Archive for the 'Misc' Category
Eclipse Indigo hangs on splash screen workspace
Thursday, December 15th, 2011
So today I came in to work and saw that my wonderful windows machine was restarted due to Windows Update, and yesterday I was working on some java stuff and did not close out my eclipse, thank god that I do regular code check-in Anyways tried to relaunch eclipse and it kept hanging on workspace. [...]
NET 4, VS2010 install fails on XP SP3 machine “Fatal error during installation”
Tuesday, April 12th, 2011
So I had this issue at work had to install on xp machine, dont ask why but just had to Thus I was stuck installing vs2010, I went and downloaded .net 4 standalone And was having the same issues. And went through the logs and found the error message was due a registry key (aren’t [...]
Operator ‘==’ cannot be applied to operands of type ‘System.Collections.Generic.KeyValuePair‘ and ‘‘
Monday, November 29th, 2010
So if you wish to do something like this to KeyValuePair using Linq ?View Code CSHARP1 2 3 4 5 6 var item = myDictionary.FirstOrDefault(x => x.Key == 123); if(item != null) { //blah blah } You will get this error Operator ‘!=’ cannot be applied to operands of type ‘System.Collections.Generic.KeyValuePair‘ and ‘‘ Since [...]
Back from Holidays
Tuesday, November 2nd, 2010
So haven’t posted for a while, was in home city Hong Kong for holidays and busy with work releasing software, gonna be posting a few more things coming up this month so be tuned in
Linq: Sequence contains no matching element
Friday, March 26th, 2010
So sometimes you will get these strange errors or exceptions when using linq. For example if you use ?View Code CSHARP1 var result = myEnumerableCollection.First(x => x.Name == person.Name); This will throw InvalidOperationException with Sequence contains no matching element. But if you use ?View Code CSHARP1 2 3 var result = myEnumerableCollection.FirstOrDefault(x => x.Name == [...]
Learn to use PowerShell to extract data from RSS
Wednesday, October 21st, 2009
Currently I am doing some performance testing on our application and part of it is seeing how well do we handle “insert” in our application. (Are there any problems etc, how many can it handle, etc) I am using JMeter to test the performance and it is quite a flexible product that I will talk [...]
Safe Base64 Url in ASP .NET
Monday, September 28th, 2009
So came into a problem of url encoding in IIS 7 where it does not like “+”, “/” in the Url. Basically a Url that looks like of like this http://fake.abc/TIRlcEq0umjO6uJqtqvnkUGntUzv19rK+8mcvPK5qL1bwEZtEUqTlc3iF/TomuXU746Il5IF2iN9SeYuYDqt6SQzfdrv+Ltug2KZteKlYawc= I know you may say what is this??? Its actually some kind of encrypted data that is in base64, but since IIS 7 does [...]
Cannot find SQL Management Studio after install of SQL2005
Monday, September 21st, 2009
So was just in the process of installing SQL2005 on one of our VM to test some stuff. Guess what install went great with Client Tools selected, but unfortunately SQL Management Studio doesn’t get installed??? Why ohhh why? So anyways, the solution is quite simple don’t use the installer again, simply go into the CD [...]
Be like Sylar my friend (A developer’s perspective)
Monday, August 3rd, 2009
So there is this character (antagonist) in this TV series “Heroes”, and his name is Sylar People might also know him from the new Star Trek movie, where he plays the young Spock. Anyways, back to the Sylar character, in the show he plays a serial killer who kills people with ability (e.g flying, shooting [...]
Law of Demeter (Principle of Least Knowledge)
Friday, April 3rd, 2009
The Law of Demeter (LoD), or Principle of Least Knowledge, is a design guideline for developing software, particularly object-oriented programs. (wikipedia) While everyday working on code that was written by lazy coders or junior coders I see a lot of violation of this law. I think every programmer should know the Law of Demeter by [...]
