java

...now browsing by tag

 
 

Android Chess Clock 1.0-b5 released

Thursday, February 18th, 2010

Today I released minor upgrade of Android Chess Clock. Major features implemented:

  • “Click” sound when players swapped
  • Application should be available also for devices like HTC Tattoo (explicit declaration of small screen support in AndroidManifest.xml)
  • Minor redesign of about screen
  • Updated Android Market text.
Share

Android Chess Clock 1.0-b4 released…

Monday, February 15th, 2010

I’m happy to announce that next release of Android Chess Clock was released today. For me it is important release as this is first one that I tested on my own Android Phone. There are many new features.

Screenshots of new features

image image image
Selection of calculation
methods
Bronstein time control
configuration
New Icon

Full new features & bug fixes list

  • Bug fixes
    • Fixed issue with incorrect reset when coming back from Configuration screen via Cancel button
  • New features
    • New icon
    • Added new time control calculation methods:
      • Simple Delay
      • Fischer
      • Bronstein
    • Added button allowing bug report

Coming soon

  • Hourglass method
  • Support for Go & Scrabble time control approaches
Share

Android Chess Clock 1.0-b3 released today

Saturday, February 6th, 2010

I have released next version of Android Chess Clock. Major change is refactoring of calculation engine to support multiple calculation strategies in future. Although this change is not visible for user today it is investment for future.

Screenshots

acc-main acc-main-l

Major changes in this release

  • slight screen design graphic improvement
  • added different layout for landscape screens
  • when any player runs out of time application allows one click reset of time to start next game quickly
  • added feedback button to About screen
  • various small code improvements

Coming soon

  • additional time control algorithms
Share

Android Chess Clock 1.0-b1 released…

Saturday, January 30th, 2010

I’m happy to inform you that first beta version of Android Chess Clock was released to Android Market, filed under category Games/Brain and Puzzle.

Application is currently fairly simple (as you can see on screenshot) but works:

acc-main acc-config

Main features

  • supports Android 1.5+
  • players alternate by taping anywhere on the screen
  • supports small QVGA screens as well as HVGA
  • gently graphics without CPU (and energy) consuming animations
  • independent setting of time for every player

Application was tested on T-Mobile G1 (thanks to Honza) and Google Nexus One (thanks to Vindra) as I don’t have currently real Android device.

Known bugs & user requests

  • bugs
    • application resets countdown when you change orientation of screen from landscape to portrait
  • nice to have
    • missing icon
    • application does not run in full screen mode
    • time can be set only as hours and minutes but not seconds
    • sound when player runs out of time

Please write your feedback bellow the article.

Share

Netbeans performance problem: JPanel form is much slower if running inside RCP

Wednesday, August 5th, 2009

Last week I was fighting with very strange performance issue. We have quite complicated JPanel form and I was doing some performance opmtimization. I thought that it is now OK, but when then same form was executed as component inside NetBeans Rich Client Platform, it was horribly slow.

Click to continue »

Share

How to submit Bugzilla bug using XML/RPC and pure Java

Thursday, July 16th, 2009

Our project uses Bugzilla for tracking issues. I was looking for solution how to submit occured exception programatically. I found quite simple solution using Groovy and I have adapted it to pure Java.

Here is the source code:

import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.httpclient.HttpClient;
import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
import org.apache.xmlrpc.client.XmlRpcCommonsTransportFactory;

public class Main {
   public static void main(String s[])
      throws MalformedURLException, XmlRpcException {

        HttpClient httpClient = new HttpClient();
        XmlRpcClient rpcClient = new XmlRpcClient();
        XmlRpcCommonsTransportFactory factory = new XmlRpcCommonsTransportFactory(rpcClient);
        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();

        factory.setHttpClient(httpClient);
        rpcClient.setTransportFactory(factory);
        config.setServerURL(new URL("http://bugzilla.example.com/xmlrpc.cgi"));
        rpcClient.setConfig(config);

        // map of the login data
        Map loginMap = new HashMap();
        loginMap.put("login", "tomas.hubalek@....");
        loginMap.put("password", "*top*secret*");
        loginMap.put("rememberlogin", "Bugzilla_remember");

        // login to bugzilla
        Object loginResult = rpcClient.execute("User.login", new Object[]{loginMap});
        System.err.println ("loginResult=" + loginResult);

        // map of the bug data
        Map bugMap = new HashMap();

        bugMap.put("product", "Playground");
        bugMap.put("component", "Database");
        bugMap.put("summary", "Bug created from groovy script");
        bugMap.put("description", "This is text including stacktrace");
        bugMap.put("version", "unspecified");
        bugMap.put("op_sys", "Linux");
        bugMap.put("platform", "PC");
        bugMap.put("priority", "P2");
        bugMap.put("severity", "Normal");
        bugMap.put("status", "NEW");

        // create bug
        Object createResult = rpcClient.execute("Bug.create", new Object[]{bugMap});
        System.err.println("createResult = " + createResult);
     }
 }

Usage of Apache XML RPC Client is quite straightforward, only gotcha is that mapped parameters must be set passed as new Object[]{bugMap}. Otherwise you get ClassCastException.

Share

Éčka v potravinách – program pro váš mobil zdarma

Friday, February 8th, 2008

Na těchto stránkách si můžete zdarma stáhnout program do vašeho mobilního telefonu. Tento program vám umožní jednoduchým způsobem kontrolovat škodlivost jednotlivých éček. Program se ovládá pomocí kurzorových šipek, číslic a * a #.

Click to continue »

Share

hibernate.hbm2ddl.auto – What do values create, create-drop, update and validate mean?

Thursday, November 8th, 2007

I was looking into documentation for Hibernate for the meaning of these options. Unfortunately it is not written there.

I found explanation on Eyal Lupu’s blog:-)

Enjoy…

Share

Java: How to display incomplete stacktrace?

Thursday, September 13th, 2007

A few days ago we met some issue and there was huge stacktrace finishing with … 20 more.

We was disappointed that we cannot see real cause of the exception because we thought that Java is hiding most important exception details.

But in fact, there is nothing hidden, it is just misunderstanding of the stack trace.

Lets look at following java snippet:


01 public class Test {
02 
03    private static void a() {
04       try {
05          b();
06       catch (Exception e) {
07          throw new RuntimeException("Error occured in method a()", e);
08       }
09    }
10 
11    private static void b() {
12       try {
13          c();
14       catch (Exception e) {
15          throw new RuntimeException("Error occured in method b()", e);
16       }
17    }
18 
19    private static void c() {
20       throw new RuntimeException();
21    }
22 
23    public static void main(String a[]) throws Exception {
24      Test.a();
25    }
26 
27 }

Java2html

This code display following stack trace:

 Exception in thread "main" java.lang.RuntimeException: Error occured in method a()         at Test.a(Test.java:7)         at Test.main(Test.java:24) Caused by: java.lang.RuntimeException: Error occured in method b()         at Test.b(Test.java:15)         at Test.a(Test.java:5)         ... 1 more Caused by: java.lang.RuntimeException         at Test.c(Test.java:20)         at Test.b(Test.java:13)         ... 2 more 

and you can see complete stack trace although there is text .. 2 more and the real cause you can see at the top of the last exception.

For more info see description of the “bug” number 4775147 (Incomplete stack trace printed by Throwable.printStackTrace in JDK 1.4+) in Sun’s bug parade.

Share

DGX velice pěkně popsal pocity z Ruby, které mám už docela dlouho…

Tuesday, July 17th, 2007

U několik měsíců mám v draftech rozepsaný post o tom, že nechápu, proč Sun věnuje takové úsilí podpoře JRuby (viz http://www.netbeans.org/community/releases/60/, část věnovaná JRuby), přestože existují mnohem lepší skriptovací jazyky pro JVM (např. moje oblíbené Groovy).

Nikdy jsem tento post nedopsal, ale po přečtení článku od DGX na La Trine nemůžu než se připojit, k tomu, co David napsal.

Proto říkám: dříve než se vrhnete na Ruby on Rails, mrkněte se na Grails

Share

Switch to our mobile site