David Ansermot Web Developer / TYPO3 Integrator

14avr/110

Javascript – Test if variable is numeric

Here's a simple way to check if a variable is numeric or not in javascript

  1. function isNumeric(input) {
  2.         return (input - 0) == input && input.length > 0;
  3. }

Enjoy

23mar/110

Google Maps – Center and fit map to a group of markers

Google LogoToday I'll explain how you can center and auto zoom to the correct value your map to fit a group of markers.
Suppose that we have our map called myMap and a group of markers called markers (^.^')

2mar/110

GoogleMaps stretched icons after map resize

If, like me, you have to resize your GoogleMap on your page with javascript (nldr. without page reloading) and have your marker custom icons stretched, here's the solution I found.

After your map resize function, call this one :

  1. google.maps.event.trigger(myMap, 'resize');

Then after this, make a Zoom.

  1. myMap.setZoom(xx);

It's done, your icons are right sized.

Hope this tip was helpfull for you.

14fév/110

Google Maps – InfoWindow layout broken

If you have, like me, your infowindow right corners broken, here's my solution :

Look at your CSS for something like :

... img { max-width: 300px; }

If you find a max-width applied on your img tag, remove them and it should be ok ;)

27oct/100

A flaw allows the takeover of computers browsing with Firefox

According to a Norwegian firm security, hackers exploited a flaw in the Firefox browser to take control of computers that visit the official website of the Nobel Peace Prize.

The Mozilla Foundation has confirmed this vulnerability was rated critical. It affects versions 3.5 and 3.6 of its browser.

According to the company Norman ASA, the site of the famous Prize nobelpeaceprize.org "was first suffered an attack that has to inject an iframe pointing to a malicious server.

This server then issues a variety of exploits targeting (and first) only the Firefox browser. One of the achievements is taking control away from Firefox 3.6.11.

To force the installation of malware, attackers exploited a flaw-type "competitive situation" (in English "race condition"). Attack complex that plays on the execution order of instructions, an order which provides different results.

The malicious Windows executable that is installed and then tries to query multiple internet addresses.

If one of them meets the malware launches Shell and open the socket, and gives the attacker access to the victim's computer with the same rights as the logged user.

Mozilla provides a patch is being prepared to plug this loophole.

Meanwhile, installing NoScript extension is recommended to restrict the execution of JavaScript to trusted sites.

Many analysts see clearly the hand of Beijing in this case.

The attack came just three weeks after the Chinese dissident Liu Xiaobo (described as "criminal" by Beijing), has been crowned winner of the Nobel Peace 2010.

Sources :