we have a collection of comparable held in a bag and have to find the kth largest element. I copied to a hashSet to remove duplicates then converted the hash set to an array to be sorted and consequently the kth element accessed. its compiling but fails the testing, and I can't figure out whats wrong. any ideas?
public E kth(int K){
...
What kind of tools and techniques exist for this purpose?
...
What kind of tools or techniques exist for this purpose?
...
Hi,
I need your advice about framework selection (Java vs Mono) for a new large scale web project which will be developed for linux hardware.
Which platform do you prefer and why ?
Best Regards,
Sirmak
...
I have a situation where I want a Java client to have a two-way data channel with a servlet (I have control over both), so that either can begin data transferring without having to wait for the other to do something first, but to get through the firewalls this needs to be tunnelled in http or https.
I have looked around, but I do not ...
Hello,
How do I make a J2ME Midlet to communicate with a java program or some application on the pc through the cable connected?
Thanks
...
I'm having trouble compiling a drools 4 project. I'm getting errors in the rules file saying
Only a type can be imported. <<MyClassName>> resolves to a package
The incremental compiler isn't working because of this. How do I fix the errors or get eclipse to ignore them?
...
How can i access client details like IP,Browser etc in a web service in java?
...
I have some java-app, and i want to establish a connection to some https Site, how can i do this, using URLConnection? Should i use trust store, when certificate from this site was signed using a valid certificate authority?
...
Buildix is a complete development server (by ThoughtWorks) for Continuous Integration
I'm looking for a pre-configured server with Maven, Subversion, Sonar, Nexus...
...
Hello,
I tried writing a program in Java using regex to match a pattern and extract it. Given a string like "This is a link- #www.google.com# and this is another #google.com#" I should be able to get #www.google.com# and #google.com# strings extracted. Here is what I tried-
import java.util.regex.Matcher;
import java.util.regex.Pattern...
Hi,
We have a large GWT project and many smaller GWT sub-projects
basically the large controller project invokes the smaller projects
via many means such as some are incorporated into iframes that are shown in page,
some are shown by clicking a URL and opening the project into a new window.
The requirement is to change the Css on the fl...
I am having a inner class(static) named SelectProdLineAssociationForm
I have also given a declaration like this--
public SelectProdLineAssociationForm selectProdLineAssociationForm =
new SelectProdLineAssociationForm();
now on onclick event I want to set the field in the inner class a value
so i am
document.forms[0].selectProdLi...
Hello,
I'm making Braid in Netbeans 6.7.1.
Computer Spec:
Windows 7
Running processes: 46
Running threads: +/- 650
NVidia GeForce 9200M GS
Intel Core 2 Duo CPU P8400 @ 2.26Ghz
Game-spec with normal run:
Memory: between 80 MB and 110 MB
CPU: between 9% and 20%
CPU when time rewinding: 90%
The same values for the debugging session...
Hello there. While trying to zip an archive using the java.util.zip I ran into a lot of problems most of which I solved. Now that I finally get some output I struggle with getting the "right" output. I have an extracted ODT file (directory would be more fitting a description) to which I did some modifications. Now I want to compress that...
class A implements Runnable
class B extends A
Under these circumstances B IS A Runnable.
Is it valid to write:
class B extends A implements Runnable
If it is valid, will the run method in B override that of A?
What could be the possible scenarios?
I'm uh confused...
...
Hello;
I have a maven2 multi-module project and in each of my child modules I have JUnit tests that are named *Test.java and *Integration.java for unit tests and integration tests respectively. When I exeucte:
mvn test
all of the JUnit tests *Test.java within the child modules are executed. When I execute
mvn test -Dtest=**/*...
How do i print out multiple arrays, with my code below i only get the double array printed out?
import javax.swing.JOptionPane;
public class Matriseoppgave
{
public static void main(String[] args)
{
JOptionPane.showMessageDialog(null, "Du skal nå skriv inn 3 navn");
String getnavn1 = JOptionPane.showInputDialog("Skriv inn...
Hi, does anyone have any pointers to (rough) estimates on how much effort is needed to port an application from C to Java? Of course it will depend a lot, but
would for instance using Intermediate COCOMO make sense?
Estimating how much effort is needed for writing new code is difficult, but still needs to be done. When starting from no...
Hi,
I've developed an Eclipse (3.5) plugin for my employer (a university) using Graphical Editing Framework (GEF).
Deploying the app should be as simple as pressing the "Export Wizard" link and entering an archive name and hitting "Finish" (shown in the images below).
But then I encounter the an error dialog protesting "Could not find...