Creating In-App Purchases in iOS 7
In this 7-part series I’ll show you how to create an In-App Purchase in iOS 7 with Xcode 5.1. The course will run you through everything from setting up your product in iTunes Connect, creating a custom shop class for easy re-use, making “first contact” with the App Store and how to deal with its responses. These are Parts 1+2 which are free to watch. You can see the rest of the course here: http://pinkstone.co.uk/creating-an-in-app-purchase-in-ios-7-and-xcode-5-1/
read moreHow to listen to your Commodore Datasette
Did you know that there’s a way to “listen” to a Datasette Drive, even though it’s not meant to play back the latest top twenty mixtapes? I’ve recently acquired a Commodore Plus/4 with 1531 Datasette. I remember having one of those in the eighties (with an adaptor to connect it to my C64 back then). The datasette is misbehaving, allegedly saving programmes but never loading them back in. Power is working fine, but as I no longer have a “cassette player” as such, I have no idea if it’s actually...
read moreHow to use ZoomFloppy
ZoomFloppy is an ingenious contraption by Nate Lawson which lets you connect real Commodore disk drives via USB to modern computers. It allows you to read and write old floppy disks from drives like the 1541, 1571, 1581 and several others. ZoomFloppy itself is a board with a USB connector (which also acts as the link to the modern machine), and a Commodore serial type connector (the standard cable used to connect a 1541 to a C64 for example). An optional parallel cable can also be attached which allows to transfer data faster and from copy...
read moreHow to use a Popover on iPad
In this series I’ll show you how to create Popovers on iPad. They’re fairly easy to create once you get the hang of the inner workings of the UIPopoverController. I’ll show you how to create basic Popover in code and in your Storyboard, and we’ll discuss how you can retrieve data from a Popover when it’s dismissed. We’ll do this with a simple UIDatePicker. In the last video I’ll demonstrate how you can pick images from the camera roll using the UImagePickerController with a Popover – which is...
read moreHow to load and save binary data on the C128 and Plus/4
Thanks to BASIC 7.0′s powerful commands we can load and save arbitrary sections of memory to disk using BLOAD and BSAVE. This was useful for dealing with machine code as well as raw image data. Both commands work on the C128 and Plus/4, but sadly the C64 was lacking in this area. BLOAD and BSAVE work much like DLOAD and DSAVE with the addition that you can specify a section of memory – like this: // save contents of the 40 column display BSAVE "FILENAME", P1024 TO P2023 // save the contents of hi-res graphics and colour...
read moreHow to change a UIStoryboard from iPhone to iPad in Xcode 5
In this screencast I’ll show you how to make an iPhone storyboard display as an iPad storyboard in Xcode 5.1′s Interface Builder. Under the hood a UIStoryboard is just an XML file, and with a small tweak we can make Xcode display it like an iPad or an iPhone. This is a good strategy if you’d like to use your iPhone storyboard as a starting point for an iPad version. You can read my full article on my iOS Dev Diary: http://pinkstone.co.uk/how-to-convert-your-iphone-storyboard-into-an-ipad-storyboard/
read moreHow to set the time on your Commodore C64 / C128
Did you know that the Commodore computers had a built-in clock? It wasn’t an exact science, and it didn’t show the date, but it was able to display a 24hr clock. It did this by counting how many seconds your machine was switched on, accessible in two variables TI and TI$ (short for TIME). TI$ is a string value in the format HHMMss, counting seconds. 112347 would mean 11:23am and 47 seconds. TI$ will be 000000 when you switch on the system. You can set it just like any other variable to set the time: TI$ = "094500" TI...
read moreHow to find and replace in MySQL
Sometimes you need to change some text in a MySQL table. For example, imagine you want to correct a spelling mistake or a reference in all your WordPress posts without having to change them one by one. Here’s how to do it with a raw SQL command. This works only on a single table – repeat this for each table: update `wp_posts` set `post_content` = replace(post_content, 'Old Text', 'New Text') Note the use of standard ticks and back ticks here. First we’ll select the table in question (in this case...
read moreHow to avoid 500 Internal Server Errors when using the WordPress Importer
I’ve used the WordPress Importer on many occasions – most of which gave me more grief than results. Usually I end up with a white screen telling me that there was an “Internal Server Error”. It basically means that something went wrong, but nobody knows what it was – and there is no way to find out. While entertaining ideas of finding another hobby, I searched the web one last time to sift through the hundreds of posts by other users sharing the same woes – until I came across this forum post by Anon who...
read moreHow to swap the post title and date in P2
I’ve just posted this tweak in the WordPress P2 forum to help a user and thought I’d add it here too before I forget what I did. To swap the post title and date in P2 we’ll first grab a reference to each element, then we move one up and the other down. Like so: /* swap post title and date */ #main h4 { margin-top: 30px; margin-bottom: 15px; } #main .postcontent h2 { margin-top: -65px; } Note that the date line does not have a selector for the author, so it’s difficult to remove it if that’s required. You can...
read more