DJSAN10 28 Posting Whiz in Training

Adding to what all have said.. Just to know distribuitons of Linux OS only , checkout distrowatch.com . You will get an idea that you have asked something like how many birds in my city right now..?? :) :)

DJSAN10 28 Posting Whiz in Training

Since you want to read from a file , your inital step would be to read about java IO. Check out various classes Reader, Writer, BufferedReader etc. That will give you a pretty clear idea about how to start. For ex. BufferedReader has a method readLine() that reads an entire line i.e. lines separated by newline character at a time. Accordingly you can decide what to use. Simple read a file first and display its contents on the console. Once you are done with this , you can move ahead

DJSAN10 28 Posting Whiz in Training

Please specify the problem that you are facing..?? what exactly do you want?

DJSAN10 28 Posting Whiz in Training

Try printing "type" at line number 6 , that might give you some clue. Also, paste on your entire code so that we get a better idea

DJSAN10 28 Posting Whiz in Training

@adam_k Thanks.. Will try with this and get back 2 u soon...

DJSAN10 28 Posting Whiz in Training

Just found out that comparison can be done for same table using something like this :
select * from table as t1,table as t2 where t1.column1 = t2.column1

Is this the correct way of doing it?? Can it be further optimized??

DJSAN10 28 Posting Whiz in Training

I don't need the exact query , just the logic of how I should go about it:
I need to compare for equality all records of a table for a given set of fields. If count of such similar records exceeds a particular value, I have to delete all those records.

For ex. A table contains columns A, B, C, D, E, F. I want to delete all such records whose column A, C, D are same and if count of such records exceeds (say) 100.

DJSAN10 28 Posting Whiz in Training

From this code, you are passing the file as an argument i.e. at the time when you run the program. Probably a little study of 'String args[]' or what command line arguments are will help you :)

DJSAN10 28 Posting Whiz in Training

Search on www.coursera.org or www.udacity.com and see if you get any

DJSAN10 28 Posting Whiz in Training

Well I would suggest you to try http://opencv.org/
I guess willowgarage is an older link. And from what you have written ,seems that its an installation problem

DJSAN10 28 Posting Whiz in Training

Not one of my favo.. but the hacker guy in Italian Job does nice little traffic signal hacking.. :P :D

DJSAN10 28 Posting Whiz in Training

spice

DJSAN10 28 Posting Whiz in Training

oslo gift friend

DJSAN10 28 Posting Whiz in Training

GNU assembler (gas) , also called as is another such assembler. You get it as a part of binutils as well

DJSAN10 28 Posting Whiz in Training

row[0] = 1;

I guess this is where the problem is. Your array length is actually 0 and you are trying to access the first element..!!!

DJSAN10 28 Posting Whiz in Training

For which line in your code are you getting null pointer exception??
FYI you get null pointer exception whenever you try to access/use something whose value is null

DJSAN10 28 Posting Whiz in Training

U2 (two's complement)

2 's complement means inverting each bit (i.e. 0 becomes 1 and 1 becomes 0). And then add 1 to whatever number you get .That will give you 2's complement of that number

DJSAN10 28 Posting Whiz in Training

Echidna Centre Strange

DJSAN10 28 Posting Whiz in Training

Not sure if Earthbound is better than Supermario.

Commitment

DJSAN10 28 Posting Whiz in Training

Basically , you have messed up with you curly braces a lot. Check into them.

> D = S*(S-a)*(S-b)*(S-c); //D is the square of the area of the triangle
>      if(D<=0)
>      {
>       printf("The triangle cannot be formed");
>        getch();
>         exit(0);
>          if((a==b || b==c || c==a) && !(a==b && b==c && c==a))
>             // this complex logic is to eliminate interpretting a triangle with all three angles
>             // sides equal as both isosceles and equilateral.

Like for example in above code the if after exit statement will never be executed once it enters the first if

DJSAN10 28 Posting Whiz in Training

Okay then maybe you would like to post output that you are getting wrong and the expected output as well

DJSAN10 28 Posting Whiz in Training

Initialize matched to false rather than true. Suppose A is "abcde" and B is "xyz" , always first if will be false and ultimately you return matched which is true in your case which is wrong.

DJSAN10 28 Posting Whiz in Training

Here is a link that might get all your concepts pretty much clear
http://www.dedoimedo.com/computers/dual-boot-windows-7-ubuntu.html

DJSAN10 28 Posting Whiz in Training

It says case label does not reduce to an integer

Maybe printing isalpha('a') might help. Just because isalpha on true returns non-zero integer , not necessarily 1. So can be a problem. Just try that out

DJSAN10 28 Posting Whiz in Training

Your structure will contain per user specific data like name,number,email,address , whatever you want for that matter. And for many users you will use array of this structure

DJSAN10 28 Posting Whiz in Training

that does not seem to be the solution, It was already set to console in the first place

If you have read the entire thread you will find out that OP there actually changed it to Windows. I am not sure if this works though

DJSAN10 28 Posting Whiz in Training

Paste what output you are getting before problem occurs

Or what you could do is write a print statement in every function at the beginning so you can atleast know which function is messed up

DJSAN10 28 Posting Whiz in Training
DJSAN10 28 Posting Whiz in Training

INT_MAX in limits.h gives maximum value of integer

DJSAN10 28 Posting Whiz in Training

1. How important do you consider computer security?
Very important

2. Do you use Anti‐virus/Anti‐spyware software?
On windows, Yes I do.

i. When was the last time you updated this software?
Automatic updation

ii. When was the last time you complete a full scan of your system?
Last month

3. which operating system do you consider most secure?
Would prefer Linux distros over Windows

4. Do you use names, dates, or cities as your password?
Yes but always a weird combination of 2 3 of them that makes sense to me ;)

5. have you been a victim of identity theft? if not do you take extra precautions so you do not?
Never till date. Have not considered any extra precautions as such but I don't give away my email id easily to websites that seem hazardous to me (usually those which have some free / lucrative offers , I avoid them until very sure)

DJSAN10 28 Posting Whiz in Training

Use Integer.parseInt() function . It takes String as parameter

DJSAN10 28 Posting Whiz in Training

Is there a way to specify a section of the long data string? Some data will be repetitive (such as payment status) and i won't want to change all the data in the string (would String tokenizer work?)

You will have to take care that only the intended string gets replaced. for ex. You will have something say a name associated with payment status so you will want to edit only that payment status which corresponds to that name

Function overhead just mean extra memory right? In that case if I use an if else statement that only call the method when an error occurs, overhead shouldn't be a problem, right?

Its not just extra memory. Check on the web you will get a lot of resources that would list out to you disadvantages of using recursive functions and cases where using them is suitable

DJSAN10 28 Posting Whiz in Training

nice, 2 problems fixed, Thanks! I ended up having to wrap all my code in do while loops... Say, can i call a method from itself? If I could then wouldn't the while loops be unnecessary?

Yes if you are saying recursion then yes you could do it. But you will have to specify a condition inside your function, and each time your function will be called you will have to check for that condition. If met you will have to stop calling function any further now. But usually, this would be something you would like to avoid because of the function overhead each time function is called plus personally, I think it will be difficult to maintain.

You can search the web to find out trade offs and advantages/disadvantages of recursion over iteration

DJSAN10 28 Posting Whiz in Training

int[] sortedArray = bubbleSort(points);

This function must be outside the for loop, that means you call the function only after you are done entering all the numbers.

EDIT : Post whatever errors/exceptions you are getting now

DJSAN10 28 Posting Whiz in Training

My question is how do I erase and edit the text file when I edit information? (eg, what where and what type of search?)I plan to write to the text file before exit and read it when the program start.

This technique might be bad efficiency wise , but the most simplest way i can think of is read the entire file as a string, use replace function of String class to edit/erase your file contents and write back to your file i.e. overwrite it.

hyperstars commented: very helpful relplies ty +0
DJSAN10 28 Posting Whiz in Training

Also, what kind of loop should be used if i want to be able to restart a certain process if wrong information is typed? For example, i'll have a conformation message, and if it's no i want to be able to go back to the start of that process. I know java don't have flags so...

You can use a while loop infinitely and maybe write your condition inside the loop(which leads to exit/stop the process) and break the loop when that condition is met or simply give that condition in the while loop.
Since you want to start your process all over again you will need to re initialize process specific values to their initial values. I think only doing this much will be enough

DJSAN10 28 Posting Whiz in Training

Now is there a way I can check if t (the name) is already in the account hash map? I realized this is a problem after I accidentally typed a non-existent name and the output was weird.

Yes, you can use account.containsKey(yourKey) function. Check documentation for the same

DJSAN10 28 Posting Whiz in Training

First check if the connection is being made correctly. Check if con is null. If yes it means connection is not getting established in the first place, check if you have set driver path correctly

DJSAN10 28 Posting Whiz in Training

Every language that interacts with the user directly will involve knowledge of HTML. CSS is the artistic part that takes time to master. A little PHP knowledge will go a long way, but PHP is back end development, not necessarily website design. JavaScript, especially jQuery are easy to learn. Beause HTML/CSS aren't programming languages, start with JavaScript as your first language, it's extremely easy to grasp and does wonders for design. AJAX is neat too, having the ability to dynamically call remote content like auto updating tweets. XML is easy to learn, but only necessary for sitemaps in website design. I don't know DOM or Flash, but Flash is old school, learn HTML5 canvas + JavaScript.

Exactly what I was looking for. Thanks a lot :)
I 'll mark this thread as solved after some more time. If anyone else wants to give their suggestion too :)

DJSAN10 28 Posting Whiz in Training

If I want to learn web designing and development, that includes many technologies HTML5, CSS, PHP, JavaScript, AJAX, XML, DOM, Flash/Flex/ActionScript and so on.
In which order should I go? The start will be basic HTML no doubt , but then which ones are the pre requisites for what. What will be better to learn before learning something ? I am looking for that order of preference. Do correct me if I missed something.

Thanks

DJSAN10 28 Posting Whiz in Training

package junit.framework does not exist

Thats where your problem lies. This previous thread might help
http://www.daniweb.com/software-development/java/threads/355349

DJSAN10 28 Posting Whiz in Training

printArray(array);

What is printArray function ?

DJSAN10 28 Posting Whiz in Training

Integer age = new Integer(); age.parseInt(Keyboard.readint() );

What NormR1 just suggested , that and i think readInt() might be the correct one. I don't know check the syntax

DJSAN10 28 Posting Whiz in Training

String updateStr = "UPDATE VIDEOS PLAYCOUNT = " + PLAYCOUNT + 1 + " WHERE ID = '" + id + "'";

There should be a "set" word after update videos i.e.
"Update videos set playcount = " + ..... an so on .
Check out the syntax

DJSAN10 28 Posting Whiz in Training

changed = true;
} //need closing curly brace after this

You need 1 closing bracket after this bracket which is of the for loop.
And follow NormR1 suggestion, you will be able to track these mistakes easily :)

DJSAN10 28 Posting Whiz in Training

can i do arrays with different classes in one class?

can you be a bit clearer as to what exactly you want.

DJSAN10 28 Posting Whiz in Training

I am using Eclipse to do my firmware project. However, it keeps giving me a red under lined error for the import line java.awt whenever i try to import the following.

Post your code. We need to know whether you have written the statement correctly

DJSAN10 28 Posting Whiz in Training

Post on which line number you are getting segmentation fault. Paste the exact message here, you might get quicker replies

DJSAN10 28 Posting Whiz in Training

public class Project2 {

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

for (int counter = 1; counter <= 10; counter++) {

JOptionPane.showInputDialog(null, "Please enter ten numbers",

"Question to User.",

JOptionPane.QUESTION_MESSAGE);}

number = input.nextInt();
array[counter] = number;

String output = " ";

JOptionPane.showMessageDialog(null, "Here are the numbers you selected." + output);


}

}

}

How far did you get ? Are you getting any errors? if so post them.Or post what output you are getting now

DJSAN10 28 Posting Whiz in Training

What did you do ..which change? post your code again USE CODE TAGS AND FORMAT IT so that it will be easier to understand. And post what output you are getting so far and what output you are expecting