Jump to content

Jonathanks

Members
  • Posts

    69
  • Joined

  • Last visited

Everything posted by Jonathanks

  1. There's some general information at the linked page below. Maybe it can help. From what I gleaned, Visual Studio is well-supported for compiling httpd on Windows and Cygwin/Mingw and other compilers need tweaks. https://httpd.apache.org/docs/current/platform/win_compiling.html
  2. Wow. That's very elegant! I like your approach.
  3. I don't have much experience with Cygwin except installing it. Try running ./configure --help to see what options are available. I think you need to run ./configure with those options. Then try running make again.
  4. Eclipse supports JavaScript and I use it. I also use text editors like sublime text and notepad++. They're all good. I use Netbeans too.They're all good. I think what matters is your preference.
  5. It's a compressed file archive. Extract the contents of the archive just as you would do for a .zip extension.
  6. You can wrap the output in <pre></pre> tags. But this too is HTML (you're sending data to a web browser so you may not always escape it) and it may cause the output to display in monospace fonts.Also, the nl2br() function can be used; you can also use heredoc to format your text so you won't need n.
  7. Won't this code perform the database insert even if success=false?It seems testing for success before the connection to database satisfies his request.Maybe by adding && $_GET['success'] == 'true'to the if condition in the first segment of php will be good.
  8. You want to reverse an accidental submission to a database, correct? That's what my suggestion is intended to address.The code above does not interact with the server. Most likely, it will be helpful in confirming form submission. If the user clicks 'ok', the request proceeds, else it fails. And the buttons aren't what I meant: they're JavaScript dialog buttons, not HTML.You can do it without AJAX.Did you understand my suggestion?
  9. I think he wants to provide a remedy for mistakes in form submission. He can do it by form or by AJAX. I'm not good at this but I may provide pseudocode instead.
  10. It seems you're using two buttons in the markup: one for 'submit' and the other for 'cancel. You can add an onclick function to the cancel button that sends an AJAX query to the post destination to check the database and reverse the last update.Your PHP code can set a variable, say $prev_data, to the previous state of the data in the MySQL database before updating it with new data. If the user, after submitting the update completely, decides it was a mistake, the 'cancel' button sends an AJAX request; the PHP code tests the request for a condition then updates the database with the data in $prev_data.I hope this makes sense a little.
  11. I had same problem with WAMP. Stopping the web server in the IIS control panel, as Justsomeguy suggested, can resolve it. You can also make one of the servers to listen on a different port.
  12. That will work: on all files in the home directory, I think.Maybe you should consider naming your files semantically. For example, you may suffix files intended to have read-write permission with '_rw' before the file extension and use wildcard matching to set the permission on all of them at a time.(example:example_rw.txt, example1_rw.html...exampleN_rw.php$ chmod a+r /home/*_rw.*)I don't know if such would work but I hope you get the point. Just try it for yourself.I haven't used UNIX or LINUX before: I'm just a beginner with windows. I've seen so many recommendations for linux systems to programmers. Maybe one day I'll try a linux OS.
  13. I think this may help:Opera Mini: Web Content Authoring Guidelines
  14. Hello. I'm don't know python and I'm still a beginner with PHP and JavaScript.The code above seems like a python implementation of the following in JavaScript:x = parseInt(prompt('enter a number', ''));Is this correct?
  15. I'm also new and I just got an i5 laptop. I haven't had any problem with it. I'm learning web development.
  16. Jonathanks

    for loop

    The first problem has the loop body reassign the variable 'a' to a number. Given it's initial value of a.length as 2, and the initial value of 'i' as 0, 'a' will always be greater since the value of i is continuously added to it. So the loop never ends.
  17. Yea. Ingolme has explained it.In your first loop, the assignment was done outside the loop so each time the loop is run, the value of the variable 'hunter' is updated outside and is stored.In the second loop, the value is updated inside of the loop, stored and output with the document.write() function. But each time the loop is run, the variable 'hunter' is reassigned to 0. Hence you have 3 instead of 6.
  18. You don't need a plug-in to achieve that. Have you read the tutorials on CSS? The background-image property of the body element will set that.
  19. It's a mode in which the browser is not law-abiding. It accepts any malformed mark-up in this mode and is not strict with syntax, tags and elements as prescribed in the DTD.But one thing is many websites depend on it very much: turn on strict mode and try visiting as many sites as you can. You'll find that many of them will not render correctly in the browser.
  20. Then I think it's how m^3 should be displayed in HTML you should figure out. Dunno if I'm right, but try m<sup>3</sup>.
  21. Store the time received from $_POST['time'] in another variable and use the variable name. Maybe that will work.
  22. The first code uses the && operator. The && operator evaluates all conditions from left to right and returns 'true' if all the conditions are satisfied. If one is satisfied, it continues on to the next until all conditions are tested. All must be satisfied for the instruction to be executed. The || operator tests if one of the conditions is true. If the first is false, the second is evaluated. But if the first is true, the other conditions bound by the || will be ignored and the instruction executed.So, considering your code, the first loop tests the variable 'sexo" for all predefined values. It must satisfy all conditions, returning 'true' for the code to run. If sexo === 'h', for example, it returns false and the loop ends without executing the code. The second code tests for options. If sexo === 'h', being an OR operator, it executes the instruction if any of the conditions is true. That means one of the conditions must definitely be true in this case. And so, the loop won't end.
  23. And there's plenty of free materials you can get online. Books, videos and other materials. You can not just get stranded.
  24. He means a demo account. Something like:Username: demoPassword: demoYou don't want us to go through a whole process of creating a new account we may end up not using just to make a review.
×
×
  • Create New...