2,040 Posted Topics

Member Avatar for aPPmaSTer

It may be possible on FF using CSS but not sure about IE. Try this... [CODE] <style type="text/css"> .optionImg1 { background-image: url('image/path'); } .optionImg2 { background-image: url('image/path'); } </style> // in HTML <select> <option class="optionImg1">Option 1</option> <option class="optionImg2">Option 2</option> </select> [/CODE]

Member Avatar for aPPmaSTer
0
176
Member Avatar for server_crash

@ajst I understand that it could help but it is not worth it. In big O time, it is still the same. If you really want to reduce the computation, why don't you use square root of x? You should have found a factor of a number before the number's …

Member Avatar for Momerath
0
162
Member Avatar for Alex Edwards

@kvass [i]einjelle[/i] has his math right on the first one but not the second. But his computation is NOT the same as computer computation because of mathematical operation preference. In math, if you do not give parenthesis to your expression, every operation has the same preference. Therefore, it is ambiguous …

Member Avatar for Taywin
1
3K
Member Avatar for Harekc

Please show your code. Also, don't forget to put your code in the [ code ] tag provided by the forum.

Member Avatar for Taywin
0
123
Member Avatar for altayar

You didn't use setSelectedFile(File) but you use getSelectedFile()??? Then what file are you actually selecting? Here is the JFileChooser [URL="http://download.oracle.com/javase/6/docs/api/javax/swing/JFileChooser.html"]API[/URL].

Member Avatar for Taywin
0
104
Member Avatar for bharath54321

The link won't explain in depth about how to deal with button on JTable, believe me. I worked on it before. It shows you how to display a button, but the button itself does not work as a button. You need to add a listener to the button yourself because …

Member Avatar for Taywin
0
321
Member Avatar for caswimmer2011

Reading a file from local and reading a file on a webpage are 2 different approaches. Also, you should create a new thread instead of revive an old thread...

Member Avatar for vadayattu
0
226
Member Avatar for prem2

@prem2 [I]masijade [/I]has already mentioned the replace() method of String class. You can use that to replace the string. For example, "d00000\n00000d".replace("\\n", "") will result in "d0000000000d" string.

Member Avatar for Taywin
0
1K
Member Avatar for Gsterminator

Do you have to implement your own sort() method? If you do, then you need to pick a sort algorithm (i.e. bubble sort, gnome sort, etc.) before you can do the sort. If you do not, use those Collection or Array methods as [I]mKorbel[/I] and [I]stultuske[/I] provided.

Member Avatar for Taywin
0
141
Member Avatar for ankit.pandey3

If you look at the code, line 10-11 are exactly the same as line 25-26. That's an error from copy & paste. I would suggest to change the z-index to higher when it is increasing regardless what it is, and change it to 0 when decreasing. Also, change your CSS …

Member Avatar for Taywin
0
144
Member Avatar for deucalion0

If your image has not been loaded to the view (HTML), changing your placeholder image src won't do anything. If you want, you could put all those images on to the HTML but hide them (display:none;visibility:hidden). Then the placeholder should display the image when its src is changed.

Member Avatar for Taywin
0
100
Member Avatar for nickcolb

Be very careful when you use float & int together. If you have float on your left hand side, you won't get a float when you use int in computation. Use double in place of float would make things easier but the rule is still the same. [CODE] float f; …

Member Avatar for JamesCherrill
0
184
Member Avatar for LaurenceS1

Hmm... Why would you put the BigCorp class in the package as well while you are going to use it? You may delete the package from the BigCorp class and move the class up one folder level. Then import those 2 classes from the package [CODE] import BigCorp.Person; import BigCorp.Employee; …

Member Avatar for stultuske
0
132
Member Avatar for kalleanka

@Pnorq Your function is correct, but there are a lot going on. :) @kalleanka Use regular expression and replace() function. [CODE] var str = "xxx, yyy, zzz, sss,"; str = str.replace(/,\s*(\w+),\s*$/, "and $1") // Done! Case for any more than 1 -> xxx, yyy, str = str.replace(/,\s*$/, "") // Done! …

Member Avatar for Luckychap
0
6K
Member Avatar for eltonpiko

You could start from replacing word by word. In a string, you attempt to search for the longest match first. For example... [CODE] cry -> aWordInYourLanguage cry out -> anotherWordInYourLanguage <== match this one first [/CODE] I think google also let those who own the language help them adding the …

Member Avatar for jon.kiparsky
0
1K
Member Avatar for Phinocio

Did you open your file in the append mode? If you just open to write, by default it is overwritten mode.

Member Avatar for jon.kiparsky
0
151
Member Avatar for Java_tyro

What is your current logic to the problem? I can give you a hint, use a search and iterate through the area until no more connected 1's is found. Don't forget to keep track of where you have already visited. The method could be recursive (easy to implement) or iterative …

Member Avatar for jon.kiparsky
0
217
Member Avatar for brynFlew

In line 5, you are expecting an element with name "workArea" but you are calling check2() with it? Where is your "workArea" element?

Member Avatar for brynFlew
1
211
Member Avatar for gedas

One way to do is to store all the file content somewhere (in the memory if the file is not too big), manipulate the content (delete certain text), and then rewrite the content to file as new (replace the whole file content with the content in the memory or wherever …

Member Avatar for bharathkumar.m
0
238
Member Avatar for altayar

If you want to assign a value to each of your array while you are going through a loop, it would be easier to look at when you move the row loop to be inside the col loop. Also, you need to control the column position where you want to …

Member Avatar for JamesCherrill
0
212
Member Avatar for bettersaid

You may need 'frame' or 'iframe' to load another HTML into your page. However, you will loose certain access functionalities using 'frame' or 'iframe' due to security.

Member Avatar for bettersaid
0
158
Member Avatar for didi00

So you have Airplanes and Airports, but the Airplanes could have multiple attributes. Some of these attributes are mutual exclusive and some are shared. Question... Do both military and civil plane consist of cargo and passenger types? Not sure about what you said above.

Member Avatar for didi00
0
69
Member Avatar for Casperjames

Hmm... Your event attached is incorrect. You try to attach Out() function but did not attach parameter to the function. As a result, it is ambiguous. I am not really sure here because I forgot how to use this closure function... Anyway, could you try... [CODE] if(img.addEventListener){ img.addEventListener('mouseout', function(evt) { …

Member Avatar for Casperjames
0
174
Member Avatar for Rakesh Mall

Each assembly compiler may be fit to certain architecture. Can't just say 'assembly' and can be used it all computer architectures nowadays. I did only MIPS32, MS Assembler, and the other one I cannot remember its name... Also, I am sure that assembly will help you understand atomic better when …

Member Avatar for Taywin
0
113
Member Avatar for Verandaguy

Align what script??? I am not sure what you mean by 'aligning' the script? You mean the display HTML part? By the way, this is not going to work... Your code is too much and it would not help at all even in code tag. You may need to look …

Member Avatar for Verandaguy
0
248
Member Avatar for falina2

If your element is inside a div and the div is 100% in width, margin-left: auto; to your inner element should do it. If it is just an element inside a body tag or inside a div which does not have a width value specify, it won't work.

Member Avatar for Taywin
0
107
Member Avatar for JudeV

You are close. You still need to verify the 'n' value first. And then you need to validate the grade with more than just less than 0. The requirement states that it must be between 0 and 100. Then, you need to keep track of how many number the user …

Member Avatar for Taywin
0
94
Member Avatar for VulcanDesign

It is possible if your site A accept the parameter via GET method. If so, you could construct a link and call the link instead of post. Though, it could be impossible if your data is very long or requires a lot of escaping...

Member Avatar for Taywin
0
105
Member Avatar for infinitus

It seems that your server does not accept certain code format. It started after line 29 of your code. Could you try to delete the new line for your line 25 and 26 in the window.open(....) and make them to be one line instead?

Member Avatar for Taywin
0
121
Member Avatar for infinitus

You computed points in line 250 & 251, but you did not put the points back to your "points" input tag value? By the way, there is a bug in your page. I didn't try to look at it but this is how I created it. 1.Open the page 2.Play …

Member Avatar for infinitus
0
232
Member Avatar for isamuhunter

Not sure. Does it mean that a node could have multiple parents with multiple children OR have one parent with multiple children? Would it possibly become a circle? You could use ArrayList to store parent/children depending on your data. However, be very careful! Circle is dangerous for a linked list!

Member Avatar for isamuhunter
0
2K
Member Avatar for dangari

Hmm.. I think it is IDE problem, it is not Java problem. You may look at [URL="http://netbeans.org/kb/docs/java/project-setup.html"]this[/URL] or another one is [URL="http://www.lampos.net/netbeans"]this[/URL] for further information about NetBeans import libraries.

Member Avatar for dangari
0
140
Member Avatar for deecoup

Hmm... Maybe you should read how to use Google map [URL="http://code.google.com/apis/maps/index.html"]API[/URL]? And you need to [URL="http://code.google.com/apis/maps/signup.html"]sign up[/URL] for a key to use it too for their own security (dns attack); otherwise, it won't let you use it. I can't tell you more because it depends on how you implement your …

Member Avatar for Taywin
0
73
Member Avatar for chris.aaker

OK, your way is called 'hard-coded'. In other words, it is not flexible and your function is expecting the form element with name 'myform1'. If you pass in an argument of the DOM form to the function, it is much more flexible to deal with because the function can be …

Member Avatar for peter_budo
0
203
Member Avatar for hiyatran

As Shanti said, the fix is to escape your double quotation in your string. The way you do creates an unterminated string. [CODE] /* document.writeln("<tr><td style="background-color:#FFFF00;">" + "test" + "</td></tr>"); |----------------|--------------|-------------------------|-| ^ ^ ^ ^ ^ ^ | | | ^ | | start start end expect start command string …

Member Avatar for Pnorq
0
165
Member Avatar for Sherry.K

Hmm... Obscure question. :P Is the interest computed at the end of each year or each month or each week or each day? :D Does the answer have to be in a whole year or decimal or year & month & day? ;)

Member Avatar for VernonDozier
-4
599
Member Avatar for bailsb

Line 35 in class Expression, you are missing semicolon at the end. [CODE] istream& inStream //inout [/CODE]

Member Avatar for bailsb
0
2K
Member Avatar for code07

You should google it... A sample I google for read/write file is [URL="http://www.javapractices.com/topic/TopicAction.do?Id=42"]here[/URL]. To concatenate files, the easiest way is to read the whole content of one file to your class variable and read the other to concatenate the already read content in your class variable, and then write the …

Member Avatar for Taywin
0
75
Member Avatar for 54uydf

You could get JavaScript library for it on the Internet for free. Use google to search for 'WYSIWYG editor javascript' and you should see many. I've been using [URL="http://tinymce.moxiecode.com/"]tinyMCE[/URL]. There are many others but the way to use them is a bit different from one another.

Member Avatar for 54uydf
0
121
Member Avatar for razerLachesis

In raw JavaScript, you need to remove all option elements inside your target combo box, and then repopulate options by creating option elements & append them to the target combo box.

Member Avatar for Pnorq
0
580
Member Avatar for Xemintirre

Hmm... What version of your Ruby? I believe it has to be at least 1.87 or higher, or maybe even 1.9... How did you install it? What platform are you using?

Member Avatar for Taywin
0
123
Member Avatar for Lalita_shah

You do not need to use backspace to go back to certain pages, but you just use the browser's cache (if what it is called this) instead. Each visited page is saved in a hash. Be careful, the way to deal with IE browser compared to other standard browsers may …

Member Avatar for Lalita_shah
0
179
Member Avatar for HesterSuma2007

Hmm... But go back to your original question, the last key to terminate or let the program to compute is still 'Enter' key not '=', isn't it? You are using 'nextLine()' and that's the reason why you cannot make it work. You need to read in each character and keep …

Member Avatar for HesterSuma2007
0
165
Member Avatar for Kirielson

I thought that the select tag would send only the value you selected if it is not a multiple selection? Hmm... Haven't played with Servlet for almost a year... Need to recall it...

Member Avatar for mandy011
0
1K
Member Avatar for gedas

OK, you have 2 choices to do this - in JavaScript or SVG. If you are going to do it in JavaScript, it will be a bit difficult and may be slow because JavaScript is not for graphic rendering. You could check [URL="http://javascript.open-libraries.com/utilities/drawing/10-best-javascript-drawing-and-canvas-libraries/"]this link[/URL] for further javascript library you may …

Member Avatar for gedas
0
88
Member Avatar for Phil++

OK... The easiest way is using split() of String method... [CODE] public static void main(String[] args) { String a = "Phillips"; String[] b = a.split(""); for (int i=0; i<b.length; i++) { System.out.print(b[i]+" "); } } [/CODE]

Member Avatar for mKorbel
0
158
Member Avatar for bharath54321

Instead of trying to make it work, you should redesign your application. It does not make sense to have a drop down list with check boxes in it... If you are doing that, it would be very confuse to users anyway... Also, please use good English (or understandable) when you …

Member Avatar for mKorbel
0
481
Member Avatar for TySkby

Hmm... Just give you a sample here for the future... [CODE] function replaceAllIndexPHP() { var elems = document.getElementsByTagName("a") for (var i=elems.length-1; i>=0; i--) { elems[i].href = elems[i].href.replace(/index\.php\?view=/i, "#") } } [/CODE]

Member Avatar for Taywin
0
156
Member Avatar for gedas

Sometimes your loop may look like... [CODE] while (true) { } [/CODE] This is a special case. Normally the loop is intended to keep going until a certain condition is met which is at an unknown time. Often times, you would find this in concurrent programming. In this case, you …

Member Avatar for gedas
0
100
Member Avatar for TheWhite

Hmm... Why can't you use regex? What is the problem with it? [CODE] String str = "&quote;This is just something&# 39;"; str = str.replaceAll(/&quote;/, "\""); // or str = str.replaceAll(/\&# 39;/, "'"); // shouldn't have space as you said [/CODE] And if you want it to cover all HTML code, …

Member Avatar for JamesCherrill
0
202

The End.