Thursday, November 12, 2015

Friday, October 30, 2015

Remove duplicate objects in an array of object in JavaScript

function remove_duplicates(objectsArray) {
    var usedObjects = {};

    for (var i=objectsArray.length - 1;i>=0;i--) {
        var so = JSON.stringify(objectsArray[i]);

        if (usedObjects[so]) {
            objectsArray.splice(i, 1);

        } else {
            usedObjects[so] = true;          
        }
    }

    return objectsArray;

}

Monday, September 28, 2015

telrik kendo grid edit command event javascript

 command: [{ name: "edit", text: "edit", click: myFunction }, "destroy"],

function myFunction(e) {
    alert("deleted pressed!");
}

Start Task Scheduler

To Run Task Scheduler using the Windows interface

  1. Click the Start button.
  2. Click Control Panel .
  3. Click System and Maintenance .
  4. Click Administrative Tools .
  5. Double-click Task Scheduler .

To Run Task Scheduler from the Command Line

  1. Open a command prompt. To open a command prompt, click Start , click All Programs , click Accessories , and then click Command Prompt .
  2. At the command prompt, type Taskschd.msc .

SQL alter table modify column

ALTER TABLE Persons
ALTER COLUMN DateOfBirth year