how can i write program in java to find the transpose of the graph G, where the input and the output of the program are represented as adjacency list structure.
for example:
input:
12341
outout:
1432
What would the possible scenarios be in which I would get this error produced from a struts web app?
java.lang.IllegalArgumentException: No bean specified
I would like to have a button in my window such that if I click it (button) the window is closed.
I found out that I can close a window in the following way:
referenceToTheFrame.hide(); //hides the frame from view
refToTheFrame.dispose(); //disposes the frame from memory
But if I do this way, compiler complains:
Note: myProgram.java uses or overrides a deprecated API
Note: Recompile with -Xlint:deprication for details.
Do I do something unsafe?
I am looking for seminal and excellent examples of libraries and projects that emulate the good practices of the Java Concurrency in Practice book.
The book is marvelous. However, I think supplementing this book reading with code reviews of projects and libraries that make use of the concurrency APIs effectively is necessary to drive the concepts into the brain.
One good example of what I am looking for is
https://code.google.com/p/concurrentlinkedhashmap/
Can folks help me with finding exemplary, well written code that use the concurrency api well?
I have a ByteInputStream, created from a Socket in Java. The connection is to a simple web server that uses chunked transfer encoding. The web server does in fact work in normal browser. But in my program, I am attempting to read, I read the first first bytes (some 5kb of data). But each read after that returns 0 bytes read. Isn't it supposed to block until it can read?
I was studying the legacy API's in the Java's Collection Framework and I learnt that classes such as Vector and HashTable have been superseded by ArrayList and HashMap.
However still they are NOT deprecated, and deemed as legacy when essentially, deprecation is applied to software features that are superseded and should be avoided, so, I am not sure when is a API deemed legacy and when it is deprecated.
I am trying to create an app which uses a combination of jQuery templates and Backbone.js
I have very little experience in both of them (though I know jQuery)
Could you please provide some good examples where jQuery templates and Backbone.js are used effectively.
Also I am loooking at using JSON for the model/data and trying to persist the data (I use Java at the backend)..So looking for ideas on how that can be integrated?
Thank you.
Hi,
Could you please help in the following? Is there an acceptable design guideline to implement WS Notification Messaging in java? My scenario is the following: a web service client makes a web service call to a web service.
After that, the web service should be able to send asynchronous notifications to the web client (as a result of the first web method call). What approach should be used?
Thank you,
Regards
I am a Java developer but up to now have not had any hands on experience using the Spring framework.
Does anyone know of anyone good online tutorials that explain the basics and offer good examples and sample code.
I am trying to create a Response class in Java which has a method
void setResponse(String response);
Different response subclasses will have different requirements for the response. The string that is passed to the function is received from the user.
What is the correct way of handling a wrong response?
Should the function throw an exception like IllegalResponseException
Should the function be declared like
boolean setResponse(String response, String errorMsg)
and return false if the response is wrong and set the error message to the appropriate value
I'm quite confused about the basic concepts of a Hash table. If I were to code a hash how would I even begin? What is the difference between a Hash table and just a normal array?
Basically if someone answered this question I think all my questions would be answered:
If I had 100 randomly generated numbers (as keys), how would I implement a hash table and why would that be advantageous over an array?
Psuedo-code or Java would be appreciated as a learning tool...
I'm trying to execute a simple example of Multicast sockets on Java.
MulticastSocket s = new MulticastSocket(6789);
InetAddress group = InetAddress.getByName("230.1.1.1");
s.joinGroup(group);
This code generates the error: IP_ADD_MEMBERSHIP failed (out of hardware filters?)
Any idea?
Thanks
In Eclipse, the Java Method Override Indicator is the little upwards arrow next to a method in the Type Hierarchy view.
A solid arrow means a method overrides an existing method lower in the hierarchy.
What does the hollow arrow mean?
Do annotations effect either arrow?
Has anyone expirience this error before: this happens when I hit CTRL + space , here is the error :
For those who has tinyurl blocked: This compilation unit is not on the build path of the java project.
This is a maven project, mvn eclipse:eclipse doesn't help I mean it compiles and runs just fine just something is wrong and I can't figure out what. I checkouted this project from SVN, it wasn't developed on my PC.
Guys just finished reading one of my college books about threads in Java and I was informed that lock - what ever it is, is in Object class. So it looks like even though I'm not using threaded classes my objects will be heavier because of that? Don't you think that it's a bit annoying and unfair to expect from anyone to pay for something s/he have not intention of using?
Thanks
If I have no to little experience in either of them, but know enough Java and Ruby to be comfortable, is one framework harder to learn than the other? Is one easier to use for the beginner on these?
I know it is hard to answer. Just looking for general thoughts on it.
Hi,
Is there any reason behind using this date as standard for time manipulation? I have seen this standard in Java as well as in Python. These two languages I am aware of. Is other popular languages also follows the same standard?
Please describe.
I am looking for :-
A mature, scalable and proven CMS solution
With Support for Mobilization (Android and iPhone)
Good Amount of Customization using Java / .NET
Lots of out of the box components to choose from.
Please help with recommendations.
p.s Are there any Mobile CMS providers which works in a SaaS model?
hi guys , when every one of us program in java he would need a library (some jars) to complete his work .
so when this programmer find some libraries he need . how he can find the best of these libs ?
thanks.
Hi - I need to write some junit tests on java code that calls Math.random(). I know that I can set the seed if I was instantiating my own Random object to produce repeatable results. Is there a way to do this also for Math.random() ?
From the java sources, it look like to drops into native code. Is the cost roughly equivalent to a volatile read or does it need to acquire a lock of some type?