- Create an AAC format copy of the original song (we'll call this x) - right click on the song and select "Create ACC version" (you might need to change your recording settings first)
- Change the start/finish times of x but make sure it's length doesn't exceed 40 seconds - right click on the song and select "Get Info", then go to the "Options" tab
- Create an AAC format copy of x - this version will be a lot smaller in size. (we'll call this y)
- Navigate to y's physical location (e.g. "C:\Music\Song.m4a") - right click on the song and select "Show in Windows Explorer"
- Rename the file and change it's extension to m4r (e.g. "Song.m4r") - right click on the file and select "Rename"
- Drag the file (or import) into iTunes and it should go into the Ringtones section - if you can't see a Ringtones section, go to Edit > Preferences > General and make sure the check box is selected for "Ringtones"
- Finally, sync your iPhone but make sure it has been setup to sync ringtones - click on the your iPhone (under "Devices") and go to the "Ringtones" tab
Thursday, 25 September 2008
iPhone ringtones
The following guide is for creating custom iPhone ringtones using iTunes. Some instructions might be specfic to Windows but the same principles apply to other operating systems.
Sunday, 7 September 2008
The hyperlink trailing slash
When creating hyperlinks to a folder resource, always trail with a forward a slash.
Any reqeusts for the URL without a trailing slash will hit the server and a 301 redirect will be returned to the URL with a trailing slash. This is because the server thinks that "test" is a file and tries to locate it. After searching, it realises that the request was actually for a folder called "test"; therefore it's response informs the client of the correct URL (with a trailing slash).
It makes sense to include the trailing slash to speed up your website and reduce the load on the server. It doesn't make that much difference for root domains but it's good practice anyway:
http://andrewgunn.blogspot.com/test (slower)
Vs
http://andrewgunn.blogspot.com/test/ (faster)
Any reqeusts for the URL without a trailing slash will hit the server and a 301 redirect will be returned to the URL with a trailing slash. This is because the server thinks that "test" is a file and tries to locate it. After searching, it realises that the request was actually for a folder called "test"; therefore it's response informs the client of the correct URL (with a trailing slash).
It makes sense to include the trailing slash to speed up your website and reduce the load on the server. It doesn't make that much difference for root domains but it's good practice anyway:
http://andrewgunn.blogspot.com
Vs
http://andrewgunn.blogspot.com/
The C# ?? (null coalescing) operator
The ?? operator checks whether the value on the left side of the expression is null, and if so it returns an alternate value on the right side of the expression. If the value on the left side of the expression isn't null, it returns the original value.
Example 1:
Example 2:
Example 1:
string input = null;
string output = input ?? "Input is null";
// Outcome: ouput == "Input is null".
Example 2:
string input = "Hello World";
string output = input ?? "Input is null";
// Outcome: ouput == "Hello World".
Wednesday, 3 September 2008
JavaScript - Anchor popups
If JavaScript is disabled, the user will be redirected to whatever is in the href attribute in a new frame. If JavaScript is enabled, a new window will open with the same content but the parent window will stay at it's current location.
JavaScript:
HTML:
The morale of the story is always have a backup for users with JavaScript disabled.
JavaScript:
function Popup( url, height, width )
{
var windowProperties = "toolbar = 0, scrollbars = 1, location = 0, statusbar = 0, menubar = 0, resizable = 1, width = " + width + ", height = " + height + ", left = 50, top = 50";
return window.open( url, "", windowProperties );
}
HTML:
<a href="http://www.google.com/" onclick="javascript:Popup( 'http://www.google.com/', 600, 600 ); return false;" target="_blank">Test</a>
The morale of the story is always have a backup for users with JavaScript disabled.
Subscribe to:
Posts (Atom)