Friday, April 25, 2008

Java - switch example

Java has a switch statement like most other languages. This example program demonstrates the switch statement without "break" after each case.

The output will be :This is three when x=3
This is default when x not equal to 1 or 2 or 3

class DefSwitch{
public static void main(String args[]){

int x=3;

case 1:
System.out.println("This is one");
System.out.println("This is default");
case 2:
System.out.println("This is two");
case 3:
System.out.println("This is three");



Knowmax - our intelligence hub

" Ultimatix entails digitisation of the whole organisation end to end in real time through the web. With every single employee connected through this process across the world in all facilities and offices, Ultimatix is TCS’s digital platform.."

Knowmax is the intelligence hub within Ultimatix.

knowmax t-shirt ultimatix
"Find Me" contest conducted every Monday question posted within Knowmax.

Tuesday, April 22, 2008

The lights come on in the sea side building

sea side buildingsFrom the ferry -lights come on as the night sets in

Monday, April 21, 2008

Jew Town Kochi

The Clock tower on the Synagogue(built in 1760)
synagogue gateSynagogue gate
jew town cochinThe jew town in cochin - shop near synagogue

To know more about Jews in India read wikipedia. The synagogue in cochin is popularly known as the paradesi synagogue and was built in 1568 by the descendants of Spanish, dutch and European jews. Various conservation efforts are in place for the synagogue.

Simple PERL counter

A simple PERL counter that counts the number of times a page is loaded. The script reads the number stored in "counter.txt" and increments it by one and displays the same. The incremented value is then stored in "counter.txt".

print "Content-type:text/html\n\n";

open (MYFILE, 'counter.txt');
close (MYFILE);


print $count;

open (MYFILE, '>counter.txt');
print MYFILE "$count\n";

close (MYFILE);

A simple script to demonstrate reading from and writing to a file using PERL.

Sunday, April 20, 2008

Chinese fishing nets Kochi

chinese fishing net cochin kochiThe fishing nets at the beach in cochin.
For more check wikipedia.

Saturday, April 19, 2008

Model Tricycle toy

tricycle toy modelModel tricycle toy

Worlds largest Varpu in Cochin

The worlds largest varpu is in this shop in Kochi.

Monday, April 14, 2008

The wonderful world of server side programming

Server side programming is wonderful as it provides access to lot of resources that client side scripts cant dream of...Database access, files to read and write to, mail programs and other applications on the server...

But Server side scripts are notorious for there slow speed of execution also.So its always a combination of both that triumphs.. Here is a imple perl script to print hello world... and since its a serebvr side script.. after printing "Hello world" it realises that it has entered the world wide web and prints "Hello web" :)

print "Content-type:text/html\n\n";
$first="Hello World";#scalar variable
print $first;
print "<br >";#line break
print $first;

Friday, April 11, 2008

Passing values between Javascript and Vbscript

Very few applications are using Vbscript, but lot of old code exsists that use Vbscript. So its not very difficult to run into a situation where values have to be passed from one to the other. First i was thinking of using a hidden text box to pass values between the two... but its much easier. You can call variables from both, meaning variables are not specific to the scripting langauge as both are client side scripting langauges.

See the following code:


jvalue=confirm('Pass a value to Javascript');

<script type="text/vbscript">
<!--javascript variable used in Vbscript function -->

vvalue=ucase("vbscript here")


<!--Vbscript variable used in Javascript function -->

<input type='hidden' name='passval'>

<!--no need of hidden text box-->


This example shows how one can use variables from javascript in vbscript and also vice-versa.
The situation is very different when values are to be passed between a client side script and a server side script.

Raganatitu bird santury-- yet to identify the birds

bird srirangapatanam

cranes rangantitu


Thursday, April 3, 2008

Hard coding username and password

If you are thinking of hardcoding username and password.. pls dont do it. Here are some sane reasons not to do it:
  1. When the password expires, its got to be reset...if its hard coded, they have got to search where the elusive password has been coded. Add to this the fact that the password will be encrypted and hardcoded---they have to break the code to get to the password...
  2. Code is not the place to put ur passwords in.. For example i know of a very widely used business application which will work only with the vendor provided how secure is your application?
  3. Hard coded paswords cant be changed with changing employes. So you never know..

Ok even after this if you want to hard code the password... please make sure you comment your code properly...