magnify
magnify
category

Insert and delete items in a JavaScript array

Published on August 21, 2013 by in JavaScript

It is a common idea that arrays in Javascript are not as flexible as they figure. Javascript arrays and insertion There are dedicating functions to insert items at the beginning (unshift) or at the end (push) of a javascript array, but it seems to not be possible to insert, it only seems… Array.prototype.unshift doc Unshift

Read More…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
category

“For in” Trouble

Published on August 15, 2013 by in JavaScript

I saw a lot of time developers using “for in” instead of “for (i = 0; i < list.length; i++)" just because it's shorter. It's a big mistake because, when you use "for in" pattern, you have to check if the key is a own property of the object, else you're going to have big

Read More…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
category

CSS property: text-overflow: ellipsis

Published on April 16, 2013 by in CSS

When needing a web feature, my first reflex is to play with javascript. Today i needed to limit the width of a text by replacing the hidden part by “…”. After Googling 2 minutes, imagine my surprise to discover the property “text-overflow” and worst it exists since IE 6.0 and Firefox 7.0, 🙂 a huge

Read More…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
category

log “alert” messages to console

Published on March 21, 2013 by in JavaScript

Today, i’m playing with the jPlayer. It’s an amazing tool to play audio and video, but the only way to get debug messages is by using the classic alert messages: $("#jp").jPlayer({ errorAlerts: true, warningAlerts: true, … which is not fluid and quite boring, so, i decided to try to log these messages, replacing the window.alert

Read More…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
category

Installing the webcam Logitech c210 on Debian

Published on January 28, 2013 by in Debian

Even if their product are really good, Logitech never wanted to publish drivers on Linux 🙁 I hope the rise of gaming on Linux (Steam is now on Linux) will force them to change their mind. By the way, after googling and testing few drivers which fails because i’m on the latest kernel, I finally

Read More…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
category

jQuery 1.9.0 and $.browser

Published on January 21, 2013 by in jQuery

Version 1.9.0 has been released last week and its changelog is available right here. Removing the deprecated stuff is always good, at least once every 2 or 3 years. For me, it’s a good thing to force developers to update their code with this frequency. After having a quick overview of this released, i had

Read More…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
category

wget anonym: set a user agent and a referer

Published on December 23, 2012 by in Debian

Set a user agent and a referer to wget to make it anonym and bypass some security check.

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
category

jQuery plugin to use document fragments

Published on December 12, 2012 by in jQuery

jQuery plugin to use document fragments.

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
category

jQuery tips – Propagate an event to a child avoiding infinite loops

Published on December 11, 2012 by in jQuery

Detect the source of an event and propagate it to a child avoiding the potential infinity loop.

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
category

SVN to GIT

Published on November 25, 2012 by in Tools

Import a SVN repository to GIT in 5 command lines.

 
Tags: ,
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments