Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+3
Strength to Decrease Rep
-0
89% Quality Score
Upvotes Received
7
Posts with Upvotes
6
Upvoting Members
6
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
3 Commented Posts
0 Endorsements
Ranked #1K
~12.5K People Reached
Favorite Tags
Member Avatar for woomar

The question seems a little vague out of context and you may need to provide more information. To add a node to a list, you have to make some other pointer point to the new node then add a ponter to the current node to the next element of the …

Member Avatar for somjit{}
0
228
Member Avatar for woomar

Your problem is trivial and occurs at line 12. At this point you test for the end of the list and exit the method but instead of returning the count, you return 0 and get 0 every time as the result! 12 if (node == null) return listcounter;

Member Avatar for JamesCherrill
0
258
Member Avatar for kurianjoseph

I recently got a book from the local library The complete Idiot's guide to HTML5 and CSS3, which covered the topic well but did not really cover the use of these for Mobile compatability, which is what I was looking for. Apart from this the 'for Dummies' series are often …

Member Avatar for naina125
0
136
Member Avatar for Conquero

I suspect your first problem is in the definition of the dot product. You say the result is a third matrix of size [3][4] which in your example is wrong. Generally two matrics of size [i][j] and [j][k] give a result of size [i][k] formed from the total of the …

Member Avatar for stevelg
0
122
Member Avatar for Sci3nc3F1cti0n

Very interesting, not done javascript yet, next chapter! Note that the vatiable name in line 31 is shown as a different colour, (like it has been recognised as a keyword,) but not in line 15. Also noted that line 15 has lev all in lower case, line 31 has it …

Member Avatar for Zagga
0
246
Member Avatar for rrlogu

Overlapping elements in html is handled by the *z-index* which is automaticaaly assigned (in order of declaration) by the browser unless you state otherwise. Try; #topdiv {position:fixed; z-index:1; ... ... } You may need a higher value or specify the z-index for the body as 0. If both still show …

Member Avatar for JorgeM
0
176
Member Avatar for pmark019

One problem I can see is that you have created the textView in the Java code rather then within main.xml but not added the View to the layout. You czan create widgets in xml or in code (or both) but they need adding to a view group using `this.addContentView(text);` You …

Member Avatar for stevelg
0
95
Member Avatar for im abcd

On line 23 in the program you try to set up a Button variable but declare it as (Buttton) {3 t's} this typo will cause your error as the type is not recognised. I suspect your actual error message is Buttton not recognised as a type!

Member Avatar for im abcd
0
792
Member Avatar for alreem

The program shown will not calculate the value of e^x! Presumably, this is an exercise in programming to calculate the value as a series (hence collecting and printing a sum!) for which you should have the formula; [QUOTE]e^x=1+x+(x^2)/2!+(x^3)/3!+(x^4)/4!...[/QUOTE] This is no doubt the formula used by the java math class …

Member Avatar for ztini
0
2K
Member Avatar for sarathsshanker

You have not provided any code or listings it making it difficult for anyone to identify what the problem is! I ave had problems creating the R.JAVA class caused by problems in the XML files that create it. If there is a single syntax error the compilation fails and no …

Member Avatar for stevelg
0
66
Member Avatar for Whilliam

I think your answer may lie in a classic error in Java! At line 127 you test if the command is 'calculate' and then test for which operation is selected. Java will test to see of the object 'c' is the same as the object 'calculate' - which it is …

Member Avatar for stevelg
0
196
Member Avatar for Archenemie

In the getdbresults button listener you use the line [CODE]Cursor cursor = db.query(false, DBhelper.table_name1, null, null, null, null, null, null, null);[/CODE] Reading the android developers reference docs there is only one form of query beginning with a boolean and this uses eight further arguments beginning with the table name and …

Member Avatar for stanleyben
0
133
Member Avatar for stevelg

I am trying to create an app to enter records into a database (SQLite) which includes an option field with data selected from a drop-down list box or Spinner. I can create the Spinner from a string array input from Strings.xml but I want to make the data 'user editable,' …

Member Avatar for stevelg
0
195
Member Avatar for Jay V.

You are making two mistakes here by the look of it. The first is the type of result you want and the second is the function used. The if statement requires a Boolean value in the brackets to control execution. Your entry results in a numeric value, the number divided …

Member Avatar for kashokreddy14
0
131
Member Avatar for shroomiin

While use of arrays or an arraylist would make sense they are not necessary. The original program is almost there. It even has an integer declared to hold the value in numcounter. What is needed is to record the current value of counter in numcounter when a new smaller value …

Member Avatar for dlucke17
0
111
Member Avatar for bustersox

You have two problems in the sort routine which I can see. The outer for loop initializes the startScan to 0 to run while startScan>data.length()-1 (4), but startScan will immediately be less than 4 so the code block will not run! (You need >) When you find the minimum value …

Member Avatar for stevelg
0
2K
Member Avatar for LiquidScorpio81

Interesting problem! You are looking to print out the set of permutations of the three numbers 1,2,3. I did not know where to start initially but soon seen what was needed once I saw your approach. You are on the right lines but the above code will not work. Rather …

Member Avatar for stevelg
0
91
Member Avatar for rocky89

As a starter, do you know what the first four perfect numbers are? Do you know the next perfext number after 6? and tellingly,, Given a number n, how would you determine if it is perfect?

Member Avatar for stultuske
-1
187
Member Avatar for bkafroboy69

The methods shown will not do anything like what you are asked. The method getRank sets the value of Rank to 0 at line 10 but never alters or resets it to anything else. So the return at line 13 will be 0 irrespective of what you expect line 12 …

Member Avatar for stevelg
0
167
Member Avatar for stevelg

Hello A belated introduction to all. I am from Liverpool, England and work between a surveyors office on CAD and a web design company writing Java based cloud applications. I joined Daniweb to help augment my skills in Java. I have written a number of programs previously but have only …

0
32
Member Avatar for robdiablo

Challenging! You cannot do what you want the way you are trying to do it. For singles it is easy using; [CODE]where ti.UID=t2.UID and((t2.gender='male' and t2.age='23) or (t2.gender='female' and t2.age='20'))[/CODE] but when it comes to couples you need to test two records in table two, where you only access one …

Member Avatar for vankysrox
0
122
Member Avatar for JuicedBrain

You are processing the input with the account object, which is defined as a SavingsAccount class. The subclass containing the deposit and withdrawal methods is named as Bank Account! Perhaps when you decided to rename one you should have renamed both! To accumulate the totals you seem only to need …

Member Avatar for javaAddict
0
128
Member Avatar for emcee123

A user repeatable loop usually places some code around the main program block with a variable condition. For example a while loop with a simple Boolean variable. Set the variable to true initially then after running through the loop once ask if the program is to be run again. If …

Member Avatar for stevelg
0
77
Member Avatar for gibbsfan19

Your primary problem here is that you do not call the 'printBin' method from the main class so this procedure is never called! You also use the call Integer.parseint() but do not allocate the result to any variable. These could be overcome using [CODE]printBin(Integer.parseInt();[/CODE] but as this returns an integer …

Member Avatar for stevelg
0
145
Member Avatar for Alex_is

You give no indication that you understand what you are trying to do. You should know that the median is defined as the central value in a set. If the set has an even number of elements it is the arithmetic mean of the central two. If you order the …

Member Avatar for stevelg
0
403
Member Avatar for nola_Coder

It is not clear what you are trying to do! I can see how the first array adj[][] represents a directed graph but no lengths are given unless the lengths are the values in the array (ie. 1) Hence, you have no lengths to assess when the length is 2. …

Member Avatar for nola_Coder
0
167
Member Avatar for hanntaa

You should have successfully read the file into the arraylist in the lines 349 - 359. You now need to separate the lines into groups of four which are the formatted into contact records. The loop will need to run upto the size of the array, so use [CODE]for(int i=0;fileRead.size();i+=4) …

Member Avatar for hanntaa
0
199
Member Avatar for Stefano Mtangoo

Your main problem lies in understanding the operation of subclasses in OOP. Subclasses are templates for creating objects which do not exist in memory until a new instance is created and given a variable name. Then the code will exist but still needs to be called for it to do …

Member Avatar for Stefano Mtangoo
-1
244
Member Avatar for leoeroy

The calculation for the power series evaluates each term adds 1 and then assigns this to the variable, overwriting any values from previous iterations. The final loop will then assign only 1 plus the last term. You need to accumulate the values from each term as it is caluclated. Hence; …

Member Avatar for leoeroy
0
2K
Member Avatar for Farfie

Here's a hint for you. If you cannot separate the entered number into characters, the only way you can test individual digits is to divide the number down. If you use modular division (%10) the result will be the final digit in the number which can be tested. Using integer …

Member Avatar for stevelg
0
158