After a break from coding in general, my way of thinking logically faded (as if it was there to begin with...). I'm no master programmer. Intermediate at best. I decided to see if i can write an algorithm to print out the fibonacci sequence in Java. I got really frustrated because it was something so simple, and used the debugger to ...
I'm currently looking for a Java Mesh Library.
If my understanding is correct, this would be something similar to OpenMesh.
All I've found at moment is JMesh 'A Polygonal Mesh Library in Java' (http://jmesh.origo.ethz.ch/) which is still in development.
Context : turning a very large stl file into a Mesh structure (probably winged- or...
I need to perform certain operations on a class after it was unmarshalled
(after it is constructed by JAXB, rather then by myself).
Is there such a functionality in JAXB?
If not, how could I achieve it?
...
Hello,
If I write this line in Java:
JOptionPane.showInputDialog(null, "Write something");
Which method will be called?
showInputDialog(Component parent, Object message)
showInputDialog(Object message, Object initialSelectionValue)
I can test it. But in other cases similar to this, I want to know what happens.
Martijn
...
I'm looking for a complete java development infrastructure with an integration of:
an IDE like eclipse,
a build system like Maven,
a version control system like subversion,
a continuous integration server like Hudson,
a repository manager like Nexus,
an automated release plugin like Maven Release Plugin.
Further I'd like to have:
a...
I'm using SLF4J with Log4J underneath. What access levels should I be setting my loggers to?
static final Logger logger = LoggerFactory.getLogger(ClassName.class);
...
I'm dealing with code that does various IO operations with files, and I want to make it able to deal with international filenames. I'm working on a Mac with Java 1.5, and if a filename contains Unicode characters that require surrogates, the JVM can't seem to locate the file. For example, my test file is:
"草鷗外.gif" which gets broken int...
"%11.2lf" of C++ is equivalent to ?
You guys have any resource that shows the equivalent formats for both Java and C++?
...
I am not able to get values from both files and text input in a servlet when my form includes multipart/form-data. I am using the apache.commons.fileuploads for help with the uploads. Any suggestions. Also in the code below there are some things that I feel should be more efficient. Is there a better way to store these multiple files in ...
It's easy to make objects available to Rhino from Java using ScriptableObject.putProperty, but is there a way to expose a top-level function? That is, can I make it so scripts in Rhino can call foo() and have that call out to Java code?
...
I want to maintain a collection of objects of type Odp. Odp implements Comparable. I need to be able to refer to an object in the collection with its integer name. This integer must correspond to its sort order (not insertion order). Each integer only applies to one Odp, and vice versa.
I have a function compareOdp(Odp o1, Odp o2) that ...
I created a program to draw many polygons automatically everytimes user presses a button. The points of the polygon are generated automatically using the random function. The problem is that, since the points of the polygon were randomly generated, some of the polygon are overlap with other polygon. How can I avoid this, so that every po...
I used to think that each memory location contains 8, 16, 32 or 64 bits. So 0101 would be stored in an 8 bit machine as 00000101 (sign extended if it was negative). This was all fine and dandy until I wrote a program in java out of curiosity to find out some more inner workings of this system.
The method in question looks like this:
p...
Hi,
I am using ajax google API to search a string against google. It is returning me all HTML files which have all tags including text.
If I want to get text only, what should I use?
My program is in Java.
Regards
Manjot
...
Hello,
I am trying to create a simple chat client using the red5 media server, but I seem to be having a slight hiccup. I am creating a shared object on the server side, and it seems to be creating it successfully. However, when I make changes to the object via the client (type a message), the SYNC event fires, but the content within th...
I've heard that using exceptions for control flow is bad practice. What do you think of this?
public static findStringMatch(g0, g1) {
int g0Left = -1;
int g0Right = -1;
int g1Left = -1;
int g1Right = -1;
//if a match is found, set the above ints to the proper indices
//...
//if not, the ints remain -1
try {
...
Hello Ladies and Gents,
A little help please.
I am designing a stateless server that will have the following functionality:
Client submits a job to the server.
Client is blocked while the server tries to perform the job.
The server will spawn one or multiple threads to perform the job.
The job either finishes, times out or fails.
The...
I keep getting the following error when I try to invoke the Facebook REST API Call:
Connect.registerUsers
Error Code: 100 - param accounts must be an array
JSON based response (from Facebook):
{"error_code":100,"error_msg":"param accounts must be an array.","request_args":
[{"key":"accounts","value":"{email_hash:5232156322_55ddgvc3d...
I am referring to this discussion. I have never written any code in C or in C++ . I do not have any CS background. However I have been working as Java developer for 5 years and now I have decided to learn more about CS and do some catching up.
...
I am writing a java program that connects to a website and it returns the HTML, for some reason I am having problems with it. Right now I am only able to access the website if I do
//example String host = "www.google.com"
but If I want to access a URL that is any more complicated then I get an UnknownHostException.
At first I tho...