Joined September 2011
·
000f45b685d4d6ff1a171676512c382e

Pavel

Ruby developer at Veritrans
Ruby developer
Veritrans
·
Jakarta, Indonesia
·
·

Posted to Postgres common commands over 1 year ago

\? - to see help

There is a difference between for and forEach. for will local reassign variable for every run, while forEach will create new variable. Example:

var links = document.getElementsByTagName('a');
for(var i = 0; i < links.length; i++) {
  var element = links[i];
  element.addEventListener('click', function () {
    alert(element.innerText); // you think it will be element you clicked on? It will be last element in array
  });
}

I find this useful for me:

ObjectKit.forEach = function Object_forEach (object, callback) {
  for (var key in object) {
    if (object.hasOwnProperty(key)) callback(key, object[key]);
  }
};
Posted to Continuous testing for D over 1 year ago
Posted to iTunes 12 blue icon over 1 year ago

Thank you for link. It's almost same with manual I mentioned, paste image in "get info" window. For me it worked only if I open icon in preview.app and copy image (not a file)

Achievements
191 Karma
16,019 Total ProTip Views