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. (more…)
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. (more…)
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 can use a nice feature of SSH whereby you open a “master connection”. The master connection passes your user’s credentials to the server and then allows several “slave connections” to perform operations through itself without the need for reauthenticating. (more…)
FreeAgent Central is a great online application that keeps accounts in order for freelancers and small businesses. If you use a referral code, both you and the referrer get a 10% discount. I have been using FAC for the past two years and am greatly satisfied with it. If you want to use it too, use my referral code and we can both benefit
My Referral Code:
Or follow this link:
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 {} \;
inside the top level folder of your working copy. This goes through every subfolder of your working copy and gets rid of the .svn directory that makes your files a subversion working copy.
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:
+load() method is executed before the main(). In a loadable bundle, that same method is executed during the loading process. Instead, the +initialize() method is executed lazily before the first use of the class it belongs to.+load() method is executed, so if using any autoreleased objects you will have set one up yourselves. The +initialize() method runs in the same context as the first call you make to the enclosing class, so there will most likely be an autorelease pool present.+load() method is executed so early, you have to be careful because not all classes you rely on might have been loaded. All frameworks you link to are guaranteed to be loaded first, though, so you can rely on the classes they define. No such concern is necessary when using classes from within the +initialize() method.+initialize() method), when redefining a +load() method in a category, you will end up with all defined loaders being executed when an application starts or a bundle is loaded.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. (more…)
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
The output of netstat above will give you the number of the process (pid) as well as the name. You can then use
sudo ps -f -p
to find out more about the process (for example the command line arguments passed to it) and this
sudo kill -9
to kill the process brutally (if you have no other means) and release the port in question.
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 you need to apply custom configuration to.
In order to make these files effective, you need to run a Plesk command that will detect the presence of the new files and include them in your domain’s main config file (they are not by default). You can do this at the specific domain level
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=<yourdomain.com>
or just reload all domain configurations at once
/usr/local/psa/admin/bin/websrvmng -a
You can now safely keep on using the Plesk administration console and be sure that your custom configurations will not be overwritten or affected in any way. This information definitely applies to Plesk 8.2 where it has been tested, but should work equally well on previous and possibly later versions.
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. (more…)
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. Here’s a few simple steps you have to follow in order to access your goods, regardless of where you are… (more…)