July 2008 - Posts

Thank you uCertify

 Last week I passed exam 70-529. I passed with 953/1000 at first attempt. I used uCertify training kit. This training kit was really useful with a lot of questions and reviews, simulations and practices. It contains MSDN tips too. I used some other demo versions but I decided to choose and buy uCertify because it was the best one.

Thank you

Bye

Antonio

Calculate file hash

A little code snippet for calculte file hash:

 

public

string CalculateHash(string file)

{

 

 

try

{

 

 

MD5 obj = MD5.Create();

 

 

byte[] bytes;

 

 

using (FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))

{

int index = 0;

long fileLength = fs.Length;

 

 

if (fileLength > Int32.MaxValue)

 

 

throw new IOException("File too long" );

 

int count = (int)fileLength;

bytes =new byte[count];

 

 

while(count > 0)

{

 

 

int n = fs.Read(bytes, index, count);

 

 

if (n == 0)

 

 

throw new InvalidOperationException("End of file reached before expected");

index += n;

count -= n;

}

}

 

 

byte[] val = obj.ComputeHash(bytes);

 

 

ASCIIEncoding ascii = new ASCIIEncoding();

 

 

return ascii.GetString(val);

}

 

 

catch (Exception)

{

 

 

return null;

 

}

}

Bye

Antonio

Posted 17 July 2008 02:02 PM by antrad | no comments
Filed under:
Nice post about CSS and Rounded Corners

This is an useful link...I am not a great designer with web graphic :-)

Bye

Antonio

This site

Search

Go

This Blog

Syndication

Sponsors

  • MaximumASP
  • Breaking News
  • Find a Job
  • Social Bookmarking
    Tidebuy Reviews
    Online Shopping
    asp.net hosting
    UK online local dating