Skip to content


Spotify playback stops on Ubuntu 9.10

Having recently upgraded to Ubuntu 9.10 I experienced some problems with playback on Spotify. And for those of you who didn’t know, Spotify does work on Ubuntu if you run it using Wine.

I found that there are quite few people that are having the same problem on getsatisfaction.com on this thread.

The problem I was experiencing was that every now and then play back would just stop and then if I tried to play another song it would be really poor quality and it would eventually just stop completely.

To fix this I did the following:

  1. Uninstalled wine
  2. sudo aptitude remove wine

  3. Added the latest WineHQ APT Repository to software sources, by following this tutorial
  4. Re-installed wine v1.2
  5. sudo apt-get install wine1.2

  6. Re-installed spotify by running the command
  7. sudo wine "Spotify Installer.exe"

Hope that helps, if not then please let me know

Tags: , .

Ubuntu 9.10 coming soon.

Seeing as though I’m using Ubuntu as my main OS, I decided to show off some of their bling and spread the word that Ubuntu 9.10 is being released in 7 days…and counting!

Tags: , .

Time for twitter

After resisting it for quite sometime now I have finally decide to create a Twitter account.

To keep with the theme of my blog, here is my twitter URL: http://twitter.com/Peeled_Carrots

Tags: , .

What happened to good old exercise?

Maybe I’m missing something here, but I recently saw two adverts for new “fad” products which apparently help you lose weight.

The first was “Skinny Water“…I mean come on. Okay, so it’s flavoured water that apparently has no calories, helps metabolise fat and boosts immunity. I’m sorry but that sounds like a big crock of sh*t. If you want low calorie water, how about drinking water?

The second amazing new weight loss product that I saw was advertised on the underground. It is a new shoe which Skechers have release called “Shape Ups“. Apparently they have the following benefits:

  1. Weight loss
  2. Body composition
  3. Glutei strength
  4. Low back strength/endurance

Haaibo, now that is amazing…shoes that make you fit. So for the second time…what a crock of sh!t!

What about just eating healthy food, drinking good old tap water and doing exercise in a normal pair of running shoes? I suppose that is just too difficult for the majority of the world’s population. It’s not a wonder that obesity levels are at an all time high.

Tip for the day: Stop being so lazy, get off your fat arse and do some exercise!

Tags: , .

Flex Internal build error

Whilst I was developing in Flex Builder today I came across the following abstract build error messge:
An internal build error has occurred. Please check the Error Log

It seems like this is quite a common problem and I found a number of blog atricles referring to it. It seems that one gets this error due to the following reasons:

  • Having an incompleted switch statement without any cases
  • Missing a semi-colon after a variable declaration
  • Listing a twice with different extensions in your mxml
  • Declaring an import twice in an Actionscript file or embedded Actionscript in an mxml file
  • If certain lines of code are commented out resulting in a trace statements being unreachable

However, the reason why I was getting the error was because I had mistakenly extended a class of itself…eg

public class myClass extends myClass
{

}

AMATUER HOUR!!!

I found that soultion in a commet by Jules on Michael Imhoff’s blog.

I just had the same error (Uncaught exception in .log, java.lang.StackOverflowException). It appeared after I’d done some work with sed on my object model. Turned out one of the classes extended itself, ie class myClass extends myClass :-)

Thanks dudes :)

One would think that the Flex compiler would have identified this and given a more dexcriptive error message?

Tags: , , .

Wamp php fopen and fsockopen problem on vista

I have finally found a solution to a fopen/fsockopen problem I was having on Vista using Wampserver…I know it’s not ideal to be developing on Windoze, but it’s my work machine so don’t crucify me :)

I wanted to access a php file on my localhost using the following code:

$fp = fopen("http://localhost/test/export.php", "r");

but got a [function.fopen] php warning:

Warning: fopen(http://localhost/test/export.php) [function.fopen]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\wamp\www\test\export.php on line 11

I also tried adding “@” before the fopen, but still got the same php warnings

$fp = @fopen("http://localhost/test/export.php", "r");

So instead I tried fsockopen instead, but got another smiliar warning:

Warning: fsockopen() [function.fsockopen]: unable to connect to http://localhost/test/export.php (Unable to find the socket transport “http” – did you forget to enable it when you configured PHP?) in C:\wamp\www\test\export.php on line 11

Now for the solution:

I came across a solution which worked for me on the wampserver forum:

I think I just found the solution here: bugs.php.net

It seems by changing ‘localhost’ to ‘127.0.0.1′ it works!

So, changing the code to look like this actually works:

$fp = fopen("http://127.0.0.1/test/export.php", "r");

Strange, but true. Thanks to anarchitecton!!!

Tags: , , , .

Smarty PHP Google Maps API plugin

When I wrote my last post on PHP Smarty I was still wet behind the ears when it came to web development, but 3 years on and I have got a bit more experience and can offer a bit more insight to my fellow web ninjas out there…wachaaa, judo chop!!

I was recently building a web application where I was using Smarty, which is a really lightweight templating engine and I would definitely recommend using it instead of Flexy (part of PEAR) as the documentation is almost ten times as good and it doesn’t rely on a massive PHP library like PEAR.

The Google Map API plugin for Smarty has been around for a few years now and the latest release is version 2.5 which was released in September 2007.

It is really easy to use and if you are familiar with the way Smarty works, then you’ll be laughing!! There is some detailed documentation on phpinsider.com, so if you need any help then I would suggest this page.

All you need to get going is the following:

  1. Latest version of Smarty(obviously)
  2. The Google Map API class plugin
  3. A Google Map API key

It is really configurable and is very easy to integrate into existing Smarty templates, so why not give it a try…here is a demo.

Tags: , .

Swanage triathlon 2009 race report

In an effort to keep my readers (I know there are millions of you out there :) ) updated I thought that I would try to write a few reports on recent races that I have done…so here goes.

On Sunday 9 August 2009 I took part in the Swanage Olympic triathlon in Swange(obviously) which is close to Poole/Bournemouth.

I travelled to Swanage on the Friday evening and stayed at the Herston camping site, which was not the best camp site I’ve ever stayed in and was incredibly overpriced. I paid £20 a night for a 2 man tent and the ablutions blocks were abysmal to say the least. Also, the other campers were pretty bleak when our crew of about 20 people work up on Sunday morning at 05:00 to get ready for the race, but I suppose that was to be expected anyway.

Registration took place on the Saturday and was very conveniently located close to the main promenade and beach, and offered exactly what an athlete wants before race day…a hassle free registration. There was a store at the registration tent offering a few bargains, but nothing out of the ordinary.

I really enjoyed the race on Sunday and ended up switching waves so that I could race against two of my training partners, which made for some exciting moments in the final few metres of the run where I was involved in a sprint finish that I lost :(

The swim was fantastic, except for the middle section where we had to clamber up some slippery steps and run down a slipway before heading back towards the main beach. The water temperature was ideal and being a relatively small race I didn’t feel like every other triathlete in the race was on top of me.

After the swim there was quite a challenging run along the promenade and up a few steps to the transition. Then it was on onto the bike which was also really enjoyable, although it would have been better if they roads were closed. If the event gets bigger it would be great if the organisers could request some police marshalling from the council. The bike leg offered one challenging decent with 3 s bends, one or two climbs requiring some effort and lots of rolling hills where one was able to keep the one’s speed pretty constant. Also, there was quite a lot of beautiful scenery to look at during the 40km route.

Sprint finish

Then it was into transition again and onto the run, which was a BEASTY to say the least. There was 400ft of climbing in the first few km’s and I have to admit that I did walk at one stage when I was running up the first big hill. Once the hill had been conquered one was rewarded with a fantastic view across the bay and of the country side, which did make it worth it :) . Then there was a steep decent and a loop in the country side before heading back to town for the finish.

Swanage is a lovely little town and I hope that the triathlon gets more popular as it was a really enjoyable although the organisers could the following improvements:

  • To realize that I changed numbers and waves and am not still waiting to start :)
  • Road closures for the bike course
  • Finishers medals
  • A proper timing system with timing chips

Here is a link to the event

Thanks to Megan for taking such cool photos…I hope you don’t mind that I’ve used them on my blog :)

Tags: , , .