define('DISALLOW_FILE_EDIT', true); define('DISALLOW_FILE_MODS', true); Blog | WP Hosting

Blog

How to embed YouTube and Vimeo videos in WordPress

Posted by on 12:35 pm in Knowledge Base | Comments Off on How to embed YouTube and Vimeo videos in WordPress

In this screencast I’ll show you how to embed YouTube and Vimeo videos into your WordPress posts. There’s no need to copy and paste code snippets and position them anymore, thanks to a technology called oEmbed (sometimes called auto embed). WordPress parses the URL to your videos and adds the code needed to display those automatically – it even adjusts the width (if supported by your theme). oEmbed works with a variety of services, and while I’m at it I’ll show you how to embed items from YouTube, Vimeo, Flickr...

read more

How to switch between upper/lower case and PETSCII fonts on a C64

Posted by on 7:57 pm in Knowledge Base | Comments Off on How to switch between upper/lower case and PETSCII fonts on a C64

The C64 can display two sets of fonts: either a combination of upper case and lower case letters (good for any kind of text), or a combination of upper case letters and graphics (default), known as PETSCII characters. In direct mode you can switch between the two by pressing CBM+SHIFT (i.e. The Commodore Key and SHIFT together). But that’s no good when you’re app starts – you can’t expect the user to press that combination to see the correct letters on the screen (or that horrible combination of text and weird...

read more

How to set the text and background colour on a C64

Posted by on 7:23 pm in Knowledge Base | Comments Off on How to set the text and background colour on a C64

To set the background colour on your beloved old C64 (and C128 in 40 column mode) you have to POKE the colour value into two registers, one for the background and one for the border. The poor little guy only had 16 colour values, 0 for black, 1 for white, etc. To change the background to black: poke 53280,0 (for the background) poke 53281,0 (for the border) Likewise you can read the current background colour out using PEEK: bg = peek (53280) br = peek (53281) The text colour has to be set before any text is written. You can do this either by...

read more

Reading and Writing Sequential Data on the Commodore 1541

Posted by on 1:17 pm in Knowledge Base | Comments Off on Reading and Writing Sequential Data on the Commodore 1541

Sometimes it’s helpful to store large amounts of data on the disk rather than keep in it memory. Consider adventure games for example: you could add room descriptions to your listing and later read it into memory – but this would double the amount of memory you really need to keep the data. Since there’s only 64KB available on a C64 that’s not smart – given that you have another 170KB sitting there next to the breadbox. The 1541 supported reading and writing “sequential data”. It means that rather...

read more

Commodore 1541 DOS Commands

Posted by on 11:24 am in Knowledge Base | Comments Off on Commodore 1541 DOS Commands

The 1541 Floppy Drive was equipped with its own MOS 6502 chip and was therefore capable of understanding and executing its own commands (to format the disk, copy files, erase files, etc). The idea was that it could operate autonomously without the attached C64 to get involved – revolutionary at the time. They were called CBM DOS commands – indeed as in Disk Operating System, not to be confused with the later MS-DOS or DR-DOS. Those DOS commands were not part of BASIC and had to be sent to the drive with a dedicated channel. In...

read more

Commodore 1541 Disk Drive BASIC Commands

Posted by on 4:45 pm in Knowledge Base | Comments Off on Commodore 1541 Disk Drive BASIC Commands

I must admit it’s been a while since I’ve loaded files from a C64 and the 1541 Floppy Drive – let alone save programs back to disk. Here’s a quick reference how we did things 30 years ago: Opening Files The C64 BASIC v2 did not have built-in commands for talking to the drive. Instead, we used the standard LOAD command to bring things into memory, appending the disk drive number (which was 8 by default). If you don’t specify the drive number the system assumes “1″ which is the Datasette (tape drive)...

read more

How to populate an NSTableView in Code

Posted by on 11:11 am in Knowledge Base | Comments Off on How to populate an NSTableView in Code

In this screencast I’ll show you how to power an NSTableView using code. I’m referencing this article for code snippets and details: http://pinkstone.co.uk/how-to-populate-an-nstableview-in-code/ I’ve also made a “no-code” version on how to populate an NSTableView using an Array Controler and Cocoa Bindings here: http://pinkstone.co.uk/how-to-bind-an-nsarraycontroller-to-an-nstableview/ Enjoy!

read more

How to bind an Array Controller to a Table View with Cocoa Bindings

Posted by on 11:07 am in Knowledge Base | Comments Off on How to bind an Array Controller to a Table View with Cocoa Bindings

In this screencast I will show you how to bind a Table View to an Array Controller in Cocoa, using Xcode 5.1 and OS X Mavericks. We’re using Core Data to save our entries and – check it out – we’re not writing a single line of code! Cocoa Bindings is one of the most exciting features in OS X development for me, and I hope that one day it’ll find its way into iOS too. The project is also available on GitHub: https://github.com/versluis/Bindings-Demo I’ve written more about how to do this here:...

read more

How to Tear Down your Core Data Stack in iOS

Posted by on 10:01 am in Knowledge Base | Comments Off on How to Tear Down your Core Data Stack in iOS

In this screencast I will show you how to tear down your Core Data Stack. Documentation on this topic is a little sketchy to say the least. We’ll create a new Master/Detail app and implement a button that will remove the store file and reset the entire stack – without nasty error messages or app crashes. The app will work on iOS 7.1 and iOS 6. I’m using Xcode 5.1 in this demo. The principles of course apply just as much to Mac Development. You can read more in my companion article here:...

read more

How to fix JetPack 3.0 Sharing Icons in P2

Posted by on 10:30 pm in Knowledge Base | Comments Off on How to fix JetPack 3.0 Sharing Icons in P2

JetPack 3.0 was released yesterday and it had quite a facelift: a new menu structure, dozens of graphical tweaks and a new set of Social Icons for sharing your posts. Those work well out of the box in TwentyThirteen and TwentyFourteen – but not in P2. Here’s how we can fix the problem. First let me show you what we’re actually fixing here. In JetPack 2.9.3 and before the social sharing icons at the bottom of a post looked like this: After you upgrade to JetPack 3.0, and if you’re running P2, then those icons are...

read more