Sunday, August 3, 2008

firefox advanced configuration

type about:config in address bar and change the firefox configuration!

Saturday, August 2, 2008

Sunday, July 27, 2008

farsi dictonary in ubuntu

for first you need to download Stardic dictionary in ubuntu .
http://wiki.ubuntu-ir.org/MehdiHassanpour/uploads?action=AttachFile&do=get&target=stardict_3.0.0-2_i386.deb

when package downloaded , double click on it and install package using package manager .

Close the Stardict if it's running .

then go to Babylon Glossary Page and download your favorite Glossary .
http://info.babylon.com/glossaries/8F3C/hFarsi___advanced_version.BGL

now you need to convert the bgl file ( bgl is the format of babylon glossary ) . to convert it you need a program call dictconv .
http://3v1n0.tuxfamily.org/pool/feisty/3v1n0/dictconv_0.2-0~3v1ubuntu1_i386.deb
when package downloaded , double click on it and install package using package manager . or (sudo dpkg -i dictconv_0.2-0~3v1ubuntu1_i386.deb)

when you installed dictconv , you should convert bgl file with this command in terminal :
dictconv test.BGL -o test.ifo
(test is the name of your downloded glossary )

the output of this command is three file :

test.ifo , test.idx , test.dict

now type this commands in terminal :
sudo apt-get install dictzip
dictzip test.dict
sudo apt-get install dictzip dictzip test.dict

this will convert your test.dict file to test.dz .
now put these files to a folder same as test :
test.ifo , test.idx , test.dz
then you should copy the " test " folder to Stardict dictionary directory . to do it :
sudo cp -r test /usr/share/stardict/dic
sudo cp -r test /usr/share/stardict/dic

now open Stardict again .

Wednesday, July 23, 2008

every about HTTP in java

http://fisheye1.atlassian.com/browse/~raw,r=1.1.2.19/compiere/serverApps/src/main/applet/org/compiere/ifm/filetransfer/monitor/HttpFileTransfer.java

Thursday, June 26, 2008

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

Create the directory if it is not there:
Code:
sudo mkdir /var/run/mysqld/

touch the file to create it
Code:
sudo touch /var/run/mysqld/mysqld.sock

change the ownership of the folder and socket to the mysql user
Code:
sudo chown mysql /var/run/mysqld/
sudo chown mysql /var/run/mysqld/mysqld.sock

free icon

http://www.ingraphic.ir/recommend/top20_free_icon_sites.php

Saturday, May 3, 2008

Tuesday, February 26, 2008

windows vista Snipping Tool

start
snip

windows run auto application once and just once

HKEY_LOCAL_MACHINE/ SOFTWARE/ Microsoft/ Windows/CurrentVersion/ RunOnce
new: String Value
name:
data value : application address

google search trick

search music files:
intitle:index. of? format name
e: intitle:index. of? Mp3 jojo

search flight
flight from ... to ...

Thursday, February 14, 2008

java change keyboard layout

Visit the following article http://java.sun.com/products/jfc/tsc/articles/InputMethod/inputmethod.html
and read it carefully.

if you download and copy following jar file to /lib/ext you will have a menu item called "select input method" added to all swing applications.
http://java.sun.com/products/jfc/tsc/articles/InputMethod/InputMethodHotKey.jar

You can find full specification and api document here
http://java.sun.com/javase/6/docs/technotes/guides/imf/index.html

Finally the direct answer is here:
Any swing component which extends from java.awt.Window has a method called getInputContext(). You can change the input method like this, it will automatically change the keyboard layout when you focus the component.
for example"
yourMainJFrame.getInputContext().selectInputMethod(new Locale("fa", "IR"));