Test – Code Formatting

if (! GetConsoleScreenBufferInfo(hStdout, &csbiInfo))
 puts("error geting screen buffer info");    
 return 1;                                   


Private Sub Option1_Click()
If Option1.Value = True Then
  ShortPaths = True
  ShortPaths = False
End If
End Sub


IE.navigate URL
IE.Visible = False
Do While IE.Busy Or IE.readyState <> READYSTATE_COMPLETE
‘Sanity check
    wscript.sleep 1000
    idx = idx + 1
    if idx > 3 then
        exit do
   end if


Function ValidateDomain(strRef)
dim x
ValidateDomain = false
for each x in Hosts
  if x <> "" and Instr(1, strRef, x, 1) > 0 then
    ValidateDomain = true
    exit for
  end if
End Function


:: Get the length of a string
setlocal & set TmpCnt=%*
if not defined TmpCnt (
  set StrLen=0
) else ( 
  set TmpCnt=%TmpCnt:~1%
  set /a StrLen +=1
  if defined TmpCnt goto Lenloop

 endlocal & set StrLen=%StrLen%
 goto :EOF


use Astro::Sunrise;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year += 1900;
$mon += 1;
#@array = sunrise(YYYY,MM,DD,longitude,latitude,Time Zone,DST);
@array = sunrise($year, $mon, $mday, -78.79119894, 42.91730004, -5, $isdst);
@array[0] =~ s/-//g;
@array[1] =~ s/-//g;
open(FP, "> d:/inetpub/wwwroot/Weather/SunData.txt") || die;
print FP "$mon/$mday/$year @array[0] @array[1]";
close FP;


Public Function GetPageHTML( _                        
       ByVal URL As String) As String                 
    ‘ Retrieves the HTML from the specified URL       
    Dim objWC As New System.Net.WebClient             
    Return New System.Text.UTF8Encoding().GetString( _
End Function                                          

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s