June 11, 2008
The following code returns a random number between min and max:
private int RandomNumber(int min, int max)
{
Random random = new Random();
return random.Next(min, max);
}
At some point, you may also want to generate random strings.
///
/// Generates a random string with the given length
///
///
Size of the string
///
If [...]
Filed by Paul Gu at June 11th, 2008 under Programming
No comments on this post yet
May 26, 2008
Is it impossible to shrink the Trucated Log file?
Yes, following code always shrinks the Trucated Log File to minimum size possible.
1) Replace DatabaseName with your database name
2) Replace TransactionLogName to database log name
USE DatabaseName
GO
DBCC SHRINKFILE(TransactionLogName, 1)
BACKUP LOG DatabaseName WITH TRUNCATE_ONLY
DBCC SHRINKFILE(TransactionLogName, 1)
GO
Is is simple?
Filed by Paul Gu at May 26th, 2008 under Database
No comments on this post yet
January 24, 2008
When do query page in ASP.NET, the special characters(é,ç,ë etc.,) are comming as ??…
The Response contains both ASCII and non-ASCII characters…
This might be a consequence of the proxy class they generated. It should be able to set the HTTPContentType to “text/xml;charset=utf-8″. This is the header that ‘packs’ the soap, since it is handled by the [...]
Filed by Paul Gu at January 24th, 2008 under Dot Net
No comments on this post yet
January 22, 2008
By Mark Russinovich
DebugView is an application that lets you monitor debug output on your local system, or any computer on the network that you can reach via TCP/IP. It is capable of displaying both kernel-mode and Win32 debug output, so you don’t need a debugger to catch the debug output your applications or device drivers [...]
Filed by Paul Gu at January 22nd, 2008 under Dot Net
No comments on this post yet
“I see stuff like ”zz” passed into DateTime.ToString(). What exactly does that do?” — Very Confused DateTime String Formatter
DateTime has its own set format string modifiers because there are so many ways to display a date and time. There are 2 things that affects how your DateTime is formatted.
1. CultureInfo
Besides the format string modifiers, CultureInfo on your [...]
Filed by Paul Gu at January 22nd, 2008 under Blogroll
1 person have commented this post