Posts Tagged ‘code examples’

This is a test of PHP Script Syntax Highlighting with the GeSHi code colorizing and syntax parsing library, along with the WP-Syntax plugin.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//
// Include the GeSHi library
//
include_once 'geshi.php';
//
// Define some source to highlight, a language to use
// and the path to the language files
//
$source = '$foo = 45;
for ( $i = 1; $i < $foo; $i++ ){
echo "$foon";  --$foo;
}';
 
$language = 'php';
 
// Create a GeSHi object
 
$geshi = new GeSHi($source, $language);
 
// And echo the result!//
echo $geshi->parse_code();

An unofficial Python Tutorial is at growing in the InfoGami wiki system. It has a nice layout and the code examples are easy to read. See for instance the section on Python Modules, or the Brief Tour of the Standard Python Library. I just really appreciate it when the page layout is so clean and easy to read, code examples sprinkled like spice — which makes this technical documentation for Python easy to study.

  • How To Build A Mac OS X App With XCode and MacRuby March 15, 2010
    Want to develop a Mac OS X app without getting waist deep in Objective C? MacRuby is the answer, and it’s now mature enough to use directly from XCode to build fully-featured Ruby-powered Mac apps. “Jean Pierre Hernandez” of Phusion presents a walkthrough of how to do it, step by step. […]
  • How To Find Ruby User Groups March 9, 2010
    Ruby User Groups (RUGs, for short) are typically informal organizations put together to encourage Ruby developers with certain areas to get together, share ideas, and, often, to have some fun. If you're lacking for inspiration or want to get to know some Rubyists within certain parts of the world (or just around the corner, if you're lucky), headin […]