Archive

Posts Tagged ‘how to’

How to Create a Facebook Application

July 13, 2008 2 comments

This is aimed at people how already know programming and want to apply some of these skills to making a facebook application. You dont need to know much, even html will do though you wont make much of an application with this. Ive made mine using php and it was a site i had already developed.

Facebook is a great place to put your web apps and is easy to do but the documentation I could find on the site wasn’t that great (though mayb im just blind). First of all you need a facebook account, you should be able to do this easily enough, you also need an application, the application is no different to any other website and can be written in any language your familiar with (we just put it in a frame later on), i wrote my app when learning php with no intention of ever using it in facebook.

The first thing you need to do is get the developer application on facebook. Then choose to create an application by clicking set up an application. Choose a name and then click optional fields(this is where we set it up).

Callback URL is where you enter the address of your app, so if you have created a website you put a link to that sites home page. The canvas URL is the url for app on facebook, you have to choose a unique address for it which people can use to get to the app. If you just want to place your app in the page like i did, meaning that it works like a normall webpage, choose iframe under the canvas url box. We then choose application type to be website.

The next important field is “Can you application by added on facebook” and since your making an app for face book you probably want to set this to yes. You then need to fill in the install option page(if it can be added on face book). Here you want users to be able to add it to all pages. The default FMBL is the code that will appear on their facebook page when they add it.  I set as a link to the apps home page.

The final section to fill in is the integration points that helps facebook work with your app. The only part you need to fill in here the side nav URL which is the link that will appear in the applications part of the users page when they use facebook, so they can get to your app.

Finally click save, after that you can mess around on the developer trying out the different parts, try adding an image in the settings part. You also have to develop some code so that you application actually does something have fun,

David Woodford 🙂

Matrix Multiplication

This is a simple tutorial on how to multiply 2 matrices together. You can speed up doing this using my c++ matrix calculator (download matrix calculator) but I strongly recommend learning how to do them long hand first as you should only use formulae and program that you understand how they work. Multiplying matrices is a useful thing to know as it enables complex algebra to be simplified and i used extensively in 3d computer graphics.

What Matrices can i Multiply Together

You may fin it surprising that only certain size matrices can be multiplied together, this is because of the way the multiplication is done and how the size of the answer is determined.

The size of a matrix is given as rows by columns
eg) 2 3 1
3 6 1
is a  2×3 matrix. When multiply matrices the columns of the first matrix must be equal to the rows of the second. The size of the new matrix is given by the rows of the first by the columns of the second

eg) Fig1

demostration of the size of matrix after multiplication

How is the multiplication Done

The way in which matrix multiplication is done is surprisingly simple.  Go to the first point in the new matrix. Look at the row it is in and go to the start of that row in the first matrix and the start of the column it is in in the second matrix. Multiply these to numbers together, then move along one in the first matrix and down one in the second matrix and multiply these together. Keep going till you have reached the end of the row of the first matrix, now add all of these values up and that is the first value for your new matrix.

So you go to the row in the first, the column in the second, times each pair of values and add them up for each value.

In the above diagram (fig 1)
u=ag + bk
v=ah+bl
w=ai+bm
x=cg+dk
y=ch+dl
and so on….

That may sound a little confusing but you’ll soon get used to it and it is very useful. If you want to practise and check your answers please download my c++ matrix calculator, the command for multiply is mlt, though you will have to define you matrices using the dim command first. All the data it needs off you is asked for

If you have any comments please leave them below or email me at woodford_4@hotmail.co.uk

Factorizing Quadratics

April 16, 2008 1 comment

Factorising quadratics is basically putting them in brackets. In this section we will look at two different ways of factorising quadratics( for simple and complex ones) and when they should be used.

Note/ sometimes a quadratic cannot be factorized using whole numbers, this is when you must use the quadratic equation to find the values of x. See my earlier post and c++ program

Simple type

Use when there is no coefficent of x2

eg)x2+2x-8

start by opening 2 brackets with an x in each
(x )(x )
put the first sign in the first bracket. If the second sign is + put the same sign in both, if its – put the opposite sign in the second bracket
(x+ )(x- )
find the 2 numbers that will add(if both signs in brackets are +) or subtract(if the signs in the brackets are different) to make the middle number(2) and multiply to make the end number(8)
(x+4)(x-2)
and thats your quadratic factorized

Complex Type

Use when there is a coefficent of x2

eg) 8x2-14x-15
Before we can open brackets we need to split up the 14x
8x2 ?x ?x-15
the rule for the signs is the same as in the simple case, put the first sign before the first x term. If the second sign is + put the same sign in both, if its – put the opposite sign before the second x term
8x2-?x+?x-15
we also use the same rule for the to coefficients of x, they must add or subtract to make the middle number(14) but they must times to make the end number times the first(15×8=120)
8x2-20x+6x-15
we then take out the common factor of the first 2 terms(4x)
4x(2x-5) + 6x -15
we use the bracket(2x-5) as the common factor for the second 2 terms and find what we need to multiply by(3)
4x(2x-5)+3(2x-5)
we then take the 2 numbers in front of the brackets(4x and 3) as our second bracket
(4x+3)(2x-5)
and there we have a fully factorized quadratic

DIABLO TRICK >> GRINDS

February 10, 2008 1 comment

Grinds are more a group of diablo trick rather than any specific trick, however this will attempt to teach you the basics of how to perform a simple grind with a diablo. A grind is basically when you balance a spinning diablo on one of the sticks, like you would on the string.

This is how I do it

  1. get the diablo spinning fast(it tends to slow down when its on the stick) and do a basic toss — though not much higher than your sticks (because you don’t want it bouncing as it lands)
  2. Turn one of the sticks inwards(so its parallel to the string) and try to catch the diablo on it, so that it lands as it would have on the string
  3. Point the knotted end of the stick upwards (because the diablo is spinning if you don’t do this it will go flying off, aim to angle it such that the force of gravity pulling it down the stick matches the spinning trying to pull it forward, its something you get used to)
  4. When you ready (probably after a few second to start with) tilt the stcik back down again so that the diablo can roll off back on to the string — alternatively you can flick the stick up so that the diablo goes into the air and catch it again like normal

This trick will take a while to master, it took me sometime, but once its done it will look pretty good. At first you may only be able to keep it there for a few seconds but with practice you can extend this time, concentrate on keeping it under control so if it begins to wobble return to normal even if you’ve only just go it there.

If you have any suggestions, improvements or comments please leave them below or email me at woodford_4@hotmail.co.uk >> please visit my site www.breakingwave.co.nr

3 Clubs and Mills Mess Juggling Tutrials

February 2, 2008 Leave a comment

HI, ive just uploaded 2 new juggling tutorials to my Youtube account , thse are Mills mess and Juggling

Clubs. These are to go with my written tutorials on this blog as well as on my site (www.breakingwave.co.nr)

Any way here they are