Search results

  1. Artificial

    website.com/forums or forums.website.com

    There are actually some technical differences between the two. A subdomain is not considered the same source as the upper domain by web browsers, which would lead to a couple of things: HTML5 localStorage cannot be shared as easily between the forum and the rest of the site. Cookies set on...
  2. Artificial

    Learning HTML and stuff

    No problem. :) I don't think it plays a huge role which language you choose to use, as long as it has good tutorials and documentation and doesn't make things too difficult for you. If I were to order the languages in terms of how easy it is to get started with them, I'd start the list with...
  3. Artificial

    Learning HTML and stuff

    I would say getting the grasp of HTML and CSS is quite simple, a year of studying should definitely teach you more than the basics of those. The more complicated part of web development is programming the application logic in the client using JavaScript and on the server using pretty much any...
  4. Artificial

    what is the best way to do this?

    You should save the JSON in a .js file, for example "data.js", which would contain only something like this: var data = {fleet: {...}}; Then you can include this JS file in multiple files using the tag <script src="data.js"></script> Then any scripts included after that will be able to access...
  5. Artificial

    what is the best way to do this?

    How do you access the files on the NAS server using your browser? Do you use a URL starting with "file://" or "http://" (or "https://")? If you use a "http(s)://" URL, there is server software running to serve those HTML, CSS, and JS files - whether or not you're able to make said software run...
  6. Artificial

    what is the best way to do this?

    With the direct way, you could have a JavaScript file that contains nothing but the variable assignment, which makes it pretty close to being just a data file. And yes, browsers prevent websites from making requests to your local file system - how would you feel if for example TH would crawl...
  7. Artificial

    what is the best way to do this?

    There are two ways of getting that JSON to your JavaScript code. The first is to just embed it directly into your JavaScript code (as JSON is just a small subset of JS): var data = {"fleet": {...}}; The second way is to use an XMLHttpRequest to request the JSON file from the server, and then...
  8. Artificial

    what is the best way to do this?

    That display: inline; should indeed override the display: none;, as you can see in this simple demo. There must be something else in your CSS not causing it to work.
  9. Artificial

    what is the best way to do this?

    In that case the solution I suggested isn't that great. While JS can't that easily read CSV files, it can read JSON files, which would be a better fit for representing the data anyway. A simple example of a JSON file containing data fitting your case: { "fleet": { "cars": { "car1"...
  10. Artificial

    what is the best way to do this?

    I am unsure of what your situation quite is. Is the repeated data stuff like headers and footers that are present on all pages and what you're trying to hide and show the actual content? Overruling display: none; should indeed be quite easy to do, but I can't say what's wrong with your code for...
  11. Artificial

    Java - File size is not incomprehensible

    Ah, that does indeed explain it. Java's serialization stores more information about the objects than just their contents. For example for arrays it saves at least the object's type (1 byte), size (integer, 4 bytes), and class description (handle, integer, 4 bytes). That means the size it takes...
  12. Artificial

    Hey, the gist tags are acting kind of weird...

    Hey, the gist tags are acting kind of weird: http://www.thehelper.net/threads/java-file-size-is-not-incomprehensible.158019/#post-1348682 (the line numbers are not aligning correctly with the code lines). Btw, is the used-to-be-irc chat still alive? If so, what info do I need to connect, again? :P
  13. Artificial

    Java - File size is not incomprehensible

    I could not replicate your problem. Using this code: 9f859ef5ccc42508b6cd produced in a test.dat file of size 8.1 MB: /home/felix $ javac a.java && java a && du -h test.dat 8.1M test.dat Then again, I haven't used Java in a while so I might've made some mistakes in...
  14. Artificial

    Javascript weird bug?

    The last one isn't actually the string "2.5", but the number 2.5, which makes it a bit more understandable. This result might seem a bit weird, but it's actually just a result of JavaScript's automatic type conversion and is quite well defined (though maybe not the best idea in the world). In...
  15. Artificial

    Facebook Connect stores user details to my database?

    The details aren't automatically stored to your database, but in order to do anything meaningful (or even allow logging in via Facebook) you need to store at least the users' Facebook IDs in your database. If you don't, when the user logs in via Facebook after registration you have no...
  16. Artificial

    Iframe padding help

    Yes, you can use the min-height CSS property instead of height. So for #main, change height: 1000px; to min-height: 1000px; and you're ready to go. I can't really understand why you would like to have a long area with nothing but white on it when the two iframes are both hidden, though. If you...
  17. Artificial

    Prevent Registered user from registering again

    TL;DR: You can't (unless it's a very special case). And you shouldn't (unless it's a very special case). Whilst there are technical solutions for making it more difficult to register several accounts, none of them are both easy and effective. Most of them (such as IP and cookie based solutions)...
  18. Artificial

    Linux versus Windows for programming

    I would say the most important factor when choosing your OS is the availability and usability of tools you need. If you plan on programming for .NET, for example, you might want to go with Windows as (based on my experience) using any Microsoft products without using only Microsoft products is...
  19. Artificial

    System Artificial's Recipe System

    Thanks for the compliments. As for your problem, I'd suggest you post your problem as a separate thread in the World Editor Help forum (so more people can see it and help you) and link to that thread either here or in some other kind of message to me so I can take a look as well. Some...
  20. Artificial

    Flask-SQLAlchemy - First unwatched episode from series sorted by last watched

    I understood the last_watched attribute meant that everything before that has been seen already and shouldn't be selected. Didn't notice User had a watched_episodes attribute. Didn't notice that was a requirement, was too focused on the part that challenged me. Nah, you can just click on the...
Top