Search results

  1. A

    Enrollment in C programming course

    There's a good C tutorial here you might want to look at, to get warmed up a bit. http://c.learncodethehardway.org/ I would recommend you do it with Cygwin (in Windows) or a Linux virtual machine so you don't have to deal with Windows and can use the standard tools (gcc, gdb, valgrind, make)...
  2. A

    Best way to start making a website?

    Java and servlets in general are quite separate from HTML and CSS. They serve up HTML and CSS to a requesting client. So you can make your front end, in HTML and CSS, however you want. Where servlets come in handy, is when you want to process a request differently each time.So if you have a...
  3. A

    Using a length() function in a loop's condition

    It's still good to notice these things I think. This one is quite trivial, but they aren't all trivial and the more you spot them the more you spot them.
  4. A

    Best way to start making a website?

    It depends whether you want to build a static website or a dynamic website (with a database behind it). A static website only requires HTML/CSS and perhaps some JavaScript if you want to make it a bit fancy/flashy. If you are building a dynamic website that has lots of content sitting in a...
  5. A

    Java JAVA, EntrySet(), iterator

    You are printing out the whole set in your for loop, don't you want to look at each item? Like this: Set<Map.Entry<String,JsonElement>> mySet = jsonObject.entrySet(); System.out.println("mySet as 'key : value'"); for(Map.Entry<String,JsonElement> singleItem : mySet) {...
  6. A

    Java Decoding JSON object in JAVA

    I made it a bit more readable: {"columnGridContainer":"[[1,\"1\",\"bridge_routine_link\",\"Y\",\"Y\",\"100\",\"CENTER\",\"Cheese\",\"\",\"\",\"\",\"LEFT\",\"LEFT\",\"LEFT\",\"LEFT\",\"\",\"0\",\"string\",\"string\",\"\"]]", "header_row_2_enabled":"N", "header_row_3_enabled":"N"...
  7. A

    Java I'm new to Java

    Go to Tools > Templates > Java > Java Class, and click the "Open In Editor" button at the bottom. It looks like the template is written with Freemarker or something similar, but you should be able to work from what's there. I think that's what you're after.
  8. A

    PHP My php code skips a user request please look inside

    $user[0] is array notation for the first (0th) element of an array (and a 'string' of characters can be thought of, and accessed, as a character array). The start of the string you received from the input is the first character they typed (and remember, a newline '\n' character is appended to...
  9. A

    Why cant I create 1 million threads?

    The pid of a process is just an incrementing integer, I get pid's of 20000 or so fairly often, but most of the processes that had lower pid's are long gone. I guess the OS just keeps incrementing until it's safe to start again at some lower number.
  10. A

    PHP My php code skips a user request please look inside

    Be VERY careful with fgetc and fgets, for reasons already mentioned (the consumption, or non-consumption of the newline '\n' character. I'm not sure if PHP has the concept of buffer overflow, but if it does, you should watch out for that too (someone enters an essay instead of the small number...
  11. A

    Java Coding in Java - replacement for a global variable

    Indeed. Like this: class DatabaseClass { private static DatabaseClass databaseInstance = null; private DatabaseClass() { } public static DatabaseClass getInstance() { if(databaseInstance == null) { databaseInstance = new DatabaseClass(); } return...
  12. A

    Java Coding in Java - replacement for a global variable

    I'm not the greatest OO designer, but in this situation I just make a database class that handles it all, with a runQuery(myQuery) method that returns the query results to me in list. When another class needs database, I instantiate the database class and call runQuery(myQuery).
  13. A

    Simple Big O analysis question

    I was under the impression that you could ignore constant factors, and lesser terms when deducing the Big O of a function. So 2n^2 => O(n^2). Or 5n^3 + 8000000000n^2 + 4612876198274194109438109284n + 8 => O(n^3). When you reach large values of n, the n^3 term eclipses the other terms.
  14. A

    Java Java interpreter

    I'm not sure what's going on here, it's only a small portion of the code, and some of the logic makes no sense at all to me. It's pretty difficult to decipher code without seeing it all. What is the TiledLayer class? What's with calling methods on an int primitive: paramInt.setCell(j, k...
  15. A

    Java Java interpreter

    You will have to spend some time to learn the Java language, or at least some programming language before someone can explain this to you. Do you recognise any of the constructs? Do you know what an object is? A function? An array? With some basic knowledge, you can decipher this yourself...
  16. A

    PHP HTML and PHP issue: display HTML form variables using PHP echo

    I'm not super familiar with PHP, but I just checked w3schools and according to them, form field values are put into an associative array as key/value pairs and you are correct in your approach (i.e. retrieving the value with $_POST["nickname"]) In the case of a GET request, you would have...
  17. A

    Is OpenGL too old for computer graphics programming?

    It pretty much comes down to OpenGL (most platforms) and DirectX (Windows only). DirectX is very popular because Windows is a popular gaming platform, but don't be fooled, OpenGL is very capable and robust. I think you could learn either one and transition to the other without too much fuss...
  18. A

    Would there be a market for physics/chemistry web development tools?

    There's one way to find out :P I like these kinds of tools, it's often just the kind of tedious procedure nobody wants to do, but if you have a plugin that spits it out then why not? Do it I say. :)
  19. A

    Difference between Pasting and typing?

    Usually you can paste your password, but it depends where you copied it from, there might invisible characters you can't see. I'm not aware of a method to detect a pasted password as opposed to a typed one on a website.
  20. A

    Java Javascript and HTML help

    There is much interplay between HTML/CSS and JS. The important things to learn are: The DOM (Document Object Model). When you manipulate HTML with JS, you need to understand the DOM. It defines the structure of the page. CSS. CSS is what you use to define the 'look' of HTML. From simple...
  21. A

    Massive Online Open Courses

    I've done 4 programming courses (using Python and JS), and one statistics and another on complex analysis with 2 different MOOC's so far (Udacity and Coursera) and I really enjoyed the experiences. I think perhaps programming, and computery-maths courses are more suited to this style of...
  22. A

    The Cycling Thread

    Solution: ride on the dirt and leave the roads and the crazies that drive on it well alone! I went for my first DH ride in too damn long this week, it was awesome, I couldn't wipe the grin off my face all day and the scrapes I picked up just serve to solidify the memory :) Get one of these bad...
  23. A

    Music genres

    Jazz is interesting, rock is fun, pop's got no soul. :P
  24. A

    Music genres

    I could sub-classify techno to death, but I prefer to just call what I mainly listen to 'techno'. It isn't techno by most peoples interpretation of the genre, but I know what I mean, my friends know what I mean, and it takes too long to tell anyone else :P Genres are .. useful I think, but only...
  25. A

    How come I can program for fun but I can't math for fun?

    Perhaps you could combine your interests? :) http://projecteuler.net/
  26. A

    Best Songs Ever

    I love this song lately, nice acoustic jam, great harmony. It's by a band called Wooden Sky, titled "Oslo". This is a cover by some kid and he done good.
  27. A

    [Linux] Last Semester of College Which distro?

    I don't think it much matters, you can get neck deep in the guts of Linux with Ubuntu or Mint if you want to. Do you actually want to do kernel level C programming, or are you just wanting to learn a bit more everyday Linux-fu like Bash scripting and programming in your favourite language (with...
  28. A

    Fundamental laws and differential equations

    If you measure something, or some group of things, every day for a year, then you have a bunch of data. You can plot the data on a graph, measurement vs time, and draw a curve through the points, or rather, find a function that determines the curve. Then you can "do calculus" and determine the...
  29. A

    Look around you (Maths)

    That was great :) Imhotep!
  30. A

    How smart were mathematicians in high school?

    I saw these quotes from Helen Keller last week, and I think they are appropriate here: Just to illustrate that there's plenty going on in the world, and mountains of problems to solve, and just by studying a discipline and joining a profession, you can make a contribution that means...
Top