how can i say in java
if i get to the end of a row in a 2d array and i have only encountered 0's in that row
to set row to the next one (row ++) and set column to 0 (column = 0)?
i am having problems where my algorithm i going in to an infinite loop :D
thanks
...
Greetings,
Is there any open source graph database available other than Neo4J??
NOTE: Why not Neo4J?
Neo4J is opensource, but counts primitives (number of nodes,relationships & properties). If you are using it for commercial use. And does not have any straight forward information of pricing on official website. so there can be potenti...
We have an Applet that can possibly display Chinese text. We are specifying a font for it (Arial), it works fine under both Windows and Mac OSX.
But in Firefox on Linux the Chinese characters are rendered as squares. Is there a way to work around this? Note that we can't assume the existence of a particular font file on the client.
...
I know that the SMS content provider is not part of the public API (at least not documented), but if I understand correctly it's still possible to use many of the SMS features as long as you know how to use the API(?).
E.g it's pretty straightforward to insert an SMS into your inbox:
ContentValues values = new ContentValues();
values...
We are implementing a web page to maintain an organisational structure. The structure is stored in SQL Server 2008 and uses the new HierarchyID data type. Because we have had problems getting JPA and Hibernate to play with this new data type we have decided to use views and stored procedures to abstract away this data type. So we want to...
I have the following problem. I have something like 300 Eclipse Plugins. Now, as part of an ant script I want to read all MANIFEST.MF files and then look for the execution environment string.
Bundle-RequiredExecutionEnvironment: J2SE-1.4
Now, this string has several possible values. I want to create a report that lists the execution...
For a really abstract application I am creating, I need to call methods without knowing their parameter types and only knowing the parameters in a String shape.
Let say I have the method;
getNames(String like, int amount);
and I have a array of strings containing the 2 parameters, so lets say I have;
String[] params = new String[] {...
I understand that Java can load/execute DLL code, but I'm wondering if there are any security checks to prevent untrusted code from the system being called by a JVM. Couldn't this destroy the system -- are there any OS features that prevent this? Or can someone just write in Java itself some method that prevents untrusted code from being...
Hello all
ok i made a midlet through which i can connect to server pages and get soem information as response.
For example i made a midlet through which i acced url: http://example.com/?u=nepal&t=1
Now i want to change the value of u as per users input.
I made a text field through which users can input desired name in u=*
Now how ca...
Hi,
I am trying to Compress and Archive all the files in a folder, using Java Runtime class. My code snippet looks as this :
public static void compressFileRuntime() throws IOException, InterruptedException {
String date = Util.getDateAsString("yyyy-MM-dd");
Runtime rt = Runtime.getRuntime();
String archivedFile = "myuse...
How do I get the charset from javax.mail.Message object?
...
Hello All...
I am new to Spring Web MVC..
Can I get some example or online link that shows me how to implement logout feature using spring web mvc ?
I don't want to use the in built feature of spring security (i.e. ACEGI)..
Thanks in advance...
...
Calendar rightNow = Calendar.getInstance();
String month = String.valueOf(rightNow.get(Calendar.MONTH));
After the execution of the above snippet, month gets a value of 10 instead of 11. How come?
...
Using Bluetooth I wish to communicate between a Windows PC and a mobile phone. The PC will probably have Bluecove while the mobile comes with JSR-82.
Do I have to implement CRC and other error checking procedures in my software related to Bluetooth transmission and reception or does the underlying Stack and hardware takes care of thos...
I am implementing an new eclipse refactoring. This will enable developers to Pull-up the preconditions statements from a child method to the parent method.
This all works perfectly when I select "Finish" in the refactoring wizard, but when I select "Preview" I get an error "No target edit provided." This seems to be caused by a prob...
why is there syntax error on this line ( shown below )
package org.temp2.cod1;
import java.security.*;
import javax.crypto.*;
import javax.crypto.spec.*;
import java.io.*;
public class Code1 {
byte[] plaintext = new byte[32]; // <<<<<<<<<<<<<<<<<<<<<<<<<< syntax error
for (int i = 0; i < 32; i++) {
plaintext[i] = (byt...
Any reason why a call to
File.createTempFile("prefix", ".suffix", new File("C:\\");
might take 40-50 seconds to complete?
Update:
I knocked up a little test harness that benchmarks creating 100 test files on C:\ and the default tmp folder. Specifying "C:\" is consistently ~0.9ms slower than just leaving it on the default, allowing fo...
I am using Lucene to index and search a small number of large documents. Using the demo from the Lucene site I have indexed the documents and am able to search them. However, the search result is not particularly useful as it points to the file of the document. With very large documents this isn't particularly useful.
I am wondering if ...
Hello Guys,
I would like to know if there are any recommended patterns for errorKey -> errorMessage look up? I am trying to improve my exception handling techniques and would be grateful for some ideas.
I am using some third party software and when an exception occurs they return an error key in the format THIRD_PARTY_ERROR_KEY. This...
Hello,
when i log in into my webapp dwr start their execution, and after that make this error log:
18-11-2009 12:09:13 [http-8080-Processor24] ERROR org.directwebremoting.util.LogErrorHandler
- Line=7 Element type "filter" must be declared. 18-11-2009 12:09:13 [http-8080-Processor24] ERROR org.directwebremoting.util.LogErrorHandler
- L...