0

Iterating through Enums

Posted by Tim on November 27, 2009 in .NET Framework

Here is how you iterate through a set of Enum items: For Each thisItem As Integer In System.Enum.GetValues(GetType(ENumName)) ‘Do processing here Next System.Enum.GetNames is also available References: http://msdn.microsoft.com/en-us/library/58hssdz9%28VS.80%29.aspx

Tags:

 
0

Finding the Length of an Image Field in SQL Server

Posted by Tim on November 19, 2009 in SQL Server

Problem: I need to know the size in bytes of an image stored in an Image field in SQL Server Solution: SELECT DATALENGTH(column) FROM table

Tags:

 
0

DateTime.ToString()

Posted by Tim on November 5, 2009 in .NET Framework, ASP.NET

Here is a link that is useful as a reference for DateTime.ToString patterns References: http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm

Tags: ,

 
1

Blocking IP Addresses on Linux Server

Posted by Tim on November 4, 2009 in Open Source, Uncategorized

Had some suspect IP addresses trying to attempt to login via the admin user in Moodle. Best thing to do is block the IP address to the server or even better the IP range (after doing a IP lookup to see where the IP address came from). References: http://www.cyberciti.biz/faq/how-do-i-block-an-ip-on-my-linux-server/

Tags: ,

Copyright © 2008-2012 Codelab Blog All rights reserved.
Desk Mess Mirrored version 1.9.1 theme from BuyNowShop.com.