Jump to content

thescientist

Moderator
  • Posts

    8,682
  • Joined

  • Last visited

Everything posted by thescientist

  1. PHP errors are pretty clear for the most part and will include line numbers. What errors are you getting and which part don't you understand about them? You can search more information on all them, they will be documented on the PHP site.
  2. You could look into using WebSockets
  3. since it's an array, just use a loop
  4. Ah yes, I remember reading all about that last week. Pretty interesting that turned into overly dramatic situation. IMO, I think NPM, Kik, and Azer all could have handled the situation better. I get the Kik had a copyright and thus their right to the name, but I wonder if most people (read developers) who stumbled upon a kik namespaced package on NPM would immediately think of the instant messaging company.
  5. thescientist

    Google Maps?

    I have never done that, but I would start with their API docs https://developers.google.com/maps/ https://developers.google.com/maps/web/ (for the web) Depending how you decide to show a map, the options may be different, but I'm sure it's in there and / or there examples across the web, I imagine it is a very commonly used feature by developers.
  6. do you have a question? Otherwise, this looks like a spam post. (I didn't both to click on that link as there is no immediate reason as to why I should as it related to answering a programming question)
  7. I would just add that you should be more mindful of what users on the forum are trying to teach you. I understand that example may not have been immediately obvious to you, but the point was still fundamental, because in fact the example was a direct answer to your question. (using values from user input vs fixed / hardcoded / embedded / etc in the code itself). There was a better way to respond such as, "that reply is not clear to me could you expand further, I don't get xyz..". In so much that you would like people to continue helping you.
  8. have you tried looking for errors in browser's console? have you added any console logging to trace the execution of your code to see the point where it may have stopped working? For future reference, I would highly recommend formatting and indenting your code in your posts, and if possible, try and whittle down the code sample to only what is needed to reproduce the issue. It's a proper problem solving technique rather than piling everything on the testing. Just tackle the problem one setup at a time and determine some sort of acceptance criteria that confidently reflects that the code is working as expected.
  9. In all fairness, only 3 minutes had gone by since your first post. This is a volunteer forum, so replies happen when someone can get to it. However putting all your code into the post itself certainly aids in getting replies.
  10. Exactly, often times the biggest challenge to writing code is how well you actually express the code through "human" language. The second example favors using proper names for variables so you can infer what the code does now, and in six months from now when you or someone else has to return to it. It should be like reading a box, the code should speak for itself. Those are the lesson I try and take away, not the actual language syntax.
  11. These are some of my favorites, that I have taken a lot of inspiration from http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882 http://www.barnesandnoble.com/p/design-patterns-erich-gamma/1100886879/2673713654907?st=PLA&sid=BNB_DRS_Marketplace+Shopping+Textbooks_00000000&2sid=Google_&sourceId=PLGoP20411&k_clickid=3x20411 http://www.amazon.com/The-Clean-Coder-Professional-Programmers/dp/0137081073 http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742 http://www.amazon.com/Performance-JavaScript-Faster-Application-Interfaces/dp/059680279X Note that the first 3 don't reference JavaScript at all, but I consider them to have been more helpful than the last two because it taught me more about programming at a higher level, even though I don't really code in Java (primarily JavaScript and PHP). This has made me a better developer overall because I can recognize when something feels right, versus when it doesn't (code smell), while the last two just helped me get better at only 1 language.
  12. I second JSG's recommendation in getting a better understanding of programming, patterns, design, etc from a high level view. Most of the books I have read tend to focus on Java, however that is merely based on Java being fairly ubiquitous and most web languages have similar constructs (but different syntax). However, what i take away is how things are built, and the concepts such a DRY and SOLID transcend programming languages. That said, if you are looking at programming to be more of a casual endeavor, then a JavaScript book may be all you need. If you are looking to learn backend and frontend and everything in between, a high level understanding of computer programming is recommended, in addition to books on the specific languages you are looking to pursue.
  13. Did you read the docs? To me they look to do the same (note select is now just an alias for filter in new versions) http://api.jquery.com/jquery.grep/ https://github.com/lodash/lodash/blob/3.10.1/doc/README.md#_filtercollection-predicate_identity-thisarg
  14. That said, per the MDN docs, tables are still a good option for email, due to poor CSS support. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table So, just a matter of a developer knowing and using the best tools available for the job.
  15. Of course you are entitled to your opinion and you are free to develop in any way that you want, but to say Is just not an accurate fact. The intent by the standards team was to provide better ways to express, semantically, what developers were using tables for, with more meaningful alternatives that in and of them selves are better for all the reasons already mentioned. So just be clear that tables do have their use, however just not for the same reasons as 15 years ago, is all. The web changes and evolves and I think on the topic of tables for layout in particular, all here will agree it was for the better.
  16. thescientist

    Domain name

    You haven't added any error reporting. I would start with that. Are you making sure $_POST['domainname'] is being submitting correctly from your form? Where does the code go from there? I would add more echo statements and trace all steps of your code execution.
  17. One thing worth noting that I believe applies is SEO / page ranking. A search engine like Google will be more likely to promote a website that uses semantic elements to describe the layout of a page over one that uses something non-semantic like tables. Tags like header, nav, footer, article, h1-h6, p, etc more accurately describe the content of your page. This can also benefit users who may accessibility issues as screen readers will most likely favor content rendered semantically. Tables are, unsurprisingly, for tabular data. In the past they were all we had so we used them. The web has advanced in years to support better definitions of standards and separation of concerns, and now all you really need is some valid and semantic HTML and some well structured CSS and you can easily create a site that is responsive, easy to maintain, and scalable.
  18. look at what he said. you have to put shuffleList IN the document.ready callback function. Like this $(document).ready(function() { shuffleList(); }); Here's the jQuery documentation for ready, there are a bunch of examples. https://api.jquery.com/ready/
  19. Did you read the bottom where it lists the possible values and their meaning?
  20. what kind of output are you expecting? what kind of debugging are you doing to make sure values are what you expect them to be?
  21. JavaScript (including AJAX) runs in the browser. The browser is responsible for supporting the language spec and features. The server is what hosts the static assets (HTML / CSS / JS) and returns them in response to a request from the browser. The browser, after getting JavaScript returned, will execute it, just like it will render HTML / CSS.
  22. definitely need to see some code for this, and ideally screenshots of your network tabs showing these requests, because I'm not sure what you are trying to say. Are you saying your project reads a txt file from the server via AJAX and outputs the response into a <div> but that's not working on mobile?
  23. closing as this also a duplicate of the original thread here http://w3schools.invisionzone.com/index.php?showtopic=54673
×
×
  • Create New...