If you have multiple jar files in your Eclipse project, then you would have some problems, if some jar files have classes with the same name. In this case, the priority order of the jar files should matter, because you always want to import the right class.
How to set the priority order of your jar files in Eclipse?
Right click your project, and then click the Property menu.
In the "Java Build Path" menu on the left of the popup Window.
Then you can see the "Order and Export" tab which shows the order of the jar files and source codes.
Friday, November 2, 2012
Thursday, September 20, 2012
How To Open a Command Prompt in Windows 8
Windows 8 has been released recently, and some people complain of it, since it changes the way in which users used to do with Windows.
However, I really like it, for the simple reason that it integrates nearly all the Microsoft products together, e.g. Windows on PC, Windows on Phone, and also Xbox.
One of the new features that I found useful is that in Windows 8 file explorer, you can easily open a command prompt in the current folder by simply clicking the menu File -> Open command prompt, which is the one that I has been expecting for a long time.
However, I really like it, for the simple reason that it integrates nearly all the Microsoft products together, e.g. Windows on PC, Windows on Phone, and also Xbox.
One of the new features that I found useful is that in Windows 8 file explorer, you can easily open a command prompt in the current folder by simply clicking the menu File -> Open command prompt, which is the one that I has been expecting for a long time.
Tuesday, September 18, 2012
Useful add-ons of Firefox
FireBug 1.9
A useful tool used to see the html architectures of web pages.
HttpFox
A tool used to see the TCP/UDP packages sent from/to Firefox.
A useful tool used to see the html architectures of web pages.
HttpFox
A tool used to see the TCP/UDP packages sent from/to Firefox.
Tuesday, July 24, 2012
How to install Git on Linux
1. The easiest way is to install Git using package managers, and you can refer to the following page:
http://git-scm.com/downloads
2. if you really cannot use any package manager, the final choice is to install Git from its source codes, which can be found at:
http://code.google.com/p/git-core/downloads/list
Then you can install Git from the source code (according to the INSTALL in the root directory of the Git source code tarball):
$ make configure ;# as yourself
$ ./configure --prefix=/usr ;# as yourself
$ make all doc ;# as yourself
# make install install-doc install-html;# as root
http://git-scm.com/downloads
2. if you really cannot use any package manager, the final choice is to install Git from its source codes, which can be found at:
http://code.google.com/p/git-core/downloads/list
Then you can install Git from the source code (according to the INSTALL in the root directory of the Git source code tarball):
$ make configure ;# as yourself
$ ./configure --prefix=/usr ;# as yourself
$ make all doc ;# as yourself
# make install install-doc install-html;# as root
Wednesday, June 27, 2012
how to change the language of Windows 7 Business
Microsoft provides free language solutions for Windows 7 Ultimate/Enterprise, but not for Windows 7 Business.
Of course, you can pay some money to upgrade your Windows 7 Business to Ultimate/Enterprise for the privilege of changing languages.
There is also one free solution: using Vistalizator:
http://www.froggie.sk/download.html
This website also provides the language files, MUI language pack, for different Windows systems.
Of course, you can pay some money to upgrade your Windows 7 Business to Ultimate/Enterprise for the privilege of changing languages.
There is also one free solution: using Vistalizator:
http://www.froggie.sk/download.html
This website also provides the language files, MUI language pack, for different Windows systems.
Wednesday, June 13, 2012
Berkeley language model and Google Web 1T language model
Berkeley language model provides a library for estimating storing large n-gram language models in memory and accessing them efficiently. The most amazing contribution of it is that it can be used with the Google Web 1T language model, and it also provides the binary Web 1T language models for many languages:
English
Chinese
Czech
Dutch
Frenchh
German
Italian
Polish
Portuguese
Romanian
Spanish
Swedish
The homepage of the Berkeley language model project is here, and you can find the binary language models of the Google Web 1T here.
English
Chinese
Czech
Dutch
Frenchh
German
Italian
Polish
Portuguese
Romanian
Spanish
Swedish
The homepage of the Berkeley language model project is here, and you can find the binary language models of the Google Web 1T here.
Tuesday, June 12, 2012
Static variables in Python
While Python introduces a lot of new features to the programming community, the variable types in Python are always not clearly defined. In this post, I will discuss the static variables in Python.
(1) How to use static variables in Python classes
(2) How to use static variable in Python functions (Python does not really have static variables in functions, so here we use the attribute of a function instead of real static variables)
(1) How to use static variables in Python classes
class Foo(object):
counter = 0
def __call__(self):
Foo.counter += 1
print Foo.counter
foo = Foo()
foo() #prints 1
foo() #prints 2
foo() #prints 3
(2) How to use static variable in Python functions (Python does not really have static variables in functions, so here we use the attribute of a function instead of real static variables)
def myfunc():
if not hasattr(myfunc, "counter"):
myfunc.counter = 0 # it doesn't exist yet, so initialize it
myfunc.counter += 1
Subscribe to:
Posts (Atom)