JavaScript Trim Prototype
Trim function prototype:
|
1 2 3 |
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,""); } |
Example:
|
1 2 |
var mystring = " hello world "; alert("[" + mystring.trim() + "]"); |
- Published in Javascript
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
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
- Published in All, HTML, Javascript
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
Using TIMESTAMP datatype to reduce database corruption
There will be times when 2 people are trying to change the same record at the same time. For example, a Human Resources Manager might want to change an Employee’s salary and an IT person might want to update the Employee’s password. This is not an uncommon problem and applications can be written to help

