Posts

WPF 4 Lowers Default BitmapScalingMode Quality


Posted in:

If you've recently upgraded a .NET 3.5 WPF application to .NET 4.0, you may have noticed that some of your images look like crap. This is because Microsoft has changed how WPF rescales images. Instead of the original high quality, it has been lowered to low quality. This was done, they say, to improve performance.

Read More Icon Read More

Creating a Javascript Bookmarklet


Posted in:

For nearly all problems there are probably a hundred different solutions. Recently one solution I have chosen for a few problems has been a Javascript bookmarklet. A bookmarklet is a regular bookmark that runs a bit of Javascript code instead of just going to a link. They are really useful for doing a small task on a website or webpage that you don't have direct access to the backend or source of. So, today I am going to show you how to make a simple bookmarklet.

Read More Icon Read More

How to Build a Simple Twitter Client using Python


Posted in:

Building a Twitter client is nothing new to Switch On The Code. We've done it in WCF and Silverlight. To be honest though, using the Twitter API is a great way to exercise two very useful parts of a language and framework - making web requests and parsing XML. That's what we're going to do today. We're going to build a very simple command line twitter client (read-only) using Python.

Read More Icon Read More

Flex & Actionscript Singleton Model Class


Posted in:

In many of the projects and applications I build with Flex I use a singleton for the Model - we've talked about Singletons in the past here. Whether this is the preferred method of handling a model is a matter of opinion so I won't be discussing it. However, I do want to share the model class that I typically use. Actionscript lacks a real static constructor, used for creating a single instance of a class, which means creating a nice singleton takes a bit more work.

Read More Icon Read More

Running a Method After A Delay on iPhone or Mac


Posted in:

In nearly every programming language there is a way to delay a method call. Objective-C is no different. They have built in a few simple methods to achieve this. We are going take a look at one of these methods today, all which reside in NSObject. This means any class you create will have the ability to call these methods. The method we are going to take a gander at is - (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay, got the love the Objective-C method names.

Read More Icon Read More

Python Tutorial - Batch Image Resizing


Posted in:

Every once and a while I come across a simple task that deserves a script. Instead of using a language I know, this is often a great opportunity to pick up a new language or get a refresher on one I haven't used in a long time. In this case, I needed to resize an entire directory of images. There are tons of free tools out there to do this, but where's the fun in that? Also, I could have whipped this tool up very quickly in a language I know, like C#, however I haven't used Python in several years and I decided it was time for a refresher.

Read More Icon Read More

Installing and Running Google Go on Mac OS X


Posted in:

A while ago Google gave us a brand new language, Go. In the last couple of years I really haven't heard much about it, but I decided to finally install it and give it a try. This tutorial will guide you step-by-step on how to install Google Go and start writing your own applications.

Read More Icon Read More

Using Doc Raptor to create Excel Spreadsheets


Posted in:

Remember back many moons ago when we posted a previous tutorial about Excel document creation? Specifically, this one. It worked, but if you take a look at it again, that code was painful. And ugly. And required hooking up ruby with a Java library called JExcelAPI using RJB - which, really, is not something anyone actually wants to do. So today we are going to take a look at something else (that I think) is a lot nicer/cleaner for Excel document generation: a new web service specifically for document creation called Doc Raptor.

Read More Icon Read More

Creating a Roulette Wheel Using HTML5 Canvas


Posted in:

HTML5 is really hot all over the web right now so I figured I would drop some HTML5 knowledge on y'all. I have worked with Flash and Flex consistently for the last few years so I can easily drop and manipulate graphics in it, but I haven't done much with HTML5. This lead me to try and challenge myself to recreate something I built in Flash in HTML5. That is what we are going to look at and learn to build in this tutorial.

Read More Icon Read More

Taking a Dive into HTML5 - Web Storage


Posted in:

HTML5 is getting a lot of attention these days - especially when it comes to video. This tutorial is going to cover a feature added to HTML5 that I don't think is getting enough attention - web storage.

Read More Icon Read More

In The News

Tutorials Around The Web