216 Posted Topics
Re: Those `pos1` and `pos2` variables are always **0** so it's constantly comparing the first two letters. Your `i` and `j` however remain unused. | |
Re: This is not what they mean by Delegation Principle. Obviously no one will redesign your application to comply with OO principles for you. You can start making your application OO by implementing the first five principles (S.O.L.I.D.). * **S**ingle Responsibility Principle - *Each class should have its own responsibility.* For … | |
Re: In **PromotionAdapter** * The variables should be made private (also instantiating them to null is pointless, Objects will be null by default) * On line 7 you're calling `super()` for no reason. In **promotionfragment** * According to convention, classes should start with an upper case letter and be camel cased: … | |
Re: You could try using the old [Android Development Tools plugin](https://developer.android.com/sdk/installing/installing-adt.html) for Eclipse. It's not the official tool anymore, but at least it's an IDE. Something else that could help is testing/running the application directly on the mobile device. If I remember correctly the plugin supports hooking up your phone and … | |
Re: You can create an array in [various ways](https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html) . String[] array = new String[]{"I","did","not","read","my","textbook","and","I","don't","know","what","a","Google","is","nor","have","I","studied","line","63","outside","of","the","Netbeans","GUI-builder"}; Furthermore, it seems that most of this code was given to you (or generated by Netbeans) and that you haven't done much of it yourself. Until then I will only leave you reading material for your … | |
Re: As @JamesCherrill pointed out, the add method you're using on line 101 is not the correct way to add data to a JTable. You are passing `null` as a component to `public void add(Component comp, Object constraints)`. If you read the JavaDoc of that method you will find it says … | |
Re: The form has no action, so it's not sending anything anywhere. You'll need a page to act as "cart" and process/validate the selected flight there. Also, do not use the deprecated and insecure `mysql` API, but instead use `PDO` or `mysqli`. You can find more information [here](http://php.net/manual/en/mysqlinfo.api.choosing.php). There's also no … | |
Re: You're using `JOptionPane.showMessageDialog` inside the loop, which is why you'll get a lot of dialog windows. The `input` String you defined is not being filled, so it stays blank. Replace the method calls inside the loop and store the information in `input` instead. Secondly, by using the `integer` type for … | |
Re: > I just can't find any helpful tutorials for writing that code. Have you tried googling for "android proximity alert" and clicking the [first result](http://www.javacodegeeks.com/2011/01/android-proximity-alerts-tutorial.html)? | |
Re: It's in the zip.  If you have a lot of different file types to work through, perhaps [Apache Tika](https://tika.apache.org/) is an alternate solution to your problem. It uses POI and many others, but combines them into a single API for mimetype detection and metadata/content extraction. Alternatively, if you're … | |
Re: Empty the receipt String at the beginning of the actionPerformed. Each order you run by all the checked items and, if checked, append their value to the already existing String. You can set the value of a JTextArea by using its `setText()` method. You could call that at the end … | |
Re: Try a tool that's on a bootable drive/CD, less chance of overwriting the old files since it won't use the hard drive. There are plenty of linux options, but if you'd rather have something similar to windows you could try [UBCD4win](http://www.ubcd4win.org/index.htm) (follow instructions and burn using a different computer, then … | |
Re: $.ajax({ type: "POST", url: "a.php", data: postData, success: function(data){ window.open("a.php"); } }); Instead of doing something with the response you open `a.php` again but without sending any data. If you just want a different button to do the submitting you can use [submit()](http://api.jquery.com/submit/). | |
Re: `if(Character.toUpperCase(inputChar) ==('F') || Character.toLowerCase(inputChar) ==('f'))` Are you the chairman of the Department of Redundancy Department? | |
Re: Regardless of Entity Framework or your data model, the select query could be something like: SELECT expenseCode.ExpenseId,expenseCode.Cost,expenses.ExpenseType FROM expenseCode INNER JOIN expenses ON expenseCode.ExpenseId=expenses.Id; Which you can put in a view if you don't want to have this query in your code. Though I believe Entity Framework automatically links tables … | |
Re: if($result === false) { trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR); if($row = $result->num_rows > 0) { echo "Username doesn't exist."; } else { $sender = getUserData('First Name'); if($where == $sender) { echo "You can't donate to your self!"; } else { $total = $user_mBalance … | |
Re: `$("#degree_name_id").focus();` will set focus in jQuery. `document.getElementById("degree_name_id").focus();` will set focus the old fashioned way. ![]() | |
Re: > But I am new be in seo so can suggest me which steps i wan't follow to improvement of site. From your own website: > SEO & Web Marketing > Specializing in Business & Marketing Analysis, Search Engine Optimization tools, Google, Bing, Yahoo and Social Media outlets. Put your … | |
Re: Table and chair icons (large tables, small tables etc.) are a fixed size I take it? And a user can then drag them around to place them how they want them, add more/less of the icons. Are you using a coordinate or position system for those icons.. would it not … ![]() | |
Re: Sounds homeworky so just a hint to get you started: it's all in the details. There is also a physical model by the way. ![]() | |
Re: Any JavaScript validation is vulnerable. Use server side validation on all fields before allowing it. | |
Re: Java has GUI's yes. > 1.) keep a list of all the movie available. In what? > 3.) On the program itself. Call VLC to play the movie. That's possible in VB.NET, Java and even in web. > 4.) Online capability is not needed. Then why consider web? It seems … | |
Re: Same as you did with the `<td>`'s. echo '<td><a class="btn btn-success" href="update.php?id='.$row['img_id'].'">Update</td>'; Also, don't use the **mysql** API, it's [deprecated](http://php.net/mysqlinfo.api.choosing). Go with **mysqli** or **PDO**. | |
Re: HTML is not a protocol. Follow a [tutorial](http://www.vogella.com/tutorials/REST/article.html) on REST. Learn how web pages can interact with a REST API and start simple. | |
Re: If you want to use it as a database, have you considered using sqlite? From what I [gather](https://docs.python.org/2/library/sqlite3.html) its usage is fairly straightforward in Python. | |
Re: "my script" ? I looked at your other question yesterday, went to your site, after a menu click the header would indeed stop scrolling. There's a ton of scripts on there from all sorts of frameworks, themes and Google. Which one is not working? Or which one is supposed to … | |
Re: Well according to [this very interesting](http://www.addsimplicity.com/downloads/eBaySDForum2006-11-29.pdf) presentation their DBA's gave back in 2006 even at that time they had **26 billion** SQL executions **per day**, hundreds of coders keeping the application servers running, and were *"hitting compiler limits on number of methods per class"*. That's not in the *"one or … | |
Re: Create a page which, given a keyword, will search your data set and print the results. Test that until it works. Then, go back to this page and use Ajax to send a POST to the search page with the keyword as parameter. Attach a success handler to the Ajax … | |
Re: `$Query-bind_result` it needs a `->`, so `$Query->bind_result`. | |
Re: In addition to the above, be sure to check input again before sending the actual input data. There are users who, when they can't **type** what they want, will copy-paste their garbage input (with the mouse obviously, how could they **ever** press two keys at once, that's just madness). Then … | |
Re: It's unclear (to me anyway) what you mean. Do you want to move an id from one database table to another? Move a cell from one HTML table to another? And the comma separator is supposed to do what, exactly? Split the id's? | |
Re: I understand the concept of your question but want to know 1. is this homework 2. what was unsatisfactory about the answers you found You might want to glance over the [rules](https://www.daniweb.com/community/rules) once more. | |
Re: You can use `pointer-events:none` in the css of that transparent div to "ensure" it won't be the target of mouse events. Ensure between air-quotes because it will depend on what's below the div. Also, it won't work in old IE (but what does). | |
Re: Get a random number between 0 and the amount of records using **count x rand**, then use LIMIT offset, amount. So for instance, let's say the random number is 5. `SELECT * FROM foo LIMIT 5,1` would give you the 6th row (starts at 0). You could also just select … | |
Re: In the sense of "I have a cinema app and I want IMDB's movie data for the films playing" or more like "let's see what the NSA is up to these days"? (don't scrape us, we'll scrape you!)  Nice try NSA, nice try. In all seriousness, some sites … | |
Re: `tempq` is a list of some sorts? If it contained **a1**, **b1**, **c1** like stultuske posed. You loop through all the list elements, but does it not play **a1** three times? You're not checking the current element but all elements, it finds **a1** then stops. > the problem is the … | |
Re: One/multiple of those trigger## do not exist when you try to set the onclick. Why not make it a **lot** easier by just putting the show form call in the `href` of `<a href='#'id='trigger" . $i . "'>"`. | |
Re: > [ > Nome: Interior; > IdDireta: 2; Nome and not name? ` if (p === "Name") {` var _this = this, $div = _this.$div, opts = _this.settings, $table = $div.find(opts.tableSelector); What is **this**? your `$table` is `this.$div.find(this.settings.tableSelector)` and `$div = this.$div`? It only has a class `<table class="table"`. Try … | |
Re: From that page you posted: > $.store.book[*].author > the authors of all books in the store Wouldn't this `$result = jsonPath($jsonobj , "$.[1]");` be more easier if you wrote it as `$result = jsonPath($jsonobj , "$.photos.photo[*]");` You'd have just the photos in an array then, no? Out of curiosity, what … | |
Re: "Focus on a textbox while moving to the next textbox if it's empty" You mean as in focus on the first non-empty textbox? > while moving to next field Moving as in moving focus? You'll have to be more clear. You can use `.focus()` to set focus, or `.focusin()` and … | |
Re: > I have a code which is lc.runlight(); It has no parameters. `public void runLight(int numCycles,int sizePerCycle)` requires two integers. > I have looked through this and can't really see which section would help me Start at the top, read until you're at the bottom. It's a good tutorial telling … | |
Re: Several things I'm noticing: You seem to be mixing JavaScript and HTML, some of it might never run. <input id="rNo" type="radio" name="YesNo" value="No" onclick="this.form.submit();"> <input id="rYes" type="radio" name="YesNo" value="Yes" onClick="location.href='http://localhost/home/calcprint.php';" Both those inputs suggest the form should be sent **as soon as** someone clicks on them. The second one is … | |
Re: LOL > I just figured it out. So I just solved my own question. Guess which [question](https://www.daniweb.com/software-development/threads/490097/do-i-have-some-sort-of-programming-talent) about you I just solved? I now know you were telling the truth there. You **did** only spend half an hour learning Java. It shows. | |
Re: > I'm a thirteen year old programmer. From your linkedin you posted on your profile:  You "enrolled" when you were 9? You'd think there would have been something in the news about that. Regardless of the age (and truth), why hang around here asking if you're a genius, … | |
Re: Are you still in a position to change the table structure? What you are describing sounds like a one-to-many (or many-to-many) relationship between speakers and clients. You could avoid saving ID's in a string by using a different structure. client speaker speaker_client -------- -------- ------------------------ id name id name client_id … | |
Re: You could create/resize it on an HTML canvas and export the canvas to PNG using `canvas.toDataURL("image/png")`. | |
Re: Are you hosting it yourself? Check ports and whether the host allows remote access to a MySQL database. Also check you have the proper user privileges in place (GRANT). | |
Re: You're already using jQuery, have a look at the [selectors](http://api.jquery.com/category/selectors/) it provides. You could use `$(img)` to get all **img** elements. If you only want specific images you could give them a **class** and select on that using `$(.class)` or `$(img.class)`. You could even use something like `$(img[src*='album'])` that checks … ![]() | |
Re: How accurate do the address coordinates need to be? You could download [an open source dataset](http://download.geonames.org/export/zip/). |
The End.