<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Just a little cold</title>
	<link>http://www.lewismoten.com/2006/01/just-a-little-cold.html</link>
	<description>This is just a blog (web log) about me - Lewis Moten. Read along as I talk about daily happenings, movies, opinions, programming, and more.</description>
	<pubDate>Mon, 01 Dec 2008 18:10:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Lewie</title>
		<link>http://www.lewismoten.com/2006/01/just-a-little-cold.html#comment-2274</link>
		<dc:creator>Lewie</dc:creator>
		<pubDate>Sun, 22 Jan 2006 02:20:15 +0000</pubDate>
		<guid>http://www.lewismoten.com/2006/01/just-a-little-cold.html#comment-2274</guid>
		<description>As far as the heat, we have mild winters here.  My parents had a heat pump in colder regions and it seemed to work just fine in the winter.  There is always heat outside.  The temperature would be absolute zero otherwise, and that is a rare thing to come by unless you are participating in scientific research.

I have not personally tested the upload script in Windows Server 2003.  I have had many people comming to me with problems for 2003 and it turns out that microsoft locked it down pretty heavy with the default install.  The main problem seems to be the amount of data you can upload at a time.  I don't know what problem you are having specifically.  If you don't have the latest version, then you may want to head on over to http://www.planet-source-code.com/ and search for upload files without com in the ASP section.  You should be looking for version 3.x.  People have posted comments, problems, and fixes on my code up there that could help you out as well.</description>
		<content:encoded><![CDATA[<p>As far as the heat, we have mild winters here.  My parents had a heat pump in colder regions and it seemed to work just fine in the winter.  There is always heat outside.  The temperature would be absolute zero otherwise, and that is a rare thing to come by unless you are participating in scientific research.</p>
<p>I have not personally tested the upload script in Windows Server 2003.  I have had many people comming to me with problems for 2003 and it turns out that microsoft locked it down pretty heavy with the default install.  The main problem seems to be the amount of data you can upload at a time.  I don&#8217;t know what problem you are having specifically.  If you don&#8217;t have the latest version, then you may want to head on over to <a href="http://www.planet-source-code.com/" rel="nofollow">http://www.planet-source-code.com/</a> and search for upload files without com in the ASP section.  You should be looking for version 3.x.  People have posted comments, problems, and fixes on my code up there that could help you out as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Moore</title>
		<link>http://www.lewismoten.com/2006/01/just-a-little-cold.html#comment-2272</link>
		<dc:creator>Eric Moore</dc:creator>
		<pubDate>Fri, 20 Jan 2006 16:45:15 +0000</pubDate>
		<guid>http://www.lewismoten.com/2006/01/just-a-little-cold.html#comment-2272</guid>
		<description>Hey Lewie, 

I'm not sure where you live, but I suspect if you have an oil fired furnace you live in a cold place.  From my understanding, you don't want a heat pump for a primary heat source if the temperature stays below 32 for extended periods of time.  Because a heat pump works on taking heat from the air, when it gets really cold they are not very good.  Now if you live in the South ( i.e. Texas/La/Florida ) they make a lot of sense because winters are less severe. 

Finally, I am writing to you today to ask you about some of your code. You see I'm a contractor working for a small company.  Apparently the previous web developer used one of your file upload utilities to upload files to the website here.  

About 2 weeks ago, we had a network problem.  During the night when I wasn't here, the acting manager brought in the previous web developer and they merrily updated the OS to Server 2003 / IIS 6.0.  I found this out the next morning and when I asked them why they rebuilt a webserver and updated an OS at 3:00 a.m. when they were working on a network problem? (Can you tell I'm perturbed at this point.)

They claimed they found a virus.  So I asked what virus?  Turns out the virus in ? was the Intel Nic program...

My ? I'd like to ask you is do you recognize this code and can you tell me if you've tested in 2003.   Or could you provide me any information about the code....

 ------------------------------------------------------------------------------
'	Author:		Lewis Moten
'	Email:		Lewis@Moten.com
'	URL:		http://www.lewismoten.com
'	Date:		March 19, 2002
' ------------------------------------------------------------------------------

' Field class represents interface to data passed within one field
'
' Two available methods of getting a field:
'	Set objField = objUpload.Fields("File1")
'	Set objField = objUpload("File1")
'
'
'	objField.Name
'		Name of the field as defined on the form
'
'	objFiled.Filepath
'		Path that file was sent from
'
'		ie: C:\Documents and Settings\lmoten\Desktop\Photo.gif
'
'	objField.FileDir
'		Directory that file was sent from
'
'		ie: C:\Documents and Settings\lmoten\Desktop
'
'	objField.FileExt
'		Uppercase Extension of the file
'
'		ie: GIF
'
'	objField.FileName
'		Name of the file
'
'		use: Response.AddHeader "Content-Disposition", "filename=""" &#38; objField.FileName &#38; """"
'
'		ie: Photo.gif
'
'	objField.ContentType
'		Type of binary data
'
'		use: Response.ContentType = objField.ContentType
'
'		ie: image/gif
'
'	objField.Value
'		Unicode value passed from form.  This value is empty if the field is binary data.
'
'		use: Response.Write "The value of this field is: " &#38; objField.Value
'
'	objField.BinaryData
'		Contents of files binary data. (Integer SubType Array)
'
'		use: Response.BinaryWrite objField.BinaryData
'
'	objField.BLOB
'		Same thing as BinaryData but with a shorter name.  Added to help prevent
'		confusion with database access.
'
'		use: Call lobjRs.Fields("Image").AppendChunk(objField.BLOB)
'
'	objField.Length
'		byte size of Value or BinaryData - depending on type of field
'
'		use: Response.Write "The size of this file is: " &#38; objField.Length
'
'	objField.BinaryAsText()
'		Converts binary data into unicode format.  Useful when you expect the user
'		to upload a text file and you have the need to interact with it.
'
'		use: Response.Write objField.BinaryAsText()
'
'	objField.SaveAs()
'		Saves binary data to a specified path.  This will overwrite any existing files.
'
'		use: objField.SaveAs(Server.MapPath("/Uploads/") &#38; "\" &#38; objField.FileName)
'
' ------------------------------------------------------------------------------
Class clsField
	
	Public Name				' Name of the field defined in form

	Private mstrPath		' Full path to file on visitors computer
							' C:\Documents and Settings\lmoten\Desktop\Photo.gif
	
	Public FileDir			' Directory that file existed in on visitors computer
							' C:\Documents and Settings\lmoten\Desktop

	Public FileExt			' Extension of the file
							' GIF

	Public FileName			' Name of the file
							' Photo.gif
	
	Public ContentType		' Content / Mime type of file
							' image/gif
							
	Public Value			' Unicode value of field (used for normail form fields - not files)
	
	Public BinaryData		' Binary data passed with field (for files)

	Public Length			' byte size of value or binary data

	Private mstrText		' Text buffer 
								' If text format of binary data is requested more then
								' once, this value will be read to prevent extra processing
	
' ------------------------------------------------------------------------------
	Public Property Get BLOB()
		BLOB = BinaryData
	End Property
' ------------------------------------------------------------------------------
	Public Function BinaryAsText()
		
		' Binary As Text returns the unicode equivilant of the binary data.
		' this is useful if you expect a visitor to upload a text file that
		' you will need to work with.
		
		' NOTICE:
		' NULL values will prematurely terminate your Unicode string.
		' NULLs are usually found within binary files more often then plain-text files.
		' a simple way around this may consist of replacing null values with another character
		' such as a space " "

		Dim lbinBytes
		Dim lobjRs
		
		' Don't convert binary data that does not exist
		If Length = 0 Then Exit Function
		If LenB(BinaryData) = 0 Then Exit Function
		
		' If we previously converted binary to text, return the buffered content
		If Not Len(mstrText) = 0 Then
			BinaryAsText = mstrText
			Exit Function
		End If
		
		' Convert Integer Subtype Array to Byte Subtype Array
		lbinBytes = ASCII2Bytes(BinaryData)
   		
   		' Convert Byte Subtype Array to Unicode String
   		mstrText = Bytes2Unicode(lbinBytes)
   		
   		' Return Unicode Text
    	BinaryAsText = mstrText

	End Function
' ------------------------------------------------------------------------------
	Public Sub SaveAs(ByRef pstrFileName)

		Dim lobjStream
		Dim lobjRs
		Dim lbinBytes
		
		' Don't save files that do not posess binary data
		If Length = 0 Then Exit Sub
		If LenB(BinaryData) = 0 Then Exit Sub
		
		' Create magical objects from never never land
		Set lobjStream = Server.CreateObject("ADODB.Stream")
		
		' Let stream know we are working with binary data
		lobjStream.Type = adTypeBinary
		
		' Open stream
		Call lobjStream.Open()

		' Convert Integer Subtype Array to Byte Subtype Array
		lbinBytes = ASCII2Bytes(BinaryData)
		
		' Write binary data to stream
		Call lobjStream.Write(lbinBytes)
		
		' Save the binary data to file system
		'	Overwrites file if previously exists!
		Call lobjStream.SaveToFile(pstrFileName, adSaveCreateOverWrite)
		
		' Close the stream object
		Call lobjStream.Close()
		
		' Release objects
		Set lobjStream = Nothing
	
	End Sub</description>
		<content:encoded><![CDATA[<p>Hey Lewie, </p>
<p>I&#8217;m not sure where you live, but I suspect if you have an oil fired furnace you live in a cold place.  From my understanding, you don&#8217;t want a heat pump for a primary heat source if the temperature stays below 32 for extended periods of time.  Because a heat pump works on taking heat from the air, when it gets really cold they are not very good.  Now if you live in the South ( i.e. Texas/La/Florida ) they make a lot of sense because winters are less severe. </p>
<p>Finally, I am writing to you today to ask you about some of your code. You see I&#8217;m a contractor working for a small company.  Apparently the previous web developer used one of your file upload utilities to upload files to the website here.  </p>
<p>About 2 weeks ago, we had a network problem.  During the night when I wasn&#8217;t here, the acting manager brought in the previous web developer and they merrily updated the OS to Server 2003 / IIS 6.0.  I found this out the next morning and when I asked them why they rebuilt a webserver and updated an OS at 3:00 a.m. when they were working on a network problem? (Can you tell I&#8217;m perturbed at this point.)</p>
<p>They claimed they found a virus.  So I asked what virus?  Turns out the virus in ? was the Intel Nic program&#8230;</p>
<p>My ? I&#8217;d like to ask you is do you recognize this code and can you tell me if you&#8217;ve tested in 2003.   Or could you provide me any information about the code&#8230;.</p>
<p> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
&#8216;	Author:		Lewis Moten<br />
&#8216;	Email:		<a href="mailto:Lewis@Moten.com">Lewis@Moten.com</a><br />
&#8216;	URL:		<a href="http://www.lewismoten.com" rel="nofollow">http://www.lewismoten.com</a><br />
&#8216;	Date:		March 19, 2002<br />
&#8216; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>&#8216; Field class represents interface to data passed within one field<br />
&#8216;<br />
&#8216; Two available methods of getting a field:<br />
&#8216;	Set objField = objUpload.Fields(&#8221;File1&#8243;)<br />
&#8216;	Set objField = objUpload(&#8221;File1&#8243;)<br />
&#8216;<br />
&#8216;<br />
&#8216;	objField.Name<br />
&#8216;		Name of the field as defined on the form<br />
&#8216;<br />
&#8216;	objFiled.Filepath<br />
&#8216;		Path that file was sent from<br />
&#8216;<br />
&#8216;		ie: C:\Documents and Settings\lmoten\Desktop\Photo.gif<br />
&#8216;<br />
&#8216;	objField.FileDir<br />
&#8216;		Directory that file was sent from<br />
&#8216;<br />
&#8216;		ie: C:\Documents and Settings\lmoten\Desktop<br />
&#8216;<br />
&#8216;	objField.FileExt<br />
&#8216;		Uppercase Extension of the file<br />
&#8216;<br />
&#8216;		ie: GIF<br />
&#8216;<br />
&#8216;	objField.FileName<br />
&#8216;		Name of the file<br />
&#8216;<br />
&#8216;		use: Response.AddHeader &#8220;Content-Disposition&#8221;, &#8220;filename=&#8221;"&#8221; &amp; objField.FileName &amp; &#8220;&#8221;"&#8221;<br />
&#8216;<br />
&#8216;		ie: Photo.gif<br />
&#8216;<br />
&#8216;	objField.ContentType<br />
&#8216;		Type of binary data<br />
&#8216;<br />
&#8216;		use: Response.ContentType = objField.ContentType<br />
&#8216;<br />
&#8216;		ie: image/gif<br />
&#8216;<br />
&#8216;	objField.Value<br />
&#8216;		Unicode value passed from form.  This value is empty if the field is binary data.<br />
&#8216;<br />
&#8216;		use: Response.Write &#8220;The value of this field is: &#8221; &amp; objField.Value<br />
&#8216;<br />
&#8216;	objField.BinaryData<br />
&#8216;		Contents of files binary data. (Integer SubType Array)<br />
&#8216;<br />
&#8216;		use: Response.BinaryWrite objField.BinaryData<br />
&#8216;<br />
&#8216;	objField.BLOB<br />
&#8216;		Same thing as BinaryData but with a shorter name.  Added to help prevent<br />
&#8216;		confusion with database access.<br />
&#8216;<br />
&#8216;		use: Call lobjRs.Fields(&#8221;Image&#8221;).AppendChunk(objField.BLOB)<br />
&#8216;<br />
&#8216;	objField.Length<br />
&#8216;		byte size of Value or BinaryData - depending on type of field<br />
&#8216;<br />
&#8216;		use: Response.Write &#8220;The size of this file is: &#8221; &amp; objField.Length<br />
&#8216;<br />
&#8216;	objField.BinaryAsText()<br />
&#8216;		Converts binary data into unicode format.  Useful when you expect the user<br />
&#8216;		to upload a text file and you have the need to interact with it.<br />
&#8216;<br />
&#8216;		use: Response.Write objField.BinaryAsText()<br />
&#8216;<br />
&#8216;	objField.SaveAs()<br />
&#8216;		Saves binary data to a specified path.  This will overwrite any existing files.<br />
&#8216;<br />
&#8216;		use: objField.SaveAs(Server.MapPath(&#8221;/Uploads/&#8221;) &amp; &#8220;\&#8221; &amp; objField.FileName)<br />
&#8216;<br />
&#8216; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Class clsField</p>
<p>	Public Name				&#8216; Name of the field defined in form</p>
<p>	Private mstrPath		&#8216; Full path to file on visitors computer<br />
							&#8216; C:\Documents and Settings\lmoten\Desktop\Photo.gif</p>
<p>	Public FileDir			&#8216; Directory that file existed in on visitors computer<br />
							&#8216; C:\Documents and Settings\lmoten\Desktop</p>
<p>	Public FileExt			&#8216; Extension of the file<br />
							&#8216; GIF</p>
<p>	Public FileName			&#8216; Name of the file<br />
							&#8216; Photo.gif</p>
<p>	Public ContentType		&#8216; Content / Mime type of file<br />
							&#8216; image/gif</p>
<p>	Public Value			&#8216; Unicode value of field (used for normail form fields - not files)</p>
<p>	Public BinaryData		&#8216; Binary data passed with field (for files)</p>
<p>	Public Length			&#8216; byte size of value or binary data</p>
<p>	Private mstrText		&#8216; Text buffer<br />
								&#8216; If text format of binary data is requested more then<br />
								&#8216; once, this value will be read to prevent extra processing</p>
<p>&#8216; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
	Public Property Get BLOB()<br />
		BLOB = BinaryData<br />
	End Property<br />
&#8216; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
	Public Function BinaryAsText()</p>
<p>		&#8216; Binary As Text returns the unicode equivilant of the binary data.<br />
		&#8216; this is useful if you expect a visitor to upload a text file that<br />
		&#8216; you will need to work with.</p>
<p>		&#8216; NOTICE:<br />
		&#8216; NULL values will prematurely terminate your Unicode string.<br />
		&#8216; NULLs are usually found within binary files more often then plain-text files.<br />
		&#8216; a simple way around this may consist of replacing null values with another character<br />
		&#8216; such as a space &#8221; &#8221;</p>
<p>		Dim lbinBytes<br />
		Dim lobjRs</p>
<p>		&#8216; Don&#8217;t convert binary data that does not exist<br />
		If Length = 0 Then Exit Function<br />
		If LenB(BinaryData) = 0 Then Exit Function</p>
<p>		&#8216; If we previously converted binary to text, return the buffered content<br />
		If Not Len(mstrText) = 0 Then<br />
			BinaryAsText = mstrText<br />
			Exit Function<br />
		End If</p>
<p>		&#8216; Convert Integer Subtype Array to Byte Subtype Array<br />
		lbinBytes = ASCII2Bytes(BinaryData)</p>
<p>   		&#8216; Convert Byte Subtype Array to Unicode String<br />
   		mstrText = Bytes2Unicode(lbinBytes)</p>
<p>   		&#8216; Return Unicode Text<br />
    	BinaryAsText = mstrText</p>
<p>	End Function<br />
&#8216; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
	Public Sub SaveAs(ByRef pstrFileName)</p>
<p>		Dim lobjStream<br />
		Dim lobjRs<br />
		Dim lbinBytes</p>
<p>		&#8216; Don&#8217;t save files that do not posess binary data<br />
		If Length = 0 Then Exit Sub<br />
		If LenB(BinaryData) = 0 Then Exit Sub</p>
<p>		&#8216; Create magical objects from never never land<br />
		Set lobjStream = Server.CreateObject(&#8221;ADODB.Stream&#8221;)</p>
<p>		&#8216; Let stream know we are working with binary data<br />
		lobjStream.Type = adTypeBinary</p>
<p>		&#8216; Open stream<br />
		Call lobjStream.Open()</p>
<p>		&#8216; Convert Integer Subtype Array to Byte Subtype Array<br />
		lbinBytes = ASCII2Bytes(BinaryData)</p>
<p>		&#8216; Write binary data to stream<br />
		Call lobjStream.Write(lbinBytes)</p>
<p>		&#8216; Save the binary data to file system<br />
		&#8216;	Overwrites file if previously exists!<br />
		Call lobjStream.SaveToFile(pstrFileName, adSaveCreateOverWrite)</p>
<p>		&#8216; Close the stream object<br />
		Call lobjStream.Close()</p>
<p>		&#8216; Release objects<br />
		Set lobjStream = Nothing</p>
<p>	End Sub</p>
]]></content:encoded>
	</item>
</channel>
</rss>
