Advanced Physics and Soup+ AJAX

Posted by VigilantPsyche on June 4, 2008, 2:02 p.m.

Yeah so lets see…

We can derive the equantions of physics motion by integrating basic formula… a=(v-u)/t

a=acceleration

v=final speed

u=initial speed

t=time

s=displacement

"a->b{x" is the integral of x with limits of high a and low b.

a=dv/dt

t->0{(a) dt = v->u{ (dv/dt) dt

//Move a outside integral as its constant…. cancel dt

a (t->0 { (1) dt)= v->u {(1) dt

at=v-u

v=u+at

So the thing I don't get is why you can cancel the two 'dt's since one means "change in time" and one means with respect to time… :/

So yeah… I'm in the last year of school now and it rocks. Half of my time is composed of freeeee periods so I just sit in the common room ( a shabby old classroom ) playing card games.

The lessons are pretty hard ( first year of univaersty stylie ) but meh… I'd rather work hard and have a lot of free time than generalize.

Hmm… AJAX is hard…. I have a sneeking suspicion that the site's "Add Favourite User" button employs it ;D

That's all.

Can't think of what to write.

Apart from.

Soup.

EDIT: YIPEE! MILKY BAR COOKIES!

Comments

Rusky 16 years, 6 months ago

AJAX is way cool once you get it working. and "sneeking suspicion?" XD

PY 16 years, 6 months ago

It does, we tried it.

Physics rocks.

Engines are fun to make, it makes for the most fun I've ever had in games (HL2, rocketing my own buggy to send it flying into a group of combine. Bloody brilliant!) and it makes the world go round!

Alert Games 16 years, 6 months ago

AJAX isnt really hard. I used it a few times before.

basically, you just change the text of the element using a different file. Once you get it to work, then you can use it for different things.

KaBob799 16 years, 6 months ago

I looked at ajax examples and it looked really hard, then I looked at the latest blogs button and figured it out right away.

sirxemic 16 years, 6 months ago

You did all those integrals, just to conclude out of

a=(v-u)/t

that

at=v-u and v=u+at…

WTF

a=(v-u)/t –> *t –> at=v-u

at=v-u –> +u –> u+at = v

Also, you defined s as displacement but didn't use it…

firestormx 16 years, 6 months ago

Ajax is actually really simple. In extremely basic terms, you can think of it almost like having an iframe.

I don't know if you know much about php/sql/javascript, but here's hoping you do:

To make an "add friends" button that doesn't use ajax, you might make it a link to a page that's something like site.com/add_friend.php?friend=23

In add_friend.php, the $_GET['friend'] variable is the row id of the user that you're adding to your friend's list. Then, using mysql, you add a row to your 'friends' table, with the id of the friend, and the id of the user who has added the friend.

Now, using ajax rather than redirecting the entire browser, we simply make it when you click the "add user" button, it executes the JS function add_friend(friend_id). In there, we initialize the javascript, then "execute" the page "add_friend.php?friend="+friend_id. Then, in that same function, we use onreadystatechange and readyState to check if add_friend.php has completed its execution (and status to ensure that add_friend.php actually exists), and when readyState is 4, then we change the "add friend button" to "friend added", or something.

Like KaBob said, if you take a quick look at the javascript in the source code here at 64D, you ought to be able to catch on pretty quickly. Since this was coded a few years back when I was fairly new to javascript and good coding in general, all the js is right there in the source.

foslock 16 years, 6 months ago

Physics is fun. Programming it takes incredible patience though, beware.

F = ma