[MSSQL] Concatenating Rows Values in Transact-SQL
see the “The blackbox XML methods” here : https://www.simple-talk.com/sql/t-sql-programming/concatenating-row-values-in-transact-sql/
[HowTo] Update Autogenerated values in Linq DBML
Set field properties in DBML editor : Auto-generated = true auto-sync = always More info here http://weblogs.asp.net/zeeshanhirani/…
[HowTo] disable “unknown publisher” security message on Windows Mobile device
http://xman892.blogspot.be/2007/07/visual-studio-2008-device-security.html
[Error] Please install NETCFv35.Messages.EN.wm.cab or NETCFv35.Messages.FR.wm.cab
Damn… I’ve taken some time to find a correct way to handle this… Sometimes, when debugging windows mobile applications, i got the following message : “An error message is available for this exception but cannot be displayed because these messages are optional and are not currently installed on this device. Please install ‘NETCFv35.Messages.EN.wm.cab’ for Windows […]
[How to] backup and restore Windows 8 activation
http://forums.mydigitallife.info/threads/35737-GUIDE-How-to-backup-and-restore-Windows-8-activation
[HowTo] hide control in master page (asp.net)
http://stackoverflow.com/questions/3121915/can-i-hide-a-user-control-in-a-master-page-from-a-content-page
[HowTo] Select Top x using Linq
If you wish to make such a query : Select top 10 Foo from MyTable use the .Take(x) method : var foo = (from t in MyTable select t.Foo).Take(10); In VB LINQ has a take expression: Dim foo = From t In MyTable Take 10 Select t.Foo
[HowTo] Linq Count Granchild items from an object with .SelectMany()
Lets say you have the following structure : Product -> Zone -> Category -> Item Meaning a Product has multiple Zones with multiple Categories with multiple Items Lets say we need to select the count of items for each product in a simple distinct list of product. Linq query using .SelectMany() : xyzDataContext dc = […]
[HowTo] LINQ filter : Ignore accented letters (Diacritics) in string comparison ?
Here is a small extension method that will do the job (Warning : do not use for Linq To Sql): public static string RemoveDiacritics(this string text) { string formD = text.Normalize(NormalizationForm.FormD); StringBuilder sb = new StringBuilder(); foreach (char ch in formD) { UnicodeCategory uc = CharUnicodeInfo.GetUnicodeCategory(ch); if (uc != UnicodeCategory.NonSpacingMark) { sb.Append(ch); } } return […]
[Code Sample] GetSoftwareRoot without knowing 64 or 32bit mode
In the case where you explicitly need to read a value written by a 32 bit program in a 64 bit program, it’s OK to hard code it. Simply because there really is no other option. I would of course abstract it out to a helper function. For example : private static RegistryKey GetSoftwareRoot() { […]