2,040 Posted Topics
Re: My first question would be, what is your HTML for the submission? In your very first post, you said `<input type="number">`. There is NO type "number" for "input" tag. What is that??? | |
Re: Hmm... You use it on the whole document? I have a feeling that the event is bubbled from an element inside the page and the whole document. Have you tried to change from `$(document)` to a specific element and/or `$(window)` to see if it still acts the same way? | |
Re: You will need either cookies (from client side) or session (from server side). There is NO WAY to pass on variable directly from refreshing a page. I would suggest you to check on how to use [cookies](http://www.w3schools.com/js/js_cookies.asp). | |
Re: >Arrays don't overload tostring() as far as I am aware in any language. Off topic: Try Ruby, Perl, or JavaScript. ;) | |
Re: Your issue is very common in concurrent programming. One possible solution is to lock the table right when a user attempt to add a new data. The work part inside locking table must be as little as you can, or you would create a bottle neck. Another solution is to … | |
Re: The question does not make sense... Why would one want to download an empty file in the first place? Then why would one want to compare an empty file with another empty file -- hint is that they are empty! | |
Re: You are using Ajax to do the work. If you want to reset your form, inside your `submit_reply()`, add another portion of JavaScript to clear/reset your form data (right after line 18). Simply go through each element in the form that you want to clear/reset, and set the value to … | |
Re: From your `myFriend` variable data structure, you don't need to iterate it that way. It is already an associated array (as Object). You simply call for the value using `lastName` key. for (var friend in myFriends) { if (friend["lastName"]=="Michel") { myFamilyMembers.push(friend); } } | |
Re: Where do you initialize your `connectionPool` variable? If you are talking about the only one in `main()`, then there is a problem. The variable which is being used to connect INSIDE your class CANNOT be initialized in `main()` method. It must stay inside your class (i.e. as a private variable). | |
Re: What do you not understand? At least line 120 & 121 has method declaration at the same time. What do you really want to do here? If you need to average values in an `ArrayList`, then there must be a return type (not `void`). Besides, in your current code, you … | |
Re: Hmm... If I understood correctly, you simply add the string when you initilize your `Label` variable. For example, you passed in first and surname as `public static void displayRequest(String firstname, String surname) {`, then you would do `Label name = new Label(firstname+" "+surname);`. Is that what you are asking for? | |
Re: What you are supposed to do... 1)Read in a given file which contains BORG programs 2)Parse tokens from the read in data. 2.1)If you read in the file data line-by-line, split each token with a white space 3)Add any variables found in the program to your "hash table" 4)If there … | |
Re: I'm guessing your `map` is from `std::map`. And I guess you are trying to iterate through it. Then, a suggestion to use a nested loop is below. for (map<string, map<string,map<string,vector<int>>>>::iterator it1=myNestedMap.begin(); it1!=myNestedMap.end(); ++it1) { // it1->first is the key // it1->second is the value for (map<string,map<string,vector<int>>>::iterator it2=it1->second.begin(); it2!=it1->second.end(); ++it2) { … | |
Re: You simply add a sum variable inside your `mostrarLista()` and keep adding it. Display the variable instead of the value inside your node. Does that make sense? PS: Next time, please show your sample output, so that people do not need to dig into your code in order to understand … | |
Re: A recursive function is a function that repeatedly calls itself. A valid recursive function must have at least one base case (a valid way to exit) or it could go into an infinite loop. However, if a recursive function does not cover all possible base cases, the function can still … | |
Re: There is a problem with @jkon way. If a user keeps refreshing the page, the count will go up per fresh. As a result, the count number will be inflated. However, the part to save the counter in database is correct (SET viewed = viewed+1). There is no way to … | |
Re: If you are using a tool like wix, you are a web designer. You just know how to use tools in order to express your creativity. You are not developing a website. The limitation of using tools is that you don't have flexibilities outside what the tools are offering. In … ![]() | |
Re: If you have a map loaded, then the page should have the massge display inside said a "div" element with an ID (so you can call it replace the content later), then wait. Either before or after you plot vehicle on the map, edit the message content in the display … | |
Re: Your `$_SESSION['card']` is created as an array, but then you are using each element as an associated array... Edited: I am guessing you are missing `$_SESSION['cart'][0]=array();`. You attempt to assign an associative array to an element of an array... PS: I still don't feel comfortable with the way you structure … | |
Re: I am not going to talk about your script in detail for now because you need to understand how `form tag` works in HTML. If you use `input` tag as `type="submit"` for a form without using `onsubmit` event handler in the `form` tag, you WILL always go to the page … | |
Re: From what I read the [manual](http://php.net/manual/en/function.setcookie.php), how could you use `$_COOKIE[...]` in yoxi.php without setting cookie in your page??? | |
Re: First, did you see a mistake at the beginning? Your `superlist` variable is not initialized the way your algorithm is explaining. It could be `var superlist = [["I", "V", "X"], ["X", "L", "C"], ["C", "D", "M"], ["M", "V&772;", "X&772;"]];`. Second, you are supposed to loop from the last character in … | |
Re: Before thinking about implementing it in GUI, you should come up with how you are going to go about the randomness. GUI is just a step after you could complete the "behind the scene" process. Do you have any idea how that randomness works? By the way, what does UWA … | |
Re: Old question, but here is something to look at. The error suggests that one or more records have value of `Bookamount` field as `null`. As a results, the `sum()` can't add the `null` value with integer. You should check your database... | |
Re: One note on your design, you should change the select file type from typing to a drop-down list instead. Put most of common use file type in the list. For the rest, put them as 'All Files' which is *.*. This way, your program could have some control over the … | |
Re: [Here](http://mathforum.org/library/drmath/view/74057.html) is talking about mediant of 2 fractions. However, I don't understand your statement "The mediant of two fractions a/b and c/d , given an integer n is the fraction(a+c)/(b+d)only if b+d" because it looks like it is cut off. What is your question regarding the mentioned portion? | |
Re: You mean if you load the file content and save in the program memory (variables), then it works fine? Well, my guess in your program is that the way you parse String from the file. How do you parse string? If a string doesn't match, what would you do? Skip? … | |
Re: I agreed. The prototype of the function in AVL.cpp is delcared to accept `AVLType<T>` (line 18) but the function is accepting `TreeNode<T>` (line 87). | |
Re: Why do you need a backslash in `new Dropbox\AppInfo(...)` and in 2 other places??? Also, I am not sure you are creating PDO correctly. Shouldn't it be something like... $database = new PDO('mysql::host=localhost;dbname=editmate;dbuser=root'); ![]() | |
Re: The person on the site you cited has already answered your question. In your case, you need to enable another PHP module on your Apache server. You need to find and download NTS version of PHP module. Then you need to disable the TS version of PHP module and enable … ![]() | |
Re: As JOShealV said, your code is wrong starting at for each loop (Line 23~35). What is the purpose of the loop? You are reading each row data into attendancedate, but keep replacing the value until you are done with all records you retrieved. the whole `datarow`. However, your `datarow` is … | |
Re: It might be the way it render text by sanitizing all output. You may be able to work around using a span tag with CSS. | |
Re: There is a way if your site involves database; however, I prefer not to discuss any further. The matter should be taken to court (a small claim court, possibly) if your client does not pay rather than being sneaky this way. By the way, inserting this kind of kill switch … | |
Re: For others who don't know. Just directly retrieve the url from its `src` attribute? | |
Re: Is this an assignment? I hope so because the code indicates that passwords are saved in PLAIN TEXT in the database! Also, the code is comparing email & password both in case-sensitive. Anyway, you simply print out the HTML image tag, but the url needs to be dynamic. Look at … | |
Re: In part with JamesCherril answer, in your `print()` method, you are looping through the NUMBER of nodes (n) instead of the HEIGHT of your heap. You should rewrite the method definition into something similar to a tree iteration instead of direct iteration in a for-loop. | |
Re: Because in Java, `int` stores a number, not a decimal. When you divide an int with another int, the result will be a number (no decimal). You should read more on Java data type. You may use `float` instead, but then you will have to be careful on rounding error … | |
Re: If `f==NULL`, your program still keep going through `fwrite()`... | |
Re: @necrovore, Your solution is not really correct but rather a patch job. What JamesCherrill said that the OP should reset the `a` value at either the begining or ending of each `loop i`. Because the current code let variable `a` be assigned by the `for-loop k`, the variable is not … | |
Re: Hmm... If I understood correctly... What you need to do is to read the 1st files and save data in a variable. It could be in a hash or array, it is up to you. You will need to split the first file columns into value of the 1st and … | |
Re: If you want to verify the password user entered, simply rehash the plain text password using the same method you do when you save the password into the database. It should be equal. Thus, you DO NOT need to save plain text password. If a user calls for "Forget Password" … | |
Re: First, you need to look at how your problem formulate. The data inside your data file indicates that EACH LINE contains one record. If you look closely, it is similar to... //username password firstname lastname age gender /* iamSamantha 143iluvu Samantha Jones 23 Female AdamLambert ilove8 Adam Lambert 25 Male … | |
Re: I don't know what you mean by "implement customise product like upload photo on mug, t-shirt and other products."? What does this have to do with HTML/CSS??? If you are asking for layout/design of the page, I can't help you because I am not a creative person to do web … | |
Re: First, you need to be able to generate a random number (int) within your stored question array. In this case, I believe you set it to 30, so the number should be from 0 up to 29 (inclusive). You should read this [page](http://c-faq.com/lib/randrange.html) on how to use `rand()` function in … | |
Re: Hmm... The write to file and read it back is using too many resources and is not optimal. I am not clear about your question. Do you mean you want to... 1) create a random generated number between `a` and `b` (inclusive) for an array size of 50 2) count … ![]() | |
Re: 1) Old post... 2) You could do it with `s/(\/opt\/dragon\/bin)/$1\/runit/g` if you want to repeat the matched as a part of the result. | |
Re: 1) Old post 2) This is Java, so RegEx is being used in Java 3) I am not sure but in Java, iirc, your RegEx string needs to specify leading and ending part with `matches()` method. Not sure about RegEx class. | |
Re: First, you need to debug and find out WHERE the script breaks. Also, I believe your `$sMsg` must be a full HTML format (starts with `<html>`, contains `<body>` tag, and ends with `</html>`). | |
Re: Can't you use SUM() inside your query after you alias the column??? Please provide a sample query that used to create the table/view you mentioned. By the way, you could use `cast()` function to convert varchar to int as well. Edited: I just realized I misunderstood your purpose. You should … | |
![]() | Re: If you want to empty the form, simply add JavaScript in your toggle function to clear the form before it `shows` the form? ![]() |
The End.