Archive for the ‘Computer Stuff’ Category

SQL JOIN: inner and outer

When joining two tables in an SQL statement, there are two options. You can use an inner join, or you can use an outer join. Let’s see what the differences are. Share this:EmailFacebookSharePrintRedditStumbleUponDigg

Read the rest of this entry »

Multiple SSH/SCP invocations

In writing shell scripts sometimes you want to be able to execute several SSH or SCP commands in a row. Unless you have set up authorised keys on the server, each one of the commands executed in the script will require that the user enter their password for the connection to be established. Or you [...]

Read the rest of this entry »

Remove all subversion info from a working copy

If you want to make a plain directory out of a working copy, you could use the svn export command and then delete the working copy. But if you’re running under a *NIX system with a bash shell, it might be quicker to just go find . -name ".svn" -type d -exec rm -Rf {} [...]

Read the rest of this entry »

Objective-C load and initialize

These two static methods of an ObjC class allow you to run initialization logic where you can set up any static state. Both methods are only invoked if implemented and do not need to be declared in the interface of your classes. The differences between them are as follows: In an application, or in a [...]

Read the rest of this entry »

Mail and Calendar in Android apps

While there isn’t a dedicated API in the Android SDK for sending email messages or adding events to a user’s calendar, there is a way to perform either task using specially constructed intents. Share this:EmailFacebookSharePrintRedditStumbleUponDigg

Read the rest of this entry »

Ports and processes in Ubuntu

This command will show what processes are currently listening on what ports on your Ubuntu box: sudo netstat -lntp If you have installed nmap (sudo apt-get install nmap), you could also run sudo nmap -A -T4 localhost to try and find out the name and version of the services running on each port. The output [...]

Read the rest of this entry »

Custom configuration for Plesk domains

If you ever change your web server configuration files under Plesk manually, your changes will be overwritten the next time you use the administration console and apply any settings through it. This can be solved by adding a configuration file to your domain config folder /var/www/vhosts/<yourdomain.com>/conf/vhost.conf or subdomain config folder /var/www/vhosts/<yourdomain.com>/subdomains/<subdomain>/conf/vhost.conf depending on which element [...]

Read the rest of this entry »

iPhone apps and device language setting

Though it is possible and even relatively easy to create an iPhone app that uses a different language to the one set in the device settings, the feature is not very well documented and it can take a while to work out how to use it properly. Share this:EmailFacebookSharePrintRedditStumbleUponDigg

Read the rest of this entry »

Redeem an AppStore coupon from outside the US

DEC 2010 UPDATE: This article is now obsolete. Apple changed their policy and promo codes can now be redeemed in any App Store worldwide If you have received an AppStore coupon for an iPhone/iPad/iPod Touch application, you will only be able to download your free product if your account is based in the United States. [...]

Read the rest of this entry »

Custom SQLite build and iPad

I have built my own SQLite3 library in order to enable support for full text search for my iDEX app, I compiled and tested on iPhone (iOS 3 and 4) with no problem, but then I switched to the iPad target of the same project under iOS 3.2, where the application would crash as soon [...]

Read the rest of this entry »