Tuesday, July 1, 2008

File Upload

Label1.Text = "File Name : " & FileUpload1.FileName
Dim i As Integer = FileUpload1.PostedFile.ContentLength
Label2.Text = Math.Round(i / 1024, 2) & "KB"
FileUpload1.PostedFile.SaveAs(Server.MapPath("~/images/") & FileUpload1.FileName)

Friday, June 20, 2008

Oracle Codings

exp 80 - to export database
imp 80 - to import database

Thursday, June 19, 2008

Print first 10 prime numbers

To print first 10 Prime Number

Void main()
{
Int I, count=1;
For(i=1;i<=100;i++)
{
For(j=1;j<=I;j++)
{
If(j%2==0)
{
Continue;
}
If(j==i)
{
Cout<<”Number is prime”< Count=count+1;
}
If (count==10)
{
Break;
}
}

Lan Cable Colour Coding

1. White of Orange
2. Orange
3. White of Green
4. Blue
5. White of Blue
6. Green
7. White of Brown
8. Brown

Wednesday, April 2, 2008

making flash movie transparent

param value="transparent" name="wmode" param name="wmode" value="transparent" close tag here

Now, find the embed tag and add the following tags along with the other embed tags:
wmode="transparent"

Tuesday, April 1, 2008

changing listview according to change in treeview and listbox

ListView1.Items.Clear()
Dim a, b As String
a = ListBox1.SelectedItem
If File.Exists(TreeView1.SelectedNode.Text & "\" & a) Then
b = TreeView1.SelectedNode.Text & "\" & a
Dim y As FileInfo = New FileInfo(b)
ListView1.Items.Add(y.Length / 1024 & " KB")
ListView1.Items(0).SubItems.Add(y.CreationTime)
ListView1.Items(0).SubItems.Add(y.LastAccessTime)
ListView1.Items(0).SubItems.Add(y.IsReadOnly)
Else
ListView1.Items.Add("This is a directory")
End If

Running Any process in vb.net

Dim p As New Process
Dim pi As New ProcessStartInfo
pi.FileName = TreeView1.SelectedNode.Text & "\" & ListBox1.SelectedItem
pi.UseShellExecute = True
p.StartInfo = pi
p.Start()