Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
15
Posts with Upvotes
14
Upvoting Members
10
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
3 Commented Posts
0 Endorsements
Ranked #540
~34.4K People Reached
Favorite Tags

76 Posted Topics

Member Avatar for adarshcu

Hi All, I need some help with analysing a problem. I have a list of objects that are retreived as part of search results in my webapp page. From the list of these objects, one object is selected and the next screen is populated with the data from this object. …

Member Avatar for JamesCherrill
0
153
Member Avatar for riahc3

If you could afford more memory to your JVM on the server machine. You could increase it. This reduces the chance of OutOfMemmoryError. May be you could also use a profiler to confirm that there has been no memory leaks in your application ?

Member Avatar for jwenting
0
256
Member Avatar for william.bishop.7169
Member Avatar for adarshcu

Hi, [CODE] public void getTasksList(ArrayList<PerformTask> TasksList) { // TODO Auto-generated method stub try{ Class.forName("com.mysql.jdbc.Driver"); Connection cn=DriverManager.getConnection("jdbc:mysql:///test","root", "admin"); Statement st= cn.createStatement(); String s1 = "Select * from perform_task"; ResultSet rs = st.executeQuery(s1); System.out.println("Comes Here !! "); while(rs.next()){ rs.getDate("DateOfTask"); java.util.Date jDate = new java.util.Date(rs.getDate("DateOfTask").getTime()); TasksList.add(new PerformTask(rs.getInt("TaskID"), rs.getInt("PersonID") , jDate ,rs.getString("TaskDescription"),rs.getInt("TotalEffort"),rs.getString("TaskName"))); } }catch(Exception …

Member Avatar for rahul.pedduri
0
2K
Member Avatar for adarshcu

Hi All, I've the following scenario which i am not sure can be implemented. I have my Client Side Objects, which have been defined at an earlier stage. Now i need to send the data in the form of XML to the server side who have given me XSD's. Now …

0
97
Member Avatar for adarshcu

Hi, I'm not quite sure if there is a thread for Eclipse related query separately. But since this is a java related one. I'm posting it here. Is it possible that i can have PMD check run on a project by default ? Instead of clicking on my source file …

Member Avatar for DavidKroukamp
0
142
Member Avatar for adarshcu

Hi All, I have a JAR file that contains a .dll file. But during an ant build a ZIP Error is thrown [CODE]error reading D:\COE\Libraries\client\WSQUtil-1.0.jar; error in opening zip file[/CODE] Is there a way to overcome this ? The jar looks fine(opens in winzip) and eclipse build path also references …

Member Avatar for adarshcu
0
226
Member Avatar for adarshcu

Hi All, I need to have a Regex that will not allow just spaces, but it can allow sentences with spaces. It should allow any special characters that occur as well. Actually, it is for a text area of comments. So i want to restrict him from entering just spaces. …

Member Avatar for adarshcu
0
112
Member Avatar for TigerTeck

Did you write this code ? I think there are way too many mistakes here. Write the class properly. There are repetitions of variables. Also use functions to write your code. Probably then, we can think of writing the functionality that you want. An example, [CODE]public class A{ private int …

Member Avatar for TigerTeck
0
168
Member Avatar for sike.mausa

I don't find the error that you stated above. Can you paste the code that you used. And the full exception message. @above. It should throw a FileNotFoundException in case the file is not found in the String sent. He has passed a string. I see no issue in that.

Member Avatar for sike.mausa
0
616
Member Avatar for <HHH>

I think you can do this to help your case. [CODE]while(scanner has lines){ //get line into a string variable from scanner Scanner secondScanner = new Scanner(line); while(secondScanner has integers){ //read numbers into array here. } secondScanner.close(); }[/CODE]

Member Avatar for <HHH>
0
106
Member Avatar for codybuRr

For [CODE] length frequency ------ --------- 1 3 2 13 3 24 4 13 5 10 6 2 7 5 8 3 9 1 10 3 11 2 > 23 0 ------ --------- Average length = 4.2 [/CODE] I would like to see length and frequency as key-value pairs in …

Member Avatar for codybuRr
0
1K
Member Avatar for Nandomo

Well, what you have used is correct functions of String. If it works for you, its great. but i have a question. Why do you need four sets of [CODE]String type, asked, ans;[/CODE] to perform the same operation. Once a set of values required for your quiz object is ready. …

Member Avatar for Nandomo
0
200
Member Avatar for iThaos

For Java specifically. i prefer Head First Series Java. For android, please check mobile development forum in this same site. Happy learning!!

Member Avatar for iThaos
0
148
Member Avatar for federerforehand

Yes. First, add suit and number to your card class. Move the generation part to a tester class. Essentially programming should be a way such that the single functionality performed in a function. Here you could, 1.Have a method to generate random number separately. 2. Pass the random number from …

Member Avatar for adarshcu
0
138
Member Avatar for akingcool

As JeffGrigg told you. Open Source third party tools are a good option. Apache POI is good and i feel its the best.

Member Avatar for akingcool
0
419
Member Avatar for cdea06

You have a constructor which takes 3 params [CODE]public Account(double initBal, String owner, long number) { balance = initBal; name = owner; acctNum = number; numAccounts++; }[/CODE] But you try to use a constructor which has two parameters. [CODE] Account consolidatedAccount = new Account(0, acct1.name);[/CODE] Your error message says exactly …

Member Avatar for JamesCherrill
0
244
Member Avatar for Joey_Brown

Yes setting the value of a variable using a setter is the best way . But then you do not return a boolean value. Setter should not return a value. It is against programming conventions. [CODE]public void setmyYVar(int y){ if(my_condition_is_true){ this.y = y; }else{ //do nothing or set a pre-defined …

Member Avatar for Joey_Brown
0
3K
Member Avatar for sasikrishnasamy
Member Avatar for dennysimon

[CODE]Scanner scanner = new Scanner(myFileWithLineNumbers); while(scanner.hasNextLine()){ String line = scanner.nextLine(); line.substring(1, line.length()); }[/CODE] This is one such small snippet of code. Assuming you have single digit numbers. There will be variations when you try to add this in your code fully. May be your line number has a "." at …

Member Avatar for adarshcu
0
148
Member Avatar for ali11

It would be nice if your code is enclosed by code tags. Its not at all readable.

Member Avatar for ali11
0
139
Member Avatar for AngelAmi

More inputs from you would do us good. Show us the piece of code that you are using to execute the query. One Example may be -- Where i assume query is what you are running from your java program. [CODE]List mylist = query.list();[/CODE]

Member Avatar for stultuske
0
89
Member Avatar for lenyjose

I do not know about best sites. But i suggest Head First Series in Java as a good place to start. It is a very good book. Ohh.. I almost forgot. You get a good documentation if you download java onto your machine which is also available on their site.

Member Avatar for adarshcu
0
134
Member Avatar for anand01

Try using the[CODE] .equals()[/CODE] method on the first String. It would be good for you to investigate why [CODE]== [/CODE]is not used for Strings.

Member Avatar for anand01
0
142
Member Avatar for ashsailesh
Member Avatar for hfx642
0
126
Member Avatar for TheComputerGuy

First there are lots of typo's in your program. Remove them. Your class cannot return an int. Your method should [CODE] public class void MyClass{ public static int myOddNoSumFunction(args){ // functionality } public static void main(String[] args) { myOddNoSumFunction(myargs); } } [/CODE] Note the usage of static. Try the same …

Member Avatar for JamesCherrill
0
2K
Member Avatar for begprogram

i'm not sure why you need this loop. [CODE]while (maxVal > userInput) { maxVal = maxVal/10; }[/CODE] What i would do for this is [CODE]1. Get input from user. //Inside a loop now, 2. userInput % 10 , Print remainder 3. userInput = userInput/10 //exit loop [/CODE] Given so many …

Member Avatar for adarshcu
0
149
Member Avatar for canarian

This should not work slow on the PC configurations you mentioned as this just a very basic program. Is this the entire program or is there any other calculations or looping done ?

Member Avatar for adarshcu
0
88
Member Avatar for ilovejava

I'm not able to see any error in the program as such. But this should take a long time to get you the answer. Because basically you are iterating 3 inner loops 10000 times and also the third loop is almost called four times for each run of the second …

Member Avatar for Taywin
0
683
Member Avatar for cutterpillow20

Download at [URL="http://www.oracle.com/technetwork/java/javase/downloads/index.html"]http://www.oracle.com/technetwork/java/javase/downloads/index.html[/URL]

Member Avatar for cutterpillow20
0
153
Member Avatar for gahhon

[CODE]String[] studentName = course.getStudentName();[/CODE] Now iterate through this array. Use an Enhanced For loop. Its better. I think you are now printing the entire array of students thrice. @above. I feel it is an assignment for them to create a course class.

Member Avatar for gahhon
0
202
Member Avatar for Raghu_Ganapm

@hfx642: To add to what ezzaral said, variable is not available is correct , but then you may pass it as a parameter , even when you pass that as a parameter, since u say it has been initialized, it will not throw a NPE,unless you specifically initialize it to …

Member Avatar for hfx642
0
97
Member Avatar for Hikari123

Are you getting any errors or is the program not running as you expect it to ?

Member Avatar for Hikari123
0
124
Member Avatar for gedas

I guess you may have to use an overloaded hashcode method for this to work. I'm not quite sure though. May be the more experienced people can help you out. I have a few questions out of curiosity : 1. Can it not be the other way around ? You …

Member Avatar for gedas
0
118
Member Avatar for loserspearl

Catch all the exceptions that are thrown.NumberFormatException is thrown appropriately here as you are trying to parse a character to integer. Catch that as well !!

Member Avatar for adarshcu
0
216
Member Avatar for mohamed moamen
Member Avatar for mohamed moamen
0
122
Member Avatar for techyworld

You will have to learn the concept of a stack first. It will be a little difficult to explain a concept of a stack, as it is best understood with pictures and graphics !! Each function call is assigned a new stack frame with memory for its local variables. Try …

Member Avatar for techyworld
0
88
Member Avatar for b.netana

The error is because of concept of polymorphism. In line 33 that you specified , cam is a super class, while megapx() is present in a sub class. Your super class variable can hold the reference to a suclass object but it will not know the functions or variables present …

Member Avatar for hfx642
0
288
Member Avatar for adarshcu

Hi, I was preparing for SCJP 1.6 and i have the following snippet of code. [CODE]package com.self.trials3; public class Animal { public void Animal(){ System.out.println("Obviously Works"); } Animal(){ //System.out.println("Constructor"); //super();use super or this() as first line in your cons to call other //cons. this("Adarsh"); } Animal(String AnimalName){ //System.out.println("AnimalName >> "+ …

Member Avatar for pavanvusirika
0
153
Member Avatar for adarshcu

[CODE] insert into AUDIT_TABLE( "TIMESTAMP", AUDITCATEGORY, USERID, AUDIT_XML, "AUDITID", "SOURCE", "ROLE", EVENT_ID, EVENT_DATA, TYPE_OF_APPLICATION) select CURRENT_TIMESTAMP, AUDITCATEGORY, USERID, AUDIT_XML, (SELECT MAX(AUDITID)+1 FROM AUDIT_TABLE), dummyNumber||i, "ROLE", EVENT_ID, EVENT_DATA, TYPE_OF_APPLICATION from AUDIT_TABLE where "SOURCE"='1312171509321'; [/CODE] Hi, Above is a part of my stored procedure , I'm trying to create test data for …

Member Avatar for adarshcu
0
202
Member Avatar for campuzcrazyness

a goto statement isnt tat good for programming.. avoid it if possible.. this program becomes pretty simple without em..

Member Avatar for campuzcrazyness
-1
549
Member Avatar for adarshcu

[CODE]import java.util.regex.Matcher; import java.util.regex.Pattern; public class RegexTest { public static void main(String[] args) { String regex = "([a-zA-Z'-]*[ ]*)*"; Pattern p = Pattern.compile(regex); String input = "Adarsh has been testing this issue for a very long time now!#!"; Matcher m = p.matcher(input); System.out.println("Called"); if(m.matches()) System.out.println("Matched"); else System.out.println("Not Matched"); if(input.matches(regex)) System.out.println("Matched"); …

Member Avatar for thekashyap
0
185
Member Avatar for hoven

"The question is required to use arrays to display what the user has entered when they select choice 4 " @above Do you want to display all the previously entered choices by a user when he finally presses 4.?

Member Avatar for hoven
0
141
Member Avatar for L3gacy

MS Visual Express C++ is just around 70 mb. The entire Visual Studio Express is that big. You can download only the C++ component.

Member Avatar for mike_2000_17
0
401
Member Avatar for adarshcu

Hi all, I've this following piece of code. It is a simple hands on exercise for my learning. I retrieve data from a table called cat and what i would like to do is , go to the action page only if there is a record for that username and …

Member Avatar for Shanti C
0
186
Member Avatar for ComicStix

don't use [CODE]for (i = 0; i <= odds.length; i++)[/CODE] Use [CODE]for (i = 0; i < odds.length; i++)[/CODE] The array subscript for the last element is one less than array.length

Member Avatar for adarshcu
0
314
Member Avatar for TinhornAdeniyi

Well !! I went through your code, it does have a problem. I feel its more simple and i don't find the necessity to run through a loop since you have the pointers for the first and the last one. What can be done is You have [CODE]1->2->3 Store 1 …

Member Avatar for TinhornAdeniyi
0
200
Member Avatar for stephy1
Member Avatar for biancaW

The braces are incorrectly laid out. Try using a better editor. It shows you where the braces are wrong and one more thing , when multiple statements have to be executed for a set of conditions , braces have to be there. You have not used them anywhere.

Member Avatar for arkoenig
0
285
Member Avatar for curbster

[QUOTE]Good point, I moved those to the constructor called showListing,[/QUOTE] 1. You cannot call a constructor by any name. It has to have the same name as the class. [QUOTE]What do you mean TVShow objects instead of an array of Strings?[/QUOTE] 2. Create an array just like you do so …

Member Avatar for Akill10
0
12K

The End.