Running Multiple Instances of Google Talk (GTalk Polygamy) and Login as Multi-Users.

Ability to polygamy running multiple Google Talk is useful if users have multiple Google Talk accounts (or Google or Gmail accounts that used to login to GTalk) or multiple profiles or personalities, and don’t want to log on and off from one account to another account every time when want to switch, or want to log in to all accounts at the same time on the same computer.

You can add the /nomutex switch or parameter to existing Google Talk shortcut, or create a new shortcut with the /nomutex command line parameter.

To edit existing Google Talk shortcut:

1) Right click on the Google Talk shortcut.
2) On the right click contextual menu, click on Properties.
3) Go to Shortcut tab on Google Talk Properties window.
4) On the Target textbox, add in the /nomutex to the end of the line so that it looks like below (or you can simply copy and paste the below syntax and replace the original).

Target: “C:\Program Files\Google\Google Talk\googletalk.exe” /nomutex

5) Click on OK.

To create a new shortcut for Google Talk:

1) Right-click on the desktop or anywhere you want to place the GTalk shortcut.
2) Select New on the right click context menu.
3) Then select Shortcut.
4) Copy and paste the following line to the text box when prompted to type the location of the item:

“C:\Program Files\Google\Google Talk\googletalk.exe” /nomutex

5) Click on Next.
6) Give the shortcut a proper name such as Google Talk or Google Talk Multiple or Google Talk Polygamy.
7) Click OK until you are done.

If you have hex editor, you can act like a hacker and modify the bits in Google Talk program so that it will always allow multiple instances of GTalk to be launched whether the /nomutex switch is specified or not.

Launch hex editor and open googletalk.exe, then search for the following patterns in the hex editor:

004536FD . 3BC6 CMP EAX,ESI
004536FF . 75 05 JNZ SHORT googleta.00453706

Modify the string to look like the following:

004536FD . 8BC1 MOV EAX,ECX
004536FF . EB 05 JMP SHORT googleta.00453706

How this Works?
The mutex is short for mutual exclusion object.
A mutex is a program object that allows multiple program threads to share the same resource, but not simultaneously.

So, in the hack above, we used nomutex (no-mutex) to use the same resources simultaneously….!

Source :- http://insecure.in

Define a class Car having data members Brand Name, No of Gears,Sports car or not and Price. Define constructors to initialise data members. Define method to display the output.

class Car

{

String BrandName;

int noG;

String Type;

float price;

Car(String s,int i,String t,float p)

{

BrandName=s;

noG=i;

Type=t;

price=p;

}

void display()

{

System.out.println(“**********CAR DETAILS**********”);

System.out.println(“Brand Name: “+BrandName+”\nNo.

Of Gears: “+noG+”\nType: “+Type+”\nPrice: “+price+”\n”);

}

}

 

class CarDetails

{

public static void main(String args[])

{

Car c=new Car(“TATA NANO”,4,”Family car”,98899.99f);

c.display();

}

}

 

 

 

Output

 

Brand name: TATA NANO

No. of gear:4

Type: Family car

Price: 98899.99f

Define a class circle having data member radius. Define methods to calculate area and perimeter and to display the result.

import javax.swing.JOptionPane;

class Circle

{

float r;

void input()

{

 

r=Float.parseFloat(JOptionPane.showInputDialog(“Enter The Radius Of The Circle: “));

 

}

void calc()

{

System.out.println(“Area Of Circle Is: “+(3.14*r*r)+”\nPerimeter Of Circle Is: “+(2*3.14*r));

}

}

 

class CirArea

{

public static void main(String args[])

{

Circle c=new Circle();

c.input();

c.calc();

}

}

 

 

Output

 

Enter the Radius of the circle 12

Area of circle is 452.15999

Perimeter of the circle is 75.36

Define a class Rectangle having data members width and height. Define methods to calculate area and perimeter and to display the result.

import javax.swing.JOptionPane;

class Rectangle

{

float width,height;

void input()

{

height=Float.parseFloat(JOptionPane.showInputDialog(“Enter The Height Of The Rectangle: “));

width=Float.parseFloat(JOptionPane.showInputDialog(“Enter The width Of The Rectangle: “));

}

void calc()

{

System.out.println(“Area Of Rectangle Is: “+(height*width)+”\nPerimeter Of Rectangle Is: “+(2*(height+width)));

}

}

 

class RecArea

{

public static void main(String args[])

{

Rectangle r=new Rectangle();

r.input();

r.calc();

}

}

Output

Enter the height of the rectangle 43

Enter the width of the rectangle 34

The area of the rectangle is 1530

The perimeter of the rectangle is 158

 

Create a simple calculator which will perform add,sub,div & multiplication.

<html>
<head><title> MATHEMATICAL OPERATION </title>
<script type=text/javascript>
function add() {

var a=parseInt(document.f1.t1.value);
var b=parseInt(document.f1.t2.value);
var c=a + b;
document.f1.t3.value=c;
}

function sub() {

var a= parseInt(document.f1.t1.value);
var b= parseInt(document.f1.t2.value);
var c=a – b;
document.f1.t3.value=c;
}

function div() {

var a= parseInt(document.f1.t1.value);
var b= parseInt(document.f1.t2.value);
var c=a / b;
document.f1.t3.value=c;
}

function mul(){

var a= parseInt(document.f1.t1.value);
var b= parseInt(document.f1.t2.value);
var c=a * b;
document.f1.t3.value=c;
}

</script>
</head>
<BODY bgcolor=’green’>
<form name = f1>
Enter first number<Input type=text name = t1 />
Enter second number<Input type=text name = t2 />
Result <Input type = text name=t3 />

<Input type=button value=Add onclick=add() />
<Input type=button value=Sub onclick=sub() />
<Input type=button value=Div onclick=div() />
<Input type=button value=Mul onclick=mul() />

</form>
<body>
</html>

Create a web page in which the color is automatically changing in time.

<html>
<head>
<script type=”text/javascript” language=”javascript”>
function changeColor(){
if(document.bgColor==”red”){

document.bgColor=”green”;
}
else if(document.bgColor==”green”){

document.bgColor=”blue”;
}
else if(document.bgColor==”blue”) {

document.bgColor=”white”;
}

else if(document.bgColor==”white”) {

document.bgColor=”violet”;
}
else if(document.bgColor==”violet”) {

document.bgColor=”cyan”;
}
else if(document.bgColor==”cyan”) {

document.bgColor=”black”;
}

else if(document.bgColor==”black”) {

document.bgColor=”yellow”;
}
else if(document.bgColor==”yellow”){

document.bgColor=”orange”;
}
else if(document.bgColor==”orange”) {

document.bgColor=”red”;

}
setTimeout(‘changeColor()’,1000);
}

</script>
</head>
<body bgColor=”red” onload=”changeColor()”>
</body>
</html>

Create a dynamic table.

<html>
<head>
<title>Table demo</title>
<script type=”text/javascript”>
function demo()
{
row=parseInt(prompt(“Enter no of rows to be created?”,”"));
col=parseInt(prompt(“Enter no of columns to be created?”,”"));
name=prompt(“Enter your name”,”");
color=prompt(“Enter any color”,”");
document.write(“<center><table border=5 bordercolor=red height=70% width=50%>”);
for(a=0;a<row;a++)
{
document.write(“<tr>”);
for(b=0;b<col;b++)
{
document.write(“<td><font color=”+color+”><center>”+name+”</center></font></td>”);
}
document.write(“</tr>”);
}
document.write(“</table></center>”);
}
</script>
</head>
<body>
<center><input type=button value=”Table Demo” onClick=”demo()” /></center>
</body>
</html>

Output

Create a table using rowspan & colspan with fil the color.

<html>
<head>
<title>Mark sheet</title>
<body>
<center>
<table border =3 bordercolor = "lightblue" width = 70%
height = 50%>
<tr>
  <td colspan = 2 bgcolor = "red" align = center>a</td>
  <td rowspan = 2 bgcolor = "green" align = center>b</td>
</tr>
<tr>
 <td rowspan = 2 bgcolor = "yellow" align = center>c</td>
 <td bgcolor = "lightblue" align = center>d</td>
</tr>
<tr>
<td colspan = 2 bgcolor = "pink" align = center>e</td>
</tr>
</table>
</body>
</head>
</html>

Output

Create a table using rowspan & colspan.

<html>

<head>

<title>Mark sheet</title>

<body>

<center>

<table border =3 bordercolor = “lightblue” width = 70% height = 50%>

 

<tr><td rowspan = “2″>NAME</td><th colspan = “6″>MARKS</th></tr>

 

<tr><th colspan = “2″>SM</th><th colspan = “2″>SE</th><th colspan = “2″>ITA</th></tr>

 

<tr>

<td>EXAM</td><td>INTERNAL</td><td>SEMESTER</td>

<td>INTERNAL</td><td>SEMESTER</td><td>INTERNAL</td>

<td>SEMESTER</td>

</tr>

 

<tr>

<td>MCA01</td><td>23</td><td>40</td><td>25</td>

<td>49</td><td>22</td><td>50</td>

</tr>

 

<tr>

<td>MCA02</td><td>21</td><td>43</td><td>23</td>

<td>49</td><td>22</td><td>50</td>

</tr>

 

<tr>

<td>MCA03</td><td>19</td><td>42</td><td>22</td><td>49</td><td>22</td><td>50</td></tr>

 

</table>

</body>

</head>

</html>

Output

 

Create a form & validate it.

<html>

<head>

<title>Validation ::04-Feb-2012::</title>

<script type=”text/javascript”>

function validate()

{

email=document.test.email.value

name=document.test.name.value

course=document.test.course.value

phno=document.test.phno.value

if(email.length==”")

{

alert(“Enter Your Email….”)

return false

}

if(email.indexOf(“@”)==-1)

{

alert(“Invalid Email Id….”)

return false

}

if(name.length<6)

{

alert(“Please enter First name”)

return false

}

if(course.length==” “)

{

alert(“Please enter COURSE”)

return false

}

if(course.length>3 )

{

alert(“Enter Correct Course”)

return false

}

if(isNaN(phno) || phno.length<10)

{

alert(“Please enter the 10 digit mobile number correctly…”)

return false

}

 

alert(“Sueccsfull”)

return true

}

</script>

</head>

<body><center>

<form name=”test” onSubmit=”return validate()”>

<table>

<tr>

<td>Enter your Email:</td><td><input type=text  name=”email”></td>

</tr><tr>

<td>Enter your Name:</td><td><input type=text name=”name”></td>

</tr><tr>

<td>Enter your Course:</td><td><input type=text name=”course”></td>

</tr><tr>

<td>Enter your Mobile no:</td><td><input type=text name=”phno”></td>

</tr></table>

<input type=submit value=”Validate” name=”submit” href = “www.google.com”/>

</form>

<br/><br/>

</center></body>

</html>

 

Output :