Tuesday, July 14, 2009

Get mobile directories/roots using J2ME

//try this code

Enumeration roots = FileSystemRegistry.listRoots();
while(roots.hasMoreElements()){
//here you can do your actions on the roots-
//use 'roots.nextElement()' to get the root/directory
//for eg you can add these directories into a choice group.
//To get the string value of the diectory use
//'String=roots.nextElement().toString();'
}

java cellphone software developers cochin

website hosting development cochin kerala

change screen resolution of linux pc command line

You can change the screen resolution of u'r linux pc by just input the command "xrandr"

[root@localhost] xrandr
will display the compatible resolutions
u can set a resolution by
[root@localhost] xrandr -s 1024*768

Monday, July 13, 2009

Take Screenshot Using Linux Command

Do you want to take screen shot using command. Then try this command in the console.

command - import

[root@odcclient6 Setup]# import -trim /root/Desktop/test.jpg


Cheers.................... :-)

Random Number generation in PHP

function randomdigit($digits) {
static $startseed = 0;
if (!$startseed) {
$startseed = (double)microtime()*getrandmax();
srand($startseed);
}
$range = 8;
$start = 1;
$i = 1;
while ($i<$digits) {
$range = $range . 9;
$start = $start . 0;
$i++;
}
return (rand()%$range+$start);
}
?>

Zion Ultra..Place your inbox anywhere in yor mobile...




Zion Ultra Beta 2


An application that allow you to place your Inbox anywhere in your mobile phone. Through this cellphone application you can choose where to place your inbox,outbox and which port in which you are sending SMS etc.It also allow you to create txt templates in you mobile and also you can send txt files as SMS. If this application is running on your mobile and other person is sending message throug this application you will receive the SMS in this application instead of the normal inbox(be ensure that both sender and receiver must use the same port-default port is 5000).

cellphone application developers website developers webhosting, Cochin, Kerala

Download Zion Ultra Beta 2

Linux Funny Commands

THE WHATIS COMMAND

If you want to know what is the use of cd command just type in console

[sujith@odcclient6 bin]$ whatis cd
cd (1p) - change the working directory
cd [builtins] (1) - bash built-in commands, see bash(1)

NOTE: Some times you may have to build the database first by running "/usr/sbin/makewhatis".


Here comes the fun :

[sujith@odcclient6 bin]$ cd /usr/bin
[sujith@odcclient6 bin]$ ls | xargs whatis | less

[ls = list directory contents, xargs = build and execute command lines from standard input]

mysql password reset in 10 steps

suppose u forgot the password of u'r mysql server
while u are trying to logged in it will display a message like
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
so here is a solution to change the password of mysql with out loss of u'r data
first you have to stop the mysqld service
1)service mysqld stop

then u have to find out the mysqld path
2) whereis mysqld
it will display the mysqld location in your system
Then u have to run the mysqld with the option --skip-grant-tables

3)/usr/libexec/mysqld --skip-grant-tables

then the mysql will be started
090713 13:15:33 InnoDB: Started; log sequence number 0 11427172
090713 13:15:33 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.45' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

Now u can login to mysql with out using password using a client
4)mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.0.45 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

after that u have to choose the mysql as your database
5)use mysql
in mysql database the user table contains the login details of the user

to see the structure of the table "user" just input
6)desc user

u have to use update command to change the password of a user
7)update user set password=password('test123') where user='root';
this will set the password of root to test123

8)flush privilges
;

kill the mysqld u have started
9)killall -9 mysqld
start mysqld service again

10)service mysqld start

now u can login to the mysql root account using test123 as password

LinkWithin

Related Posts with Thumbnails