Jump to content

JohnQ

Member
  • Posts

    63
  • Joined

  • Last visited

Everything posted by JohnQ

  1. Ok I don't know if my title makes sense , but here's my arduino sketch. https://jpst.it/FsoH If I boot up the Yun and just call arduinoyun.local/data/get I only get this *{"value":[],"response":"get"}* Nothing, eventhough I've coded in the Bridge.put already. BUT once I run the serial on Arduino's software http://imgur.com/NAqIfHe . It Gives out the reading as intended. When I enter the arduinoyun.local/data/get THEN it will have the data that I needed. That is: *{"value":{"date":"Fri Feb 12 02:08:22 SGT 2016\u000a","cm":"6","inches":"2"},"response":"get"}* I can't seem to just call the /data/get without starting the serial monitor on Arduino's. I've been stuck for days. Help? Is there a special command I need to get it to turn on without using the Arduino's Serial monitor first?
  2. Hi, it's for this Research Methodologies workshop I have to attend this week. Apparently we have to submit some data by the end of this week and deduce the data received
  3. https://docs.google.com/forms/d/1bX7aGvKSobLxAufP-0w4ML-4qou6mhsF2Zidy6KtVM4/viewform Appreciate your reply!
  4. I prefer a smaller seperate keyboard since I travel with my laptop alot. Having a quick PC-ish setup with a bigger monitor and a small keyboard like the vortex Pok3r is nice. Can fit in my travel bag too!
  5. Lol spot on! 1.4 Million! Anyways Congratulations LMG. You guys deserved it. Anyone noticed the video had luke and edzel neck on neck about something? hahhaa
  6. How much was it? lol. I would like to see the Titan X SLI in 5k?
  7. Here's Part one. XMLHttpRequest Response What is XMLHttpRequest? XMLHttpRequest is an API provided by most browsers which allows client-scripting language such as Javascript to use for making requests to a server. It handles both the request to a server and response from the server. We use Javascript to create XMLHttpRequest objects. Summary: - XMLHttpRequest is an API provided by most browsers - Handles both request/response from the server - Javascript is used to create XMLHttpRequest objects A request from an XMLHttpRequest object can be sent to a URL via a GET or POST method ( click here for in depth GET or POST methods ) . The requests can also be set to an asynchronous or synchronous connection. An asynchronous connection means that , while waiting for the response from the particular server, the page in the particular Javascript segment can multitask. EG, writing a new email on the gmail interface. The response from the server can be fetched from the XMLHttpRequest object upon receipt of the response message, response can either be fetched as TEXT or XML. The text response can contain unstructured plain text or structured HTML text ( which means you can create your own RSS Feeds, now thats another tutorial for another time ) Summary: - XMLHttpRequest can be sent to a URL via GET or POST - Request can be set to asynchronous or synchronous connection ( one way/ two way ) - Response from server can be fetched from the XMLHttpRequest object - Can either be fetched as TEXT or XML Illustration: We can get the response status sent from the server by using several events associated with an XMLHttpRequest object: readState status onreadystatechange The readyState event provides the states (i.e. progress) of the HTTP request made by an XMLHttpRequest object. When sending an HTTP request message to the server, the states of the message can change from 0 to 4. The states are: 0: Request not initialised 1: Server connection established 2: Request received by server 3: Request being processed by server 4: Request is finished and response is ready The status of response messages from the server can be checked using the status event. The status of the response can be: 200: Request was completed and response given. 204: Request received but no response. 404: File/Resource not found. 400: Bad Request with the URL. 401: Not authorised to the file/resource. 403: Forbidden to access the file/resource. The onreadystatechange event is used to bind a function that will be called automatically when the readyState of an AJAX connection changes from 0.The function binded to the onreadystatechange event is usually responsible in deciding what to do with the progress of the connection and how to handle the response. Sorry it's abit wordy. But I promise the next post will be more practical! Next : Implementing AJAX in a web system
  8. Yes it is solved. I posted it here not for help but to share the link I posted
  9. In this case it wasn't the ISP, it was my apartment that was running the internet service. It's free, but they only provided me with one login tied to my room number. The apartment is running its own server to control the internet users. Also, there were no RJ-45 jacks in my room.
  10. So eversince I moved to my new apartment abroad ( Away from home for 6 months, work related ) . The internet was only limited to one device ONLY. I was frustrated but doesn't matter, bought a sim card for my phone and used the cellular data for a few days. Found out a few days later that the data charges for the particular Mobile Service provider was a tad expensive. So I tried EVERYTHING ..from spoofing MAC addresses to bridging my connection, trying to login to the MySQL server to 'inject' another user for my other devices . It was some local made software that controls the internet. Couldn't find anything on it on the net. ...Except for this. I knew at the back of my head it was possible but didn't know how so I surfed the web , read up all the forums out there and found THIS. http://tipsandtricksforum.com/thread-210.html And it WORKS. Enjoy
  11. I say this to people also when I don't have enough money to buy something new haha
  12. Android Studio did not came up to my mind at that time, was opting Eclipse cause thats what we're going to be using for the Android programming class next semester. Will check out Android Studio & Intellij! Thanks!
  13. I would open up the macbook and sell off the parts? And get a new laptop *cough Gigabyte p34w v3*
  14. What has apple done to you?
  15. Sorry! http://github.com/qamaruz/helloWorldthis should be fine
  16. Yes, what this guy said. Basically calls the Graphical User Interface (GUI) libraries in Java for text inputs. Should be called in a JFrame or a JPanel. Happy coding! Here are examples of implementing a JLabel on a JFrame on my github account , https://github.com/qamaruz/helloWorld
  17. " When you teach, you understand " - My dad I am a 3rd year Computer Science student ( One more year till I get my degree ). I am going away from home for 5 months, Project-related. I decided to start this to fill in my free-time abroad. I am also doing this so I don't forget about everything that I've learned. This, I feel is useful . Feel free to correct me if you spot any errors. What is AJAX? You know how any requests you make on any web pages requires a full page reload? and then you have the same contents with just small extra information added. AJAX (Asynchronous Javascript and XML) is a technique of making requests to the server asynchronously (i.e. behind the scene without affecting other functioning parts of a system) AJAX makes use of old existing technologies (i.e. Javascript, XMLHTTPRequest object, HTML and CSS) . The idea of loading data asynchronously have been around since HTML 1, but the technique used an outdated concept of using a frame or iframe HTML element. Unlike standard requests to server, AJAX allows a single web page to make concurrent requests at any time. This allows a more responsive and dynamic web system. What do we have so far from the text above? - Requests are usually for the content that is needed by a user. - Response are then displayed on specific part of a web system without affecting the other existing content. - Unlike standard requests to server, AJAX allows a single web page to make concurrent requests at any time. The idea of loading data asynchronously have been around since HTML 1, but the technique used an outdated concept of using a frame or iframe HTML element ( I have never done this before but for those did, can please share? ) An illustration: Technologies involved in an AJAX-driven web systems: XMLHttpRequest: To make requests to server Javascript: To handle responses from server Server-Scripts: To handle requests from client HTML: To structure the result CSS: To style the result Here's an overview: Next : AJAX Tutorial Part 2: XMLHttpRequest Response
×