17 December 2010

Chat with your friends on your Mobile

Today almost every smartphones provide chat feature on gmail,facebook ,but some mobiles like mine doesn't provide this, so in order to enjoy all the fun of chating with friends ,today i will tell you an easiest way for this

For that you have to install eBudddy Mobile messenger on your mobile

Following are some features it supports



1:- You have friends on both MSN,Yahoo,gmail,Facebook???No problem! Now you can chat with them all from your mobile.

2:- eBuddy Mobile Messenger supports offline messaging. You can also receive offline messages. As soon as you login, you will get all the messages that were sent to you when you were offline.


There are many other featrures , just check out following link ,you will get to know all about this interesting software
eBuddy Mobile Messenger

Note:-if you face any difficulty in downloading and installing of this software,feel free to ask

10 December 2010

Way of Providing File Permissions to Java Applet

Sometimes if you have ever tried to run the Java Applet, through which you may want to write some data to some specific file on clicking button for example you want to keep track of various user name and passwords and write it to a file, in that case you may get an exception like this

“access denied(java.io.FilePermission filename write”

The reason for this exception is

The Java Platform security does not permit an applet to write to and read from files without explicit permission

A Java Applet has no access to local system resources unless it is specifically granted the access, So here Access permission is granted with a Policy File, and appletviewer is executed with the Policy File to be used for the Applet being viewed.

In order to provide file permissions to an applet ,you have to create a Policy File.

For that Open any Text editor ,say notepad and write the following code

grant {
permission java.io.FilePermission "<<ALL FILES>>","write";
};

Save it as “write.policy” without quotes

Note :- You may also give read permission

Now write code for your applet.If you haven't written till now. See the sample code below

import java.io.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
/*<Applet code="randomfile" height=400 width=400></applet>*/
public class randomfile extends JApplet implements ActionListener
{
JLabel l1,l2;
JButton b;
JTextField f1,f2;
String str="";
public void init()
{
l1=new JLabel("Username");
l2=new JLabel("Password");
b=new JButton("Submit");
f1=new JTextField(20);
f2=new JTextField(20);
FlowLayout f=new FlowLayout(100,20,25);
Container c=getContentPane();
c.setLayout(f);
b.addActionListener(this);
c.add(l1);
c.add(f1);
c.add(l2);
c.add(f2);
c.add(b);
}
public void actionPerformed(ActionEvent e)
{
Object o=e.getSource();
if(o==b)
{
repaint();
str=f1.getText()+" "+f2.getText();
RandomAccessFile r=null;
try
{
r=new RandomAccessFile("mo.txt","rw");
r.writeBytes(str);
r.close();
}
catch(Exception ee)
{

System.out.println(ee.getMessage());
}
//r.close();
}
}
public void paint(Graphics g)
{
g.drawString(str,100,200);
}
}


The above mentioned code will accept username and password from user and write it to a file mo.txt.

Now for running this applet instead of using normal command ie

appletviewer app.java

You have to use below mentioned command

appletviewer -J-Djava.security.policy=write.policy randomfile.java

It will run properly

09 December 2010

How to check whether javascript is enabled or not on client browser

This is a very common problem faced by web developers, when they want to develop a registration form for a website, which in turn depends on JavaScript for form validation or may be some other purpose, and then in that case, you may want to detect the settings of client’s browser and redirect him to different page and ask him to enable JavaScript.

Today I will explain you How to check this setting and redirect to a different page accordingly ?
We can detect whether user has enabled javascript or not in his browser by using noscript tag and if the JavaScript is disabled then the code within this noscript tag will be executed.

It is a two step process

1:- First add this code to your home page ,if javascript is enabled then it will redirect you to another page ie hello1.htm

<html>
<head>
<noscript>
<meta http-equiv="refresh" content="2; URL=hello1.htm">
</noscript>
</head>
<body>
Welcome
</body>
</html>

2:- Create another file say "hello1.htm" ,where you will show message

“It seems that your browser that doesn't support JavaScript. Please enable it if you want to use our services” or whatever message you want to print

So process is very simple and easy

03 December 2010

Protection of kids from inappropriate web content like adult sites etc. using OpenDNS

Last weekend, I was searching on Google,How to disable incognito mode provided by Google chrome??

Now you must be thinking what is this Incognito mode????

In Google Chrome whenever you want to browse in stealth mode. It offers the incognito browsing mode .While in incognito mode, Webpages that you open and files downloaded are not recorded in your browsing and download histories also, all new cookies are deleted after you close all incognito windows that you've opened.

But I didn’t find any way of disabling it. I searched a lot on this, but no use .Finally I came across OpenDNS, a free alternative solution for those especially parents, who want to protect their kids from inappropriate web content like adult sites, social networking websites.

OpenDNS gives you more than 50 filtering categories to choose from. Simply check the boxes of the categories you want to block and watch your filtering take effect within minutes.

It also provides protection form phishing by telling whether a particular site is fraudulent or not.

To know more. Just gave it a look

OpenDNS Solutions Overview

I am sure once you read it. You will find it very useful.

You can use the free service or paid, all depends on you choice.For free use, just sign up on their site and follow the instructions given by them

If you face any problem, Feel free to ask :)