Cookies are ubiquitous on the web. They're used to store usernames, login tokens, shopping cart contents, and so on. In libraries, cookies are typically modeled as name-value pairs. An API consumer requests a cookie using a known name (e.g.
$.cookie('user')in jQuery with the Cookie plugin) and the library returns a string (e.g.
Introducing CoffeeDOM, a JDOM fork for Java 5
When it comes time to work with XML in Java, the first thing I usually do is go to the JDOM website to check for a Java 5 update. Unfortunately, I am always disappointed. There has not been a major JDOM release in over 6 years and, if the JDOM mailing list is to be believed, no Java 5 version is planned. As a result, I have decided to take my own initiative and make CoffeeDOM, a JDOM fork with Java 5 support.
CoffeeDOM is intended as a natural evolution for JDOM developers. As such, there have been minimal changes to the API. CoffeeDOM adds support for Java 5 features like generics, enums, and covariant method return types, and reduces the amount of boilerplate required by making previously checked exceptions (like JDOMException) unchecked. In this article, I will briefly go over these changes.
(If you don't want to bother with the article, you can skip right to the Google Code page or browse the Javadoc API documentation.)
Things I miss from Java while programming in C#
One of the perks of being a freelance programmer is that I get to program in a lot of different languages, either because the client has dictated a certain language, has left the choice up to me, or limited me by what is supported by a host (Hi PHP!).
As fate would have it, I have had the good fortune to have extensive experience with both C# and Java. While many articles will list things a programmer misses from C# while coding in Java (properties, LINQ, reified generics, type inference, named and optional parameters, closures, continuations), this post intends to look at things a Java programmer might miss while coding in C#.
||perform short-circuited evaluation. Essentially, this means that a program, when evaluating boolean operators, will only evaluate as many arguments as is necessary to determine the value of a boolean expression. Sometimes, however, this is not the behaviour we want.
How to do an AJAX search with jQTouch, Part 2
This article assumes you have read the first part of this series.
How to use custom jQuery animation queues
You may not know this, but whenever you use jQuery commands like
delay, you are implicitly making use of a jQuery queue behind the scenes. That queue is named
fx, and it is the default queue that all animations use unless otherwise specified.
In this article, we will look at how jQuery animation queues work, how to create and manipulate them, and how to use them in a meaningful way.
For his 1986 book The Blind Watchmaker, Richard Dawkins developed a program that created "biomorphs": virtual creatures created by a computer simulation. The simulation, called Biomorph, was developed in order to demonstrate the power of natural selection.
How to query posts by template in WordPress
Ever wanted to filter a query_posts call by template? If you're reading this post, you probably have or need to right now. You probably went to the query_posts documentation and scanned for something like "template=foo" and were deeply disappointed. Then maybe, in an act of desperation, you started to trudge around the plugin library. Stop! Stop right there! You don't need a plugin to do this. Everything you need is already in WordPress.
PHP interfaces and optional parameters
Interfaces in object-oriented languages like Java, C# and PHP are useful language constructs for ensuring that objects will respond to certain methods. However, unlike Java and C# (until recently), PHP has optional parameters. As it turns out, this feature has an interesting (and a little bit unexpected) effect on how we can implement interfaces in PHP.
subscribe via RSS