verruckt24 438 Posting Shark
System.out.println("Enter the name of the lab this computer is located: \t"); }

Remove the '}' in this line that is what causes the previous while loop to terminate "prematurely" and on the next '}' it terminates the method/class, so that the next statement "appears" to the compiler out-of-place.

verruckt24 438 Posting Shark

>I found the best book to be google
Yes but sometimes you need a flow to what you are reading which is hard to get given the fact that you are looking up different articles written by different authors scattered all over the internet.
Also when you read different articles by different authors you would sometimes find them contradicting each other a bit, because every author has hos own style, his beliefs his own "best practices" etc,
I am not saying that this isn't a good way, yes it is, but for a beginner not a preferred way to begin with.

>Given a good compiler (NetBeans or Eclipse)
These are IDEs.

verruckt24 438 Posting Shark

>I hate how resource hungry some java programs can be
Thats the thing from the Ice age. Now Java can really be as fast and efficient as some of the native language code.

>I did some searching around and found two books
Hmmm... Did you not search the sticky thread at the start of the forum ? It lists some good books for Java too and they really are worth.

I personally haven't read any of the books mentioned, I haven't even heard the name of Big Java before, I found Bruce Eckel's Thinking in Java quite good.

verruckt24 438 Posting Shark

Mark the thread as solved if it is.

verruckt24 438 Posting Shark
for (guesses=0; guesses <= ichances; guesses++);

The semi-colon [;] at the end of the for loop makes this happen, remove it.

verruckt24 438 Posting Shark

There are three methods in MouseEvent which could be of particular help, getX(), getY() and getPoint(), getPoint returns the X,Y position relative to the source component while getX() returns the X coordinate and getY() returns the Y coordinate.

Now what you could do is, divide the image in sections for bets and then on the mouse click get the coordinates from which you could decide what section of the image has been clicked on and hence what part of it has the bet been placed on.

darkagn commented: Good idea to section off the image, thanks :) +3
verruckt24 438 Posting Shark

[I] [U]

verruckt24 438 Posting Shark

If it is profiling that you need to do on your program/application and not only the overall time required for execution, I would suggest you to use the profiling tool accompanied with modern day IDEs such as NetBeans. But if it is just the overall execution time that you require more of a ballpark then what javaAddict mentions should more than suffice your need.

verruckt24 438 Posting Shark

its not homework... i solved but its not efficient, i need some ideA to get started, i did many functns of second program too. plz plz i cant get u ferrari, but i can pray dat u get ferrari...

Then I too cannot help you do your assignments, but believe me I will offer more than the traditional rituals in prayer to request GOD to help you get your assignments done. ;)

Okay on a more serious note, put out the code here, whatever you've written, specify the problems or where you get stuck and I am sure people will help you here, even if they don't actually get a ferrari.

verruckt24 438 Posting Shark

The forum announcement here suggests that no one here would be willing to provide you homework help unless you show some effort. But I ain't much of an obeyer of the rules myself....sssssshhh.... *talking in a low voice* I can help you solve these assignments, even if you don't show any effort, provided you help me buy a Ferrari.

verruckt24 438 Posting Shark

If the image resolution is more then specified critarea image lable automatic increas it's size and all other component of JFrame will become hidden or unmannaged.

i have also that problem one month ago.that's why i use Stretching of image. however it has one disadvantage that it takes some moter time then JLable cause it drows the image on panel.

You can always restrict the size of the JLabel to disallow it to grow more than a specified size.

@OP : Mark the thread solve if it is.

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

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

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

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

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

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

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

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.

verruckt24 438 Posting Shark

@notuserfriendly : The logic for postfix evaluation is pretty straightforward. Move over the postfix string/expression and push any operands (numbers) into the stack, whenever you find an operator pop the topmost two operands from the stack and evalulate them, then put the result back onto the stack, continue moving over the string in the same manner until you have reached the end, when you reach the end of the expression, pop the lone value from the stack. This is your result.

verruckt24 438 Posting Shark

u need to implement the stack
then do precedence with switch cases
ill give more info once i get home, but at least show some code that you wrote not the code from your resource material form CD

Why is that, that you believe he copied the code ?

@OP : Read my prvious post I've underlined the problem there.

verruckt24 438 Posting Shark

Since you have code from two different sets I guess you will have to use two different charsets here and check the character code while reading from the file, if the character code is in the range 0800-00FF i.e. Latin-1 use the charset ISO-8859-1 if it is from the set 0100-017F i.e. Latin Extended - A use the aprropriate charset.

PS : I do not know the charset to be used for Latin Extended - A, like you use ISO-8859-1 for Latin-1

verruckt24 438 Posting Shark

If you observe more closely all the characters that have managed to get convered are from the set Latin-1 (0080-00FF) such as Á - \u00c1, ú - \u00fa, á - \u00e1, í - \u00ed. The only character that is not from the Latin-1 set but still gets converted is š - \u0161 which belongs to the Latin Extended - A set. But thats because the encoding windows 1252 consists of characters from ISO 8859-1 as well as ISO-8859-15 where the | is replaced by š for 0xA6 from ISO-8859-1

verruckt24 438 Posting Shark
scan.nextLine();
String str = scan.nextLine();

This is what causes the problem. You are already moving your scanner past the line read. Remove the first scanner.nextLine();
Read the Scanner docs here for more details.

verruckt24 438 Posting Shark

All the errors point to just one thing that the symbol/variable input is not declared.

input = Integer.parseInt(br.readLine());

In the above code of yours, have initialized input but havne't declared it anywhere, declare the variable before using it.

Note: Also paste your code in code blocks in future so that the trouble of saving/opening it can be avoided on our part, also you can copy paste the error in the post itself.

verruckt24 438 Posting Shark

If that solves the query mark the thread as solved so that people are aware of the fact and do not post anymore on this thread. Else we do have a lot of old threads revived unnecessarily.

verruckt24 438 Posting Shark

i have alrady gone though the code on the specified links

You haven't gone through anything, if you would have gone through, your questions would have changed, but you keep asking the same, lame questions again and again.

i didnt find any link where we can use apache poi and itext together so asked... can u able to provide me link where apache poi and itext has been used together?

You are still asking for spoon feeding like a baby.

i guess this forum is there to explain the things

Have you gone through the forum rules, if not go through them, if yes, still go through them again and try to understand them this time. We aren't in anyway obligated to help you.

and if somebody has alrady implemeneted the things is really helpful

Translation : I would be happy biting on ready made food than to cook it myself.

i guess u guys wont implemet anything and just post the link

Yes, rare enough but you are right this time.

Giving you one last hint, if you have the smarts to take it.
Go read how to read content of an excel file with Apache POI. Once you know how to obtain the content, go read how to transfer it to a pdf file using the iText library. That's all that you are going to get from me.

verruckt24 438 Posting Shark

You say you don't need spoon feeding, but what else are you asking for then, when you say "Please explian the useage of apache and itext together???". You have been given the links, you can go read the contents there, which I am sure would be more better in explaining the usage than anyone over here. What do you think we are going to do when we would be explaining you the stuff, we would read the contents on the site as well, why then do you need our interpretation for that.
If you are not aware of the customs here, let me tell you that we would be giving you only pointers in the right direction, which you have already been given, we aren't your tutors to do the explaining part for you as well.

verruckt24 438 Posting Shark

You can print out the output in CSV (comma-separated-values) format and then open this file in a spreadsheet application like Excel. If this is not what you want, detail out your problem.

verruckt24 438 Posting Shark

Build and exit key: I built an exit key using the number 0, but somehow I think it is entering into the formatted equations and changing the response I'm expecting. I could be wrong. I'm very very new at this.

Thats the reason I suggested you a menu, at every stage of input taking, you could have a different exit key, which does not fall into the range of valid inputs for that stage.

verruckt24 438 Posting Shark

> I must also format the pay as currency
Do you mean having decimal points ? If yes then you could define your pay variable as float/double according to your requirement.

> Build an exit key
What you could do is have a menu printed at the start of every calculating stage mentioning the user about the options, say 1. to enter hours worked, 2. exit. Something of this sort. Then process accordingly.

verruckt24 438 Posting Shark

You can assign only access privilege to the standard set of records (I assume they are in a separate table) to the group. So that they can certainly generate other records using values from the standard records but not edit/delete them in anyway.

verruckt24 438 Posting Shark

Yes masijade gives a more specific answer in your case.

PS : And yes crazy does know, that verruckt = crazy in German, actually I got crazy translated in german, from google langauge tools. ;)

verruckt24 438 Posting Shark

If you see the javadocs for ConnectException class, it tells you that this could be typically due to the fact that no process is listening on the port. Make sure the port number that you are using (32133) is being listened by some process.

verruckt24 438 Posting Shark

@javaAddict : Yes, you had already given him enough hint for him to workout the solution, but I observed that he was busy talking about the modulus then too. Thats the reason I mentioned him that he needs to look at whats sited to him.

verruckt24 438 Posting Shark

Firstly gabec94 I would like to note a few things that I have observed while going through this thread. You are not taking any heed of the advice and help given to you and just want to stick to the method of doing something in the langauge that you have worked with in the past. While learning different langauges you will come to know that you need to appreciate each langauge for the things that can be done with it and do them the way they can be done in it.

>I would like to work with modulus because that is what I have learned, rather than teaching myself new things
If this is the case then why learn new langauges at all ?
Also even if this is somekind of assignment that you are absolutely being made to do in the Java langauge, still, why not do it in the proper way.

Coming to your problem : I suppose you want the user to insert to an n-digit number and then output to him the n digits separated by spaces.
You don't need to go to the "using-modulus-to-separate-each-digit" method over here, as it would involve more coding on your part, plus the String class of java offers much easier mechanisms to do this same thing, not to mention that treating a string like an integer and then again converting it to a string doesn't seem to be a logical flow.
To explain what …

verruckt24 438 Posting Shark

Depends upon how much data you would want to store. varchar is a choice, tinytext - max 255 chars, text - max 65535 chars are other options. There are also mediumtext and longtext .
Choose according to your needs. A complete summary of MySQL field types can be found here

verruckt24 438 Posting Shark

@masijade:

but still it shows the K meanspoints class needed error

Thats the error he is looking to sort out. And look at the solution he is trying,

I also tried with vector class, but it shows error.

Thats a simple error he has been asked to chuck off by his tutor. That explains my previous post.

verruckt24 438 Posting Shark

Why do you think your trainer gave this to you to be debugged, only for you to pass it onto somebody else, naah, he wants YOU to do that, so probably there's something in it that he wants you to learn. Step through the program, see whats it expected to do, observe what is actually does, do some figuring out using dry running etc to find out the reason for the difference. I think this help should be enough for you to start working on it.

verruckt24 438 Posting Shark

Detail out your problem, I ain't getting from this description what it is that you want to do exactly.

verruckt24 438 Posting Shark

As Ezzaral has mentioned, I would like to see more code, as these lines are perfectly fine.

verruckt24 438 Posting Shark

i think u should only include<iostream.h> and else do as suggested by nucleon........

Read the posts written above.