October 22, 2006

Buy Memory

Buy memory at

Buy.com Memory

Posted at 08:10 PM

September 28, 2006

Web Conferencing

There are lots of interesting web conferencing software systems out there. This list will evolve with reviews on these software programs.


Posted at 05:52 PM

June 21, 2005

Cross Unix Tricks

nixCraft: FreeBSD > Display information about the system :: Linux, FreeBSD and Solaris Tips & Tricks

Finding CPU Information:

Solaris: /usr/platform/sun4u/sbin/prtdiag | grep 'System Configuration' | sed 's/.*(\\(.*\\) .*)/\\1/'

Linux: cat /proc/cpuinfo | grep '^model name' | sed 's/.*: //'

CPU Speed:
Solaris: psrinfo -v | grep MHz | awk '{print $6 $7}'

Linux: cat /proc/cpuinfo | grep '^cpu MHz' | sed 's/.*: //'

total Disk Space:

Solaris: /usr/sbin/df -kF ufs | grep -v Filesystem | awk '{print $2,$6}'

Linux: /bin/df -kl -x tmpfs | grep -v Filesystem | awk '{print $2,$6}'

Total Physical Memory
Solaris: /usr/sbin/prtconf | grep Memory | sed 's/.*: //' | awk '{print $1*1024}'

Linux: cat /proc/meminfo | grep '^MemTotal' | sed 's/.*: //' | awk '{print $1}'

Posted at 04:39 PM

May 17, 2005

Short simple scripts

Every now and then I get to write some scripts to fetch the required data from a file. These days I'm having to deal with the Sybase interfaces file. I need to translate from a server name to the host and port.

This file can be large and the format is of the form:

query tcp ether host1 1234
master tcp ether host1 1234

Grepping with a multi-line regex can be a pain. So here is one solution:

awk '/SERVER/{f=1}f>0{f++};f>2{print$4" "$5;exit}' interfaces

Wait. On Sun systems Sybase sometimes uses TLI for the host/port so the file can look like this:

query tli /dev/tcp \x000208fca60e123f0000000000000000
master tli /dev/tcp \x000208fca60e123f0000000000000000

The following awk script can handle this case:

awk '/SERVEr/{f=1}f>0{f++}f>2{ if($2=="tli") print $5; else print $4:; exit}' $SYBASE/interfaces

Finally we need to convert back from the TLI format to host/port. Here is some javascript that can do that (assuming val has the string).

port = parseInt(val.substring(2,6),16);
host = parseInt(val.substring(6,8),16)
+"."+parseInt(val.substring(8,10),16)+"." + parseInt(val.substring(10,12),16)+"." + parseInt(val.substring(12,14),16);
print ("host "+host+" port "+port);

And if you decide you want to filter crontab files for a certain program here is something:

crontab -l | sed -n -e '/^#/d' -e '/string/p' | awk '{print $6}'

sed FAQ, version 014
Awk reference

Posted at 08:53 PM

May 08, 2005

List of tables

SQLZOO, How to.. Get a list of all tables

How do you get the list of tables in a schema or database:

DB2: select * from syscat.tables where tabschema='SCOTT'

Sybase: select * from sysobjects where type='U'

Oracle: select * from cat

Posted at 03:01 PM

April 04, 2005

Setting up telnetd

PROTOR Redhat : Installing TELNET server on Redhat

By default the RedHat 7.2 installation will not allow a remote user to connect to the system using TELNET for security reasons. It is probably safest to leave the system like this and use an encrypted connect facility such as SSH. However if you do wish to allow TELNET access then you need to do the following.

Install the telnet-server RPM from the RedHat installation disk #1 either using a suitable package manager to use the following command line:

rpm --install --replacefiles --nodeps

This installation creates a file telnet in the directory /etc/xinetd.d . Edit this file and change the line

disable = yes
disable = no

Restart xinetd by the command

xinetd restart

Posted at 10:54 AM

December 11, 2004

Java Tools

JInspired JDBInsight/JXInsight Home JDBC tracing tool.

Posted at 07:44 PM

May 19, 2004

Remote JMX

The Java Management Extension (JMX) API is defined and under maintenance release of the Java Specification Request (JSR) number 3.
JMX defines the API for management of Java applications, and those API are local to the application: remote clients that would like to connect to a JMX-enabled remote application and manage or monitor it using JMX could not do it in a standard way.
The MX4J project, the JMX reference implementation itself, and other JMX implementations provide custom connectors, mostly RMI-based and HTTP-based, but those are not interoperable.

JSR 160 thus provides a standard way to connect to remote JMX-enabled applications using RMI; it is possible to use MX4J JSR 160 implementation on client side, and have a JMX Remote Reference Implementation on server side, or viceversa. This allows the creation of Management Consoles based on Swing, for example, that will be able to interoperate no matter which JMX implementation is used.

Remote JMX

Posted at 10:04 AM

May 10, 2004



Posted at 03:38 PM

April 21, 2004

XA transactions

Java Technology Forums

A non-XA transaction is what you get (usually automatically) if you access JDBC connections and do statements over them. A non-XA (or local) transaction can only span one connection (if you rollback, it's the work on that connection only).

A JTA transaction is any transaction that you configure in the application server. For instance, if you use a bean with REQUIRED transaction settings in the deployment descriptor, then that will be a JTA transaction.
Same thing for UserTransaction.begin() (if you do that).

XA-compliant means that the JDBC or JCA driver you are using is compatible with the JTA transaction manager in the application server: the driver will listen to the instructions that the application server gives it to rollback or commit. non-XA-compliant JDBC or JCA drivers don't listen to this and do what they want.

Indeed, the tricky part is when you combine e.g. JDBC and JTA transactions: if you're not careful then the JDBC will still use its own,"separate" local (non-XA) transaction. That is the case for non-XA-compliant drivers. The effect is that when the application server calls rollback() then this will not be done properly. Simply because the application server is unable to rollback your "local, non-XA" transactions. This is not what you want and that's why the application server warns you.

XA and weblogic

X/Open Distributed Transaction Processing (DTP) XA interface

TPMs: (Transaction Processing Monitors): Tuxedo, CICS, NCR TopEnd, UniKix

Posted at 10:31 PM

MQ For Dummies

Quick summary of MQ Series (now known as Websphere MQ 5.3).

Messages, Queues: Self explanatory.

Types of queues: Predefined queues: Setup by admin, live past reboots
Dynamic queues: created programatically based on template queue definitions (using mqsc DEFINE QMODEL).

(attributes such as number of messages, etc).

object types are: queuemanagers, queues, process definitions, channels, namelists, authentication information objects.

Talk to MQ Using:
MQAI - MQ Admin Interface
PCF - Programmable Command Format
MQSC - Commands from the keyboard
MQAI - COM interface
ADSI interface

Process Definition - defines the process that is started in response to a trigger. Some queues can be set up to start a process when a message is posted to the queue

Channels: Abstraction mechanism to hide the details of distributed queueing. This could hide the fact that you are talking over different networks and protocols.

Cluster: A group of queuemanagers set up so that they can communicate with each other without requiring definitons.

Namelist: A list of names for MQ objects

XA compliant transaction managers: IBM TXSeries, BEA Tuxedo. XA compliant databases - two phase commits.

Posted at 10:24 PM

April 20, 2004

Types of MBeans

There are three types of MBeans; standard, dynamic,
and open. Only standard MBeans use reflection. Dynamic MBeans register their
methods, operations, etc.  OpenMBeans are dynamic MBeans but are restricted
to using OpenType objects (which are ArrayType, CompositeType, SimpleType,
or TabularType).  OpenMBeans allow complex objects to be returned to the GUI
without the GUI having to have knowledge of the "real" classes.  Since
OpenMBeans are dynamic MBeans they also do not use reflection but instead
register their methods, operations, etc.  
-- From the web

Types of beans

Intro to JMX

Posted at 09:15 PM

February 16, 2004

disabling WMI

Disable Remote WMI

Posted at 01:51 PM

February 07, 2004

SVG Tutorial

SVG Tutorial
Learn SVG

Posted at 11:51 AM

September 21, 2003

BladeLogic --- Simplify Secure Automate

Aduva, Aurema, Bladelogic, CenterRun, Centrata, CoroSoft, Egenera, Ejasent, Inkra Networks, Moonlight Systems, Nauticus Networks, PlateSpin, PolyServe, Racemi, Relicore and Sychron.
Relicore, dirig.com, collate.net




interesting moonlight systems

Posted at 10:08 PM

September 13, 2003

Tivo but free

Freevo | Freevo

Posted at 04:07 PM

September 11, 2003

September 02, 2003

java's jar option

The sun java vm has a -jar option. Be careful when using this since it also negates all the classpath values without warning.

Java –classpath foo;bar; -jar js.jar

The classpath was being reset to only js.jar

The solution:

Java –classpath rtest.jar;js.jar org.mozilla.javascript.tools.shell.Main. foo.js

This works like a charm!

Posted at 04:12 PM

August 21, 2003

Rocking on without M$

Tech News - CNET.com

An interesting article on a company's transition away from M$

Posted at 03:49 PM

August 19, 2003

More Oracle issues

Google Groups: View Thread "What means: Shared memory realm does not exist?"

So I had this problem on a Win XP box (keywords: win32 windows, windows NT, Win2k, windows 2000). All of a sudden my app server refused to work. It would complain that:

== ORA-01034: ORACLE not available
== ORA-27101: shared memory realm does not exist

I tried restarting my machine. I tried restarting the Oracle DB. I tried connecting from Net 8 Assistant to no avail. The magic incantation is:

sqlplus /nolog
connect sys/ORACLE as sysdba

(ORACLE is the default password if you haven't taken the time to change it).

Posted at 03:37 PM | Comments (0)

August 14, 2003

Spam Check with a twist

Mailinator allows you to give your email address and not worry about it being used for spam. THe only problem is that the email goes away in a few hours. Maybe if it stuck around for a couple of days it would be better. Its a great idea never the less


Posted at 01:53 PM

August 08, 2003


When a rendering engine has to render any given object there are two possible ways of doing this. One is to paint all pixels that fall in the middle of the shape. But the problem with this approach is that even though it is fast, on systems with large pixels you end up with a jagged effect. For example when zooming in on pictures you see this problem. This mechanism of painting only the middle of all shapes is called aliasing.

The better mechanism is anti-aliasing. In this method, the redering engine calculates the intersection of every pixel with the shape and coloring them in propotion with how they're present. This way if a pixel is not completely covered by a shape it is still colored but at a lower intensity.

How does this work: The rendering engine calculates the coverage values for all the pixels affected by the shape. These alpha values

Posted at 04:20 PM

June 19, 2003

.NET 1.0 to 1.1

Migrating from J# 1.0 to J# 1.1 is not as seemless as it may seem. The affinity for a 1.0 compiled app is supposed to make it continue to work on a 1.0 framework if a 1.1 framework is installed. In short to make a J# app work make sure you have J# for every single .NET framework. If you have .NET 1.0 and .NET 1.1 make sure you have J# 1.0 and J# 1.1 on the same box even if your app was compiled with J# 1.0

Posted at 06:09 PM | Comments (0)

June 17, 2003

size of an oracle database

Allocated Tablespace in MB :
SELECT tablespace_name ,SUM(bytes)/(1024*1024) MB_TOTSPACE
FROM dba_data_files GROUP BY tablespace_name

DB size in GB:
select sum(bytes)/1024000000 "Size in GB" from dba_data_files;

Posted at 09:48 PM

June 11, 2003

And now it makes sense

Why does the DOS window show up sometimes but not at other times. Now I know.

Google Groups

Posted at 01:54 PM

February 25, 2003

Design Patterns

The Pattern Depot has an online book: The Design Patterns Java Companion

Posted at 03:14 PM

December 10, 2002


This has to be one of the cooler projects I've seen online. Captcha.net has a mechanism to (more-or-less) reliably ascertain that a human is on the other end of a connection. (Remember: On the Internet no knows you're a dog). It has usage in spam control and other fields.

Find out if you are human?

The NYTimes article and as always metafilter

Posted at 05:09 PM | Comments (0)

WinSock2 support

FWIW (For What It's Worth):

WinSock 2 SDK: Sept '98 as part of Microsoft's "Platform SDK" available on-line through MSDN. Download.
Add-on for Windows 95: Equivalent to Win98 version, but lacks GQOS support. Download (look for"Windows Socket 2 Update").
Native in Windows 98: It includes support for the "Generic QOS APIs" (RSVP support only)
Native in Windows NT4: Substantial updates available in Service Pack 4 (SP4). Download: WorkStation and Server
Native in Windows 2000 (aka "NT5"): Beta 2 has GQOS with RSVP, Differentiated Services, Traffic Control & Policy Enforcement.

For more info: Sockets.com. Essentially if you are on Win98 or WinNT you can assume the presence of Winsock2. Only Win95 is the red haired step child

Posted at 11:13 AM | Comments (0)

November 26, 2002


I like Google and I use their toolbar, but now I am strongly considering uninstalling the toolbar. The main issue is that they update the toolbar without notifying the user.

The link below shows some bugs in the toolbar. The scariest aspect is the ability to execute arbitary scripts simply by referring to them. Terrible!
Google toolbar hacks

Posted at 10:06 AM | Comments (3)

October 03, 2002

Program Correctness

Dijkstra's hypothesis:
Assume a program has N parts
The probability of getting it right is c. Then the probability of getting it wrong is 1- c

The probability of the whole program working is c^N. Which unless c is close to 1 heads closer to 0 when N grows large. So when building a large program unless the pieces are perfect the probability of the whole thing working is low.

Posted at 03:16 PM | Comments (0)

September 24, 2002

August 20, 2002

Make hay while the spam flows

Habeas has a solution to rid us of the spam that plagues us. In return they'd like corporations to part with some money. [via MeFi]

Posted at 02:52 PM

July 11, 2002

And then they created life

Scientists have created a virus in a lab. Its alive. Man has created life?
Read more here [via Metafilter]

Posted at 11:48 PM

June 24, 2002

Spam Harvester

I noticed that an agent by the name "autoemailspider" had traversed my site. A search showed that most hits belonged to public web server logs that the spider had been through. I finally found the originating site. Looks like some Russian company that sells email harvesting software for spammers.

Posted at 09:15 AM

June 20, 2002

Nature, adapt thyself

Millions of years ago spiders were great ground hunters. However, something interesting happened. Bugs evolved to escape their predators, and started to fly. Spiders and other predators were now faced with a dwindling source of chow. The spider population started waning. The spiders started evolving to where they gained the ability to spin a nearly invisible web to trap their prey.

Our knowledge how the spider builds its web is still incomplete. We do know that spiders build dragline silk support structures and then the capture spiral. Spider web is among the strongest materials known to man. However, gathering enough spider web to use is a tough proposition. Silk worms make nice well behaved, herbaceous inhabitants of farms. This is how silk is gathered. Spiders are territorial and aggressive.

Companies have found a way to insert the web producing gene of a spider into a goat in way such that it turns on in the mammary gland and produces silk in the milk. This silk is separated from the milk and subjected to the same spinning process as in the spider to produce the spider silk.

Read more at the New York Times.

Posted at 04:39 PM | Comments (0)

June 17, 2002

Macrovision headaches

Macrovision is a company specializing in copy protection technology. I've encountered macrovision when I tried piping my DVD player through my VCR to my TV (because my TV didnt have an AV in). Macrovision leverages the fact that VCR's have AGC circuitry (Automatic Gain Control) which attempts to compensate for extra brightness. Macrovision includes extra signals in the non-viewable portion of the signal to cause the AGC to kick in and render the copy unviewable. For more information on this particular technology check out the FAQ

Posted at 10:06 AM

June 02, 2002

Flight simulator cheat sheet

Here are a couple of hints I'm using:

To take off.

- turn off the brakes (.)
- turn throttle on high (F4)
- at about 55 knots gently ease back (numpad 2)
- at about 85 knots ease back a bit more (numpad 2)

use trim often (keypad 5) to level the plane out.

turn at 20degree bank. about 25degrees before the turn is complete straighten out the plance.

Flaps are great for slowing down.

Posted at 11:43 AM

MS Flight Simulator

This weekend I battled my computer to set up Microsoft Flight Simulator. My machine, a PII 700Mhz with 256MB of RAM is a pretty decent computer. I have a NVidia Riva TNT card. However Flight Simulator would balk at using the hardware accelerator. It said that it was using safe mode and that if my opinion differed I could consult the Readme. The readme had a net useful value of -1.

Dell Support however insisted that they hadnt provided me with that Nvidia card and that I had to deal with it myself. Nvidia gave me drivers from Sept 2001 and said that they could care less what happened.

Usenet a constant source of relief mentioned the problem but didnt give me any direct insight. I finally stumbled on to guru3d which had the latest drivers. The tuners, explanations were a life saver. I now have flight simulator working in full screen mode with hardware acceleration enabled. The graphics are less impressive than the snapshots on the box (no surprise). I've learnt a lot about airplanes so far. I'm looking forward to using the Air Traffic Controller aspect of flying. Figure I need to learn to land first!

Posted at 11:40 AM | Comments (1)

May 22, 2002

Are we changing again?

What is the World Wide Web? The essential characteristics I've used to identify the web are:

links -> transition you from page to page.

Browsers now expose DHTML that allows you to modify a page without transitioning to a new page (or even refreshing the page from the server). DHTML is great for building mini calendar widgets and other utilities you would like to use to enrich the user experience. However now companies are starting to integrate DHTML to remove page transitions. EchoSpace claims this makes for a better and faster UI. One of the advantages of the web to me is that I can bookmark any part of a site and return to it. The stateless nature of the web lets me use my bookmarks to jump into the right place in a site. There are cases where this makes no sense. I cannot/should not jump into the payment section of an online airline ticket system. In those cases the server refuses the request since the client doesnt have session information (yeah, that stateless thing was only partly true).

Posted at 08:49 AM | Comments (0)

May 21, 2002


There is much talk about ReST (Representational State Transfer) and SOAP (Simple Object Access Protocol).

Why do you use SOAP? Say you want to use Google's search apis to get a cached page. Your SOAP query would include half a dozen SOAP envelope lines and finally explicitly mention every single parameter you are passing in. Your response will be an XML doc (enconsed in a SOAP envelope).

What does ReST say? ReST says rather than wrap all that data within a SOAP envelope just call www.google.com/xml?q=searchstring. The results will be returned as XML and you have your answer. Dont bother building all this SOAP stuff around the messages.

Why would you want all this extraneous information? well for one to deal with types and specific data. For example I believe there is a SOAP standard to allow dynamic lookup of interfaces (via UDDI and WSDL I am assuming). The reasoning that resonates with me is compatability of interfaces. For example if I were to publish a translation api that took a search parameter and I changed that parameter tomorrow I believe SOAP provides me more flexibility. I can take the XML gunk that SOAP gives me apply an XSLT transform and get the new version that allows me to service old and new customers.

xml.com has an article about google SOAP apis.

Amazon decided to go the Rest route (kinda). They have a regular old GET string that returns an xml doc. No requirements for a heavy duty SOAP client. Just fetch the URL and parse the XML and you have your data. Apparently google used to expose this via the /xml path. EBay also uses ReST.

Posted at 09:22 PM | Comments (0)

May 20, 2002

Do you google?

It's boggles my mind how much I am beginning to like Google. Now Google Labs is captivating my interest.

The projects currently at Google labs include:

1. Google Glossary which finds definitions for words you type in.

2. Google Sets which predicts similar items in the set. For example I started with Bill Joy, Scott McNealy and Vinod Khosla and Google retorted with Ed Zander, Bill Gates et al.

3. Voice search allows you to query by telephone. Nothing fancy here yet. The voice interface better be darn simple in order to not drive the user up the wall.

4 Google keyboards reminds me of vi (my favorite editor btw). It allows you to browse google results without the mouse using the control keys j k h u

Posted at 11:57 PM

April 02, 2002

web widgets for everyone

DomApi is a collection of LGPL'ed web widgets. (DHTML for browsers > 5.0).

Posted at 10:33 AM

December 2006
October 2006
September 2006
December 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
Arts and Letters Daily
Movies seen
Books read
Bush Says