In JavaScript I want to change some formatted numbers to a regular number. The code might be look like that: var aNb=[ 1500, “1,500”, “15,00”, “1,500,000”, “1,500,000.25”, “1000.25”, “1 000 000”]; for (var i=0; i < aNb.length; i++) { var nb = aNb[i] + “”; if (nb.split(“,”).length <= 2) nb = nb.replace(/,(\d{2})$/,”.$1″); nb = nb.replace(/[^\d\.\-]/g, […]
Month: October 2015
Force CORS headers in Firefox to allow cross domain calls
This guy created a Firefox extension to force the CORS (access-control) headers from a call. This is very useful when you want to do a JavaScript/AJAX query over another website that doesn’t allow the cross domain calls. His code is on github. I’ve the XPI compiled version on my blog (into a ZIP file) found […]
Sharepoint Workflow: Check if a field is empty [Sharepoint 2010]
The Sharepoint workflows are powerful but sometimes stupid… If you want to: Check if a Date Field is empty, then you can use a String Workflow Variable that contains your Date Field as a Short Date (SP2013) (or a String for SP2010), and then compare it to “1/1/0001” (or “1/1/0001 12:00:00 AM” for SP2010) Check […]
“class-phpmailer out of memory using GuiForm” avec WordPress
Ayant un WordPress sur 1and1 j’ai été confronté à un “out of memory” sur le fichier class-phpmailer.php à cause d’un appel AJAX d’un formulaire créé avec GuiForm. Je ne peux pas faire grand chose côté serveur à cause de l’hébergement partagé… Donc j’ai fouillé comment contourner le problème. Il va s’agir de modifier le fichier […]