Archive for December, 2009
Techstart Internship Mela
Techstart Internship Mela
-Hire Interns for your startup
Time: December 23, 2009 from 9:45am to 1pm
Location: Institute of Management and Career Courses (IMCC) campus
Street: 131 Mayur Colony, Kothrud
City/Town: Pune 411029
Map: http://bit.ly/8PK5Z4
Latest Activity: 7 hours ago
Background
Students who are studying for MCS/MCA/M.Sc. ( Computer Science ) typically have to do internship (Industrial Training) with some company for 6-months [...]
Evaluating JSON Data
Evaluating JSON data is the most fundamental and common use-case for any modern ajax based web application. The most commonly used method to evaluate json strings has always been eval() but there are few other methodologies that I have learnt recently.
1. eval()
var jsonData = window["eval"]( "(" + jsonString + ")" );
Support: All Browsers variants
2. new Function()
var [...]
JavaScript: String.replace()
Today I had to help out my friend with replace any email address with < email address >
Here is the easiest solution I could come up with:
var myString = “My email address rajesh.segu@abc.com”;
function replaceEMail(){
return “<”+arguments[0]+”>”;
}
myString = myString.replace( /([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}([\w/_\.]*(\?\S+)?)/ig, replaceEMail);
myString here becomes “My email address <rajesh.segu@abc.com>”.
The best part in this solution is that you could pass [...]