Blog
Deep Copy of Arrays
With jPaq and many other JavaScript libraries, it is very easy to do a shallow copy of an array. On the other hand, it isn’t as easy to do a deep copy of arrays. For this reason, I plan on Read more…
With jPaq and many other JavaScript libraries, it is very easy to do a shallow copy of an array. On the other hand, it isn’t as easy to do a deep copy of arrays. For this reason, I plan on Read more…
As I was beefing up my past implementation of cartesianProductOf(), I decided to look into set theory a little bit more. After looking through some Wikipedia pages, I found another process that may be of interest to JavaScript programmers that Read more…
A few weeks ago, I came across a question about finding the cartesian product of two or more arrays in JavaScript. For anybody who is looking to do so, I posted the following code on stackoverflow: It is important to Read more…
A few weeks ago, I wrote an example page on jPaq.org for using the curry function to easily add prototypal functions to the String object. As I was playing around with jPaq, I thought of a few more examples: All Read more…
Learn how to get currency inside of a mail merge without extra spaces between the dollar sign and the number.
I personally love both JavaScript and Python. For this reason, from time to time I like to port functions that are available in Python, over to JavaScript. The following is a port of the expandTabs function. The biggest difference between Read more…
One of the functions that didn’t make the cut for jPaq is String.prototype.toCharCodes(). The reason is I don’t feel that it is a function that many people are looking for. Still, if you are looking for a good implementation for Read more…
There are a lot of people out there that no how to do file searches and Microsoft Word searches by using wildcard characters, but not as many people know how to work with regular expressions. That is the main reason Read more…
I recently encountered two troubling bugs with jPaq’s String.prototype.indexOfPattern() function. In order to fix it, I ended up exploring the powerful String.prototype.replace() function, exploiting the parameter passed into the callback function. I already knew that the matched text and sub-groups Read more…
Up until today, I was interested in writing a more object oriented version of the native window.open() function. Unfortunately, I found out that there are some major incompatibility issues between browsers. Let’s take this example for instance: [sourcecode language=”js”] window.open(“http://google.com/”, Read more…