Skip to main content

Posts

Showing posts from August, 2011

using javascript to sort a dynamic html table

using javascript to sort a dynamic html table

[ click the column headers on the html table to sort the column ]



[ dynamicTable.html ]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Dynamic Data Table</title> <script type="text/javascript" src="dynamicTable.js"></script> <link rel="stylesheet" href="dynamicTable.css" /> <script type="text/javascript"> function load() { var columnNames = ["dateColumn", "numberColumn", "stringColumn", "booleanColumn"]; var dataRows = [ [new Date(2001, 2, 6), 8, "into", false], [new Date(2006, 6, 21), 5, "accessory", true], [new Date(2001, 0, 12), 3, "rubber", true], [new Date(2003, 6, 21), 6, "a", false], [new Date(2005, 6, 12), 4…

my first 'go' program

installing and running my first go program on an ubuntu system.

[ the version of linux I'm running ]
terry@terry-HP:/etc$ pwd /etc terry@terry-HP:/etc$ cat lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=11.04 DISTRIB_CODENAME=natty DISTRIB_DESCRIPTION="Ubuntu 11.04" terry@terry-HP:/etc$
[ a little bit more about my machine ]
terry@terry-HP:~/goProjects/helloWorld$ uname -a Linux terry-HP 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux terry@terry-HP:~/goProjects/helloWorld$
where to go to for updates to installing 'go'
http://golang.org/doc/install.html
From Blogger Pictures
install the 'gcc' tool chain..
sudo apt-get install bison gawk gcc libc6-dev make
[ screenshot of 'gcc' install command ]
From Blogger Pictures
[ one more egregious screenshot of the 'gcc' tool chain installation ]
From Blogger Pictures
first test whether 'hg' is installed ( mercurial )

From Blogger Pictur…

good reference links on IoC, inversion of control, and ORM, object relationship management

[ great set of reference source code material ]
http://www.java2s.com/

From Blogger Pictures
about Java the bits and pieces.
http://java.sun.com/docs/books/jls/second_edition/html/jTOC.doc.html

From Blogger Pictures
[ great overview of IoC, inversion of control ]
Design pattern – Inversion of control and Dependency injection
http://www.codeproject.com/KB/aspnet/IOCDI.aspx

From Blogger Pictures
[ a good overview of ORM technology - object relationship management ]
Java ORM: lessons learned
http://www.kuro5hin.org/story/2006/3/11/1001/81803
From Blogger Pictures
[ my kudos goes out to the maestro who made this presentation on ORM - a complete end to end understanding ]
http://infotechgate.com/CXEC312/CXEC312%20Lessons/

[ good pdf book on the Hibernate ORM technology ]
Hibernate in Action
www.cpe.ku.ac.th/~plw/oop/e_book/hibernate_in_action.pdf

[ another good presentation on ORM technology ]
EJB 3.0 Persistence - Sang Shin
www.sis.pitt.edu/~gray/INFSCI2935/ppts/shinTutorials/PersistenceEJB3.0.ppt






create a lazarus pascal shared object [ .so / .dll ] and then invoke using java JNA

download the pascal shared object [ .so / .dll ] project ( lazarusWs.zip ).

uncompress the lazarusWs.zip
From Blogger Pictures
import the lazarus project file, "trwtsstring.lpi", into the lazarus ide.

a shared object [ .so / .dll ] method - numElements
From Blogger Pictures
a shared object [ .so / .dll ] method - getElement
From Blogger Pictures
the "exported" shared object [ .so / .dll ] methods
From Blogger Pictures
a java program which calls the trwtsstring.so, shared object. (or a windows dll)

The below program depends on the java jar library file JNA

package com.linuxclicks.jna.invoke.pascal.start; import com.sun.jna.Library; import com.sun.jna.Native; public class Start { private interface LinuxClicksPascalLibrary extends Library { public int numElements(String line); public String getElement(String line, int index); } public static void main(String[] args) { String valueToParse = " -1111111110…

pascal with the lazarus ide doing text extraction using regular expressions

pascal with the lazarus ide extracting doing text extraction using regular expressions

download my pascal program which uses regular expressions here..
lazarusWs.zip

unzip the lazarusWs.zip file.
From Blogger Pictures
open the 'trwRegExp.lpi' file with the 'lazarus ide'
From Blogger Pictures
program trwRegExp; uses ctypes, strings, regexpr, sysutils; var numChars : integer; lineStr : string; linePch : PChar; type stringValues = array[1..50] of real; const hello = 'hello'; {----------------------------------------------------------------------} function numElements(csvLine : PChar) : integer; stdcall; var regularExpression : pchar; tRegExprEng : tregexprengine; success : boolean; index, len, loopCounter, stringLength, liIndex, liLength : integer; holdString, stringItem : string; holdPcharString : pchar; newPcharString : pchar; begin loopCounter := 0; index := 0; len :=…

clonezilla - creating a wifi ad-hoc hotspot and running a ssh server

Here are some notes on connecting to a wifi-hotspot from a running clonezilla
live-cd.

[ target machine to save a backup hard-disk clone/image ]
[ target machine is also running a wifi hotspot and an ssh server ]
Ubuntu 11.04 - Natty Narwhal

terry@terry-HP:~$ uname -a
Linux terry-HP 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
terry@terry-HP:~$

[ Creating an 'ad-hoc' wifi spot ]
Click the 'up down arrow' icon ( or what have you )


[ choose menu item to create a wifi ad-hoc hotspot ]

[ create the ad-hoc wifi hotspot ]

[ the eth1 connection is the created ad-hoc network with an essid of 'terry' ]

[ the ad-hoc wifi hotspot is now visible on the 'host' computer and other computer as well now ]

[ enter the following on the machine being cloned with clonezilla
[ at the appropriate place in the clonezilla backup image step ]
terry@terry-HP:~$ ip link set wlan0 down
terry@terry-HP:~$ iwconfig wlan0 mode ad-hoc
terry@…