Monday, October 25, 2010

Monday, October 25th 2010

Me preliminary course load for the upcoming Spring semester:


Scripting 23122 CSYS 2033-190
VB.net / ASP / SQL 22290 CSCI 2893-101
PHP Programming 23990 CSYS 2463-101
Principles of Microeconomics 21483 ECON 2023-313
Intermediate Algebra 22638 March 0123-316


I hope that none of these classes will be canceled.


Overloads Function CountFiles(ByVal minSize As Integer, ByVal maxSize As Integer) As Integer
Debug.WriteLine("You've reqested the files between " & minSize & " and " & maxSize & " bytes.")
Dim files() As String
files = System.IO.Directory.GetFiles("c:\windows")
Dim i, fileCount As Integer
For i = 0 To files.GetUpperBound(0)
Dim FI As New System.IO.FileInfo(files(i))
If FI.Length >= minSize And FI.Length <= maxSize Then
fileCount = fileCount + 1
End If
Next
Return (fileCount)
End Function

Overloads Function CountFiles(ByVal fromDate As Date, ByVal toDate As Date) As Integer
Debug.WriteLine("You've requested the count of files creadted from " & fromDate & " to " & toDate)
Dim files() As String
files = System.IO.Directory.GetFiles("C:\windows")
Dim i, fileCount As Integer
For i = 0 To files.GetUpperBound(0)
Dim FI As New System.IO.FileInfo(files(i))
If FI.CreationTime.Date >= fromDate And FI.CreationTime.Date <= toDate Then
fileCount = fileCount + 1
End If
Next
Return (fileCount)
End Function

Overloads Function CountFiles(ByVal type As String) As Integer
Debug.WriteLine("You've requested the " & type & " files")
'Function Implementation
End Function

Overloads Function CountFiles(ByVal minSize As Integer, ByVal maxSize As Integer, ByVal type As String) As Integer
Debug.WriteLine("You've requested the " & type & " files between " & minSize & " and " & maxSize & " bytes")
End Function

Overloads Function CountFiles(ByVal fromDate As Date, ByVal toDate As Date, ByVal type As String) As Integer
Debug.WriteLine("You've requested teh " & type & " files created from " & fromDate & " to " & toDate)
End Function




Try
Dim num_Items As Integer = Integer.Parse("12345678")
Catch ex As Exception
Console.WriteLine(ex.Message)

End Try





Dim a As Double = 5.687
Dim b As Int32 = 1234

Console.WriteLine(a.ToString)
Console.WriteLine(b.ToString)
Console.WriteLine(483733.2324.ToString)

Dim C As Integer
Console.WriteLine(C.GetType())
Console.WriteLine(C.GetType().ToString)

Console.ReadLine()





i = 3 Or 4
Console.WriteLine(i)
i = 2 And 4
Console.WriteLine(i)
i = 3 Xor 3
Console.WriteLine(i)
i = Not 5
Console.WriteLine(i)
Console.ReadLine()


Here is something I made about drawing lines



Dim myGraphics As Graphics
Dim myPen As Pen

Dim firstX As Integer = InputBox("Please enter the first X coordinate")
Dim firstY As Integer = InputBox("Please enter the first y coordinate")
Dim secondX As Integer = InputBox("please enter the second X coordinate")
Dim secondY As Integer = InputBox("please enter the second Y coordinate")



myGraphics = Graphics.FromHwnd(hwnd:=ActiveForm().Handle)
myPen = New Pen(Color:=Color.Blue, Width:=3)
myGraphics.DrawLine(pen:=myPen, x1:=firstX, y1:=firstY, x2:=secondX, y2:=secondY)

No comments: