How to Get 5 Facebook Credits for Free
- Install new Hello City game using this link
- Follow the game tutorial steps
- At the end of the tutorial you will collect 5 Facebook Credits.
»
- koba's blog
- Add new comment
- 372 reads
Unexpected database connection problem. Hibernate broken pipe.
While using Hibernate, several times I faced the same database communication problem: for some reason after long inactivity time connection was closed. Each time that happens it takes some my time to remember the solution. So this post is more like a note for myself, but also can be helpful for those who can find it in Internet.
»
- 2 comments
- Read more
- 5208 reads
- Russian
Hibernate. Count queries without HQL
I like to use Criteria class for making database queries. Its easy to use and easy to understand, much better then HQL queries. For example:
@SuppressWarnings("unchecked")
public List<LogAdd> findAddLogs(Long minLogID) {
Criteria criteria = session.createCriteria(LogAdd.class);
criteria.add(Restrictions.gt("id", minLogID));
criteria.addOrder(Order.asc("date"));
return criteria.list();
}
Previously I had to use HQL only for writing 'count' type queries. Because just trying to get collection size mean to load all elements into memory from database and only then count them. Of course such kind of code isn't acceptable.
»
- 2 comments
- Read more
- 6089 reads
- Russian
13949712720901ForOSX
»
- Add new comment
- 3559 reads
Installing Apache Tomcat 5.5 on Debian 4 (Etch) Linux
If you need to install and start Apache Tomcat quickly, probably this article can help you.
1) Sun JDK 5 need to be installed. It can be installed from Debian repository with unstable software
Add to /etc/apt/sources.list following lines (if not present yet):
# for sun-java packages in unstable deb http://ftp.debian.org/debian/ unstable non-free deb-src http://ftp.debian.org/debian/ unstable non-free
»
- 2 comments
- Read more
- 5802 reads
- Russian
Java Application Process Name in Mac OS X
I have created simple HelloWorld application to reproduce this problem. And I was really surprised when saw that it's process name was correct!
»
- Add new comment
- Read more
- 4787 reads
- Russian
New project with maven2. Part 2 (wizard)
As was discussed in one previous post I have changed the script which became a wizard. This improvement makes the application generation process easier for the user. It also provided additionally functionality.
After answering on several questions and specifying a required type of application a project will be generated. Just run Eclipse IDE and import it into your workspace.
»
- Add new comment
- Read more
- 3409 reads
- Russian
Java application menu in system tray
I got the task to implement system tray menu for java desktop application. After some research I found several ways to finish my task:
- java 6
- java desktop components integraion library (jdic)
- eclipse swt
I have only the one biggest requirement for new application. It should support all most popular operating systems (win, linux and mac os). Java 6 has no support on mac os x. For some reason I was thinking that Jdic has no support on Mac OS X too (now I know that I was wrong). Starting from 3.3 version, SWT started supporting all main operation systems. And as the result SWT became my one and only choice.
»
- Add new comment
- Read more
- 5419 reads
- Russian
You may make up a free wallpaper, but still it will be hard to get it
Have you ever try’s to look for free wallpapers? Looks like quite easy. Just google for ‘free wallpapers’ and get a lot of results. But, when I try’s to do this for myself I found several problems. So I decided to review 30-40 sites and select the best ones.
First of all, what the most common problems I have found? Look next:
»
- 2 comments
- Read more
- 5992 reads
New project with maven (small help note)
Once in a while I need to make small java applications maybe for testing some library, maybe as helper applications. As for me the fastest way to do this, is use maven archetype mechanism. But new project creation command not very user friendly since it required several parameters that you need to remember (‘-DarchetypeGroupId’ or ‘-DgroupId’). As solution you can make small help script and put it into your projects folder.
As quick solution I make small shell script (new_project.sh) that can be used for fast start:
»
- Add new comment
- Read more
- 3659 reads
- Russian