Archive

Archive for February, 2008

Code Highlighter using Dean and Geshi

February 27th, 2008 rupert Comments off

I have been using this plugin to highlight my code. Below is a list of all possible programming languages that geshi could parse.

abap actionscript ada apache applescript asm asp autoit bash blitzbasic bnf caddcl cadlisp cfdg cfm c_mac c cpp cpp-qt csharp css-gen.cfg css delphi diff div dos dot d eiffel fortran freebasic genero gml groovy haskell html4strict idl ini inno io java5 java javascript latex lisp lua m68k matlab mirc mpasm mysql nsis objc ocaml-brief ocaml oobas oracle8 pascal perl per php-brief php plsql python qbasic rails reg robots ruby sas scheme sdlbasic smalltalk smarty sql tcl text thinbasic tsql vbnet vb vhdl visualfoxpro winbatch xml xpp z80

Alas, I was able to fix the single quotes problem with the code inside the tags from this post. I also added the “&” patch especially for my cfm codes.

Download the patched version of Dean’s code highligter (deans_code_highlighter1.3.tar.gz)

Categories: WordPress Tags:

Making GeoJSON outputs from PostGIS

February 23rd, 2008 rupert Comments off

I have an internet/web application sitting on top of OpenLayers, ExtJS, ColdFusion and PostGreSQL/PostGIS. I can query the geometry from PostGIS thru ColdFusion without any problems. If you are in ColdFusion 7, then you need a postgresql driver installed, but I do suggest you use ColdFusion 8 as the driver is built-in.

To display the geometry, I typically use AsGML output from PostGIS and supply that path to OpenLayers. Although it works as expected, I need to invest in two (2) http calls to the server:

  • 1st Request: Call search.cfm and get the attributes (name, address, tel_no, etc…). Afterwards, display the results on an Ext.Window.
  • 2nd Request: Display the geometries on OpenLayers using GML.

Read more…

Categories: GeoJSON, javascript, postgis Tags: ,

ExtJS and OpenLayers

February 19th, 2008 rupert Comments off

It seems that ExtJS and OpenLayers does not blend well together. One of the bug biters that hit me was the way ExtJS was handling arrays. It would be wise for OpenLayers to be agnostic of these frameworks.

for( var i in blocks ) should be transformed to for( var i = 0; i < blocks.length; i++)

I believe OpenLayers Ticket#1362 closely resembles this bug. Thanks to pgiraud for pointing me to the right direction.

Categories: ExtJS, javascript, openlayers Tags: ,

ExtJS QuickTip: Display other levels of a JSON object in a Grid

February 18th, 2008 rupert Comments off

You can display an item anywhere in a JSON heirarchy/level in a Grid by using dot notation. I am beginning to like JSON as it is simply practical and amazing. To fully understand, please see geometry.type as an example. Read more…

Categories: ExtJS, GeoJSON, javascript Tags:

Google Reader Links to your Blogroll

February 14th, 2008 rupert Comments off

It is so eeeassy to publish blog links in your WordPress Blog from Google Reader using an OPML file. OPML is a file type that is widely used to distribute lists of RSS/newsfeeds. You could also grab other feeds and see it in Google Reader.

1. Login to your Google Reader with your Google Account.
2. Click on Settings.
3. Then Import/Export.
4. You will see “Export your subscriptions as an OPML file.”
5. Import to WordPress.

Categories: WordPress Tags: