Tags:

ODBC connection to Access database in 64-bit Windows


I am using this tutorial to create a database connection from a java application to a Microsoft Access 2010 database. The tutorial creates a system dsn in windows, and then connects to that system dsn …

Run Handler messages in a background thread

Tags: , , ,


I want to run some Runnable in a background thread. I want to use Handler because it’s convenient for delays. What I mean is handler.post(runnable, delay); Where runnable should be run in background …

Tags: java jvm

Doesn’t the JVM release all the resources that are not explicitly closed by the programmer on program exit

Tags: ,


I’ve always heard that resources in java must be closed after use or these resources will get exhausted. Is it really a matter of concern for small programs that use very few resources(like 1 or 2 …

Tags: java regex string

Check if a String contains numbers Java

Tags: , ,


I’m writing a program where the user enters a String in the following format: “What is the square of 10?” I need to check that there is a number in the String and then extract just the number. If …

Tags:

android java not enough sequential memory for stringbuilder


My app is parsing a large http response, the http response is over 6 megabytes and is json, but not in a standard schema. final char[] buffer = new char[0x10000]; StringBuilder out = …

Tags: java

How I can index the array starting from 1 instead of zero?

Tags:


for (int i = 0; i < reports.length; i++) { Products[] products = reports[i].getDecisions; for (int j = 0; j < products.length; j++) { } } Here I want to index the inner for loop …

Tags:

How to clear ListBox? (ZK)


I have very simple question. I amazed, that couldn’t find answer. How can I make total clearing of ListBox (org.zkoss.zul.ListBox) in ZK Framework?

Tags:

Android Thread Allocation – growing heap?


Hi everyone out there, i am developing an android application against API 7 at the moment in which i use an activity which need to be restarted. Lets say my activity looks like this: public class …

Java 8: Where is TriFunction (and kin) in java.util.function? Or what is the alternative?

Tags: , ,


I see java.util.function.BiFunction, so I can do this: BiFunction f = (x, y) -> { return 0; }; What if that is not good enough and I need TriFunction? It doesn’t …

Tags:

How do I convert unicode codepoints to their character representation?


How do I convert strings representing code points to the appropriate character? For example, I want to have a function which gets U+00E4 and returns รค. I know that in the character class I have a …