News


38 Votes Vote

help with label setText

Posted by External 3 hours ago General
http://www.daniweb.com — How do i get make the correctLabel to have all the text disappear so there is NO "correct" and the "buttonclicked values". I have been tryin but i can only manage to get the "correct" to dissapear the button clicked values are not removed correctLabel.setText("Correct: " ); // this sets ... Read More
Discuss Bury
Tags: help label settext All
28 Votes Vote

capture a String that was returned.

Posted by External 3 hours ago General
http://www.daniweb.com — Creating a text based game. I have a method for each of the following: Race, profession, name.So for instance: public static void main(String[] args) { // TODO code application logic here intro(); name(); System.out.println("Welcome " + name); } public static void String name(){ System.out.println("Enter Name:"); String name = sc.next(); return ... Read More
Discuss Bury
Tags: capture string returned All
30 Votes Vote

Stanford Algorithms Design IDE Setup

Posted by External 3 hours ago General
http://www.daniweb.com — I'm trying to setup the programming environment for Princeton's online course at this website: http://algs4.cs.princeton.edu/code/ However, when I try and run one of the programs I get the following error: /Users/dane/algs4/algs4-2/RandomSeq.java:45: cannot find symbol symbol : variable StdRandom location: class RandomSeq double x = StdRandom.uniform(); ^ /Users/dane/algs4/algs4-2/RandomSeq.java: Read More
Discuss Bury
Tags: stanford algorithms design ide setup All
42 Votes Vote

How come this evaluates to true for two different String objects

Posted by External 7 days ago General
http://www.daniweb.com — I have two strings,`String one = new String("word");``String two = new String("word");`Why does `System.out.println(one.equals(two));`Return true given that one and two are two different `String` objects. Read More
Discuss Bury
Tags: how evaluates true string objects All
41 Votes Vote

Differences between the following declarations

Posted by External 7 days ago General
http://www.daniweb.com — What is the difference between `CoffeeInterface cup1 = new Coffee()`and`Coffee cup2 = new Coffee()``Coffee` is a class that extends the `CoffeeInterface`Is `cup1` an object or can it be used as one.Are there any differences betweeen `cup1` and `cup2`? Read More
Discuss Bury
Tags: differences declarations All
36 Votes Vote

2D Side Scroller Collision Detection

Posted by External 7 days ago General
http://www.daniweb.com — I am trying to determine collision in a 2D Side Scroller environment using Rectangles. However, the way most people do it is to get the bounds of the Tile. I do not use Tile's in this case, I am just drawing Simple Full Colored Rectangles using Graphics2D.`g.drawRect(int x, int y, ... Read More
Discuss Bury
Tags: d scroller collision detection All
38 Votes Vote

output term frequency-inverse document frequency (tfidf) matrix java

Posted by External 8 days ago General
http://www.daniweb.com — I have this code that outputs the tfidf for all words in each file in the directory. I'm trying to transfer this to a matrix where each row correspond to each file in the directory and each column to all words in the files and I have some difficulty in ... Read More
Discuss Bury
Tags: output term frequencyinverse document frequency tfidf matrix java All
34 Votes Vote

LDAP :: Change password (encoded password) Problem!

Posted by External 8 days ago General
http://www.daniweb.com — Hello everyone,I am writing a Java program to reset LDAP account password. I know the password should be quoted passwrod and then encoded in UTF-16. I have a question, if someone can confirm please.I am getting encoded password as follow: String oldPassword = "Password1234"; String newPassword = "Password9999"; String oldQuotedPassword ... Read More
Discuss Bury
Tags: ldap change password encoded password problem All