How can I generate random alphanumeric strings?

I heard LINQ is the new black, so here’s my attempt using LINQ: (Note: The use of the Random class makes this unsuitable for anything security related, such as creating passwords or tokens. Use the RNGCryptoServiceProvider class if you need a strong random number generator.)

Is it possible to install a C# compiler without Visual Studio?

Sure, the framework includes a compiler, csc.exe. Look at this article for a quick how-to. The important parts: You can get the command-line compiler (csc.exe) from Microsoft site http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx. Download the redistributable package of the .NET Framework, which includes the compiler and the .NET Framework with C# 2005 syntax support. The compiler is located in the following directory: … Read more

Unity – How to stop Play Mode in case of infinite loop?

I just got into this situation: accidental infinite loop, stuck in play mode on a scene with unsaved work, Unity unresponsive. But I was lucky enough to have Monodevelop open, even though I was mainly using Sublime for scripting. I pressed the button to start debugging near the top left of the Monodevelop window, then … Read more

Remove punctuation from string with Regex

First, please read here for information on regular expressions. It’s worth learning. You can use this: Which means: In the end it reads “replace any character that is not a word character or a space character with nothing.”

Format of the initialization string does not conform to specification starting at index 0

228 Check your connection string. If you need help with it check Connection Strings, which has a list of commonly used ones. Commonly used Connection Strings: SQL Server 2012 Standard Security Trusted Connection Connection to a SQL Server instance The server/instance name syntax used in the server option is the same for all SQL Server connection … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)