Software development blog, from beginner to advanced
JavaScript Trim Prototype

Trim function prototype: JavaScript String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,""); } 123 String.prototype.trim = function() {  return this.replace(/^\s+|\s+$/g,"");} Example: JavaScript var mystring = " hello world "; alert("[" + mystring.trim() + "]"); 12 var mystring = " hello world ";alert("[" + mystring.trim() + "]");  

read more
Why LINQ beats SQL

If you’re not a LINQ addict, you might wonder what the fuss is about. SQL isn’t broken, so why fix it? Why do we need another querying language? The popular answer is that LINQ is INtegrated with C# (or VB), thereby eliminating the impedance mismatch between programming languages and databases, as well as providing a single…

read more
IndexedDB – The Database in Your Browser

Introduction IndexedDB is new in HTML5. Web Databases are hosted and persisted inside a user’s browser. By allowing developers to create applications with rich query abilities it is envisioned that a new breed of web applications will emerge that have the ability to work online and off-line. The example code in this article demonstrates how…

read more
SQL SERVER – Update Lock vs Exclusive Lock

Exclusive (X) Used for data-modification operations, such as INSERT, UPDATE, or DELETE. Ensures that multiple updates cannot be made to the same resource at the same time. An exclusive lock allows only one user/connection to update a particular piece of data (insert, update, and delete). When one user has an exclusive lock on a row…

read more