Monthly Archives: September 2011

How Can I Use a LINQ Lambda Expression With Distinct()?

Contrary to what most of other LINQ extension methods provide when dealing with collections of objects, the Distinct() method takes in an object of a class that implements IEqualityComparer<T> interface. When selecting distinct objects, you probably are thinking about having … Read More »»»

Posted in C#, LINQ | Tagged , , , , , , | Leave a comment

How to Insert Multiple Rows at Once in T-SQL

Sometimes you want a statement that will insert multiple rows in a table all at once. It’s easy to do with MySQL, but here comes T-SQL – how do I do this? There are a number of ways to do … Read More »»»

Posted in MSSQL | Tagged , , , , , | Leave a comment

Using HTML5 Web Workers to Create Dedicated Threads in Javascript

What are Web Workers in HTML5? Web Workers are new feature in HTML5 allowing you to launch background threads in Javascript, a very useful feature if you need to perform some CPU intensive tasks. Normally, Javascript will execute all the … Read More »»»

Posted in HTML5 | Tagged , , , , , , , , , , | 2 Comments

How to Determine If Caps Lock is On With Javascript

A nice nifty feature you can add to your web login page or maybe somewhere where entering information is case-sensitive is to hint the user if the Caps Lock key is on. While there is no way to capture the … Read More »»»

Posted in Javascript | Tagged , , , , , | Leave a comment

Using HTML5 Canvas to Draw Simple Shapes

You should now have an understanding of what a <canvas> tag is in HTML5. So, let’s start with drawing some simple shapes. Whenever you need to draw on your canvas, you need to obtain the canvas context first. The context … Read More »»»

Posted in HTML5 | Tagged , , , , , , , , , , , | Leave a comment

What is the Difference Between Canvas and Svg Tags and Which One Should I Use?

The two new tags introduced in HTML5 are <canvas> and <svg>, the latter standing for Scalable Vector Graphics. They both can allow you to create rich graphics on the page but what is the difference between them and which one … Read More »»»

Posted in HTML5 | Tagged , , , , , , , , | 1 Comment