Hi,
I'm new to java and having problems with getting input.
This is my code which seems to get the first input as required, but then skips the next two "read" function calls?
Any suggestions?
// open up standard input
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int battMax, battMin, numN...
I would like to create a without frame border, maximum button, minimum button and frame icon.
Pls guide me to do that!
...
(connected to db call abc)--->datasource1 ---> LocalSessionFactoryBean --->transactionManager1
(connected to db call abc)--->datasource1----->AnnotationSessionFactoryBean -->transactionManager2
the reason i have 2 sessionfactory is because one is used by 3rd party osworkflow library and latter use by my application
since both are co...
I have a (huge) set of similar data files. The set is constantly growing. The size of a single file is about 10K. Each file must be compressed on its own. The compression is done with the zlib library, which is used by the java.util.zip.Deflater class. When passing a dictionary to the deflate algorithm by setDictionary, I can improve the...
I've just made a simple program with eclipse and I want to compile it into an exe file, but can't seem to found out how to do it simply. Any suggestions?
...
For instance, "%11.2lf" in C++ becomes "%11.2f" in Java.
How about for long format?
...
Hi,
I would like to have a way to display the contents of an XML file in a JTree. I have already accomplished this using DOM, by implementing a custom TreeModel (and TreeCellRenderer). However it is very clunky (much workaround-ery and hackery) and rather rough around the edges.
Is anyone aware of a way to get a JTree to display the co...
I've run into a sticky problem that I can't seem to solve with java generics. This is a bit complicated, but I couldn't think of a simpler scenario to illustrate the problem... Here goes:
I have a Processor class that requires a Context. There are different types of Context; most processors just need any abstract Context, but others ...
Hi all,
I am writing a simulator for a CORBA client, that is I am simulating a CORBA server.
A requirement of the CORBA server is that it register a certain object with the CORBA NameService.
I have somehow stumbled across OpenORB.
I have downloaded all its binary zip archives and have extracted them all to a single directory- %TCOO...
I am seeking for books that describe the design of Java/C# programming language.How the language designers thought when they were designing these two languages?What tradeoffs did they make?
thanks.
...
Hi
When do we need single threded model in webapp while designing web application in java.
...
Hi,
I was wondering if there was a way to parse XML using E4X, or something similar to E4X.
Does such a framework / library exist?
Thanks!
...
I know that sun's can handle that through JSObject but is there some way for Microsoft JVM?
I tried using JSObject with Microsoft but's it's unable to write/read any cookies.
it returns "undefined" instead.
any help appreciated.
...
I have this code with log4j, I don't use any kind of configuration files
static Logger logger = Logger.getLogger(Application.class);
...
Appender ap = new NTEventLogAppender();
SimpleLayout layout = new SimpleLayout();
Appender fp = null;
try {
fp = new FileAppender(layout, "output.txt");
} catch (IOException e) {
...
Before reading about my problem, first look at this GUI Diagram.
There are three bars at the top as follows:
one having buttons "pictorial view", "textual view" etc.
second having buttons "processes", "organisation" etc.
third having buttons "application to processes" etc.
After that two information bars are there.
After that a can...
i hava a program connect to server through xot (x25 over tcp/ip) protocol.
i have a thread to connect, send recv data with server using xot library.
public class MyThread extends Thread{
public MyThread() {
}
@Override
public void run(){
// init sock
...
// connect to server
sock.conne...
byte[] b1 = null;
byte[] b2 = null;
System.out.println(b1 + b2); // 1
System.out.println("" + b1 + b2); // 2
if i uncomment 1 its giving compilation error.
if i uncomment 2 its printing nullnull;
so whats happening here?
...
i am using this site as a resource
http://www.perlmonks.org/?node_id=573138
I am trying to understand about O notation and it gives two examples of searching two arrays for the same element. First example has O(n^2) as does the second, however the second has an enhancement to it so it runs quicker but still maintains the same O notation...
In pom.xml I have set o profiles like this:
<profile>
<id>profileId1</id>
<build>
<filters>
<filter>src/main/filters/profileId1.properties</filter>
</filters>
// rest of the profile
</profile>
<profile>
<id>profileId2</id>
<build>
<filters>
<filter>src/main/filters/profileId2.prop...
We know that in java all classes extends Object. but Object itself is a class in java. so is this class also extends by itself or any other class?
...