Blog posts tagged “programming

Binomial Expansion Calculator

I have created a javascript-based program to automatically calculate binomial expansions. Read on to find out!

Random songs Drupal module

If you look to your right, you should see a little widget titled "Random Songs". This block has always existed as a matter of fact, but not in its current state. The current version is a total re-write, and rather than being based on a hacky <iframe> element, it's a custom Drupal module.

In case you're still interested, click the title of this post...

Mapping with Drupal

Last Saturday I was offered a job paying £500 to rebuild the mapping part of an organization's website in order to make it more fit for the purpose - and, well, plain better.

Update: it actually turns out that he wants me to build a new website that mirrors the purpose of the aforementioned site, but for his personal site.

Until Monday, I knew next to nothing about anything, when it came to maps, that is. I didn't know where to get the data, how to implement it, none of that.

So, I did some research. The guy employing me to do the work said he was being sponsored by Ordnance Survey, (...)

Spelling mistake detector

This is what I coded last night, an engine for search suggestions.

Believe it or not, the table being searched contains only four rows (now at least), but the goal was to be able to make awful spelling mistakes and still get matches. I think I've 80% succeeded in doing so - there are still some optimizations that could be made, I'm sure.

Read more to check the code!

New PHP Function: english_num()

INSTANT UPDATE: My coding readability standards have changed slightly since this post.

This is a function that I wrote in the last half hour to solve a small problem: coding an auto notification system that notifies admins about how many new posts are awaiting moderation. Preferring nice english numbers such as twenty-seven, I put my coding skills to the test, and this is what I came up with:

(...)

More Stuff

Aside from my exams which I've been revising for recently (maths, physics, religious studies, spanish A level), I've also been doing quite a lot of server stuff.

For starters, here is a jQuery based calculator:

I also just coded a clock that functions as a jQuery plugin. Every ten seconds it fetches the time from the server using AJAX, then pushes it a second ahead each, well, second. This means that if it's a slow PC and JS deviates, it gets pushed 'back to reality' every ten seconds :)

[Yes, I have been getting really into jQuery and realized its awesomeness].

I've updated th(...)

Twitter

For those that are interested, this software is no longer in beta status and is at version 2.0. The URL is the same, but there are less issues than this post implies.

I've never used twitter and never will do, ever, and that's just a fact. I don't have the time, and if I did, I'd use that time for something more worthwhile :)

BUT - and this is the subject of this post - I am developing my own version of twitter. However, it's for a very small scale site belonging to my friend's minecraft server (which is actually running on my server), but it works on the same basic concept: have a wall (...)

New JSON based music widget

This has been superseded by a new rewrite. See relevant blog post.

If you looked to your left, you'd see a new 'Random songs' block. This isn't a default drupal block, it's one I programmed today at much effort! OK, admittedly I'm using the jPlayer jQuery based software to actually play the music, BUT I programmed the rest (ie. generating the random songs without reloading the page, and rendering them into the playlist using jPlayer's API).

Basically this is how it works:

There's a PHP script on the server which queries from a MySQL database containing songs - it generates 4 random so(...)

Twitter Feed

6 days ago

RT @Kasparov63: Incredible. If Russia sank an American Navy ship, Trump would thank Putin for saving the US money on payroll and ship maint…