I'm coming up against an unexpected daylight savings time problem in code I thought was purely UTC. I'm using Java 1.6, the iBatis SQL mapper (2.3.3), and Oracle XE (an eval version of Oracle 10.2) with the Oracle thin driver.
The database contains a table that represents a television broadcast schedule. Each "Asset" (program) has a s...
For the program idea I have, it requires that the software be written in one binary that is executeable by all major desktop platforms, meaning it needs an interpreted language or a language within a JVM. Either is fine with me, but the programming language has to balance power & simplicity (e.g. Python)
I know of wxPython but I have re...
Hi,
I am facing some problem during reading data from socket If there is some null data in socket stream so the DataInputStream would not read the full data and the so at the receiving end there is exception for parsing data.
What is the right way to read the data from socket so there is no loss of data at any time ?
Thanks in advan...
If you have used any decent java or .net IDE you can see the abundance of features that they provide that either do not exist in c/c++ IDEs or exist in a much more limited form.
I am thinking about features like:
Code Completion
Syntax Errors (and compilation errors with no need to compile)
Refactoring
Debugging (the amount of informa...
I am trying to read a node that will find the longest word in a tree.
My method is public static int word(Node d). So how would I have to find the length of that node? Would I just use the string that was made in the class? The class I would use initializes a boolean, String: theWord and children. Here is what I got:
int newWord = 0;
...
A few days back, while the built-in server (Tomcat v5.5) in eclipse was running, and while I was modifying the code, the server used to recompile and restart itself. I've gotten into a problem from the last day, where, the server DOESN'T load the LATEST version of the code I'm writing, instead, (I'm assuming) it compiles its own internal...
package arraySort;
import java.io.IOException;
import java.io.File;
import java.util.*;
public class openFile {
int x;
static int i;
static int[] myList = {100};
public static void main(String[] args){
try{
File myFile = new File("arraySort.txt");
Scanner scan = new Scanner(myFile);
...
I am working on an eclipse app that has got multiple views. From these views I have to access some data over the wire. An error is thrown in following scenario.
Step 1: Start app, everything works fine.
Step 2: Disable network
Step 3: Enable Network
Step 4: Try to access data over wire from one of the views. The app apparently hangs.
St...
In one of my web pages I have a HTML table. This table will have 0 or more rows and each row has 3 columns.
It looks like this:
<table>
<tr>
<td>Row1-Col1</td>
<td>Row1-Col2</td>
<td>Row1-Col1</td>
</tr>
<tr>
<td>Row2-Col1</td>
<td>Row2-Col2</td>
<td>Row3-Col1</td>
</tr>...
hi,
i am using tomcat server and i have added a rhino engine to able some scripting abilities on my users. the second phase is to provide some debug environment.
i know rhino has a debug API but i could not find any documentation/code samples about how to work with it, and build a debugger around it
any one knows?
...
I have a small Java test app in Netbeans where the main() class reads input from System.in. How can I open a window into which I can type input? (I am using NB 6.7.1 on Windows 7).
...
I have one image what I want to is: change its x & y position on mouse move.
for example:
<div class="mover" id="1">
<IMG SRC="images/buttons1.png" WIDTH=129 HEIGHT=30 ALT="" border="0">
</div>
<div class="mover" id="2">
<IMG SRC="images/buttons2.png" WIDTH=129 HEIGHT=30 ALT="" border="0">
</div>
What I want to do is like no...
Using J2SE, I tried making a LAN application using java.net.*, and it worked perfectly. I believe it's very similar (if not the same) concept to be applied for online applications.
What package(s) or classes should I use to develop an online application? do I need a static IP address? Opinions, links and tutorials are welcomed.
...
I'm trying to get the extension of a filename, but for some reason I can't make split work:
System.out.println(file.getName()); //gNVkN.png
System.out.println(file.getName().split(".").length); //0
What am I doing wrong?
...
There are many ways to Title Case in java.
But how do you prevent some of the common abbreviations from being converted. For Example;
System.out.println(makeProper("JAMES A SWEET");
System.out.println(makeProper("123 MAIN ST SW");
James A Sweet
123 Main St Sw
SW should remain uppercase as it is an abbreviation to South West.
...
I'm writing a program, which takes two words as command line arguments, does something to them, and prints out the result. I'm writing a class to handle this, and my question is: what is the best way to pass two words given as command line arguments between methods in a class? Why can't I use the usual "this.variable = " in the construct...
Hi there,
I have a quick question that someone might be able to answer. We have recently built a java library that is referenced within a web service that runs on a JBoss application server. The performance of the web service on a standard Windows XP machine is satisfactory and takes about 1.5 seconds for the whole process. However when...
I am trying to parse a data file in ANTLR - it has optional whitespace exemplified by
3 6
97 12
15 18
The following shows where the line starts and ends are. There is a newline at the end and there are no tabs.
^ 3 6$
^ 97 12$
^ 15 18$
^
My grammar is:
lines : line+;
line : ws1 {System.out.println("WSOPT :"+$ws1.text...
Could you please explain why this code is not syntactically correct?
private void addEditor(final Class<? extends FieldEditor> fieldEditorClass, final Composite parent, final PropertyKey propertyKey, final String displayName){
final Composite composite = new Composite(parent, SWT.NULL);
composite.setLayout(new GridLayout());
...
in my applicationContext.xml, this is how I map xml to POJO. how to map directory to class file without required to create xml?
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="mappingResources">
<list>
<value>com/custompackage/custom/spi/hibernate...