Plurals in Rails model associations

Remember: with has_many, use:

has_many :comments
With has_one, use:
has_one :comment
Kind of duh, but things really break if you don’t do this. It’s a great way to get NameError: uninitialized constant errors with :through, for one.

Easily create a cryptographic MD5 hash in VB.NET

Theoretically, this works.

Imports System.Text
Imports System.Security.Cryptography Private Function GenerateHash(ByVal SourceText As String) As String
'Create an encoding object to ensure the encoding standard for the source text
Dim Ue As New UnicodeEncoding()
'Retrieve a byte array based on the source text
Dim ByteSourceText() As Byte = Ue.GetBytes(SourceTStext)
'Instantiate an MD5 Provider object
Dim Md5 As New MD5CryptoServiceProvider()
'Compute the hash value from the source
Dim ByteHash() As Byte = Md5.ComputeHash(ByteSourceText)
'And convert it to String format for return
Return Convert.ToBase64String(ByteHash)
End Function