2,040 Posted Topics
Re: Hmm... I am not sure what you mean by your post. You want a C++ program source code that contains more than a 1000 lines of code? But what does "the project is too simple" mean??? You haven't even studied array and you think there would be a *reasonable* simple … | |
Re: It seems that when you do `@lines=<FIN>`, each new line in the content will become an empty line inside the array. You could simply add `print "--$msg--\n";` between line 7 and 8 to see what you got from reading each line. #For example, a file content is as follows: Min:18 … | |
Re: Your requirement is so simple, but why your implementation is so complicated? Or maybe I am missing something in your requirement. Let me rewrite your requirement and see if it is the same. 1.Read data in from a file 2.The data consists of different country names with a tab character … | |
Re: There are too many ways to do this. Is that the content in each line? > ("[^BitTorrent]+([0-9]{1,5}\\.[0-9]{1,2})"); Your regex is incorrect when you use [] in regex because anything inside [] means "or" for any character inside it. However, the symbol ^ inside [] means "not" and that means you … | |
Re: So you are talking about permutation? Are you sure that the input numbers will always be unique? If not, you need a Set<Number> as bguild said to ensure that all numbers entered by a user (or you) are unique. Then you can apply a permutation algorithm and spit out each … | |
Re: You are talking about timer clock? Using JavaScript may not be that accurate but just OK. However, attempt to deal with millisecond in each iteration is very difficult to get it that accurate. Though, you may try something around 30 millisecond each iteration just to give it a feel of … | |
Re: Check your priviledge table. Also, check the IP address of the computer which is used to access to the server. Access denied is either from priviledge is not met (not being declared as allow to work with certain databases/tables) or your IP address does not match the one in the … | |
Re: Are you talking about how to "[download](http://stackoverflow.com/questions/921262/how-to-download-and-save-a-file-from-internet-using-java)" a file from the Internet? Or are you talking about the whole application concept? Too vauge question, sorry. | |
Re: You need to decide whether the grid is pre-draw or not. If it is pre-draw (inside HTML), then you could use the element's ID to manipulate the value inside. For example, you draw your grid using table, so each cell (td) may be given an ID/name as row+"-"+column (i.e. row … | |
Re: >which is working only if value in class val1 is an input value What do you mean by that? If you are talking about if the input value is a number, then you could check whether the value is a number before you attempt to multiply. I don't know what … | |
Re: > else if (toConvertCelcius >= && toConvertFahrenheit <= 211 ) Your condition after `>=` must follow by something that can be compared with toConvertCelcius variable. That should give you an error at compile time (syntax error). Now speaking of logic, you are using if & else-if statements to compute the … | |
Re: An easy way is to try it out. What RoR version you want to install? If the newest version (3.2), you may need many more software (gems) to go with. You will need Ruby v.1.9.3 and a database software (PostgreSql or MySql). If your computer does not support any that … | |
Re: You could read it [here](https://github.com/weixiyen/jquery-filedrop) (if my guess is correct about the filedrop you are talking about). | |
Re: Have you tried to display it using unicode (i.e. 程式測試) instead of typing real Chinese character inside your HTML file content? You can look up for Chinese character unicode [here](http://www.pinyin.info/tools/converter/chars2uninumbers.html). | |
Re: Want an algorithm? [Here](http://www.cs.man.ac.uk/~pjj/cs2121/fix.html) is an explanation and gives you the information you need. By the way, DFS should be enough if you could create a tree from your expression. | |
Re: You cannot insert JavaScript right in the middle of a HTML element property, but you could access an element property to assign a value to the property. Once the element is created and added to the DOM, you then can use JavaScript to do the work. When I sad "created … | |
Re: >Write the full path This is called absolute path. This style is not recommended when you works on a website. It is easy on web developers but it is not really portable and not easy to maintain. Also, it could come and bite you when there are some changes in … | |
Re: @techyworld, Your script is completely wrong. It does NOT create a 2D array but rather create all-undefined-value array size of 10. But then you wrongly assign a value of 1 using an invalid index (not a number). Because JavaScript always trys to fix the user script, it insteads uses your … | |
Re: You could use Depth First Search to look for all cycles. Report back only those that have length >= k. | |
Re: Just a quick question... The eventID field type is a string or a number? Your second sql is calling as if the eventID is a string (with a pair of single quotation marks), so I am not so sure about that... | |
Re: >That is not the best way to handle things in life. May or may not be. If the OP is not ready or knew himself/herself that this is not the path to go through, the OP should look for another way. The project requires the OP to have knowledge of … | |
Re: foreach (values %file1) { print "missing line $_" unless (exists $file2{$_}); } If there are duplicated lines in file2, I am not sure it would print all the duplicated line numbers? Despite, its functionality may already satisfy what the OP wants. | |
Re: Are you asking for compiling a script or simply run a script? Perl allows you to either run its script or compile it for later use. If you are using comand line, you may need to read [this](http://www.perl.com/pub/2004/08/09/commandline.html). Though, I think you are using Windows, so it may be a … | |
Re: You could use *sun* java library to add the music... Look at this [link](http://ahesham.wordpress.com/2011/04/27/java-add-background-music-to-jframe/) about how to do it... The example shouldn't be deprecated yet. | |
Re: >How to fixed the layout of page for ALL screens? No you cannot. You could attempt to do it but you will never be able to do it in all screen sizes/resolutions. A browser is not *always* being displayed full screen and is not required to be so (as mine … | |
Re: >1:where was polymorphism was used in this application? The definition of polymophism is [here](http://docs.oracle.com/javase/tutorial/java/IandI/polymorphism.html). Look at the last sentence of the first paragraph... >2:identify where overriding or overloading was used in this application? The meaning of [override](http://docs.oracle.com/javase/tutorial/java/IandI/override.html) explains itself (replace something that is already exists). For [overload](http://docs.oracle.com/javase/tutorial/java/javaOO/methods.html), it is similar … | |
Re: By the way, doesn't this thread belong to JavaScript instead? And actually, you can do it with JavaScript as well as javaAddict did. | |
Re: Here is a link talking about [number rounding](http://tylertate.com/blog/2012/01/05/subpixel-rounding.html) in different browsers. | |
Re: Because you are missing `public void paintComponent(Graphics g)` method inside your JPanel class? No paint, no display. You should reread what James said. You could search on Google for a [sample graphic 2D drawing](http://www.google.com/#hl=en&sugexp=les%3B&gs_rn=1&gs_ri=hp&cp=12&gs_id=ek&xhr=t&q=java+paint+example&es_nrs=true&pf=p&tbo=d&biw=991&bih=857&sclient=psy-ab&oq=java+paint+e&gs_l=&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&bvm=bv.41018144,d.dmg&fp=628c91cae0bcd1be) in Java. | |
Re: I am not sure how many number the question is asking for??? Is it only 1 highest palindrome number which is the result of multiplication of 2 numbers in [100, 1000]? Or is it the highest palindrome numbers that are the result of 2 numbers pair? Also, the minimum number … | |
Re: I don't think the processing code is really related to DoS. The DoS is from excessively request (any kind) to a server/computer in a short period of time. As a result, the server is overloaded and either ignores all incoming requests or crashes. For example, your server can handle up … | |
Re: What you need to do is to display the value of *bmi* you just computed using System.out.println()? You could put a string or primitive number variable inside the () to display it. You could also simply concatenate it with another String (i.e. System.out.println("abcdd"+3);) | |
Re: Watch out when you work with JavaScript. You should try not to mix pure JavaScript and JQuery syntax together, or you may get the result as you are having right now. I suggest you to use pritaeas way rather than implement it the way stbuchok does even though there is … | |
Re: I don't get what you are trying to accomplish? 2teez has already answered how to deal with validating the incoming input (string). Where do you need to add the snippet portion? It should be right after you accept an input and before you save/post it in your dabase (if you … | |
Re: >What would be the standard nonjQuery way? Here you are... <html> <head> <script type="text/javascript"> function doSomething(selObj) { if (selObj && selObj.tagName=="SELECT") { alert("You selected index "+selObj.selectedIndex+" , value: "+selObj.value) } } </script> </head> <body> <select onchange="doSomething(this)"> <option value=1>One</option> <option value=2>Tow</option> <option value=3>Three</option> <option value=4>Four</option> </select> </body> </html> | |
Re: >All files are Uploading properly but Checksum Of PDF files are mismatching. This is very unclear... How did you do the checksum? What method are you using? MD5? SHA1? SHA2? etc... Also, please read the forum posting rules... [ I can't find a link to the rules :( ] | |
Re: [Posting rules](http://www.daniweb.com/community/rules) How to compute [Euclidean Distance](http://en.wikipedia.org/wiki/Euclidean_distance). | |
Re: If you use Firefox with firebug, here is the [explanation](http://thecodecentral.com/2007/08/01/debug-javascript-with-firebug#header-3). If you are using Chrome, someone has posted the [picture](http://stackoverflow.com/questions/1576467/how-to-step-through-code-in-google-chrome-javascript-debugger) of where you can push the step-in button. If you are using IE, good luck. | |
Re: Again, someone has already answered this [here](http://stackoverflow.com/questions/5319840/greedy-vs-reluctant-vs-possessive-quantifiers). When you read, please read only the post with a green check mark on the left hand side. Don't need to read others' opinions. | |
Re: OK, I will try to explain your algorithm from reading your code. 1. You pass in a set of vertices from v0 up to v(n-1) where n is the total number of vertices. The v0 and v(n-1) are connected. 2. You start it from Lx,y [v(n-1)] and Cx,y [v0]. 3. … | |
Re: Maybe you could use [find()](http://api.jquery.com/find/)? | |
Re: You should start with reading [IP Forwarding](http://www.troubleshooters.com/linux/ip_fwd.htm) first. If you don't understand how it forwards, you can't do the computation. | |
Re: For these operators (==, ===, eql?(), equal?()), you better read how OO programming works. It is similar to Java language (comparing object reference or object value). The <=> operator is similar to compare() in Java. It returns -1 if the caller value is less than, 0 if equal, and 1 … | |
Re: Let's take a loop starting from line 16... income = key.nextDouble(); while (income >0) { System.out.println("Please enter income:"); income += key.nextDouble(); System.out.println("Please enter income:"); if (key.nextDouble()<0) { System.out.println("Thank you for using tax calculator, your total income entered is:" + income); System.exit(0); } else if (key.nextDouble() <0 || income <= 0) … | |
Re: Look at the answer [here](http://stackoverflow.com/questions/5003257/how-does-1-4-inject-work-in-ruby). | |
Re: >$j("#mydiv").val(1); Maybe it should be `$j("#mydiv").val('1');`? | |
Re: When you use float property, you must be very careful and should specify all floating elements inside its own area. Create it as if each float area is a row of display content. <style type="text/css"> div.float_container { position: relative; width: 100%; } div.clear_float { clear: both; /* clear both floating … | |
Re: You cannot purely do it from the client side (JQuery) if you need to read data from the server. Further more, you could use Ajax with JQuery, but you still need to implement authentication/authorization with your server. If you already use Perl, keep using it. Web display is just a … | |
Re: In your case, your are printing out the local time. The function doesn't return anything after printing out the time, so the *irb* gets nil as return value and displays it. | |
Re: Do you know big/little endian? It is about using template from the most/least significant bits. If you don't know, you may not need to do anything with it. Also, pack() function is not really common for regular programming, so you could ignore it. |
The End.