why not allow the name in the name/value pairs to be unquoted identifiers

Quote names with " is a lot simpler than “You may quote names with " or ' but you don’t have to, unless they contain certain characters (or combinations of characters that would make it a keyword) and ' or " may need to be quoted depending on what delimiter you selected.

Unquoted key name problem :

It turns out ECMA Script 3 has a whack reserved word policy. Reserved words must be quoted in the key position, which is really a nuisance. When I got around to formulizing this into a standard, I didn’t want to have to put all of the reserved words in the standard, because it would look really stupid.(

NOTE : These days you can even use reserve words without quotes, you only need quotes when you have some quotes or special character.

Leave a comment

Posted by on August 8, 2015 in JavaScript


Git : Making the main branch identical to other branch

Problem : Some how your main branch got polluted (few bad commits) and you want to fix it ?

Solution : You can create a single commit that will make the current branch identical in contents (and implicitly in sync) with another branch.

Explanation : Roll back your branch to the commit you feel it was working fine and create/spun another branch off from there. Now cherry pick can be done for few good commits and new branch can be tested. Once that is fine, follow below commands which will eventually create a big merge commit to make your main (polluted branch) identical to fixed branch. The merge commit will remove all un-necessary files.

$ git reset --hard <another branch>
$ git reset --soft HEAD@{1}
$ git commit

Note : Please make sure that default rebase option is configured to false
command : git config –edit

The first (hard) reset grabs the contents of the other branch into your working directory. The second (soft) reset puts your commit pointer back at the tip of your original branch, but doesn’t change the files in your index at all, thus leaving them as they were in the other branch. You can then commit that state on top of your current branch’s latest commit.

Leave a comment

Posted by on July 29, 2015 in git


Tags: , , ,

FastStone–free windows image editor and viewer


You can download it for free from  and its has lot advance feature for free Smile ie you can capture screen shots, edit images using clone, apply frames, compare images.

Leave a comment

Posted by on July 27, 2015 in Online Tools



How to Save google Maps locations using name you want

Bookmarking or saving locations to the app is handy but who searches for their friends’ place by address? Without the ability to rename the address to something more recognizable, you’d likely forget which address is where.

However, when you search for an address or locate current location and save it to the list, you won’t be able to rename the address through the app into something more recognizable. Let’s try to fix that.

We’re going to show you how to rename saved locations for the Google Maps app for both iOS and Android users.

Saving A Location On Google Maps


Saving a landmark through the Google Maps app is great as you’ll be able to see the store name, together with the address at the bottom like what you see below.


Renaming Addresses Of Saved Locations

To rename an address, navigate on your browser Once you’ve logged in, you’ll be able to see all the locations you’ve saved through the Google Maps app.

Maps Bookmarks

Click on Edit to change the name of the address and click on Save when you’re done.



Hope you enjoyed our quick-tip of renaming bookmarked or saved locations on the Google Maps app which works for both iOS and Android users.

Leave a comment

Posted by on July 27, 2015 in Computer Tips and Tricks



How to delete git branch from origin

Deleting branch from Origin :
1. Select the branch from remote origin and do right click
2. Choose option to delete origin
3. Click ok with force delete
NOTE : Make sure pull request is merged and no other developer is using the branch you are about to delete

Delete Branch from origin

Delete Branch from origin

Leave a comment

Posted by on July 23, 2015 in git


Tags: ,

Splice to add, replace and remove javascript array

Here is working code link :

Splice is an effective way to add, replace or remove elements from specific index in Javascript Array.

Javascript array splice() method changes the content of an array, adding new elements while removing old elements.


Its syntax is as follows −

array.splice(index, howMany, [element1][, ..., elementN]);

Parameter Details

  • index − Index at which to start changing the array.
  • howMany − An integer indicating the number of old array elements to remove. IfhowMany is 0, no elements are removed.
  • element1, …, elementN − The elements to add to the array. If you don’t specify any elements, splice simply removes the elements from the array.

Return Value

Returns the extracted array based on the passed parameters.

If you specify a different number of elements to insert than the number you’re removing, the array will have a different length at the end of the call.


Using splice()

The following script illustrates the use of splice():

var myFish = ['angel', 'clown', 'mandarin', 'surgeon'];

// removes 0 elements from index 2, and inserts 'drum'
var removed = myFish.splice(2, 0, 'drum');
// myFish is ['angel', 'clown', 'drum', 'mandarin', 'surgeon']
// removed is [], no elements removed

// removes 1 element from index 3
removed = myFish.splice(3, 1);
// myFish is ['angel', 'clown', 'drum', 'surgeon']
// removed is ['mandarin']

// removes 1 element from index 2, and inserts 'trumpet'
removed = myFish.splice(2, 1, 'trumpet');
// myFish is ['angel', 'clown', 'trumpet', 'surgeon']
// removed is ['drum']

// removes 2 elements from index 0, and inserts 'parrot', 'anemone' and 'blue'
removed = myFish.splice(0, 2, 'parrot', 'anemone', 'blue');
// myFish is ['parrot', 'anemone', 'blue', 'trumpet', 'surgeon']
// removed is ['angel', 'clown']

// removes 2 elements from index 3
removed = myFish.splice(3, Number.MAX_VALUE);
// myFish is ['parrot', 'anemone', 'blue']
// removed is ['trumpet', 'surgeon']
Leave a comment

Posted by on June 26, 2015 in AngularJs, JavaScript



AngularJs : Simple CRUD application

Here is the link of working code :

In this simple angularJs application you can perform entire crud operation of the contact management application.


Leave a comment

Posted by on June 26, 2015 in Uncategorized


Get every new post delivered to your Inbox.

Join 1,185 other followers

%d bloggers like this: