2,040 Posted Topics

Member Avatar for mattboy64

One way to debug this is to delete some blocks of the code and recompile. If the error still exists, put back the deleted blocks and delete the next set of code blocks. Recompile agian. If the error still persist, keep doing it until it compiles. Then the deleted blocks …

Member Avatar for Adak
0
223
Member Avatar for YaLeon

Quick sort is one of the worst sort algorithm (O(n^2)) even though the average/best big O is nlogn. If you want to sort it, use other [sort algorithms](http://en.wikipedia.org/wiki/Sorting_algorithm). Anyway, what does "*as efficient as possible*" mean? Does it include both space and time? One way to deal with is to …

Member Avatar for tux4life
0
178
Member Avatar for Roshan92

My problem is that I do not know how much you know about Java. When you said you are a beginner, it is even worse to me because programing GUI requires fundamental Java programming knowledge. If the basic is not firm enough, I am not sure you would understand the …

Member Avatar for Starstreak
0
219
Member Avatar for arupface

I'm sorry, this is **Ruby** forum. You may be looking for JavaScript/DHML one. To answer your question, your JavaScript call may be invalid. The last variable '*refreshConditionOptions*' is a global variable from somewhere?

Member Avatar for Taywin
0
177
Member Avatar for general2012

>it checks whether the list is null or not ,and it is null;then it adds data to the list That's partially correct. It actually serves 2 purposes here. If your original list is empty (null) -- call the function for the first time ever, then it creates the *head* node …

Member Avatar for general2012
0
113
Member Avatar for erezz

First you need to read in each line content from the file. An explanation to read & write file in perl can be found [here](http://www.perlfect.com/articles/perlfile.shtml). Then extract the number portion you need (the last 3 number groups in a line) using [match](http://www.comp.leeds.ac.uk/Perl/matching.html) functionality (something similar to `$string =~ m/regex(capture_group)regex/`). Take …

Member Avatar for 2teez
0
307
Member Avatar for Gabums

Please read [this](http://stackoverflow.com/questions/4181884/after-and-before-css-pseudo-elements-hack-for-ie-7), someone has already suggested a solution.

Member Avatar for Gabums
0
406
Member Avatar for techyworld

It looks like you don't even know what [HTML5](http://www.w3schools.com/html/html5_intro.asp) and [JavaScript](http://www.w3schools.com/js/default.asp) mean... They are two separated topics. Please read the links I provided for you for more understanding.

Member Avatar for imran18
0
252
Member Avatar for boshu

Since noone has replied this, I will just put some notes on. Here is an [example](http://perl.about.com/od/appliedprogramming/ss/servicemonitor.htm) to deal with checking server status. And here is [one](http://www.revsys.com/writings/perl/sending-email-with-perl.html) of many [samples](http://www.google.com/#hl=en&sugexp=les%3B&gs_rn=1&gs_ri=hp&gs_mss=perl%20check%20se&pq=perl%20check%20server%20status&cp=12&gs_id=p2&xhr=t&q=perl+send+email&pf=p&tbo=d&sclient=psy-ab&oq=perl+send+em&gs_l=&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&bvm=bv.1357700187,d.b2U&fp=e3ddb9331e73c428&biw=1680&bih=939) for sending email.

Member Avatar for Taywin
0
141
Member Avatar for neoanomally

The $pid is the process ID created by the fork() if it is successfully created. The `if(!pid)` should be `if($pid)`. I think it is just a typo. You should always use strict when you write Perl script.

Member Avatar for Taywin
0
130
Member Avatar for coding101

>My get request isnt working What does that mean? Not working means millions of things... Have to taken a look at [Socket doc](http://perldoc.perl.org/Socket.html)?

Member Avatar for Taywin
0
171
Member Avatar for Vincentas

Do you want to inherit or hack the existing model? Do you have the source from [github](https://github.com/spree/spree)? Or how are you using it in your application right now? One way to extend this model is to create a new table & model file (by running migration). Then implement methods that …

Member Avatar for Taywin
0
116
Member Avatar for anestistsoukalis

If you think the problem is in lines 59~63, how about adding printf() to print out something at line 60, and between line 61 and 62? I mean if the bug is really there. (Simple debugging approach)

Member Avatar for tinstaafl
0
226
Member Avatar for katties

Hmm... You don't need to have function() to create an object unless you are going to init it later on inside another function or let a function init a new class object. Simply create it (and must be) after the constructor function. <script type="text/javascript"> function person(firstname,lastname,age,eyecolor) { this.firstname=firstname; this.lastname=lastname; this.age=age; …

Member Avatar for katties
0
185
Member Avatar for Dennis73

There are many implementations & approaches to achieve what you want, but most of them will require JavaScript (please don't use flash for this). One way to do is to load all your images in thumbnails and change the image display URL to the image your mouse is over. You …

Member Avatar for Dennis73
0
95
Member Avatar for riahc3

Why do you want to trigger the click event of a button by simulating the click? Why can't you call the same function that the click event is calling instead?

Member Avatar for EvolutionFallen
0
6K
Member Avatar for Janet_1

Too vauge question. Also, please read the [forum rules](http://www.daniweb.com/community/rules) for how to post a question...

Member Avatar for Taywin
-1
31
Member Avatar for mumaga

Do your original images that used as icons are different sizes? If so, you may need to scale it before you add to the JLabel, or simply scale the size of images and resave them yourself.

Member Avatar for mumaga
0
165
Member Avatar for Aniketayachit

It depends on your image format. java.awt library provides classes that deal with image processing -- BufferedImage, BufferedImageOp, ColorModel, etc. (brief answer for brief question)

Member Avatar for cmps
-1
64
Member Avatar for secretply

I can't seem to find a newer version for Window object in W3C... Anyway, according to the [version](http://www.w3.org/TR/Window/) I found, opening a new window is not set as standard. Yet, when I look at how the function should be used at [W3school](http://www.w3schools.com/jsref/met_win_open.asp), it shows that you could specify the URL …

Member Avatar for Taywin
0
173
Member Avatar for solomon_13000

The problem is in line 15 `var index1 = eachFilter[i].match(re1);`. Do you understand how *match()* function works? Have you ever tried to print out what value returned by *match()* function? If you do not have grouping in your regex, the function (in JavaScript) will return an array size of 1 …

Member Avatar for Taywin
0
137
Member Avatar for wolwayne

Bad variable naming... Very difficult to follow... Anyway, line 78, you declare array size of 2 to each ply. In your *while* loop, you use *i* as index pointing to your array value (in your fun_ply()). You keep increasing the value of *i* (line 271) when the answer is not …

Member Avatar for wolwayne
0
123
Member Avatar for Proglearner

Those warning are old bugs and it seems that FF doesn't fix it yet... https://bugzilla.mozilla.org/show_bug.cgi?id=671515 for unable to read chrome manifest file https://bugzilla.mozilla.org/show_bug.cgi?id=636367 for XUL box warning

Member Avatar for LastMitch
0
173
Member Avatar for bangla
Member Avatar for rotten69
0
218
Member Avatar for mumaga

You need to implement ActionListener and implement actionPerformed() to accept your button click event. Inside the method, you could use setText() to your text area object. Please refer to [oracle link](http://docs.oracle.com/javase/tutorial/uiswing/events/actionlistener.html).

Member Avatar for mumaga
0
193
Member Avatar for Proglearner

Line 27, you declared a variable with upper case, but then later on you use it with lower case. It means that the variable created in that line has no use. Better declare & initiate it at the same time at line 38 `var userChoice = ...`.

Member Avatar for Proglearner
0
237
Member Avatar for borix134
Member Avatar for mumaga

Next time, please copy & paste the error shown by runtime. Your assumption may be correct, but it may be incorrect under certain circumstances. If you look at the method in Logger class, there is a variable *this.input* inside the method. The variable *input* and *this.input* are not the same. …

Member Avatar for Taywin
0
11K
Member Avatar for Dante2

I guess you should read this [site](http://guides.rubyonrails.org/testing.html) to help you in writing unit tests. The test requires another module (`require 'test_helper'`) & the test class should inherit from ActiveSupport::TestCase. To be honest, your tests after line 3 (4+) don't seem to be that helpful. If an object of a Product …

Member Avatar for Dante2
0
320
Member Avatar for Proglearner

1)The isNaN() function doesn't check for string but rather for not-a-number. Anything that is not a number is not equal to String. 2)Your boolean check is not valid. In JavaScript, it is tricky when it comes to boolean. Have you ever tried 0==false or 1==true? Both will return true. That's …

Member Avatar for diafol
0
209
Member Avatar for nigelturk

Even though it looks like zero value is in the middle between positive and negative because the opposite of all-zero-bit is all-one-bit, it is not. Because 0 is (somewhat) being included in the positive side, there are 2^31 positive integer (0 up to (2^31)-1) and 2^31 negative integer (-1 up …

Member Avatar for Taywin
0
4K
Member Avatar for Proglearner

@Proglearner, Your script is not working... 1)Line 6, `j = Math.abs(Math.random() * 10);`, the Math.abs() does nothing for you. The value returned from Math.random() is between 0 and 1 (a float), so it is always a positive number anyway. 2)Line 11, `oneString=String(oneArray[Math.abs(Math.random() * 10)]);` would almost always produce undefined. (Also …

Member Avatar for Proglearner
0
127
Member Avatar for geedow

From glancing, you initiate SimpleDataSource in your **main()** but that does not have anything to do with your **ATM** class. In other words, they are 2 separated objects. If you want to relate the source with ATM class, you should not use *static* modifier but rather instantiate an instance and …

Member Avatar for Taywin
0
208
Member Avatar for rouse

The answer for your first question is that your mouse event covers only when the mouse cursor is hovered over the selected element. But when the mouse cursor is moved to be over your new panel, the moustout event is called and that will cause your panel to be hidden …

Member Avatar for rouse
0
159
Member Avatar for programmer12

To create Date object, you can use... var date1 = new Date("2013-01-09") var day = date1.getDay() // 9 var month = date1.getMonth() // 0 is Jan var year = date1.getYear() // 113 counted from 1900 var timeInMilli = date1.getTime() Then you can loop through the different time you want to …

Member Avatar for programmer12
0
618
Member Avatar for techyworld

After I searched and looked at their github, I don't see anything that talks about blur effect. I am guessing that the library does not support blur effect at the moment. You may have to deal with it using regular HTML5 (without the library).

Member Avatar for Taywin
0
76
Member Avatar for matan2t
Member Avatar for rohit.khurana

There is no custom tags in Ruby if you are talking about arbitrary tag name as in JSP. What are you trying to do by the way? Maybe *partial* in Ruby would be what you need?

Member Avatar for L7Sqr
0
113
Member Avatar for divyakrishnan

My question is that why you need to revert the checked property after you apply CSS? checkbox.prop("checked", !checked); By the way, wouldn't [find()](http://api.jquery.com/find/) return all elements it could match with the given condition? In other words, shouldn't it return all checkboxes instead of only one (as your script is expecting)? …

Member Avatar for diafol
0
1K
Member Avatar for jeffbeck8

I'm not sure that the code works as the explanation. I do not see where the total value of sale from an agent is added with its previous value read. Line 119 will retrieve the existing value and reassigns to the key in line 121. In other words, it is …

Member Avatar for jeffbeck8
0
197
Member Avatar for azgold472

What is the syntax of funcion *add()* for *Banner* object? Are you sure that you add it correctly? Have you taken a look at the source (using view source)?

Member Avatar for Taywin
0
273
Member Avatar for marComm

Could you please tell us **what is wrong** with it? You just said **not working** and that means million of things. 1)Did you include jquery library file to your page? Because the script is using jquery. 2)What did you change in the script? ...

Member Avatar for Taywin
0
221
Member Avatar for jeffbeck8

>String[] fields = line.split("[\\s}"); Do you know what regular expression is? If you do, then I would ask you to go back and read about [regular expression](http://www.regular-expressions.info) format. If you don't, I am telling you that your regular expression is wrong. You must need to know what '[' and '}' …

Member Avatar for jeffbeck8
0
162
Member Avatar for venkyb47

Are you sure that you created your date object correctly? I tested by plugging in the date string you gave and it worked. var d1 = new Date("2012/12/29") var d2 = new Date("2012/12/29") if (d1.getTime()>d2.getTime()) { alert("d1:"+d1+"\n GREATER THAN\nd2:"+d2) } else if (d1.getTime()==d2.getTime()) { alert("d1:"+d1+"\n EQUAL TO\nd2:"+d2) } else { …

Member Avatar for venkyb47
0
237
Member Avatar for Nathaniel10

>1) The format of the form changes after the event. I would like the new question to be identical the other questions in the form. The text is not center aligned and the input box is smaller and not aligned. The layout is changed because you are using *table* tag …

Member Avatar for Nathaniel10
0
129
Member Avatar for 03hasnam

Line 5 `Connection conn = JavaConnect.ConnectDB();` I don't know how your JavaConnect class looks like. Also, it is odd to see a method name starts with an "uppercase" letter. The reason is that the method name does NOT follow the naming convention... Line 165, when you deal with SQL as …

Member Avatar for Taywin
0
496
Member Avatar for varma51

If you do a regular refresh (using only F5), a browser will not completely ditch whatever changed on the page but rather keep it on there even though the page is reloaded. If you want it to really clear it off, you must call another javascript function after those elements …

Member Avatar for Taywin
0
258
Member Avatar for fatzky_04

It is very difficult to give you an idea because different systems may have different requirements involved (including restrictions & constraints). When you said you know the *main system function*, does it mean you know only the abstract level of the process? Or you know all details of it? What …

Member Avatar for Taywin
0
154
Member Avatar for asif49

The AI field involves a lot of mathematics & statistics (more on statistics though). It is very difficult to explain if you don't have knowledge base of those requirements. If you don't get it at all, you may not be ready to deal with this subject yet. If you insist …

Member Avatar for asif49
0
202
Member Avatar for maduxi

> Scanner file = new Scanner(new File("text.txt")).useDelimiter("[^a-zA-Z]+"); I just want to clarify your program on this line. Do you intend to count only words that contains only alphabets? If there is a word with a hyphen in the middle, do you count them as 2 words or one? (i.e. Is …

Member Avatar for maduxi
0
345

The End.