MT Sites Web Developers' Blog

Warning: This Blog Is Interesting, Watch The Clock

Anything and everything to do with web development, programming, computing, philosophy, human rights, economics, politics, business, making money and how all those things naturally come together...

What is jquery and why can it make a website ten times better?

Jquery is basically this JavaScript library which makes your website awesome. You can pretty much create any cool effect you want with it and it’s super easy to access specific classes and Ids. For example say I wanted to make a div layer with class hiddenLayer fade in from being hidden slowly, all I would have to write is:

$(“.hiddenLayer”).fadeIn(“slow”);

The same goes for fadeOut() as well. It’s so useful, you can’t afford to not use jquery.

Another perfect use for jquery is Ajax communication whether your using php or asp anything. All you gotta do to POST some data to a php script called “script.php” using jquery Ajax and then put the output of the script in a div called “result” is this:

$(“result”).load(“script.php”,{username:’joebloggs’,password:’letmein’});

Yes that’s it!!! Forget the 10 lines of code creating XMLhttprequest objects, just use this.

Check out some of the other jquery snippets around the blog!

Divisions and factions within the modern Conservative party today

Here’s a 10 mark essay I wrote in the Government and Politics AS Level. The question is “To what extent are there divisions within the modern Conservative party?”. Critique it if you want…

 

I would argue that there are four main factions within the modern Conservative Party. These are the liberal Conservatives, the One Nation Conservatives, the Thatcher Lites (‘Liberal’ Thatcherism) and Libertarians (Post-Thatcherism).

Continue reading

Project Euler Problem 3 Solution in C Explained

Ok… currently I have this code. What it does is simply loop through all the numbers between 2 and 600851475143. For each number it will check if it is a factor by using the modulus (%) function and making sure the remainder is zero. Then if it is a factor, check if it is prime using the check prime function. The way I designed the check prime function is that it will start at 2 and loop through all the numbers up to that number and check if any number can divide into it. If any number can divide into it, then obviously it is not prime.

Continue reading