jQuery: How to Create a Basic Plugin

(function ( $ ) {

$.fn.greenify = function( options ) {

// This is the easiest way to have default options.
var settings = $.extend({
// These are the defaults.
color: “#556b2f”,
backgroundColor: “white”
}, options );

// Greenify the collection based on the settings variable.
return this.css({
color: settings.color,
backgroundColor: settings.backgroundColor
});

};

}( jQuery ));

 

$( "div" ).greenify({
color: "orange"
});

Meta-Geocoding: ETL Module from Spatialytics

The Meta-Geocoding module from Spatialytics ETL is a tool used to geocode data by using existing external geocoding engines (via exposed Web Services / APIs). It can use many geocoding engines – Open source or not, free or not – that are known on the market. Among these engines are:

  • Google,
  • Yahoo! Placefinder,
  • Bing
  • OpenAdress,
  • GeoNames,
  • OpenStreetMap (Nominatim),
  • Wikimapia,
  • Semantic MediaWiki.

How I Explained REST to My Wife

When Fielding and his buddies started building the web, being able to talk to any machine anywhere in the world was a primary concern. Most of the techniques we use at work to get computers to talk to each other didn’t have those requirements. You just needed to talk to a small group of machines.

.. Ryan: Let’s say you’re talking to your sister and she wants to borrow the sweeper or something. But you don’t have it – your Mom has it. So you tell your sister to get it from your Mom instead. This happens all the time in real life and it happens all the time when machines start talking too.

Wife: So how do the machines tell each other where things are?

Ryan: The URL, of course. If everything that machines need to talk about has a corresponding URL, you’ve created the machine equivalent of a noun.

.. Wife: Why can’t a machine understand a normal web page?

Ryan: Because web pages are designed to be understood by people. A machine doesn’t care about layout and styling. Machines basically just need the data. Ideally, every URL would have a human readable and a machine readable representation. When a machine GETs the resource, it will ask for the machine readable one. When a browser GETs a resource for a human, it will ask for the human readable one.

Wife: So people would have to make machine formats for all their pages?

Ryan: If it were valuable.

.. Right now, getting the URL through the browser gives you a web page. If there were a machine readable representation for each URL, then it would be trivial to latch new tools onto the system because all of that information would be consumable in a standard way. It would also make it quite a bit easier for each of the systems to talk to each other. Or, you could build a state or country-wide system that was able to talk to each of the individual school systems to collect testing scores.