i =1; while (i < argc) { if (argv[i][0] != '-') break ; …..
Monthly Archives: November 2011
fonttosfnt – Wrap a bitmap font in a sfnt (TrueType) wrapper
UNIX Command $pwd /usr/share/fonts/X11/75dpi $fonttosfnt -o helvO12.ttf helvO12-ISO8859-1.pcf Couldn’t select character map: 6. $ls helvO12 helvO12-ISO8859-1.pcf helvO12.pcf.gz $gunzip helvO12.pcf.gz $fonttosfnt -o helvO12.ttf helvO12.pcf $ls helvO12.ttf helvO12.ttf $file helvO12.ttf helvO12.ttf: TrueType font data $ UNIX Explanation Wrap a bitmap font or a set of bitmap fonts in a sfnt (TrueType or OpenType) wrapper.
pcf . file type
Portable Compiled Font data
Bitmap . computer graphics
Bitmap Explanation In computer graphics, a bitmap or pixmap is a type of memory organization or image file format used to store digital images. The term bitmap comes from the computer programming terminology, meaning just a map of bits, a spatially mapped array of bits. Now, along with pixmap, it commonly refers to the similar …
rmic – The Java RMI Compiler
Synopsis rmic [ options ] package-qualified-class-name(s) Explanation The rmic compiler generates stub and skeleton class files (JRMP protocol) and stub and tie class files (IIOP protocol) for remote objects. These classes files are generated from compiled Java pro gramming language classes that are remote object implementation classes. A remote implementation class is a class that …
shellsort using php
<? // function shellsort($elements,$length) // { $elements = array(2,3,4,5,1,8,11,0); $length = count($elements); $k=0; $gap[0]=(int) ($length / 2); while($gap[$k]>1) { $k++; $gap[$k]=(int)($gap[$k-1]/2); }//end while for($i=0;$i<=$k;$i++) { $step=$gap[$i]; for($j=$step;$j=0 && $temp<$elements[$p]) { $elements[$p+$step]=$elements[$p]; $p=$p-$step; }//end while $elements[$p+$step]=$temp; }//endfor j }//endfor i // return $elements; print_r($elements); // }// end function ?> http://www.go4expert.com/forums/showthread.php?t=1255
selection sort using php
<?php $arr = array(2,3,4,5,1,8,11,0); // function selection_sort(&$arr) { $n = count($arr); for($i = 0; $i < count($arr); $i++) { $min = $i; for($j = $i + 1; $j < $n; $j++) if($arr[$j] < $arr[$min]) $min = $j; $tmp = $arr[$min]; $arr[$min] = $arr[$i]; $arr[$i] = $tmp; } // } print_r($arr); ?>
hashes.pl %(hash related)
A UNIX Command $cat hashes.pl # Simple hash constructs $fred{“with”} = “without”; $fred{“this”} = “that”; $fred{“mountain”} = “valley”; $fred{“left”} = “right”; print qq/$fred{“this”}n/; @keys = keys(%fred); print “Keys are @keysn”; # Initializer for %yard. %yard = ( red => ‘brick’, blue => ‘sky’, green => ‘grass’, yellow => ‘dandelion’ ); print “$yard{‘blue’} $yard{‘yellow’}n”; $perl hashes.pl …