Archive for February, 2009

Simple Javascript Form Validator

Now you will say what’s the point in writing another javascript validator? you are right, but what if when the javascript validators that you find that works are always too large for comfort? Your page recieves some thounsands or millions hits per day and the validation plugin alone is eating up the bandwidth, then its time to look inwards and right something that’s small, and that works

I started writing this some two weeks ago, adding to it as my project requires, now that the project is nearing completion., I think its time to contribute it to where it actually came from, OPEN SOURCE.

So if you need a javascript validator thats small, and just works out of the box, then check out this

as usual, project hosted on gitorious, sourceforge coming soon

Comments (2)

I cant but ask myself how some softwares are built. If softwares developers are architects, by now the world would have run out of space.

Flex builder 425Mb VS Netbeans(the whole package. php, java, j2ee+struts+jsf, uml, css+javascript+html, python, javafx, c/c++ etc) 200+Mb

Flex builder Eclipse Plugin 300MB VS Ark Linux(whole operatiing system) 200+Mb

Flex Builder Linux eclipse plugin 177Mb VS Netbeans6.5 for javafx 65Mb

Acrobat 9(a dvd. thats a massive 4gigg) VS Sumatra pdf reader(less than 5mb) Open Office can create pdf, Okular can do all the other funky stuffs a pdf reader can/should do(okular + openoffice is less than 500Mb)

This just got me thinking, and I am only thinking aloud.

Comments (4)

Jarminal – Java Interactive Shell

Jarminal is to Java what the python shell is to Python

Now jarminal is a linux tool. I will only just post the man page here. Any linux person should be able to read the man page and understand what it does.

jarminal(1)                        Jarminal                        jarminal(1)

jarminal – a java interactive shell

jarminal [option] [command]

GNU General Public License

jarminal is a java interactive shell.
Jarminal  emulates  the  python shell and provides a means of executing
java commands interactively.
The normal procedure to executing the smallest java code is

· create the java file

· compile the java file

· execute the java class created from step 2 above

This might not be effective if all you want to do is test  if  a  small
code snippet will work or not.
This  shortcoming  has been the strenght of languages like python where
you can test some code snippets
before you finally include them in your project.
Jarminal makes this interactive shell functionality available  to  java
programmers too.

-e  | –execute escapedstring You can use this option to execute a java
code without starting the interactive terminal

SAMPLE jarminal -i “System.out.println(\”Hello World\”);”
NOTE that the Hello World is escaped, and the  final  semi-colon
is inside the string

-i | –interactive This command will start the interactive terminal.

In this mode, you dont have to escape strings
Classes  can  be  defined  and they are available throughout the
interactive session
class declaration can span multiple lines
You can import java packages and they are  available  throughout
the session
Except  for the above, previous commands dont have any effect on
the new command
To execute a block of code (normally across multiple lines)  use
a open and close brace { }
Control Structures can span multiple lines

jarminal>> System.out.println(“Hello World”);
Hello World
jarminal>> public class One {
public void writeSomething(String something) {
jarminal>>   new   One().writeSomething(“jarminal   is  sooooooo
jarminal is sooooooo cool
jarminal>> for(int i=0; i<5; i++) {
new One().writeSomething(String.valueOf(i));
jarminal>> import javax.swing.*;
jarminal>>  JOptionPane.showMessageDialog(null,   “jarminal   on

-h | –help [fqcn]

Displays a minimal description of how to use jarminal if fqcn is
not supplied
fqcn – Fully Qualified Class Name.
If   a   fully   qualified   class   name   is   provided    e.g
java.util.Hashtable jarminal displays a javadoc help page.
But for this to work, you have to configure the java doc path in
the config file /etc/jarminal.conf

The javadoc help functionality can  also  be  invoked  from  the
interactive shell.

SAMPLE jarminal>> help java.awt.Dimension


0.1                            02 February 2008                    jarminal(1)

The source code is available on github.

EDIT: moved to gitorious
you can get the rpm too there.

My next work is to make it a netbeans plugin. If anyone could take this up however, I will be more than happy.

Comments (6)