A simple HTMLHelper for displaying Gravatars

by Milad 2. November 2009 20:44

Practically, The whole world knows about Gravatar(Globally Recognized Avatar).
I wanted to use this awesome service in one of my ASP.NET MVC applications, So I went to it’s documentation to see what should I do. [Well there is a great HTMLHelper in order to perform this, but I have a point!]

The big thing in constructing a Gravatar URL is how to get a string’s hexadecimal MD5 Hash. [as you may or may not know, you can do lots of stuff with MD5 Hash of anything!]
So … This is the answer to this question:

Function GetHash(ByVal text As String) As String
        Dim myhash As MD5CryptoServiceProvider = New MD5CryptoServiceProvider()

        Dim hashed = _
            myhash.ComputeHash(System.Text.UTF8Encoding.UTF8.GetBytes(text))

        Dim sb As StringBuilder = New StringBuilder()

        For Each b In hashed
            sb.Append(b.ToString("x2"))
        Next

        Return sb.ToString()
End Function

Tags: , , ,

ASP.net | Computer | Internet | Programming

Anti Spam

by MiladKDZ 26. September 2009 11:44

This Blog is now Protected with Akismet Anti Comment Spam System. [as I think Keyvan's weagis is down.]

Thanks to CodeThinked for Aksimet BlogEngine.net Extension.

Tags: ,

BlogEngine.NET | Internet

To share an interesting experience!

by MiladKDZ 25. May 2008 09:25

When I bought my Qtek S200(HTC Prophet), It came with a simple WM5.0 ROM. I wasn't thinking of upgrading the ROM for many reasons(for example I had lots of Short Messages that I wanted to keep, and I wasn't sure that my Contacts would Sync this easy!) plus that the upgrading guide on XDA-Developers website was so confusing and I wasn't sure I can make it!

Yesterday when I was checking out XDA-Developers website looking for a way to overclock my CPU, I saw this new method for upgrading and flashing Prophet(Qtek S200) ROM.

I checked out ROM List for my device and I chose Cloudyfa's [wm6.1]Prophet ShadoW 2.0 Touch Edition . (I also downloaded [wm6.1]Prophet S4V.19701.01 (UC))

I backed up all of my stuff(using a bunch of tools like Jayo Mobile Extender) and I flashed my ROM. This ROM is so gorgeous and has no stupid bugs like the original shipped one! Cloudyfa is the best I think ;)

Now I have WM6.1 on Qtek S200! ;)

PS: Here are some useful links about prophet:

Prophet Wiki on XDA-Developers

How to dump ROM and restore

Complete Overclock Guide for Prophet and also [I Overclocked up to 228MHz and my device was stable with both Originally shipped ROM and ShadoW one.]

Tags: , , ,

Computer | Internet | PPCPE | Windows Mobile

Fibonacci

by MiladKDZ 11. May 2008 20:00

فیبوناچی بازرگان هم بوده!

علم یا ثروت؟!

Tags: , , ,

General | Personal | Language: Persian | Internet

Old Google!

by MiladKDZ 30. January 2008 01:11

Look and Look!

There are awesome things on this website! Check it out ;)

Tags: ,

Daily Link | Internet

Public Function myNetSurf() as InternetAdress

by MiladKDZ 13. January 2008 11:18

' Link to a free game offer by VALVE!

Dim myObj as new InternetAdress _
("http://digg.com/pc_games/A_free_sampler_of_Portal_for_NVIDIA_GeForce_owners")

myObj.WTF = "a free game offer by VALVE!"

Return myObj

End Function

If you r not a VB fan, just clicking on the link would take you to the offer page! ;) 

Tags: , , ,

General | Daily Link | Internet | PC Game

Top 100 Funny Quotes

by MiladKDZ 10. January 2008 18:40

Must be checked out!

PS: Is man one of God’s blunders? Or is God one of man’s blunders?

Tags: , , ,

General | Personal | Daily Link | Internet