Here is an example of uploading Json Data to a MySQL database on a website/Server from a Android phone. This is great to upload user data from the phone to a website. The bad thing is that you have to use a different Thread instead of the main UI thread. It fairly simple to multithread even though some examples makes it pretty complicated. Check out my attempted to explain an example of using the Android Thread class.
Tag Archives: java
I am going to be adding small Android code snippet here that I think others can benefit from. I will only show Android code that has worked for me. I can not guarantee that it is the best way of doing it, but I know it will work. I will continue to add more in depth code (e.g. classes) in separate posts.
This post is the third installment from my post (How to detect a collision between a circle and a line). In this post I will show how to find the closest point to a point or circle. It is pretty straight forward after you know how to determine the distance between 2 points.
This post is the second installment from my previous post (How to detect a collision between a circle and a line). In this post I will show how to determine if a circle or point is above a line. If you know anything about a dot product of two vectors then you probably could come up with the ‘if’ statement yourself. Without going in to too deep of details about dot products, it is basically means if two vectors point the same direction then their dot product will be greater then zero.
I just now finished another computer graphic school project and want to share a few things. As you can tell there is a few bugs, but that is a different story. So far I am going to do this any many parts. I wanted to start off by talking about how to detect a collision between a circle/ball with a line. I will later talk about how to find the reflection, what to with many different lines and what else I can brew up.
Here is a visual of what I am talking about:
Here is a project I implemented recently in class. It uses the Neville Method to interpolate 4 points. Press the number of the dot to control the dot. This is a non-recursive version on it. The code is sorta hard to follow, but email me if you have any questions greenbizkit33 [at] gmail.com.
For my last computer graphics project I created a robot that was assembled (nothing elaborate) and then shot a bullet. I tried to get a demo to run in the browser but was having too much difficulty to get it running. Here is the source file for it:
Source code: hays_nathan_Project_2
There is examples of using moving shapes, using a matrix stack, creating a cylinder, and using a timer to animate and change camera angles. I hope this comes in handy for someone.
Ok I know this might be a boring topic, but it might be helpfully for someone out there. I want to show how to change a coordinate system. One reason you might want to dothis is for computer graphics (which is the class I learned this from). Some computer graphic software will start their coordinates from the upper left where Y increases as you go down. This is sorta confusing since most people are use to the Cartesian coordination system (the x y coordinates) , where Y increases as it goes up and there is a negative x and y.