2,040 Posted Topics

Member Avatar for softDeveloper

Could we see your script? Not sure how you did it. By the way, when you do the selection, did you attempt to check the DOM for parent/neighbor nodes instead of only the text selection?

Member Avatar for ko ko
0
122
Member Avatar for SagarSe7en

You need to solve the problem in maths first before you attempt to do the programming. Now, let's look at how math problem is like... 1) What the problem is asking for? If you still don't know, a key word is "sum" of something. 2) How each item price is …

Member Avatar for NormR1
0
550
Member Avatar for yup790

The code is not intuitive at all; besides, there are "for" loop in place of "while" loop... Not a good practice... Anyway, the break statement will stop only the inner most loop, but will not stop the infinite loop which is from the "n" variable. Why? Because "checker" variable will …

Member Avatar for Taywin
0
274
Member Avatar for jwelsh

Just a quick question, does your tracker count "refresh" page as well? Also, does it prevent web crawlers too? I'm not sure that the page your Ajax sent back is a valid web page to be called by a simple request for the page...

Member Avatar for Taywin
0
404
Member Avatar for laura301019

> two letters, a hyphen, last two digits of the year its from, another hyphen, then 3 letters What other criteria or restriction of those set of letters/numbers? The simpliest way to check string is to use regular expression. It may be a bit over your head for now, but …

Member Avatar for Taywin
0
169
Member Avatar for vizz

Try to change the CSS definition to... .hover{ display: inline-block; position: absolute; background: transparent url(images/menu_bg.png) center no-repeat; } Then see what happen?

Member Avatar for vizz
0
357
Member Avatar for godzab
Member Avatar for godzab
0
135
Member Avatar for arunod

Huh? Too broad question. Please be more specific? A Java bean? :P

Member Avatar for arunod
0
60
Member Avatar for vishalonne

Line 35 & 54, unreachable statements -- no need to be in there. When you have if-else statement and both return a value, any codes below it will be unreachable. As pritaeas said, inner most of your if-condition should return something, or the last statement (return false) will be executed.

Member Avatar for Taywin
0
239
Member Avatar for shehnaz1991

Your requirement is not clear. 1)When you said automatically calculate the total of addition, does it mean each time you type in a number? Or each time you change the whole number? Or each time you click a button? 2)Where is your HTML?

Member Avatar for Taywin
0
100
Member Avatar for collinsislee

First, you need to design how you want your number display to be. For example, you could force each display number as a block (4 characters). Then replace your line 40 with a block of code or a display function to display the number as a block. In other words, …

Member Avatar for JamesCherrill
0
368
Member Avatar for Helianthus

Do you want the replacement to be in the same 'div'? If so, you could 'hard-coded' the function; otherwise, pass in the div ID you want it to be replaced to (below). // Be careful, this function does NOT verify incoming arguments. // If element of divId does not exist, …

Member Avatar for Taywin
0
491
Member Avatar for 47pirates

As James said, a Date object no longer handle date the way you want. Even parse() method of Date class is deprecated. You can look at the [SimpleDateFormat API](http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html).

Member Avatar for Taywin
0
191
Member Avatar for rithish

> but in c++ we use <iostream.h> and <conio.h> where we use cin and cout from these libraray functions but we dont inherit anything .we use normally we dont write like class base:public derieved there is no inheriting property Yes, you can write OO programming in C++ as well. Even …

Member Avatar for Taywin
0
151
Member Avatar for rahulroshan

You should keep a boolean flag as a member variable inside your keyboard listener. It should work similar to "shift," "ctrl," and "alt" keys. If a specific key is pressed, turn the flag to true. Then when the next key is pressed, check whether the specific key flag is true. …

Member Avatar for Taywin
1
150
Member Avatar for aratnon

If you are talking about dynamically create an Object (class) in Java with user-defined name, you cannot do that. If you are talking about dynamically assign an attribute (or is being called as variable) of an object (class) with user-defined value, then it is possible. // sample class object named …

Member Avatar for Taywin
0
630
Member Avatar for laura301019

The way you use your condition is wrong. One equal sign means "assign" but two equal sings means "comparison" of 2 values. In your case cameraImage= should be cameraImage==.

Member Avatar for laura301019
0
194
Member Avatar for rakibtg

Sorry, I'm not sure what you really want. Do you have an existing page with an existing iframe element with the said URL? Do you want to replace the "CURRENT+WEBSITE+URL+HERE" text from a current existing iframe URL?

Member Avatar for rakibtg
0
354
Member Avatar for laura301019

You need to understand what "currentStudent" variable is being used in the script. In your case, it is an array index. It seems that you do not understand or have knowledge about array. You need to look it up for its fundamental concept online now before you go any further. …

Member Avatar for Taywin
0
690
Member Avatar for Bobby99

Your alphabet validation is wrong and that will always return false. The reason is that line 39 and so on will be guaranteed that the j!=checkOK.length because the lenght of checkOK is always 27 and it will be true if and only if your character is '_' (an other checks …

Member Avatar for Taywin
0
115
Member Avatar for osiron

If you look closely, there are a couple things in your code that are off. 1) Start from looking at line 60, what are you doing there? What is the consequence of doing that? 2) Look at how you use the loop to display your array value at line 53. …

Member Avatar for Taywin
0
145
Member Avatar for jamojo

If you are looking for uploading from a command line with FTP, you can check FTPClient class from apache (org.apache.commons.net.ftp.FTPClient) for uploading. Remember that it reads only ASCII file type. If you want a web interface, JSP is also a way to go.

Member Avatar for NormR1
0
912
Member Avatar for GlenRogers

You are confusing between front-end and back-end unless you are thinking about Java applet. Still, I think this forum is for Java core, not for a website unless (again) you are talking about the back-end algorithm. To answer your question, yes you can do JSPs for the front-end (display) of …

Member Avatar for GlenRogers
0
121
Member Avatar for pradeepptp

Stop reviving old thread! Look at the last date posted before replying. Also, your code is not completed + not in a code tag!

Member Avatar for JamesCherrill
0
331
Member Avatar for ilovejava

So the value in the middle of each line will be 2^(n-1)? What is the maximum you accept for the value of n? Because the n will be used to determine the height of the pyramid. Also, the value in the middle could have different length. How would you deal …

Member Avatar for JamesCherrill
0
323
Member Avatar for rayden150

... Reply to your own thread instead of create a new one... Try the code below... Not sure if it is working because I didn't test. [CODE] import javax.swing.*; import java.awt.*; public class Ejer1 { public static void main(String [] args){ JTextArea jt = new JTextArea(); jt.setText("Set it this way"); …

Member Avatar for Xeno999
0
190
Member Avatar for ABUMIN

If you have specified a class for the element, you could simply do it as... [CODE] .myclass { color: black; } .myclass a:link { color: black; } .myclass a:hover { color: black; } .myclass a:active { color: black; } .myclass a:visited { color: black; } [/CODE] It is depending on …

Member Avatar for zobadof
0
198
Member Avatar for xThrash

The implementation is tricky depending on how you want it to be. Do you have to implement the tree using only one ArrayList? Are you allowed to implement your own class to act as a tree node/leaf? Is there any constraints to the ArrayList you can make (i.e. limitation of …

Member Avatar for agieli
0
3K
Member Avatar for j23

It is not really. What you need now is to get the width & height of the applet window every time right before you draw those ovals. The only relative X, Y position that may need to be added is when the size of applet is very close to your …

Member Avatar for j23
0
1K
Member Avatar for asif123

Can you retrieve each image frame from the video? That's the first thing you need to do. After you can obtain each image frame, there are many ways to do the object detection in an image. However, there are many factors you may need to restrict your detection rules. How …

Member Avatar for asif123
0
166
Member Avatar for AbEeR Q8

You are passing a NULL value [icode]node *x=NULL;[/icode] to the insert() function. Then in your insert() function, you attempt to access "next" from the NULL pointer? That's the problem. They are all NULL. Do you have to pass in a node pointer to the insert() function? Is that one of …

Member Avatar for raptr_dflo
0
390
Member Avatar for Dwillich87

What you are doing is fine if you call the function only once. There are a couple things to be modified though... [CODE] function squareCube(selectRowNum, selectPower) { var rowNumber=10; // default is 10 var powNumber=3; // default power is 3 // if the value is a number and greater than …

Member Avatar for Troy III
0
90
Member Avatar for rpv_sen

How do you want to validate the content? Do you want to validate on submission? Do you want to validate each of them while data is being entered? Or do you want to validate after the content in each box is changed? Please be more specific when you ask a …

Member Avatar for rpv_sen
0
143
Member Avatar for Sailor_Jerry

Old thread... It's annoying to see old thread gets revived for nothing... Also, I usually use setTimeout() function to deal with sleep/wait anyway.

Member Avatar for akmr
-1
7K
Member Avatar for torkolort

If you are asking for an algorithm, Knuth-Morris-Pratt algorithm is a good algorithm to search a substring in another string ([URL="http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm"]http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm[/URL]). You can search for other algorithm as well, but this algorithm is very easy to understand to me.

Member Avatar for JamesCherrill
0
169
Member Avatar for mikecolistro

You gave only fragment of codes with no comment. Anyway, after looking at your code, I have some unclear points with your code. 1)Why do you start your weight queue in descending order? Don't you need to do it in ascending order? 2)I am not sure why you need only …

Member Avatar for raptr_dflo
0
103
Member Avatar for BuhRock

Huh? You already have the method to call for the total time for service in your Register class. What you need is to implement it by iterating through all of the customer in its own line, add all the customer's service time - getServiceTime() - and return the total value. …

Member Avatar for BuhRock
0
154
Member Avatar for wgrogers58

If you want an offer only once, you need the server side database. Cookies can be tampered and/or delete. You will be offering special price all the time if you use cookies.

Member Avatar for stbuchok
0
302
Member Avatar for jackmaverick1

A few comment on your condition check... [CODE]if (strings[1] != stan && new File(files[1]).exists())[/CODE] What are "strings[1]" and "stan"? Are they String? If so, you should not use "!=" to compare but equals() method instead (as strings[1].equals(stan)). Also, what is in "files[1]"? Is it a file name or is it …

Member Avatar for jackmaverick1
0
9K
Member Avatar for Violet_82

The script replaces the original link of anchor tag ('new_file.htm') with movie link. If Javascript is off, the script will not replace the link -- the original link is used.

Member Avatar for Violet_82
0
229
Member Avatar for caswimmer2011

I guess your set up for project properties is not correct. Look at these 2 posts from other forum [URL="http://www.velocityreviews.com/forums/t141385-how-to-create-executable-jar-in-netbeans-ide.html"]http://www.velocityreviews.com/forums/t141385-how-to-create-executable-jar-in-netbeans-ide.html[/URL] and [URL="http://forums.netbeans.org/topic12864.html&highlight="]http://forums.netbeans.org/topic12864.html&highlight=[/URL]. You may see your mistake?

Member Avatar for caswimmer2011
0
370
Member Avatar for canarian

When you are talking about "slow" computer, what is the specification for that? Java also relies on memory (for JVM). So if you are talking about 486 with 66 MHz and 32 MB of RAM (I still have it tuck away in my attic :(), then it is still OK …

Member Avatar for adarshcu
0
88
Member Avatar for ujjwal uniyal
Member Avatar for skylinedrifter

1)Define a function with similar structure as your "main()" method, but the return value is "double" instead of "int" and the arguments in the parenthesis must match the incoming type of Amount, Rate, and Year. 2)Copy the whole part where you make the mark and put them inside the newly …

Member Avatar for baldwindc
0
179
Member Avatar for joehms22

In my opinion, it should be BigTheta(n^2) still. If we take a look at the average case time complexity equation, it becomes (n^2+n)/2. The upper bound is O(n^2) for sure and the lower bound is BigOmega(n). If you are talking about Big Theta of an average case, the value which …

Member Avatar for joehms22
0
454
Member Avatar for Depsi

I don't know what "else" you are talking about. Please post the content instead of link to a file... Also, do not expect that people here will do it for you. You need to show your afford and your code first.

Member Avatar for Depsi
0
137
Member Avatar for gg3l

In firefox, you may need...[CODE]document.getElementById('elm2').style.height = 600+"px"[/CODE] But that could break IE8 and below... So you may need to check for what browser it is being viewed from.

Member Avatar for raphie
0
244
Member Avatar for Metophase

The first function gives you more flexibility and ease in calling and passing variables. The second is an inline which has more control but at the same time is more difficult to construct especially when you need to pass in variables. It is good to use the call as a …

Member Avatar for Taywin
0
252
Member Avatar for Revlis

You could use screen.width & screen.height to check for resolution. However, this doesn't mean the size of window of the browser, but the whole screen size.

Member Avatar for Revlis
0
2K
Member Avatar for j23

You can try this oracle link [URL="http://download.oracle.com/javase/1,5.0/docs/guide/plugin/developer_guide/using_tags.html"]http://download.oracle.com/javase/1,5.0/docs/guide/plugin/developer_guide/using_tags.html[/URL].

Member Avatar for Taywin
0
192

The End.