After having to repeatedly enable it on a couple of my laptops, I decided to back up the 3 steps for future use. Step 1: /etc/apache2/users/username.conf
Options Indexes MultiViews FollowSymLinks
Allow from all
Step 2: /etc/apache2/httpd.conf
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
Deny from all
Options Indexes FollowSymLinks MultiViews
Allow from all
Step 3: Restart apache
Read more →
After the upgrade to XCode 4.3 on Mac OS X Mountain Lion, you might have just realised that XCode no longer includes the GNU Autoconf, Automake and Libtool build tools used by most open source projects to generate makefiles and dynamic libraries. You could install via MacPorts or Brew, or just get the latest versions directly with the simple commands… Read more →
Here’s an excellent presentation by Pete Goodliffe that all developers should read. Beautiful. Read more →
Running mysql commands on the shell is pretty simple. However, things can get tricky if you need to enclose variables within those aprostophes in your script. Spend some time trying to figure this out. The short sample code below shows how it can be done. Note the cats on “echo $1“. Hope this helps you as well.
mysql -u $mysql_user -p$mysql_pass -e "`echo $1`"
do_mysql "drop database $dbname; \g"
Read more →
There are a couple of ways to obtain a bitmap image from a visible view object. However, its a bit more tricky to obtain the bitmap from invisible (or hidden) views. 1. Obtaining bitmaps from visible views The first approach would be to use the drawing cache of the view class (recommended). Note that while v.getDrawingCache() would provide the actual… Read more →
In C#, it is easy to confuse hiding with overriding. Both are ways to change the implementation of elements from a base class. But there are some significant differences between the two. A further confusion steps in with the term shadowing. Shadowing is a VB concept. In C#, this concept is called hiding, though there is a subtle difference between… Read more →
Here’s a pretty good tutorial on hashtable / dictionaries. Found it while studying some performance issues between the use of try/catch vs contains key for a dictionary with about 200,000 key/value associations. Read more →
Threading is fun, because with it you can do a lot more stuff at the same time. For example, keeping your UI updated while your background tasks are running. C# supports parallel execution of code through multi-threading. A thread is an independent execution path, able to run simultaneously with other threads. Here, we examine three simple C# approaches to help… Read more →
In Visual Studio 2005, references to the System.Data and System.Xml are automatically added when new class files are created. This happens even when you do not use Data or Xml at all. Why should you always manually remove these references from your project after adding new classes? Time to remove them permanently. Read more →
When trying to nest usercontrols, the child usercontrol sometimes disappears off the parent usercontrol. This is a commonly reported bug on the internet, and there’s a hotfix FIX:#842706 for vs2003 but not for vs2005, and its extremely annoying. What happens is that after placing the MyControl on your MyForm.designer.cs, it just disappears when you save MyParentControl in wysiwyg mode.
For me, the problem occurs because the Component Designer auto-validates & re-generates your MyParentControl.designer.cs code again. And, if your MyControl constructor requires initializing parameters, vs2005 will just delete that instantiation in MyParentControl.designer.cs. Read more →