Linux - Using file -i instead of the input accept attribute

The file input allows an accept attribute to indicate what type of file may be submitted. The type is the client's MIME type, which may vary by operating system, installed applications, and end user configuration. A sample set of MIME types used for… more »

dojo 1.6.1 dijit.form.Button example

I’ve been upgrading an RIA from dojo 1.1.1 to dojo 1.6.1, and spent a lot of time trying to find the cause of this error message: t.apply is not a function After many hours, I found it was related to the way the data-dojo-props event handlers we… more »

PHP <-> Perl Bridge using cURL

Using cURL to submit requests from PHP into Perl allows graceful reuse of code with a system with a robust core of Perl code and a PHP web interface. The Perl code accepts a module name, sub/function name, and a set of parameters. It includes the modu… more »

Google Maps API - Distance Calculator - PHP Example

This code gets the distance, in miles, between two US Zip codes (04429 and 02135). You can substitute other origins and destinations. <?php function curl_request($sURL,$sQueryString=null) { $cURL=curl_init(); curl_setopt($cU… more »

PHP Text Highlighter

This snippet accepts an array of words, and a descriptive name which can be used to reference the words, like so: $this->scan(array('mysql','css','js','content management system', 'xhtml','xml','rss','html','lamp','ria', 'sugar','php','zen… more »