Little reminder for later :
parseInt(‘’) == NaN //return false
isNaN(parseInt(‘’)) //return true
Little reminder for later :
parseInt(‘’) == NaN //return false
isNaN(parseInt(‘’)) //return true
gem “jquery-rails”
bundle install
[No text]
I need to start somewhere and while it may not be the most informative post ever, I’ll try to cover this feature as much as I can. Everything here is already described in the Rails Api so it should be a great idea to keep it as a reference. I’ll also try to add what I have learned
There are 4 methods in the sanitize helper.
Remove any html tags from your the input provided. If you truncate, you may see <a. strip_tags before you truncate.
Remove any links from your markup and return only the text of the link
GeckoFX is a component to reduce the complexity of embedding Firefox (XULRunner)onto a Windows Forms application to replace the default WebBrowser control.
But while trying to download a file though it, I have encountered this error :
XML Parsing Error: undefined entity Location: chrome://mozapps/content/downloads/unknownContentType.xul Line Number 30, Column 18: <description>&intro.label;</description
After a lot of googling I have managed to resolve this issue. This is what I have done :
If you’ve followed some tutorials you may have ended up using 1.9.0.0. Use 1.9.0.4
var profileDirectory = Application.StartupPath + @"\EmbeddedFirefoxProfile"; if (!Directory.Exists(profileDirectory)) { Directory.CreateDirectory(profileDirectory); } Skybound.Gecko.Xpcom.ProfileDirectory = profileDirectory;
This will add 2 files to the existing chrome folder.
pref("browser.download.useDownloadDir", true);
pref("browser.download.folderList", 0);
pref("browser.download.manager.showAlertOnComplete", true);
pref("browser.download.manager.showAlertInterval", 2000);
pref("browser.download.manager.retention", 2);
pref("browser.download.manager.showWhenStarting", true);
pref("browser.download.manager.useWindow", true);
pref("browser.download.manager.closeWhenDone", true);
pref("browser.download.manager.openDelay", 0);
pref("browser.download.manager.focusWhenStarting", false);
pref("browser.download.manager.flashCount", 2);
//
pref("alerts.slideIncrement", 1);
pref("alerts.slideIncrementTime", 10);
pref("alerts.totalOpenTime", 4000);
pref("alerts.height", 50);I hope it works for you. Happy GeckoFX programming!
In case you don’t know APPSUMO, subscribe to their notifications. They offers deals that are pretty hard to beat… Look at this one :
For $47 you get :
I intended to write a full series of posts to help learn Clojure. While I was really enthusiasm about this, my recent change of plans has left me no choice but to abandon the idea of mastering this language. I didn’t knew at that time that I’ll had to learn Ruby for my new project and I have no more time to learn anything else right now. So, goodbye Clojure!
I am a big fan of Evernote. I used to put everything from personal notes to ebook in it. But, it became so slow it was a pain to open it just to add a little something.
But they released version 4 with a very BIG performance improvement. I will now be able to resume my Evernote’s normal usage.
I needed to find an hosting company for our new product, and after a lot of though and hard decisions, we decided to go with Linode.
I choose a Linode 512 (with Ubuntu 10.04 LTS) because we are not ready for full-scale deployment yet and did not wanted to pay for something we will not use fully for some time. The beautiful things is that we will be able to upgrade with no problems later on.
Installing everything and got everything running in less than 2 hours. And I was pretty new to deploying a Rails application with mysql on linux.
While working on a Drupal project, I had to search for a specific string contained in one of a lots of PHP code files. My first search led me to no result. I assumed that the little something I searched for might be embedded in a dynamic web page (Drupal allows this). I spent some time searching and found nothing. Today, as I worked on another feature, I came across the exact thing I searched for. Humm what could I have done wrong?
XP has a known issue when you are searching for text contained in files. Hopefully, there is a solution: http://support.microsoft.com/default.aspx?scid=KB;EN-US;309173