-
NPM not working after installing yarn – MacOS Sierra
I was getting the following error when trying to use NPM after installing yarn. To fix this need to reinstate npm with yarn. Following command will do the trick. yarn global add npm
-
Regular Expressions – validating the Email
How to validate an email address with following rules using regular expressions? There should one @ sign in the email address. The email should start with a letter and can include letters and numbers and underscore symbol _ . This constitutes the left hand side of the email from the @ sign. Right hand side…
-
Invoicer by Suren Dias – Free invoicing tool for freelancers
HI I created this free invoicing tool aimed at freelancers. Its currently at a very early stage. Can only create pdf invoice at the moment from the data that user enters. Tool – http://invoicer.surendias.com/ Source – https://github.com/surendias/Invoicer
-
Regular Expression – Javascript- To check filename to see if alpha numeric characters
Ok here is a quick regular expression to check if a file name only contains alpha numeric characters also we need to allow the period sign. /^[0-9a-zA-Z\.]*$/ This allows numbers, letters and the period symbol. The full code, var filename = fullfilepath.replace(/^.*[\\\/]/, ”); // this is to get only the file name, file upload field…
-
Allow only Numbers and Decimals in a text box
To allow only Numbers and Decimals in Text boxes you can use the following JavaScript code, <SCRIPT language=Javascript> <!– function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : event.keyCode; if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57)) return false; return true; } //–> </SCRIPT> And at the Text…
-
Embedding Fonts Different Methods
If your a front end web developer you might have received a design of a website that has some uncommon font. Normally fonts like Arial, Times New Roman are commonly present in all browsers/Operating systems, that websites designed with those fonts are rendered more or less same in all browsers. But for websites that has…
-
WordPress Tabs and Slides Plugin Customization
Hi Guys after a long time 🙂 I got a project that required to have a tabbed layout on its pages. This was easily achievable with numerous plugins out there. I did some research and decided to use “WordPress Tabs Slides” Plugin. After customizing it according to the customers need I realized that the url…
-
Regular Expressions – validating the NIC number
Regular expressions!!! kind of a scary thing for most developers.. 🙂 Well it is scary because its not something that is really user friendly for developers, its a combination of letters, special characters and numbers that kind of make our eyes go the wrong way when we look at them. Well I normally don’t like to use…
-
Jquery Fancy Box – Issue in IE – How to fix?
I used jquery fancy box for displaying the contact box in the ocean dental web site and when I tested it using chrome, safari and firefox it was working without any issue. But when I tested using IE 7/ 8 it was not showing up properly. the fancy box has become smaller than the content…