verruckt24 438 Posting Shark

No.

Do you like hot to stroll on sand without any footwear ?

verruckt24 438 Posting Shark

rib scrib is

Trolley

verruckt24 438 Posting Shark

Check here. aargh.... how do people miss this thread ?

verruckt24 438 Posting Shark

if it put on JLable the lable size will set autometically as image size.

Whats wrong with that ?

verruckt24 438 Posting Shark

I don't find anything wrong in this piece of code. Post more code and the entire error trace to let us know more.

verruckt24 438 Posting Shark

what is this (File f=new File(file)

Well, thats what happens when you put yourself into a habit of "finding out code" instead of writing it yourself - you are stumped by the most basic and rudimentary things. As something I am personally against, I won't help you understanding this code as it isn't written by you.

However I can help you, write it on your own.

You need a Swing component, something like a JFrame of JPanel, put a JLabel onto it (big enough), onto which you can show your images. To auto run the slide show you change the image on the JLabel after periodic intervals using the Thread.sleep() method. (If you know what it is!)

If you want to develop a more complex slide show, where a user can hit the "prev"/"next" button, you can have this functionality built-in in your application by arranging the images to be shown in a particular order and then running through them back or forth as suggested by the user. You can then start the sleep interval on every hit of the prev/next button anew so that each image is displayed for only a specified time duration. To provide more features such as stopping the auto changing of an image, you can make the Thread stop so that it doen't flip images on it's own. To allow the user to set a custom or pre-specified interval for changing the current image you can make use of checkboxes (for pre-specified …

BestJewSinceJC commented: good advice +4
verruckt24 438 Posting Shark

Who's stopping you then ? Put out two labels mentioning "Enter string 1" "Enter string 2", put out two textboxes allowing the user to input the same. Use a label to finally show the result of the comparison. What was so difficult in this. Take a look at the Swing/AWT tutorials if you are finding yourself uncomfortable with GUI development.

And start using code tags, you have already 12 posts.

Ezzaral commented: "What's stopping you?" was my thought exactly as well :) +18
verruckt24 438 Posting Shark

*Accidental submit*

verruckt24 438 Posting Shark
textField2.setText(Integer.toString(woorden));

This statement isn't correct. You should rather do

textField2.setText(String.valueOf(woorden));

And as far as the error goes I get none such. Try this code identical to the one written by you. This runs perfectly well at my place. Also the compiler isn't correctly pointing out the error since I had sited you the docs for the split method from the String class itself. (Apart from the fact that I have used this method a thousand odd times)

String str = "disaster posts in the Java Forum";
String splitPattern = " ";
String [] tokens = str.split(splitPattern);
		
for(int i =0;i<tokens.length;i++){
	System.out.println(tokens[i]);
}
BestJewSinceJC commented: Carefully explained +2
verruckt24 438 Posting Shark

2. Use the trim() method of the String class to remove leading/trailing white spaces.

3. You can use the split() method to separate words.[Use split(" ") which would specify space as the splitting character]

4.The split method will return you an array containing the splitted elements. Use the length property of the array to get the length of the array which would also be the number of words in the string.

5. Use the length() method on each of the array elements (words) which would be strings in themselves. This will give you the length for each individual word.

6. Sum up the length of each word to get the total number of letters in the original string.

Since the dot or period character (.) would only appear in the end of a word you could write a method of your own using the String classes method to remove it off (see substring()), so that they aren't counted in the letter count.

You would not require to import any packages for the String class since the String class comes under the java.lang package, which is imported by default in every program that you write.

verruckt24 438 Posting Shark

I haven't had much experience generating these puzzles but to comment on the difficulty levels, here's what I think:
The first thing that comes to my mind is, the more the number of empty cells the higher the difficulty. Second is the placement of the various initial numbers. Initial numbers evenly spaced apart make for simpler puzzles, whereas difficult puzzles often have numbers clustered in groups.

So if you are able to programatically control these two characteristics you could control the difficulty of the puzzles.

verruckt24 438 Posting Shark

red murder mud + rum drum :)

Hollywood

verruckt24 438 Posting Shark

What you could do is :
1. Ask the string to be entered.
2. Trim it so that any leading/trailing spaces are removed.
3. Split it on the basis of (internal) spaces so that you can get the individual words in it.
4. Count the number of words.
5. Count the length of each word.
6. Sum it up to get the total letters in the string (assuming you do not want to consider the internal space characters)

verruckt24 438 Posting Shark

Okay so in your sense learning means giving away the wrong thing and trying to tell people to correct it ?

You could have just described what you wanted to tell him and left the writing of the query to the OP.

verruckt24 438 Posting Shark

628

verruckt24 438 Posting Shark

@webman07 & newbie_mysql:
Firstly webman07, trudge isn't wrong, let alone being arrogant. He just pointed you in the right direction. When posting on a forum its always good to know what the the forum has to offer, it's rules etc so you know your way around. Wasn't webman07 able to see the forum for MS SQL that is just below MySQL and if he doesn't even know the difference between SQL Server and MySQL wasn't he expected to get that cleared before posting the thread. Don't treat questions like you haven't got anything to do with them, they are your queries, your questions and you are supposed to be the one to put in the greatest effort solving them, not others, they are just there to help you through not share the majority of the burden of solving your queries. Read this essay on how to questions, you both will know a few things about asking questions on a forum, especially when the other members are doing it free of cost. And don't you and newbie_mysql come up with lame examples of parents and teachers, your parents and teachers had the morale responsibility of teaching you, making you learn, WE DO NOT. We would be happy enough even if you don't learn a thing for the rest of your life, it's your life, and we won't find ourselves in guilt.

And newbie_mysql just drop that IM/Chat speak, it is against the forum rules as well.

verruckt24 438 Posting Shark

Verruckt
the final arbitration of all takes up so much of your time.
It must be difficult to be you.

Hmm.. It's quite easy, I guess, to just retaliate with the first possible means than admitting your mistake. And however difficult it might seem to you, I like to suggest a few good things to people when I see them going wrong.

hi..if anybody post new thread in forums means, its urgent to them...i think pointing to some referance manual is waste of time....Learning depends on their own interest..no body can force them...ok coool....enjoy & learn something by using this forumm..

We are not here to solve people's problem on an urgent basis. If you can understand this is not a 24x7 support site. Go read the forum rules if you want to. And I am sure you might feel reference manuals siting are waste of time because people like you are so very ready to gulp down on readymade food. If the OP doesn't want to learn we won't help him thats all, thats the culture over here, which you might not know well just because you haven't stayed here that long. We cannot force this on the OP but we can certainly opt not to help such blood sucking leeches.

verruckt24 438 Posting Shark

Enjoy Java Programming:)

How will he, when you won't allow him to by giving readymade code pieces ?

verruckt24 438 Posting Shark

We'll have to agree to disagree. You are getting into teaching methods and styles saying that a data structure would be taught before a basic object. I know I wasn't taught data structures until my third course in computer science where as classes and methods (including built in methods) were taught in courses one and two. (Beginning programming and Advanced Programming). But maybe you were taught differently.

And almost any data structure could be used to reverse a string. A variety of trees. A doubly linked list. A stack. So to say "absolutely" when it is not absolute is absolutely wrong.

Firstly, I didn't ever say that you are not taught classes and methods before data structures, I said, that one would certainly not be taught the str.toCharArray method before data structures if you understand that. Knowing specifics reqiures deeper understanding than generics thats the simple point here. Not to mention I am sure no class teaches the String class' methods in Java so a beginner is certainly not supposed to know that.

Also I never said that doubly linked lists cannot be used to reverse strings, you can write a program that uses that damn structure to reverse a string, there can be thousands of different implementations for a single thing and many of them can be absolutely unfitting in the sense that they won't solve the problem in the most optimized, logical way, I said that I haven't heard of they being used for such purpose. You …

verruckt24 438 Posting Shark

Take a look at the Java I/O package. I am sure it's a monster containing hundreads of classes but it present as many ways as there can be to write to a file in Java.

OR

You can use a PrintWriter over an OutputStream like the FileOutputStream. The FileOutputStream can be opened on a File object, or a string that specifies the filepath.

OR

For a quick example check here

verruckt24 438 Posting Shark

@manojjena1982 : Giving away readymade stuff like that wihtout attempting to make the OP learn isn't considered a good habit here, try to correct yourself in the future.

verruckt24 438 Posting Shark

Why use a stack? You could just loop through the string and print each char in reverse order.

Because they seem logical, don't they, you just run through the string in a forward order as apart from a backward order and then just pop out elements and they are reversed. After all Stacks are made for such use.

But chances are if a person doesn't know how to use str.toCharArray(), they are not going to be familiar with various data structures.

Absolutely wrong. str.toCharArray() is langauge specific thing, whereas stacks arent, not to mention they are the most basic of the data structures that are taught to beginners. Also since they do not "belong" to any language the chances that a beginner knows them are quite good than he knowing something like str.toCharArray() which is a Java specific method.

If that's the case you could suggest a doubly linked list or whatever

Wrong again. I haven't heard doubly link lists being use for string reversal anytime. ;)

verruckt24 438 Posting Shark

imports should be declared before the public class definition. They should be the immediate statements after the package statements. To give a skeleton forthis:

// package declaration should be the very first stmts, in your .java file, since this is a comment you can omit this.
package mypackage;

// next comes the import
import javax.swing.JOptionPane;
// other imports

// then follows the public class
public class Demo{
    
    // member methods and variables go here
    
    // in the public class sits the main
    public static void main(String [] args){
    // code blocks
    }
}
verruckt24 438 Posting Shark

Does w3schools even mentiod Java

No it does not, but seeing the person from whom the post comes, I cannot be surprised with that.

verruckt24 438 Posting Shark

1). Cast null with Component
2). Convert sum variable to string type

Both of these aren't required at all.
1. NULL does not need to be casted to anything.
2. If the int is within a string, it's acceptable.

Ezzaral commented: Glad that you corrected that nonsense. +18
verruckt24 438 Posting Shark

Ohh c'mmon guyz (jbennet & happygeek) I am not saying that you chose Cohen because his recommendation came from a friend (jbennet) or jbennet recommended cohen because he is friend, I am just saying that the statement that I underlined may make one think in hindsight about such a happening and hence it shouldn't find a mention, lest, the other contenders might feel sour, thats all. You have my trust ;)

verruckt24 438 Posting Shark

Your Error in JOptionPane code write That code as Follows

JOptionPane.showMessageDialog((Component) null, "Sum is:-", " your sum is " + String.valueOf(sum),JOptionPane.PLAIN_MESSAGE);

Is this not exactly the same as what has been adviced in the previous post ? Whats the point of this then ?

verruckt24 438 Posting Shark

Seems right. But why do you need my approval ? Submit it wherever you have to and check for yourself as also don't forget to mark the thread solved, if it is.

verruckt24 438 Posting Shark

We don't have any special method of determining "member of the month". And no, it's not 'fair'. Basically anyone who's known in the community is eligible, and in the end happygeek just picks someone who he thinks will make an interesting interview for the next month's newsletter.

Yes, certainly, now that makes more sense, and is something that should well give us the reason for the current selection. But aargh... this should certaily not be the way it should be, because, common now, you aren't just giving somebody a good rep, it's a badge that the member carries around thorughout his entire life on Daniweb, which mentions "Featured Poster", which makes the member stand out amongst others. So this certainly shouldn't be left to likes, dislikes and fancies, but rather there should be a more refined procedure to bring out the talented.

And yes certainly as you mentioned, contribution would not be a broad term to mention this, it would be outright irrelevant, since one who makes a good interview might not have some concrete contribution at all.

Also I didn't like this statement.

I arrived via a recommendation from a moderator, Jbennet, who I am good friends with.

It doesn't stand in good stead, especially for the other contenders, subtly displaying that "friends" might just have a bigger weightage for their recommendations.


Lastly, excuse me for having missed your sarcasm, but I was taking this on a serious note, also I rather liked AncientDragon's …

verruckt24 438 Posting Shark

rest sit site

Bathroom

verruckt24 438 Posting Shark

626

verruckt24 438 Posting Shark

-1155

verruckt24 438 Posting Shark

Has your query been solved, if yes then please mark the thread so, so people don't keep posting here for ages :)

verruckt24 438 Posting Shark

Yes, again, there is nothing as essence software but essence of the software.

verruckt24 438 Posting Shark

Despite what you might think, the member of the month isn't chosen based on any kind of user or staff input. Happygeek has devised a secret mathematical formula which determines the next member of the month; threads like these are only intended to give people the impression that they're 'special'.

I never said it that I wanted it that way. If you happen to read my post carefully, which I don't think you have done, I am just suggesting that the reply to my previous query, of the contribution, doesn't seem to fitting here as cleary the most contribbuted members have been left out. Also if this is the case as you are suggesting now, why not was this previously mentioned ? Read Narue's post and you will understand.

Also commenting on the mathematical formula, well, let me think, a mathematical formula that somehow avoids all highest contributorsand chooses someone else, you guyz must be really good at math ahh ?
Okay so if you haven't got the hint, here's what the secret about the secret mathematical formula is: It is severely flawed.

Its called "toss of the coin"

Yeah right he he, it should really be the coin toss.

verruckt24 438 Posting Shark

Let me tell you the meaning of the question as I understand and I assume it is that way because thats the only way it makes sense to me.

4. Consider the following advances. Decide whether each of them attack the essence or the accidental complexities of software
• Eclipse
• Extreme programming

You need to tell whether Eclipse/Extreme programming attacks the essence of software or the accidental complexities of it.

What o/w do you mean by essence complexity ? Let me know.

verruckt24 438 Posting Shark

You haven't even understood the question. So I suggest first spend your time understanding that.

verruckt24 438 Posting Shark

most do not want to be told - rtfm

Then such people aren't worthy of telling anything at all. Because this community attempts to nurture an environment that makes people learn while helping them. Giving away readymade answers just because someone would not like you telling him "go-read-the-manual", isn't the right approach.

And if you feel that your time is wasted, siting people references from which they can learn, then isn't not posting a good idea to consider ?

verruckt24 438 Posting Shark

I did a lot of searches in google

And you did find a word written on either of them ?

verruckt24 438 Posting Shark

what dickersonka wants to say is, you do not need to create an object of Car within itself. What you can do is simply push the code of newCar into the constructor of the Car. Meaning the four statements where you pop up an input dialog in front of the user could be moved to the contsructor (why ? Can't they) and you could remove the newCar method.

verruckt24 438 Posting Shark

Go surfing. Do some research on your own, then come back tell us what you feel and then maybe we;ll let you know what we feel.

verruckt24 438 Posting Shark

@almostbob : Rather than posting the exact queries as answer, why not just mention that MySQL contains something like 'LIKE' and then maybe point him towards the documentation page for the same and then let him do the further tasks, such as the syntax botheration for MySQL, PHP etc. Wouldn't the OP learn more things with this approach ?

verruckt24 438 Posting Shark

Who cares.

I do. And may be several others, who for reasons known to them did not speak out.

stephen84s commented: me too +7
verruckt24 438 Posting Shark

The answer to your original question has been mentioned above. The question in your above post doesn't make any sense.

verruckt24 438 Posting Shark

Earlier in this thread, in this post, I had made public my curiosity for the criteria that holds good for a member to get the Member of the Month medallion. I had my reasons for believing that most probably it would be the number of posts, since a lot of short listed names or whose names had been put up for short listing were prolific in that sense.

A distinguished member of the forum, the Super mod actually, I shouldn't be shy taking her name, replied to my question, satisfying my curiosity to some extent, mentioning that it was the contribution that a member made to the community that was held uppermost. I wasn't entirely satisfied by the reply, since I had observed otherwise, but chose not to comment further. Now after the selection of this month's Member of the Month, I cannot hold myself back but only can exihibit my surprise in this fashion. Reasons follow:


TheDude
Posts : 3,019
Rep Points : 101
Rep Power : 11
Solved Threads : 25
Code Snippets : 0

iamthwee
Posts : 4,912
Rep Points : 512
Rep Power : 18
Solved Threads : 332
Code Snippets : 4

ArkM
Posts : 1,343
Rep Points : 599
Rep Power : 8
Solved Threads : 210
Code Snippets : 1

Cohen
Posts : 717
Rep Points : 28

verruckt24 438 Posting Shark

*deleted*

verruckt24 438 Posting Shark

@iamthwee : We are surprised too, cannot make much of what goes on for selection of the MotM tag.

verruckt24 438 Posting Shark

What is the definition of relevant ? If you use the LIKE clause, you will get only those records in which the filed contains the content of the LIKE clause. So if you have all records containing the content you want, I don't think you can order them by any means.

verruckt24 438 Posting Shark

@curtissumpter: what do you think you are doing giving people ready made code, this forum boasts an attitude opposite of that. Tell the OP the logic mentioning the way to go about, or at the most the psuedocode, but not written code in any manner.

@peedi : Use a stack to reverse the word and I am sure it will be the most convenient approach. Just keep pushing all the letters till the end of the word and then pop them back one by one.

verruckt24 438 Posting Shark

The "easiest" way to "dumb" programming is to download an IDE for a langauge when you are an infant in it. An IDE would pamper you with most things that should absolutely be not given to you at this stage. Take a look at the sticky at the top of this forum, it's made for people just like you, download the JDK, download the javadocs, write programs in an editor like the notepad or a minimal feature IDE, compile them in the command shell, solve errors by trying to figure out whats wrong while always keeping returning back to the docs, write countless programs and you will be on track.