Welcome to Matt’s Blog, Please Keep to the Posted Speed Limit

Archive for the ‘Technology’ Category

How to use an MP3 as a Ringtone on iPhone 3G

Posted by 2000mph on July 3, 2009

I just recently got an iPhone and was shocked to find no simple way to use an MP3 file as a Ringtone. That was until I ad a look around online and found that there is a way to do it, and it’s not too complicated either.

1) In iTunes find an MP3 file you want to use.

2) Select the file, then right-click –> GET INFO and select the OPTIONS Tab.

3) Check the Start and Stop Times checkboxes and change the times so that you have the section of the MP3 you want to have as your ringtone. Make sure the length is less than 30 seconds or this won’t work. When you change the Start and End Times and click OK button you can go back to the MP3 file in iTunes and play it to see if it is what you want.

4) The section you pick must be less than 30 seconds!!

5) Once you have a section of the MP3 that is less than 30 seconds that you like, select the file and right-click –> Create AAC Version or Convert to AAC. This will create a second file under the existing MP3 in iTunes.

6) Select the new smaller file and delete it from iTunes, but make sure you then click the KEEP FILE button!

7) Go to the Original MP3 file location on your computer, probably in the iTunes Music folder.

8)You should see the new smaller file we created, with a file extension of .M4A rename this to .M4R

9) Open the .M4R file and it should automatically open iTunes and place the file in your ringtones library.

10) Now you can sync to your iPhone and the ringtone should appear in your ringtones menu.

I have listed out the steps in detail so it’s actually much quicker and simpler than it looks. This means that you can use any MP3 file for a ringtone now, and not that you can select exactly what section of the MP3 to use very easily.

Posted in Technology | Leave a Comment »

My New Geek Blog

Posted by 2000mph on February 29, 2008

Because I don’t want to clutter up this blog with boring crap about programming and coding and all that other really boring stuff that I do at work I have created a separate blog. I will use the new blog to post code tips and hints and stuff I want to remember but can’t be bothered to store in my brain.

Follow the link to check it out, but it’s not very exciting, just slightly more fun than watching paint dry.

http://2000mph.blogspot.com/

Posted in Technology | Tagged: | Leave a Comment »

Some boring XML in SQL 2005 code that some might find useful.

Posted by 2000mph on January 3, 2008

OK at work I had to do some work to manipulate some XML stored in SQL 2005 database using SQL scripts. I have never done that before and I’m only basic level SQL programmer. So I did a lot of searching online and found some useful code bits here and there to get the work done. So as a help to other people but mainly as a reminder for me here are a few of the good bits ofSQL code I found.

How to insert new node into some XML stored in SQL database table.

UPDATE tablename SET fieldname.modify('insert if (/ROOT/nodename/[@attributename="attributevalue"]) then <newnodename newattribute="value"> else () as last into /ROOT[1]')

This uses the XML Modify method and contains an if statement that will only insert the new node if an existing node with a certain attribute value exists in the XML. Also you can only insert one new node in this statement, if you try to add multiple nodes in the same statement it will fail.

The if statement in the code above is only checking for one value, what I wanted to do was check for a XML node that had multiple attributes and then insert a new node next to that. To do that took so searching for the correct syntax but it is possible using a if and statement as shown below.

UPDATE tablename SET fieldname.modify('insert if (/ROOT/nodename/[@attributename1="attributevalue1"] and /ROOT/nodename/[@attributename2="attributevalue2"]) then <newnodename newattribute="value"> else () as last into /ROOT[1]')

You can also use and operator inside a XML Query such and not just an if statement as shown above. Below is some code I used to delete a node matching a XML Query that finds a node with multiple attributes with a set value.

UPDATE tablename SET fieldname.modify('delete (/ROOT/nodename/[@attributename1="attributevalue1" and @attributename2="attributevalue2"])')

If the above code isn’t much use check out the sites below where I got the information I needed to put together this code and everything else I needed to know about SQL XML to complete my work.

http://msdn2.microsoft.com/en-us/library/ms175466.aspx

http://technet.microsoft.com/en-us/library/ms345122.aspx

http://www.15seconds.com/issue/050803.htm

Have Fun

MPH.

Posted in Technology | Leave a Comment »

Visual Studio 2005 Windows Installer Issues

Posted by 2000mph on October 25, 2007

Ever seen this error message:

“Unable to get installer types in the [name of DLL] assembly. –> Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. “

Well its a bugger to figure out exactly what the bloody problem is but I came across a useful blog post that pointed me in the right direction to fix the issue:

http://geographika.wordpress.com/2007/02/20/windows-installer-woes/

If you ever get the same issue try using the log viewer suggested in the that blog post and your be able to find more detailed error information.

Posted in Technology | Leave a Comment »

How To: Setup and use iPod without iTunes!

Posted by 2000mph on September 5, 2007

Now I’m not a fan of Apple iPods for the one reason that it forces upon users a nasty piece of bugware called iTunes.

But recently a bought my partner an iPod Shuffle because she really wanted one and I have to admit iPods are cool little bits of kit and they do look good.

However once we got it home and tried to use it we had a problem. It states you have to download iTunes in order to format and setup your iPod to use and iTunes happens to be a massive 45Mb download. Thats huge and just so I can set up my iPod and transfer files, you must be f**ing joking!

So online I went to search for an alternative, and there are plenty, see links at the bottom of the page. The only trouble is in every case you have to download iTunes and setup your iPod first. There was no chance in hell I was going to do that, I have my principles and I was not going to waste my time and bandwidth on downloading that piece of crap.

So what was the solution, well it was my good old friend, Winamp! There is a plugin available for Winamp that adds iPod support called ML_iPod.

This is so good one of the guys who developed it now works for Winamp and so this feature is built into Winamp from version 5.2 and above. However the plug in has more features so is a better choice and I’m not sure all the features needed to fully support using your iPod without iTunes is available in the built in version as I haven’t tested it so any one who has please let me know. I am quite happy with Winamp 5.03 and see no need to update at the moment.

Anyway onto the plugin, it’s a stupidly small file to download and as easy to install as a single click on the installer. In seconds you can launch Winamp and set up your iPod.

There are detailed documentation for this plugin here:

http://mlipod.sourceforge.net/wiki/Ml_iPod_Basics

Built into this plugin is the best feature ever. It has a ‘Restore or initialize an iPod’ function. This means that you can initialize and format a brand new iPod without going within a country mile of iTunes or any annoying Apple software.

Then you can use this amazing plugin to sync your Winamp playlists onto your iPod. Read the documentation for more details as thats all I have for you.

I’m just so relieved that I didn’t have to download iTunes, which for some unexplained stupid reason has to come with Quicktime as well!! Why? Arggh! So if you did download it both iTunes and Quicktime would bug you every 2 secons to update, upgrade, buy, until you give in or jump out the window!

And best of all its all in Winamp, the best music player ever invented in the entire universe!

Great!

As promised links to some sites that list other iTunes alternatives if your interested:

10-alternatives-to-itunes-for-managing-your-ipod/

http://ipodmanagers.blogspot.com/

Posted in Technology | 8 Comments »

Useful C#.Net Enum List Method

Posted by 2000mph on August 15, 2007

http://devlicio.us/blogs/joe_niland/archive/2006/10/10/Generic-Enum-to-List_3C00_T_3E00_-converter.aspx

The blog above has a very useful bit of code for C#.Net that will convert a Enum definition into a List. This can be very useful, for instance to place all the values of an enum into a drop down list. I used it to check a cast from an int to enum was valid by checking it against the list.

public static List<T> EnumToList<T>()
{Type enumType = typeof(T);if (enumType.BaseType != typeof(Enum))throw new ArgumentException("T must be of type System.Enum");

return new List<T>(Enum.GetValues(enumType) as IEnumerable<T>);
}

Then used it like this to check a valid enum:

List<DayOfWeek> weekdays = EnumToList<DayOfWeek>()int sunday = 6;DayOfWeek day = (DayOfWeek)sunday;

if (weekdays.contains(day)) //isvalid

This is useful because the int to enum cast will cast to an enum even if it doesn’t exist. So its best ot make sure its valid before you continue to use it.

Kudos to the guys in the blog above for working out the code.

Posted in Technology | Leave a Comment »

Google Developer Day 2007 – London

Posted by 2000mph on May 31, 2007

Today I attended Google Developer Day in London and now I’m actually sitting on a train on my way back to Birmingham, typing on my laptop using my 3G datacard outside my flat for the first time since I got it. Its great it sometimes actually manages to pick up a 3G network, but mostly relies on GPRS which is a little slow but it works.

Anyway back to the reason for tis post. I got to London about 11am. Got a little Google goodie bag at the registration, mouse mat, pen, notead, sweets, silly putty??, well it was free so who cares.

First on the agenda was the introduction, mostly talking about Google Maps API and KML and launching Google Gears. Look it up, but mostly its just a tool to allow you toview web pages offline, use them as normal and then sync them back up when you get online again.

After that I went to four sessions, first Google Gadgets. There just like Yahoo widgets, but I might consider having ago at developing ojne considering the user base that iGoogle has plenty of people to target.

Second was a talk on Google Earth and KML, the technology that lets you add your own content on top of Google Earth. Overlay pictures on the ground, add in location descriptions and even your own 3D models. Some great examples and it did get my interest forwhat could be possible with it.

Next GData API talk. Most interesting to me working with Google Calendar and www.GooSync.com. using the Calendar API. Anyway we did get to talk with a Google Developer and find out they are trying to do APIs for Gmail but no time frame for that still. Also tasks are being considered for Google Calendar but still no idea when if at all.

Finally there was the talk on developing for mobile, which mentioned the best way to develop for the multitude of different devices, to use defined standards such as xHTML and keep it simple. Great, will do.

Then we got a live web cast from the US for Google’s Keynote speech. They taked alot more about Google Gears, and seem to make a big thing about it. Also one of he Google founders came on and talked about a load of weird stuff about replacing developers with AI so the internet could write itself, I think it was meant to be a joke. haha.

At the end we all got to goto a jazz bar across the road that Google had taken over and got free drinks so it was a good end to the day, shame we had to leave to catch the train back cause more free drinks would have been welcome.

Posted in Technology | 1 Comment »

Google Calendar Sync @ CeBIT 2007

Posted by 2000mph on March 22, 2007

Especially for CeBIT 2007 GooSync have a 1 Month Free referral bonus code. If you goto www.GooSync.com and register using the referral code “cebit7” then if you subscribe to the GooSync Advanced Account you will get 1 Month Free. Other wise you can just register and use GooSync regular account for Free.

Posted in Technology | 2 Comments »

Cebit 2007 – Hannover, Germany

Posted by 2000mph on March 20, 2007

Spent the last few days in Germany, Thursday to Sunday, attending the CeBIT electronic trade show. I managed to find a free wireless hotspot and post a blog entry while I was there but I thought I would write a full account of my trip here now.

Traveled to Berlin from East Midlands Airport on Thursday evening.My first time on a budget airline and I have to say it wasn’t that bad, I got a seat and the plane didn’t fall apart so that was all good, but I haven’t been on many planes so can’t really compare it to anything better.

Our Hotel was a 1 and a half hours from Berlin and a further 1 and a half hours to Hannover, which meant a lot of driving, but since I wasn’t the one doing the driving that didn’t bother me.

CeBIT was great, it was massive for a start. We had a look around hundreads of stands for a multitude of different companies. We managed to talk to a lot of companies in a mobile sector and get a few good contacts. I did my best to promote www.GooSync.com as much as I could and managed to hand out a good number of business cards while I was there.

Of general interest there was some good stuff about Augmented Reality systems in the future technology hall.
(How Augmented Reality Works) There was a face recognition system that would pick out a face from a video image and display on screen that persons mood. There was also a system that displayed a 3D bird on a live video feed that you could interact with. A Camera was set up facing a blank space of floor, a screen showed the live video of this blank floor, the augmented reality 3D bird was then shown standing on the floor on the screen. If you placed a blank piece of paper in front of the camera on the screen the bird would jump up onto the paper. It looked great.

I got a few pictures of the event and so did some of the guys I went with, I will upload them to Flickr when I get a chance. On the last day we traveled back to Berlin and stopped by the Autostadt in Wolfsburg (Autostadt) which is a visitors museum and visitor centre for the VW factory. It was amazing, it has a regular museum full of old cars and then each of the comapnies in the VW group, Audi, Skoda, Lamborghini, Bentley and VW all had their own building with different attractions in them like the Light and Laser show for Lamborghini and the 360 degree cinema for VW. If you ever go to Germany I recommend you stop in at the AutoStadt you’ll have a great day.

We traveled back home on Sunday night, I got back to my flat about 1am. But I’m back at work now and chasing up some of the leads we got while at the show. Maybe I’ll get to go again next year, it would be nice.

Posted in Technology, Travel | Leave a Comment »

CeBIT 2007 – Day 1

Posted by 2000mph on March 17, 2007

I,m in Hannover in Germany at the CeBIT technology exhibition with my company, Toffa International, trying to promote our new product, GooSync.

The first day here was the Friday, it was busy but not crazy. It really is the biggest show ever, 26 halls all with hundrea of companies showing their stuff.

Most of the first day we managed to speak with a lot of small/medium sized businesses. We tried the big ones too, Samsung etc.. but they are too big to be bothered. Looking around we have seen some neat stuff. A few stands showing augmentedality systems that we very impressive. Samsungs new music player/phone was worth a look too.

Just two more days here and were heading back home, still a lot more to see before then.

MPH.

Posted in Technology | Leave a Comment »