Almost three years ago I read an article on html5doctor describing the meter tag, during the course of the article an example is given of the http://www.justgiving.com/ gauge of how near you are to your target:
The article goes on to suggest this would be an ideal use case for the <meter> tag, however at that time it was impossible to style the meter tag to look like this. This afternoon after discovering that shadow DOM support had made it into Chrome stable I attempted to recreate the Just Giving meter using no images and without a mess of divs.
This is the result, one I’m pretty happy with, I haven’t really made much attempt to style the surrounding areas, I just wanted to concentrate on the (frankly rather cool) meter:
I’ve been excitedly awaiting some of the new features found in PHP 5.4, in particular array notation and file upload progress monitoring so I decided to try and install PHP 5.4 on Ubuntu. Fortunately there is a repository of prebuilt packages for Ubuntu.
I recommend using a VM so you don’t mess up any stable PHP install.
Update
Since writing this post php 5.4 stable has been released and a more up to date package is available in this ppa: https://launchpad.net/~ondrej/+archive/php5 I haven’t tested this personally but should work as described below.
I’m a regular user of codeigniter-simpletest developed by Eric Barnes however I ran into a number of issues when attempting to run some features under PHP5.3, this was due to using an old version of Simpletest. I have now updated this and had my pull request accepted and merged into the main repo so that it now uses the most recent versions (1.1alpha3).
There is however one important change to note which will stop old tests working, that is the way that test classes define a label, these are optional so this only applies if you use them in your project. The name of the test is now passed through the simpletest constructor otherwise the default is to use the classname of the test.
Before
class test_users_model extends CodeIgniterUnitTestCase
{
public function __construct()
{
parent::__construct();
$this->UnitTestCase('Users Model');
$this->load->model('users/users_model');
}
etc...
After
class test_users_model extends CodeIgniterUnitTestCase
{
public function __construct()
{
parent::__construct('Users Model');
$this->load->model('users/users_model');
}
etc...
A little project I’m working on requires the use or websockets in Opera Mobile, I’d read they were supported but when I tried it just threw an exception, then I discovered you have to enable them in the config:
Browse to opera:config in opera mobile
Open the User Prefs section
Check the enable websockets box
Scroll right to the bottom of the page and select save
Since first considering web camera applications during my MSc thesis I’ve be fascinated by different uses and application of webcams on the web. I believe outside of skype they are a very under utilised tool for both communication and interaction and despite their long existence I believe there is still a very long way to go in what they can do.
In this post I intend to summarise recent developments surrounding using a webcam within web applications and go on to discuss current implementations available for using a webcam with javascript.
For a good while I’ve been meaning to get around to backing up my data properly. I’ve always had an external hard disk on which I backed up my important data periodically but that only covers the most basic of situations. If my house burnt down, or more likely somebody broke into my house,even just a power surge, I could conceivably loose both my real copy and the backup. From this I decided the only sensible way was to explore an offsite backup solution to use in addition to local backups. I’ve also been spurred on after buying an SSD and being unconvinced about their reliability. Indeed since starting to write this post my new SSD was recalled by corsair…
In this post I’ll describe what I backup and the online services and software I used.
My previous example Node.js, MQTT and Websockets showed the use of a websocket to broadcast messages from a subscribed MQTT topic, however the topic was hard coded and the messages broadcast to all who connected. The example below uses the same client side script to connect but allows the MQTT topic to be specified in the URL and only broadcasts to the individual client. Now to subscribe to a topic “test” the websocket address would be ws://<ip>/test. Read more ▼
For a while I’ve been looking at how to bridge the MQTT protocol and websockets to make it easier to build web applications using data broadcast in MQTT streams. In the past I used python and mod_pywebsocket along with mosquitto python libraries however this was cumbersome and difficult to install. Here I present a simple solution using node.js to interact with mosquitto MQTT clients. Node.js lends itself to working well with messaging systems like MQTT and websockets due to its event driven nature. I’m also in love with node.js at the moment!
This is much simpler than previous attempts and I put the initial test together in less than ten minutes.
Prerequisites
Obviously you’ll need to have node.js and mosquitto installed and also the node library node-websocket-server (which can easily be installed using npm). All my work was tested under ubuntu but there is no reason why it wouldn’t work on OSX or even cygwin. To test you’ll need a websocket compatible browser such as recent versions of chrome.
System Structure
mosquitto_pub and mosquitto_sub are command line MQTT clients supplied with the mosquitto MQTT broker, here mosquitto_sub will be called using node.js as child processes, events are generated on output from the process. The data is then captured and broadcast over a websocket. In this case a simple jquery page is used to display the broadcast messages but in a real application there would be more client side processing to make a useful application.
Just over a year when the chromiumOS code was first released I spent a while compiling it and experimenting and posted my opinions
I made a few basic points:
Little wifi hardware support
Requires a DHCP network
Quick boot time (~10s)
It’s just like Google chrome and nothing else
A few weeks ago @popey mentioned on twitter he was compiling it and this inspired me to have another go with it. In this post I intend to see if things have moved on.
After I had problems with my sheevaplug power supply I had lost faith in the device and didn’t trust it to survive being on 24/7 without exploding/setting on fire etc… so after NewIT kindly fixed it I sold it. This left me with no server to mess with so I decided to try and build a new one – the two primary requirements being that it used as little power as possible (ideally around 10W – the same as my sheevaplug with hd and usb hub) and was totally silent. In this post I’ll describe what I came up with.