verruckt24 438 Posting Shark

1. I don't see anything wrong with the query code here.
2. If you want to send the data for just two variables mention just those variables in the insert into clause for e.g. if you want to insert just date and time write the query as follows : INSERT INTO tablename(date,time) values ('%datevalue%','%timevalue%'); this will work just as fine.
3. Instead of having two independent columns, one for date and the other for time you caould have a single datetime or timestamp column. Look into the specs of each to find out which one is more appropriate in your case.
4. Since InvoiceNum is an auto generated column, you need not pass data for it (I assume it is something like AUTO_INCREMENT in MySQL) you can omit this coulmn name and it's corresponding value from the query.

Alsoyou have not stated what error as such you are getting, mention that to get more specific help.

verruckt24 438 Posting Shark

BTW what is steganography ? It might help you detailing that. Also google for the algorithm, I am sure you would get enough information there.

verruckt24 438 Posting Shark

Yes in this case you would have to use an instance variable for the flag instead of the static variable since, as pointed out in earlier posts static variable specifies a attribute of the entire class you won't be able to distinguish between two instances of the same class using it.

verruckt24 438 Posting Shark

Before moving further I would like to clear certain details. Since the static field would be common across multiple instances of a class, what if two different instances were initialized through diffrent constructors, in that case your serialization/deserialization would always depend on the last instance created. Would this be proper behaviour according to the logic of your problem or would not be ?

On second thoughts is this the question you are asking meaning is this what you mean by static field not preserving it's value ? (I have not clearly understood your question) if yes, then in that case you can use an instance variable instead of a static variable and have the serialization/deserialization behaviour depend on that.

verruckt24 438 Posting Shark

To launch a java application at startup in linux you can specify the command for starting the application in /etc/rc.local file. If you do not have the /etc or the rc.local file already you can create one before and then paste your command into it. An intro to what is rc.local and the detailed procedure is given here. This is the technique I use to start java applications on startup, although some people call it a hack, it's a good trick nevertheless !!!

verruckt24 438 Posting Shark

To tell you somethings to start off : firstly you are not the first person and certainly not the last one to be bruding over this question. Secondly this question can be satisfactorily answered by a person having enough expertise and expierience in both of the langauges in question, I doubt you would find many of them here, or anywhere else for that matter. Moreover I feel that such questions can be answered more appropriately by the concerned person himself. Having said this, I just provide you with points where you can start thinking over and comparing these two platforms.
When it comes to questions such as, "which langauge is superior over other", there is never a definite or generic answer. The answer can be different for different situations and mostly lies in the need of the use. What you want to achieve and how you want to achieve that, would be two questions that would take you closest to the answer. To site you an example, there is always a debate (over Java vs C/C++) in the making when in our organisation we are faced with the situation of developing projects/applications/modules. Being a java developer predominantly my first call is always for Java, but also being acquainted in C/C++ and a lover of these languages is what sparks a dilemma in my mind. Till recently we would certainly have answered the issue this way : If the application/module was supposed to performance critical, speed critical we would have …

verruckt24 438 Posting Shark

Hi Chris,
For the first project that involves html I would suggest you
http://www.w3schools.com/html/DEFAULT.asp which is the HTML Tutorial of w3schools and also http://www.w3schools.com/. W3Schools is a very well known tutorial collection that would cater to your knowledge requirements for HTML, CSS, JavaScript, XHTML etc.
For the second project I suggest you first decide what server side scripting langauge you want to use as your "front-end" for the web pages. This can be either PHP, JSP, ASP, ASP.NET etc., once you have decided on this starting to gather information on the decided langauge, it's usage, examples from the langauge and best practices for the same would be the next step.
While gathering knowledge on server side langauges you can also compare the features, benefits, disadvantages of a couple of them which would help you choose the langauge/platform that is best suited for your domain.
All the best.

verruckt24 438 Posting Shark

I don't think this will replace my habbit of running to google for anything and everything, for reasons stated : A single search engine provides you so much information about whatever you need that seeping through that itself is an ardous task, in that too Google mostly dishes out whatever you want in the first five links itself. Second, so much information more often than not overwhelms you. Another reason is I think it would be in the most rarest of the rare case that one would require the services of multiple such engines.

verruckt24 438 Posting Shark

I am from India too.

verruckt24 438 Posting Shark

@BestJewSinceJC : While it is certainly possible to decompile class files and you would certainly get several decompilers, one of which is the DJ Java decompiler, I would like to point out a thing here. The source code thus obtained would not be an exact copy of your .java file. Variable names would be changed and even the constructs used for looping might be changed (this is a personal expierience, my while loop was changed to a do-while loop) which would though certainly not change the logic of the program but make it quite complex in figuring out what you've written previously, when you need to make any further additions to your program in the future. While on the other side when you do make these changes by hand you would certainly have an original copy of the source code with you at all times for future needs.
All this to make a point that though decompiling is an option, I would rather prefer to make the changes by hand if I have the changed logic and the corresponding langauge changes quite clearly in my mind.
This is the thing every developer dreads, all the best for whatever option you choose.

EDIT : stephen84s has suggested a good option too... Hope you are on windows and hope you don't have to take any of the 'decompile' or 'write changes again' option....

verruckt24 438 Posting Shark

Calling a URL and parsing it for plain text values is not what you would want. What you first require is an HTTP API from the site owners which will provide you with proper values. But this certainly requires an API defined at their end and would require you to spare them some usage fees if at all the API exists.
Then a typical interaction between your program and their site would be something like this: You call their URL using either HTTP GET or POST (as mentioned by stephen84s) as specified in their API specification providing them the zip code and they return you the current whether for that zip code as a response.

verruckt24 438 Posting Shark

ignore this post if you intend to actually learn something. start off with Notepad. it's not the most "flashy" tool, but it's as good as any idea (for a beginner that is, and it's even better)

look up the java syntax, re-read your notes on "how to create objects" and give it a go.
if it doesn't work, come back here with your own code and show us that, we'll help you out from there.

ditto, not only is the solution mentioned here by quuba irrelevant in this case it is also wrong in the case that it would apply. Using an IDE just because you don't or don't want to remember langauge syntax and API is totally useless, it should rather be used to assist in your development when much of the basic work is very well known to you and you need to waste your time repeating that.
As a personal suggestion IDEs should never be used unless until you have spent enough time typing the actual langauge, this way you will remember & learn more.

verruckt24 438 Posting Shark

SO did u actually do something :? please share i also need it )

Check the dates before posting and better do some research too, since this thread is more than years old chances are that such a system might be in place at several places and you might also get help freely on it. No need to bring to life a three year old thread for that.

verruckt24 438 Posting Shark

OK, what if i have 3 stacks namely stack1, stack2, stack3. how do i put it in a single vector.

Well thats what I too am finding hard to understand.

what is a vector anyways?

Here's where you can find out what a vector in java is.

verruckt24 438 Posting Shark

As sos correctly mentions it there should be a clear fomation of the data that you want to parse, only then will you be able to parse it correctly in all cases. For this you would either have to have a fixed width for each field or distinct termination characters for each of them (distinct = ones that would not appear as data).
Without such a proper format parsing anything would be a very weak technique to reach to the correct value of the actual data one that would most probably terminate in wrongly parsed data (as you show in your eg)

verruckt24 438 Posting Shark

Hi friends, im new to java. so im facing lot of problems in developing applications. I need all ur help. pls give ur support to ur friend. I dont have much support in my side

That's not like all hell breaking loose. This is faced by all learners of anything that in the first phases they do not know much about finding their way. The java tutorials are just for you. I would also suggest buying and reading a few good books on basic java, I personally have found Bruce Eckel's "Thinking in Java" very good, but there certainly are many more you can opt for any of these.

verruckt24 438 Posting Shark

No, you did not, from the code you have written you are just implementing a single stack. Also to confess I too have not understood what your assignment is : "to implement multiple stack with a single dimensional vector". Details would be required for further thought.
BTW : Linked List is a sequential list of nodes where each node carrries a data element and a "link" to the next such node in the list. You have defined the structure correctly for that.

verruckt24 438 Posting Shark

Reading this would give you a detailed idea of the things you want. All the topics of interest are listed there.

verruckt24 438 Posting Shark

As stultuske appropriately mentioned it, since it is 50% of the score it certainly must have been given sufficient time to be completed. Yet you did not do it and now you are asking others to do what you did not, maybe just because you were acting plain lazy. In my opinion too I think you deserve to fail, which seen from a different perspective would be better for you too, which I guess you would find out when you do the project on your own and learn a couple of things out of it which o/w you would have not.

peter_budo commented: This wound did not need it more salt. -3
verruckt24 438 Posting Shark

So far the only applications I've found still require that the computer in use has Java installed.

The one I have already pointed out, JexePack, does not require java to be installed, it does install JRE automatically when the target machine does not have it installed and you have told to do it that way.
Also to repeat what I have mentioned you would have to purchase a license for this product.

verruckt24 438 Posting Shark

I am not pointing to suggestions but from what this persons approach tells me (as has been pointed out by others here) is he isn't looking for suggestions he is rather looking for ready-made solutions which is certainly unfair advantage in a competition and thats what I am not ready to do.
PS : Replying late since I was out of town.

verruckt24 438 Posting Shark

You have stated that you have already found that package than why again do you want to find the same package ?
Also you can get information about the package, it's use and an optional API doc specifying the usage of the library it offers from the same place you got the package. If all this is not mentioned there, I don't think anyone here can be of much help to you since this information can be achieved only from the source, unless ofcourse you have the source code for it in which case I think you should be able to figure out what it does and how to use it.

verruckt24 438 Posting Shark

Since p1BloodType, p2BloodType and chBloodType are character arrays you can extract characters from them using the index position of the array. So for e.g. if you want to get the character at the 10th position of the p1BloodType array what you can do is : char ch = p1BloodType[9]; // array index starts at position 0 in the same manner to read an entire array you should use a for loop.

verruckt24 438 Posting Shark

I guess it's

struct names{
// ....
} x;

or put it this way

struct names{
// ...
};

struct names x;
verruckt24 438 Posting Shark

If your problem has been solved, please mark the thread as solved. So that anyone else visiting is aware of the fact.

verruckt24 438 Posting Shark

There are a few URLs: These will help your project.
http://math.hws.edu/javanotes/c6/ex4-ans.html
http://www.csd.abdn.ac.uk/~etadjoud/teaching/CS5536/information/notes-java/45examples/30graphics/40roll_dice/10roll_dice.html
http://www.antionline.com/archive/index.php/t-228926.html


Albert

I suggest Albert to you to not point such members to a direct solution such as these. I went through the links and all of them provide a ready-made solution. I would not be surprised if the original poster just copy-pastes the solution and submits the assignment, which certainly was not what the assignment giver was hoping for. What people would not understand is that assignments are for them to understand the process of program development rather than for mere completion. Such spoon-feeding would eventually paralyze their career as a developer. I hope you understand this and do not repeat this.

verruckt24 438 Posting Shark

Yes but again where is it that you are getting stuck up ? Don't expect us to form the logic for you since you know what's to be done, you should be able to deduce a correct logic for that and write the code for it, then if you are getting stuck at any particular place ask us specific questions about it.

verruckt24 438 Posting Shark

@stephen84s
Yep, that's what my point was since the first post. If this program is a part of a competition, why should we be the ones to provide him unfair advantage.

verruckt24 438 Posting Shark

IT depends on if your program has something to offer for others. An API offers an abstraction for some low-level tasks while doing some higher level tasks. Let me give you an example of address book itself (since your program dela with it) An address book has contacts which can be created, edited and deleted. Further more it is also supposed to offer functionality such as searching of a contact. Now if you write a collection of classes that provide this basic functionality like say you store contact's using a List and implement the create, edit, delete and search functions. Meaning you provide the most general address book operations through your classes so that developers, using your library, might be able to implement an AddressBook feature without worrying about the details of create, edit and delete (they just call your functions) then you might be able to say that you have provided an API for an AddressBook.

Now deciding whether your program is an API or not is pretty straight forward.

verruckt24 438 Posting Shark

I am not even asking you to take my advice and I simply don't need to, I have given it and now it's upto you whether to take it or not. It's not that I am to benefit or something from that. What I just had remarked about was that the solution you told me you were implementing had been hinted by me quiet a while ago already.
To that you replied, that I was being haughty which is certainly not going to liked by anyone as far as I know.

And if it's annoying I wasn't the one requesting for help in the first place. This is complete ingrateful nature which I assume from your bad rep has been already noted by many.

verruckt24 438 Posting Shark

What you can do is you can make a class Pet and then make all the other classes extend from this class such as the ones you mention above. Then when you create an ArrayList of Pet type it will be able to hold objects of all types that have 'Pet' class in their parental hierarchy. (all classes that derive from the Pet class either directly or indirectly)

verruckt24 438 Posting Shark

I assume here you want to run the above command from java.
Java provides you with facilities to run commands at shell/prompt with the Runtime.exec() function
It should be something like this :

String cmd = "C:\Program Files\aProgram\test.exe -login joeSmith password1";
Runtime run = Runtime.getRuntime();
Process proc = run.exec(cmd);

Also see this (E.g. From Java Developer's Almanac)

verruckt24 438 Posting Shark

Hi ,
how are you?

I am fine.

please, could you help me to solve this question?

No, Reason ? Your next statement.

which is a part of the compitision's questions.

If this question is part of a competition I simply do not want to provide you with an unfair advantage. If you took part in the competition you may as well figure this out on your own.
You certainly weren't banking on us when you decided to take part in the competition.

I am waiting for your respond!

You can continue to do so !!

verruckt24 438 Posting Shark

help guyz...our teacher recommend us to download the "source code" of eclipse. jcreator, net beans, and bluej,,,

i am either confused,,,,what are the source codes of this four????are these the .java file???help guyzz,.....i cant seem to find their source codes since i dont even get the idea of what are their source codes,,,,

Would you mind using a more readable langauge with proper punctuation marks so that when somebody wants to help you he can dedicate his full attention towards solving your problem rather spending a good amount of time figuring out what you want. I hope not.

Towards your answer - which javaAddict has already given - but here is a simple way, when you write an application (if you have ever written any) or for that matter even a single program the langauge statements that you write that make up the program are known as source code. So if an application has five classes the five .java files form the source code for the application.
For e.g. The source code for a program that prints out "Hello World" on the screen

public class HelloWorld{
     public static void main(String [] args){
         System.out.println("Hello World");
     }
}

Believe me I can't make it any simpler than this. ;)
I also recommend a bit of googling for you cause you seem to be too lost.

verruckt24 438 Posting Shark

As mentioned above how is the file shared ? But more importantly whats this got to do with Java ? Please put your question in proper context so that we are able to understand and in turn help you better.

verruckt24 438 Posting Shark

I think you should have chose to put them in the Tutorials section. Creating a thread for them is pretty much useless.

PS : Now you can mark the thread solved (since it cannot be 'solved' as such) and increase my and stultuske's solved threads counter.... hey just a joke ;)

verruckt24 438 Posting Shark

No need to be haughty

I think you need to show more courtesy to the fellow who's trying to help for long. You are showing me the same solution here that I had hinted to you ages earlier (take a closer look at my previous posts and try to understand them, cause I know you sure haven't) and that's what I meant from my previous post. I do not know which curriculum you are trying to follow by not taking the hints and not reaching the solution at the earliest.

verruckt24 438 Posting Shark

yes what you need to do is perform the javac command from the directory where the tutorial files are.

verruckt24 438 Posting Shark

what is a class path and how can I correct this problem. I read couple articles but i just couldnt pick anything can anyone help me???

I am surprised that no one has made any effort to answer his primary question.
You can get detailed knowledge about classpath - > here

Be careful whith the package .. couse you dont declare one.

It's absolutely not necessary to declare a package, your program can work as well without a package declaration.

I just tried to compile this program that gave me an error : >javac HighLow.java
>The system cannot find the file specified.

As far this problem goes I think the java compiler is not able to find the .java file, are you running the javac command from the same directory in which your program file rests ? If yes provide us with a full error trace so that we can guide you better.

verruckt24 438 Posting Shark

From whatever you have posted I assume you need something here where one thread continues the for loop while the other sleeps for 1 sec and then wakes up, is it ? If it is then I suggest you to take a look at the SwingWorker Class. But if it is not I advice the psoting of the relevant code here.

verruckt24 438 Posting Shark

What is the datatype of the field ? Through which program are you trying to insert the data (langauge) ? Table definition etc would be needed.

verruckt24 438 Posting Shark

A few years ago I was facing the same situation, I had to write a file parsing script in perl and I had no knowledge till then that a langauge by such a name does exist. Adding more and more functionality to my script I started to knwo my way around. As I kept working with the langauge I also needed to keep looking at the documentation. This way I was finally able to reach my goal and also along the way I was able to learn a good deal about the langauge. Not that I am a very fluent programmer in perl but to this day I able to maintain and add functionality to the original script.... and also able to chuck off a few bugs from it ;)
I guess, following this way if you are able to break down the entire project into smaller more manageable modules and then work your way by adding more functionality into them would be a good option.

verruckt24 438 Posting Shark

What do you mean exactly? Should I start throwing random programming topics at you? Persistence, multithreading,...
Maybe random OOP topics? Inheritance, polymorphism,...
Black Box

These certainly won't be project topics as such...;)

BTW commenting on the original post. I am surprised at just how many of these developers can't even find decent projects topics. Common isn't finding a good project topic and then all about it considered project work ? Rather you people should be glad that instead of the professor throwing one of his chosen topics at you he has given you liberty to go find and develop a project of your choice which you are just throwing off by asking other people about their opinion.
Also I feel the reason for allowing students to select a topic of their own is to encourage them to develop something that they are comfortable about and are interested in, so that they have the motivation that hopefully remains around during the entire project work.
Think about it !!!

verruckt24 438 Posting Shark

That's exactly what I'm doing by posting on Daniweb. Not out of laziness, but I was short on time and I was fairly sure I would have follow up questions, so I chose to post here. Since I probably answer more questions than I ask, I'm sure you guys will forgive me. :) Its a shame that when I mark this thread solved, you will now get credit for it, although you didn't answer the question or offer an alternate solution. Either way, thanks to Masijade.... an alternate solution is just as good.

I did not mean to hurt you at all although you took it in a negative way, what I just meant was you could have found the solution googling it rather quickly than on this forum also it would have been in detail which I thought you would be wanting to know since your question was so specific and all this would just add up to your knowledge about the question domain thats it.
As far as the credit goes you can may as well request the moderator or whosoever has the power to, to not to add this thread to my solved threads (or subtract the count, if it can be done so) since as matter of fact I too don't like to take credit for the stuff I haven't actually contributed to.

verruckt24 438 Posting Shark

If it is purely simple, you may as well write it on your own and ask us specific questions where you get stuck. We are not going to write the script for you.
PS : You should write it on your own even if it is not purely simple ;)

verruckt24 438 Posting Shark

Use EXPLAIN followed by your query to get an explanation about the query from MySQL. Then you can analyze this output to know how your query is performing, then based on this you can optimize your query accordingly.

Suggestion : Use the Internet to your advantage, you could have as easily found this out from the net if you would have taken the pains to search the net.

verruckt24 438 Posting Shark

I am surprised at your patience, you have waited 19 days for the answer towards this post. Hasn't this crossed your mind even once during these 19 days that you might have already long solved your query if you had have taken the pains to search on the internet for the solution ? I am definitely sure that you might have got piles of articles on that partioning stuff, if it can be done or atleast get a clear-cut NO if it cannot be done so that you could have started looking for alternatives.

verruckt24 438 Posting Shark

Can you detail a bit on what you exactly need to do rather than showing us what to do it through, so we can show you a completely different way, if there exists, to do the same thing efficiently. Also use EXPLAIN in front of your query for MySQL to explain how your query is performing then analyze the output so you might get clues what actually is slowing your query down.

verruckt24 438 Posting Shark

the path should inclulde the bin directory too. so just include C:\Program Files\Java\jdk1.6.0_10\bin instead of what you have now.

verruckt24 438 Posting Shark

Use the power of the Internet to find it out....