<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2682512101871425755</id><updated>2012-02-15T06:10:14.303+01:00</updated><category term='ruby'/><category term='javascript'/><category term='soap'/><category term='java'/><category term='mysql'/><category term='gtug'/><category term='php'/><category term='maths'/><category term='os x'/><category term='django'/><category term='flex'/><category term='vtk'/><category term='netbeans'/><category term='c#'/><category term='rest'/><category term='android'/><category term='iphone'/><category term='jobs'/><category term='webkit'/><category term='python'/><category term='ssl'/><category term='windows'/><category term='.net'/><category term='webapp'/><category term='c++'/><category term='touch'/><category term='web design'/><category term='gesture'/><title type='text'>Back To The Code</title><subtitle type='html'>Page to combat my code-amnesia</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-8970064437822998877</id><published>2010-05-25T22:01:00.002+02:00</published><updated>2010-05-25T22:01:50.450+02:00</updated><title type='text'>Moved</title><content type='html'>This blog has moved to &lt;a href="http://m14i.wordpress.com/"&gt;m14i.wordpress.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-8970064437822998877?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/8970064437822998877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=8970064437822998877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/8970064437822998877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/8970064437822998877'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2010/05/moved.html' title='Moved'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-3884394761025674637</id><published>2010-05-07T00:07:00.001+02:00</published><updated>2010-05-08T13:18:54.764+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gtug'/><title type='text'>GTUG Stockholm May meeing</title><content type='html'>I just came back from GTUG May meeting, my first GTUG meeting ever, and I got to give a presentation on web applications for iPhone and Android.&lt;br /&gt;
&lt;br /&gt;
GTUG is hosted by what can be described as one of the jolliest and friendliest developers I’ve ever met, Peter Svensson. We all met up at Ottoboni, located near Skanstull, enough seating for around 60 people. A great view towards Globen and a selection of Subway sandwiches lay on the tables unwrapped and ready to be enjoyed along with a liberal amount of white bag-in-box (or cask: whichever wording you prefer) of white wine.&lt;br /&gt;
&lt;br /&gt;
The first speaker was Tom Blackmore, famous for his work at Hitta.Se and an expert when it comes to GIS (geographical information systems). Tom talked about how one can create a relationship between raw data and locations. He went on further to explain how Googles geolocation API worked by showing examples of coordinate look-up queries for addresses as well as reverse look-ups, i.e., getting the street name from a GPS location.&lt;br /&gt;
&lt;br /&gt;
And then it was my turn. My stunning new MacBook Pro was eager to show the world how well it could render PDF formatted slide shows and wow the world with its aesthetic beauty. However, it turned out that I had an incompatibility issue with one of my VGA adapter cables and was forced to use Tom’s computer. Being all brainy and all I backed up everything to a USB memory stick, physical paper as well as Dropbox.&lt;br /&gt;
&lt;br /&gt;
So finally I began my presentation and, in what seemed mere seconds, I was already done. During these seconds of Michael-is-talking-now time, over 40 minutes of real time had elapsed. I came, presented, and felt like a mini rock star amongst like-minded people.&lt;br /&gt;
&lt;br /&gt;
Next up was Justus Thorvaldsson, a young KTH:are giving a talk on GWT and how they used it to create RiskIt, an online game based on the same principles as the classic game of Risk. To end it all, a summary was given on the results of the Android Hackathon that took place on the 1st of May.&lt;br /&gt;
&lt;br /&gt;
The end was nigh and the night was young. A bit of mingling and a beer at a random pub near Skanstull with some friendly GTUG:ians. See you all next time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-3884394761025674637?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/3884394761025674637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=3884394761025674637' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/3884394761025674637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/3884394761025674637'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2010/05/gtug-stockholm-may-meeing.html' title='GTUG Stockholm May meeing'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-410297368725373641</id><published>2010-04-01T09:59:00.044+02:00</published><updated>2010-05-05T13:08:38.843+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Similarities and Differences between Java and C#</title><content type='html'>&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;You're a Java developer about to embark on a C#.NET project or a C#.NET developer about to start work on some Java code or you're just curious about the differences between these two platforms. Whatever the case may be, fear not the new, because in this case, you will see that these languages have a lot in common.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In a sense, C# feels like the bastard child of Java and C++ and somehow even Python managed to get in on the action (&lt;i&gt;yield &lt;/i&gt;and dynamic variables). As mentioned on the wiki page, C# began its life as an extension of Java designed by Microsoft. But Sun disagreed with Microsoft's design suggestion as Sun felt that they went against Java's philosophy of keeping things simple. Thus C# was born and this is the reason why there is so much of an overlap between Java and C#. Being a new language, it had the advantage being able to adapt to the wants and needs of developers to include many new programming aspects such as lambda expressions and dynamic variables.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Namespace and Package&lt;/h4&gt;In Java, one is forced to map the &lt;i&gt;package &lt;/i&gt;structure to the file structure. This isn't the case in C# where &lt;i&gt;namespace &lt;/i&gt;acts pretty much like namespace in C++ and you can have your C# files wherever you want as long as they are in the project path. In Java, one writes &lt;i&gt;import &lt;/i&gt;to include functionality while in C# one would write &lt;i&gt;using&lt;/i&gt;.&lt;br /&gt;
&lt;b&gt;The Java Way &lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_WHIpNIQUVGA/S7NmlU7ZNOI/AAAAAAAAADU/zlLPrMbpzjo/s1600/import_using_j.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="136" src="http://4.bp.blogspot.com/_WHIpNIQUVGA/S7NmlU7ZNOI/AAAAAAAAADU/zlLPrMbpzjo/s200/import_using_j.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;The C# Way&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_WHIpNIQUVGA/S7NmtZvWscI/AAAAAAAAADc/m1GRWJGNLPY/s1600/import_using_cs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="193" src="http://1.bp.blogspot.com/_WHIpNIQUVGA/S7NmtZvWscI/AAAAAAAAADc/m1GRWJGNLPY/s200/import_using_cs.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;h4&gt;Naming Conventions&lt;/h4&gt;Anything that is public in C# is written in Pascal case, private member variables have an "_" (underscore) prefix followed by camel case, variables declared inside functions use camel case. In Java, you use Pascal case for class names and camel case for class members. This can be seen in the images above where I wrote some example code.&lt;br /&gt;
&lt;br /&gt;
Constants in most languages are represented using SCREAMING_CAPS, all uppercase with underscore separators. This is discouraged in C# but fine in Java. C# also suggests that developers use Hungarian notation for helping identify the type of the variable.&lt;br /&gt;
&lt;br /&gt;
Since C# doesn't distinguish between implementing an interface and extending a class, which is the case in Java, interface declarations have a "I" (capital i) prefix, such as IDisposable.&lt;br /&gt;
&lt;br /&gt;
At this stage you will have also noticed that C# uses C style block declarations where open curly brace is on a new line, while Java has the open curly brace on the same line as the expression or declaration, the exception in both cases being inline blocks.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;a href="http://en.wikibooks.org/wiki/C_Sharp_Programming/Naming"&gt;C# naming conventions&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;a href="http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html"&gt;Java naming conventions&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;h4&gt;Implementing Interfaces and Extending Classes&lt;/h4&gt;While Java uses the keywords &lt;i&gt;implements &lt;/i&gt;and &lt;i&gt;extends&lt;/i&gt;, C# uses the colon (:) to show that a class implements an interface or extends a class. C# syntax doesn't differentiate between the two whereas Java is strict about which keyword should be used.&lt;br /&gt;
&lt;b&gt;The Java Way&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_WHIpNIQUVGA/S7RRbodGMnI/AAAAAAAAADk/aqaFg5HWgFU/s1600/implement_extend_j.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="194" src="http://3.bp.blogspot.com/_WHIpNIQUVGA/S7RRbodGMnI/AAAAAAAAADk/aqaFg5HWgFU/s200/implement_extend_j.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The C# Way&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_WHIpNIQUVGA/S7RRg7PiyKI/AAAAAAAAADs/Uf2eux5RIns/s1600/implement_extend_cs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/_WHIpNIQUVGA/S7RRg7PiyKI/AAAAAAAAADs/Uf2eux5RIns/s200/implement_extend_cs.png" width="145" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;h4&gt;Getters and Setters&lt;/h4&gt;You will have already noticed that Java uses a naming convention for declaring getters and setters while C# uses the keywords &lt;i&gt;get &lt;/i&gt;and &lt;i&gt;set&lt;/i&gt;. In C#, variables that are accessed via accessors are properties and are accessed using conventional dot notation, much like a public variable in Java. In Java, many frameworks make use of the naming convention to simplify accessing variables via getters and setters, such as Javas expression language used in JSP's.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Primitives&lt;/h4&gt;C# implements string as a primitive whereas Java implements String as an object. Generally, Java has a class definition of all primitives such as int and Integer, this is not the case for C# where a primitive is the class. Thus, in Java you would write&lt;br /&gt;
&lt;pre class="prettyprint"&gt;int i = Integer.parseInt("2");&lt;/pre&gt;and in C#&lt;br /&gt;
&lt;pre class="prettyprint"&gt;int i = int.Parse("2");&lt;/pre&gt;This also means that you can use primitives in generics freely, which is not the case for Java generics where you are required to use an object instead.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;C# specialties&lt;/h4&gt;C# is a gigantic language when compared to Java which is a much more compact language but used for similar tasks as C#. C# has a plethora of keywords that have a slightly different name than in Java or non-existent in Java, such as &lt;i&gt;ref &lt;/i&gt;and &lt;i&gt;out&lt;/i&gt;. For a detailed keyword comparison, follow &lt;a href="http://www.25hoursaday.com/CsharpVsJava.html#keyword"&gt;this&lt;/a&gt;&amp;nbsp;link.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;For Java Developers&lt;/h4&gt;If you're new to C#, make&amp;nbsp;absolutely&amp;nbsp;sure that you familiarize yourself with linq and lambda expressions. These are two very powerful C# features, one could say a killer-app for C# that makes for very elegant solutions. Also, the use of implicitly typed variables using the keyword &lt;i&gt;var.&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
For a very detailed comparison, check out the&amp;nbsp;Wikipedia&amp;nbsp;link: &lt;a href="http://en.wikipedia.org/wiki/Comparison_of_Java_and_C_Sharp"&gt;comparison of Java and C#&lt;/a&gt;&amp;nbsp;as well as very &lt;a href="http://www.25hoursaday.com/CsharpVsJava.html"&gt;thorough analysis&lt;/a&gt; of the differences between the two languages&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-410297368725373641?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/410297368725373641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=410297368725373641' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/410297368725373641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/410297368725373641'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2010/04/similarities-and-differences-between.html' title='Similarities and Differences between Java and C#'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_WHIpNIQUVGA/S7NmlU7ZNOI/AAAAAAAAADU/zlLPrMbpzjo/s72-c/import_using_j.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-2065951074917159304</id><published>2010-02-28T18:31:00.002+01:00</published><updated>2010-02-28T18:36:39.931+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='os x'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Windows 7 x64 on Non-unibody MacBook Pro with OS X Leopard</title><content type='html'>Installing Windows 7 x64 on my MacBook Pro wasn't an "it just works" experience. It is only as of Boot Camp 3 that Apple supports the installation of Windows 7 on a Mac computer, this means that you have to do some minor hacking to be able to use the Boot Camp installation found on the OS X Leopard install disk.&lt;br /&gt;
&lt;br /&gt;
I created a partition by using Disk Utility in OS X and selected the Windows 7 DVD as the startup drive. I rebooted my computer and was greeted by a blank black screen with a blinking cursor.&lt;br /&gt;
&lt;br /&gt;
Searching the internet only led to more frustration as it seems that no solution was available. But in the end, I found a post at a forum where the poster describes how they were able to get around this problem. The solution was the following:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Turn off computer&lt;/li&gt;
&lt;li&gt;Remove battery&lt;/li&gt;
&lt;li&gt;Wait 20 seconds&lt;/li&gt;
&lt;li&gt;Insert battery&lt;/li&gt;
&lt;li&gt;Start computer&lt;/li&gt;
&lt;li&gt;et voila&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;Certainly a wtf moment. Never expected this to work, but it did and I was happy.&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The installation procedure was completely painless. I was able to use Windows 7 straight after the installation procedure. But, always a but, I wasn't able to install Boot Camp, instead I got an error: 2229 when I tried to launch the setup file.&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The problem was solved by using the instructions found &lt;a href="http://news.softpedia.com/news/Windows-7-on-a-Mac-Some-Say-it-Works-Some-Say-it-Doesn-039-t-101695.shtml"&gt;here&lt;/a&gt;. Basically, you open the BootCampe64.msi file with an msi editor such as &lt;a href="http://apps.instedit.com/"&gt;InstEd It!&lt;/a&gt;&amp;nbsp;and drop the LaunchCondition table. If it still doesn't work, try changing all references from VersionNT = 600 to VersionNT &amp;gt;= 600 in all the tables. VersionNT = 600 refers to Windows Vista while VersionNT &amp;gt;= is Windows Vista and above - Windows 7 has 610, I think.&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;So almost everything works now, except for sound. To get sound working, I had to&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Extract the RealTekSetup.exe file found on the OS X install disk in the Boot Camp/Drivers directory (do this with &lt;a href="http://www.7-zip.org/"&gt;7-Zip&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Open Control Panel -&amp;gt; System&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Expand the "Sound, video and game controllers" node and right click on the audio device item and chose update driver software&lt;/li&gt;
&lt;li&gt;Choose the folder that contains the files from the extracted RealTekSetup.exe file&lt;/li&gt;
&lt;li&gt;Windows found the files and installed the drivers without any problems&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;And now, as far as I can tell, everything really does work.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-2065951074917159304?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/2065951074917159304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=2065951074917159304' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/2065951074917159304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/2065951074917159304'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2010/02/windows-7-x64-on-non-unibody-macbook.html' title='Windows 7 x64 on Non-unibody MacBook Pro with OS X Leopard'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-4282880864284045235</id><published>2010-02-17T21:30:00.006+01:00</published><updated>2010-02-17T21:55:17.421+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Speeding Up Interaction by Cancelling Events</title><content type='html'>At my last project (I'm an IT-Consultant), I was helping fine-tune as well as bug fix the customers JavaScript based map application. One feature of the map application was that the user could interact with the map, i.e., pan around as well as zoom in, which would then trigger a search inside the given bounding box. A search executes an Ajax REST call to the search service, which can take up to around 500ms to respond, depending on the search criteria as well as the number of results found.&lt;br /&gt;
&lt;br /&gt;
The problem was that several searches could be queued within just a few milliseconds, thus resulting in several searches being executed back-to-back each taking around a half second to complete. Very frustrating for the user. Solving this problem proved to be quite easy - fact of the matter is that only the last search is of importance to the user, within a given time frame - say 300ms. This led to the implementation of a cancelling queue or what I call a null queue, i.e., all searches that are queued within less than 300ms of each other are subject to being cancelled, only the last search in the queue will be executed. This is a lot like a timeout for autocomplete.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;/**
 * Instantiate a NullQueue and set the threshold timeout value
 * to be used for nulling items in the queue.
 * 
 * @constructor
 * @param {Integer} threshold The timeout value
 */
function NullQueue(threshold) {
 
    this.threshold = threshold;
    this.queue = [];
    this.timerId = null;
 
}

/**
 * Push an item on to the queue. 
 * 
 * Every time an item is pushed on to the queue, the 
 * timeout is reset.
 * 
 * @param {Function} item Item to execute
 */
NullQueue.prototype.push = function(item){
 
    var me = this;
 
    me.queue.push(item);
 
    if (null !== me.timerId) {
        clearTimeout(me.timerId);
    }
 
    me.timerId = setTimeout(function(){
        me.process();
    }, me.threshold);
};


/**
 * Process the queue.
 * 
 * All items, except for the last item in the queue
 * are nulled. The last item is then executed.
 * 
 * @private
 */
NullQueue.prototype.process = function() {
 
    var me = this;
 
    var item = me.queue[me.queue.length - 1];
    me.queue = [];
 
    item.call();
};



/**
 * Test the NullQueue implementation
 * 
 * Move the mouse around inside the browser. Your current cursor
 * coordinates will be shown in an alert when you hold the cursor
 * still for 500ms.
 * 
 * @test
 */
function testNullQueue(){

    var testQueue = new NullQueue(500);
 
    document.addEventListener("mousemove", function(ev){
 
        testQueue.push(function(){
              alert("Mouse: x=" + ev.pageX + ", y=" + ev.pageY);
        });
  
    }, false);
}

testNullQueue();
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-4282880864284045235?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/4282880864284045235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=4282880864284045235' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/4282880864284045235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/4282880864284045235'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2010/02/speeding-up-interaction-by-cancelling.html' title='Speeding Up Interaction by Cancelling Events'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-8897925378138844677</id><published>2009-11-07T00:05:00.006+01:00</published><updated>2010-02-17T20:35:26.248+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='webkit'/><category scheme='http://www.blogger.com/atom/ns#' term='web design'/><category scheme='http://www.blogger.com/atom/ns#' term='webapp'/><title type='text'>The Funky Side of Webkit on iPod Touch</title><content type='html'>Here are some things that I noticed that make developing webapps a bit of a pain for webkit on iPod Touch. At this stage I'd like to mention that these problems occurred on a 2nd generation iPod Touch. The 3rd generation iPod Touch has a much more mature variation of webkit. Granted webkit (or Safari, whichever name you prefer) has functionality that goes way above and beyond what you would normally expect from a mobile based web browser - but there are aspects that remind me of what it can be like to develop for a browser that sometimes behaves in unexpected ways.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;css position: fixed&lt;/b&gt; doesn't work. instead you have to use a  &lt;a href="http://doctyper.com/archives/200808/fixed-positioning-on-mobile-safari/"&gt;work-around&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;css overflow:&lt;/b&gt; has lacking support meaning scrollbars do not appear when they are supposed to. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;innerHTML is strict&lt;/b&gt; which can be a bit of a double edged sword. Strict is good because it ensures that whatever you end up injecting is valid, at the same time, it makes it harder to cache something that you would like to inject later (like table elements).&lt;br /&gt;
&lt;br /&gt;
This property is usually the cause of &lt;code&gt;NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7&lt;/code&gt;. Check if all XML tags are closed, that child elements are within their correct parent elements and the proper use of HTML entities.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;innerHTML mangles ampersand (&amp;amp;).&lt;/b&gt;&amp;nbsp;This happens when I use XHR to load a remote document that contains links with a query string and try to inject it using the innerHTML property.&lt;br /&gt;
&lt;br /&gt;
A work-around is to use a different separator, like pipe "|". This also entails parsing the URL before it is processed by the service to convert | to &amp;amp; by using server-side filters for example.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Provides only a portion of a document for viewing. &lt;/b&gt;When scrolling through a long list, you'll notice that 'dead space' can appear before a portion is loaded into view. This can lead to JavaScript problems when functionality is linked to markup (like &lt;a href="http://backtothecode.blogspot.com/2009/11/automatic-pagination-infinite-list.html"&gt;this&lt;/a&gt; for example).  &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Graphical glitches &lt;/b&gt;can occur. This is probably linked to the overflow issue since I have a div with overflow hidden containing other divs with background images that are moved around (and outside) the container div. The images then break out from the container and intertwine with other elements on the page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-8897925378138844677?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/8897925378138844677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=8897925378138844677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/8897925378138844677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/8897925378138844677'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2009/11/funky-side-of-webkit-on-iphone.html' title='The Funky Side of Webkit on iPod Touch'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-7642837207249740832</id><published>2009-11-06T22:03:00.009+01:00</published><updated>2009-11-06T23:34:51.699+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='webkit'/><category scheme='http://www.blogger.com/atom/ns#' term='web design'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Automatic Pagination: The Infinite List using iUI and jQuery</title><content type='html'>Automatic pagination means that we progressively load in new data without the user having to actively click on a page link. This way, we can create lists that seem infinitely long since we automatically load the next page when the user is about to scroll to the end of the list.&lt;br /&gt;
&lt;br /&gt;
The implementation is quite simple. We create an initial page that contains all the mark-up required to qualify as an HTML web page. In this page, we have an unordered list.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;&amp;lt;ul&amp;gt;
    &amp;lt;li&amp;gt;an item&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;another item&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;&amp;lt;a href="/get/more/items?page=2" target="_replace"&amp;gt;Get more items&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
Note that the last item is an anchor which contains a URL with a pagination parameter. The page that it links to looks like the following piece of mark-up.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;&amp;lt;li&amp;gt;even more items&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;list are great&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;itemized&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a href="/get/more/items?page=3" target="_replace"&amp;gt;Get more items&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
Normally iUI would load the content when the user clicks on the link. But to automate the process, we can add a few lines of JavaScript to our web app.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;/*** JS Code using iUI framework and jQuery ***/

var ns = {};

// Throttle the requests (in this case 1 second)
ns.throttle = 1000;
ns.isOkToLoad = true;

// Number of pixels before last element
ns.scrollPadding = 100;

(function() {

    ns.autoloadOnScroll = function(event) {

        if (!ns.isOkToLoad) return;

        var scrlHeight = window.document.body.scrollHeight;
        var scrlPos = window.innerHeight + window.scrollY;

        if (scrlHeight &amp;lt; (ns.scrollPadding + scrlPos)) {

            var link = $("a[target=_replace]").get(0);
            
            if (link) {
                setTimeout("ns.isOkToLoad = true", ns.throttle);
                ns.isOkToLoad = false;

                iui.showPageByHref(link.href, null, null, link, iui.unselect);
            }   
        }

    };

})();

$(function() {

    window.onscroll = ns.autoloadOnScroll;

});
&lt;/pre&gt;&lt;br /&gt;
You could set &lt;code&gt;ns.isOkToLoad = true&lt;/code&gt; in the callback from the XHR (which is done inside &lt;code&gt;iui.showPageByHref&lt;/code&gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Links&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://code.google.com/p/iui/"&gt;iUI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-7642837207249740832?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/7642837207249740832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=7642837207249740832' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/7642837207249740832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/7642837207249740832'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2009/11/automatic-pagination-infinite-list.html' title='Automatic Pagination: The Infinite List using iUI and jQuery'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-3192875059544213708</id><published>2009-10-31T20:58:00.008+01:00</published><updated>2009-11-07T00:18:04.209+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='maths'/><title type='text'>Bifurcation Diagram with Processing.js</title><content type='html'>The patterns of nature always interested me, some are quite easy to visualize - such as &lt;a href="http://en.wikipedia.org/wiki/Bifurcation_diagram"&gt;bifurcation diagram&lt;/a&gt; of a logistic map. &lt;br /&gt;
I used &lt;a href="http://processingjs.org/"&gt;Processing.js&lt;/a&gt; to draw the bifurcation inside a canvas tag. &lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_WHIpNIQUVGA/SuyZ7KGiS-I/AAAAAAAAAC4/0sTz0jo-bQY/s1600-h/bifurcation_logisticMap.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5398859294913481698" src="http://1.bp.blogspot.com/_WHIpNIQUVGA/SuyZ7KGiS-I/AAAAAAAAAC4/0sTz0jo-bQY/s640/bifurcation_logisticMap.png" style="display: block; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center;" /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;h3&gt;The Processing.js code&lt;/h3&gt;&lt;pre class="prettyprint"&gt;float r = 0.8;
float x = 0.5;
float e = 0.0001;

float r_lim = 4;
float x_lim = 1;

int x_max = 1000;
int y_max = 500;

float r_0 = 0;

int it = 0;

int u = x_max / r_lim;
int v = y_max / x_lim;

float c_x = 0;
float c_y = 0;

void setup()
{
    size(x_max, y_max);
    stroke(0, 0, 0, 5);
}

void draw()
{
 
    // Discard iterations
    for (it = 0; it &amp;lt; 300; it++) 
    {
        x = r * x * (1 - x);
    }
 
    // Draw iterations
    for (it = 0; it &amp;lt; 500; it++) 
    {
        x = r * x * (1 - x);
  
        c_x = (r - r_0) * u;
        c_y = x * v;
  
        if (r_0 &amp;gt; 0) point(c_x, c_y);
    }
 
    // Trim the start of the diagram
    if (c_y &amp;gt; 300 &amp;amp;&amp;amp; r_0 == 0) 
    {
        r_0 = r;
        u = x_max / (r_lim - r_0);
    }
 
    r += e;
}
&lt;/pre&gt;Note that it will probably take some time to render&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-3192875059544213708?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/3192875059544213708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=3192875059544213708' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/3192875059544213708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/3192875059544213708'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2009/10/bifurcation-diagram-with-processingjs.html' title='Bifurcation Diagram with Processing.js'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_WHIpNIQUVGA/SuyZ7KGiS-I/AAAAAAAAAC4/0sTz0jo-bQY/s72-c/bifurcation_logisticMap.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-1562888758360068636</id><published>2009-10-25T22:30:00.026+01:00</published><updated>2010-02-17T21:53:42.022+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='webkit'/><category scheme='http://www.blogger.com/atom/ns#' term='touch'/><category scheme='http://www.blogger.com/atom/ns#' term='gesture'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>JavaScript Touch and Gesture Events iPhone and Android</title><content type='html'>There are quite a few sites that describe the touch and gesture events that can be used in the mobile version of WebKit running on iPhone and iPod Touch. There is, however, not so much info with regards to Android. I've placed a few links at the bottom of this article that contain information used to compile this brief explanation. &lt;br /&gt;
Touch events are a bit like mouse events, but there are some very important differences when it comes to touch vs. mouse: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;A touch is very hard to keep steady whilst a mouse can stay at a fixed position - this means that we go from a touchStart event directly to a touchMove event. Unlike a mouse where a mouseDown event is likely to fire without being followed up by a mouseMove event. &lt;/li&gt;
&lt;li&gt;There is no mouseOver equivalent since a touch can be discontinuous, i.e., we can get from point A to point B without the need of drawing a continuous line between these points. &lt;/li&gt;
&lt;li&gt;A touch is an averaged point taken from the surface area in contact with the pointing device (your finger) translated to pixel coordinates - like finding the centre of  a circle. A mouse is very precise and there is no averaging that needs to be done. What I'm trying to say is that a touch is not as accurate as a mouse. &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;Android and iPhone touch events&lt;/h3&gt;Android and iPhone versions of WebKit have some touch events in common: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;touchstart&lt;/strong&gt; - triggered when a touch is initiated. Mouse equivalent - mouseDown&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;touchmove&lt;/strong&gt; - triggered when a touch moves. Mouse equivalent - mouseMove&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;touchend&lt;/strong&gt; - triggered when a touch ends. Mouse equivalent - mouseUp. This one is a bit special on the iPhone - see below&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;touchcancel&lt;/strong&gt; - bit of a mystery&lt;/li&gt;
&lt;/ul&gt;Example: &lt;br /&gt;
&lt;pre class="prettyprint"&gt;document.addEventListener('touchstart', function(event) {
    alert(event.touches.length);
}, false);
&lt;/pre&gt;&lt;h4&gt;The Event object&lt;/h4&gt;As you may have noticed above, the event object contains an array called touches (in Androids case, the event object also containes a touch object - at this stage, touches has always a length of 1 in Android so event.touches[0] === event.touch). The touches array is Apples way of handling multi-touch events - but more on that later. &lt;br /&gt;
A touch object contains pretty much the same data as a mouse event such as pageX, pageY etc...   &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;pre class="prettyprint"&gt;document.addEventListener('touchmove', function(event) {
    event.preventDefault();
    var touch = event.touches[0];
    console.log("Touch x:" + touch.pageX + ", y:" + touch.pageY);
}, false);
&lt;/pre&gt;&lt;h4&gt;What about a click?&lt;/h4&gt;mouseClick events are triggered after a touchStart, touchEnd event sequence. A reason for mouseClick events not triggering can be that the event propagates further and a touchMove being initiated - this will cancel the mouseClick event sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;iPhone Touch and Gesture Events&lt;/h3&gt;&lt;br /&gt;
Apples WebKit implementation has a few things that are different from the Android implementation. The touchEnd event removes the current touch from the &lt;code&gt;event.touches &lt;/code&gt; array. Instead, we have to look inside the event.changedTouches array.&lt;br /&gt;
&lt;h4&gt;Apples event object for touch events&lt;/h4&gt;The event object contains the following arrays: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;touches&lt;/strong&gt; - contains touch information upon touchStart and touchMove not touchEnd events&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;targetTouches&lt;/strong&gt; - contains information for touches originating from the same target element &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;changedTouches&lt;/strong&gt; - contains touch information upon all touch events&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Gesture events&lt;/h4&gt;Apple supports gestures which are mult-touch events such as "pinching" and "rotating": &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;gesturestart&lt;/strong&gt; - triggered when initiating a multi-touch event&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;gesturechange&lt;/strong&gt; - triggered when multiple touches move&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;gestureend&lt;/strong&gt; - triggered when a multi-touch event ends&lt;/li&gt;
&lt;/ul&gt;The event object for gesture events looks very different. It contains scale and rotation values and no touch objects. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;pre class="prettyprint"&gt;document.addEventListener('gesturechange', function(event) {
    event.preventDefault();
    console.log("Scale: " + event.scale + ", Rotation: " + event.rotation);
}, false);
&lt;/pre&gt;&lt;h3&gt;Event table&lt;/h3&gt;&lt;table&gt;&lt;thead&gt;
&lt;tr&gt; &lt;th&gt;&lt;/th&gt; &lt;th&gt;touchstart&lt;br /&gt;
&lt;/th&gt; &lt;th&gt;touchmove&lt;br /&gt;
&lt;/th&gt; &lt;th&gt;touchend&lt;br /&gt;
&lt;/th&gt; &lt;th&gt;gesturestart&lt;br /&gt;
&lt;/th&gt; &lt;th&gt;gesturemove&lt;br /&gt;
&lt;/th&gt; &lt;th&gt;gestureend&lt;br /&gt;
&lt;/th&gt; &lt;/tr&gt;
&lt;/thead&gt; &lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;Android&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;n&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;n&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;n&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;iPhone&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;has event.touches&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;n&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;n&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;n&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;(iPhone) has event.scale and event.rotation&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;n&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;n&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;n&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;(iPhone) touch in event.touches&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;n&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;-&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;-&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;-&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;(iPhone) touch in event.changedTouches&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;y&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;-&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;-&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;-&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;h3&gt;Links&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://developer.apple.com/safari/library/documentation/appleapplications/reference/SafariWebContent/HandlingEvents/HandlingEvents.html"&gt;ADC Safari Reference Library&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/"&gt;sitepen: Touching and Gesturing on the iPhone&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://phonegap.com/"&gt;(like) AIR for iPhone / Android / Blackberry&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://rakaz.nl/2009/09/iphone-webapps-101-getting-safari-out-of-the-way.html"&gt;iPhone Webapps 101&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://code.google.com/p/iui/"&gt;iUI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dl.dropbox.com/u/2746641/Presentations/webkit_webapps.pdf"&gt;My slides&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-1562888758360068636?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/1562888758360068636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=1562888758360068636' title='84 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/1562888758360068636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/1562888758360068636'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2009/10/javascript-touch-and-gesture-events.html' title='JavaScript Touch and Gesture Events iPhone and Android'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>84</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-1884039742048547829</id><published>2009-10-25T15:30:00.012+01:00</published><updated>2009-10-25T22:14:08.382+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='jobs'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Job Trends: What's up and coming</title><content type='html'>&lt;p&gt;
Found myself browsing the web aimlessly until I started wondering - what's popular these days? Is it Ruby? Maybe Python? Lately I've seen a lot of job postings for PHP developers and I was wondering if the number of PHP postings actually did increase or not. And its always interesting to see how Java and .NET stack up against each other.
&lt;/p&gt;
&lt;p&gt;
So I decided to do a job trend query at &lt;a href="http://www.indeed.com"&gt;indeed&lt;/a&gt; comparing PHP, Flex, Javascript, Python, Java, .NET and Ruby
&lt;/p&gt;
&lt;h3&gt;What's up...&lt;/h3&gt;
&lt;div style="width:540px"&gt;
&lt;a href="http://www.indeed.com/jobtrends?q=flex%2C+javascript%2C+php%2C+python%2C+java%2C+.net%2C+ruby" title="flex, javascript, php, python, java, .net, ruby Job Trends"&gt;
&lt;img width="540" height="300" src="http://www.indeed.com/trendgraph/jobgraph.png?q=flex%2C+javascript%2C+php%2C+python%2C+java%2C+.net%2C+ruby" border="0" alt="flex, javascript, php, python, java, .net, ruby Job Trends graph"&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
The lines speak for themselves. While .NET and Java jobs represent the majority in this case, Javascript is also proving to be quite popular amongst employers. There seems to be a dead-heat between Flex and PHP, quite surprising since Flex is a pretty new platform whilst PHP has been around for quite some time. In the bottom ranks, we see Python followed by Ruby.
&lt;/p&gt;
&lt;h3&gt;...and coming&lt;/h3&gt;
&lt;div style="width:540px"&gt;
&lt;a href="http://www.indeed.com/jobtrends?q=flex%2C+javascript%2C+php%2C+python%2C+java%2C+.net%2C+ruby&amp;relative=1&amp;relative=1" title="flex, javascript, php, python, java, .net, ruby Job Trends"&gt;
&lt;img width="540" height="300" src="http://www.indeed.com/trendgraph/jobgraph.png?q=flex%2C+javascript%2C+php%2C+python%2C+java%2C+.net%2C+ruby&amp;relative=1" border="0" alt="flex, javascript, php, python, java, .net, ruby Job Trends graph"&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
This is a much more interesting graph as it shows the percentage increase of job postings. Ruby has skyrocketed in popularity but, as we could tell from the previous graph, still hasn't managed to establish itself amongst the ranks of PHP and Python (albeit very close to Python).
Similarly we see that Python and PHP have also a growth percentage that is higher compared to the other languages (except for Ruby of course). Interesting in this case is that PHP has a much larger growth factor compared to Flex, even though they did just as well in the previous graph. Not surprisingly, the languages that did best on an absolute scale, did worst on a relative scale, it's much harder for a language to grow in popularity once its already established itself as one of the main players.
&lt;/p&gt;
&lt;p&gt;
If we take Ruby out of the equation (since the incline dwarfs everything else), we see that both Python and PHP are increasing in popularity. Flex fares worst. Checking the wiki indicates that Flex was released in 2004, so it has been around for quite some time now but has failed to gain traction amongst employers - perhaps doing a query that contains Flash might have been more appropriate (even though they're not the same: Flash is a subset of Flex).
&lt;/p&gt;
&lt;p&gt;
Among the heavy players, Java and .NET, we can see that .NET is generally more established and has a higher growth rate. 
&lt;/p&gt;
&lt;p&gt;
In conclusion, if you're looking for ways to broaden your horizon, choose the language/platform that you find most interesting - because there certainly are jobs out there for everyone.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-1884039742048547829?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/1884039742048547829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=1884039742048547829' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/1884039742048547829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/1884039742048547829'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2009/10/job-trends-whats-up-and-coming.html' title='Job Trends: What&apos;s up and coming'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-7595334467323787273</id><published>2009-10-13T14:18:00.010+02:00</published><updated>2009-11-06T23:37:23.326+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='ssl'/><category scheme='http://www.blogger.com/atom/ns#' term='soap'/><title type='text'>SSL, Certificates and Java</title><content type='html'>For Java to be able to carry out secured communication, one must first make sure that the certificate associated with the endpoint is stored in the Java keystore. If you don't have the certificate stored in the keystore, you're likely to run into error messages similar to the following:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;javax.net.ssl.SSLHandshakeException&lt;br /&gt;
sun.security.provider.certpath.SunCertBuilderException &lt;/code&gt; &lt;br /&gt;
&lt;br /&gt;
To find the current keystore type:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt; locate cacerts &lt;/code&gt; &lt;br /&gt;
&lt;br /&gt;
You'll probably get more than one result, but the one that is of most interest is the folder that resides inside the Java JRE folder, e.g., &lt;br /&gt;
&lt;br /&gt;
&lt;code&gt; /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/security/cacerts &lt;/code&gt; &lt;br /&gt;
&lt;br /&gt;
To see all installed certificates type (keystore password: changeit):&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt; keytool -list -keystore /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/security/cacerts&lt;br /&gt;
&lt;/code&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;How to add a certificate&lt;/strong&gt;&lt;br /&gt;
Lets assume that we would like to communicate with the following soap endpoint&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt; https://example.org/api/soap/service &lt;/code&gt; &lt;br /&gt;
&lt;br /&gt;
whose wsdl can be found at&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt; https://example.org/api/soap/service?wsdl &lt;/code&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;First, lets use Firefox (or any web browser capable of handling certificates) to browse to the wsdl. On the way there, we should get some notification about a certificate being used. After a bit of clicking, we should see the wsdl (an xml file - "view source" to see it).&lt;/li&gt;
&lt;li&gt;Now left-click on the "secure" icon on the left of the address bar and choose "More information" -&gt; "View Certificate" -&gt; "Details" -&gt; "Export". Choose to save the certificate with (DER) encoding. Lets assume you save the certificate to &lt;code&gt;/tmp/security/example.cer&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Now we want to add this certificate to our Java keystore. Use the following command:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt; keytool -import -alias example \ &lt;br /&gt;
-keystore /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/security/cacerts \&lt;br /&gt;
-file /tmp/security/example.cer &lt;/code&gt; &lt;/li&gt;
&lt;/ol&gt;You should now be able to use the service without getting the above exceptions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-7595334467323787273?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/7595334467323787273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=7595334467323787273' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/7595334467323787273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/7595334467323787273'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2009/10/ssl-certificates-and-java.html' title='SSL, Certificates and Java'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-384538560219216814</id><published>2008-05-02T23:15:00.004+02:00</published><updated>2009-11-06T22:14:16.013+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><title type='text'>Enabling Auto-completion For mx. In FlashDevelop</title><content type='html'>&lt;ol&gt;&lt;li&gt;Open &lt;span style="font-weight: bold;"&gt;Project Properties&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Go to &lt;span style="font-weight: bold;"&gt;Compiler Options&lt;/span&gt; tab&lt;/li&gt;
&lt;li&gt;In &lt;span style="font-weight: bold;"&gt;Advanced -&gt; Intrinsic Libraries&lt;/span&gt; add the following: &lt;code&gt;Library\AS3\frameworks\Flex3&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Done&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-384538560219216814?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/384538560219216814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=384538560219216814' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/384538560219216814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/384538560219216814'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2008/05/enabling-auto-completion-for-mx-in.html' title='Enabling Auto-completion For mx. In FlashDevelop'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-5664121144440999961</id><published>2008-04-28T15:54:00.008+02:00</published><updated>2009-11-06T22:14:57.317+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web design'/><title type='text'>Image Bunching with Image Magick</title><content type='html'>Assuming we are in a folder that contains a bunch of gif files that we would like to combine into a single image bunch.  Simply type the following (all on the same line): &lt;pre&gt;&gt;&gt; montage -tile "nr. of images in x"
-background rgba(0,0,0,0)
-geometry +0+0 -alpha on *.gif bunch.gif
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-5664121144440999961?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/5664121144440999961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=5664121144440999961' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/5664121144440999961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/5664121144440999961'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2008/04/image-bunching-with-image-magick.html' title='Image Bunching with Image Magick'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-9171658902736837472</id><published>2008-04-22T11:01:00.017+02:00</published><updated>2009-11-06T22:15:29.426+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Django Compact Tutorial</title><content type='html'>&lt;span style="font-size:130%;"&gt;Getting Started Steps&lt;/span&gt; &lt;ol&gt;&lt;li&gt;&lt;code&gt;django-admin.py startproject  "project_name"&lt;project_name&gt;&lt;/project_name&gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Edit &lt;span style="font-weight: bold;"&gt;settings.py&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;manage.py syncdb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;manage.py runserver  "port" &lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Done&lt;/li&gt;
&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Creating Models&lt;/span&gt; &lt;ol&gt;&lt;li&gt;&lt;code&gt;manage.py startapp "app_name"&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Edit &lt;b&gt;"app_name"/models.py&lt;/b&gt;, e.g., &lt;pre&gt;class Poll(models.Model):
question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')

class Choice(models.Model):
poll = models.ForeignKey(Poll)
choice = models.CharField(max_length=200)
votes = models.IntegerField()
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Edit &lt;b&gt;settings.py&lt;/b&gt;, e.g.,&lt;pre&gt;INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'mysite.polls'
)&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;manage.py syncdb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Done&lt;/li&gt;
&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Inbuilt Functions&lt;/span&gt; &lt;ul&gt;&lt;li&gt;Add &lt;code&gt;__str__(self)&lt;/code&gt; to classes&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;__unicode__(self)&lt;/code&gt; to classes&lt;/li&gt;
&lt;/ul&gt;&lt;span style="font-size:130%;"&gt;Activate Admin Interface&lt;/span&gt; &lt;ol&gt;&lt;li&gt;Add the lines &lt;pre&gt;class Poll(models.Model):
# ...
class Admin:
    pass
&lt;/pre&gt;to your classes that should be shown in the admin interface, in this case the class Poll will be editable from the admin interface. &lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;django.contrib.admin&lt;/code&gt; to &lt;code&gt;INSTALLED_APPS&lt;code&gt; in &lt;span style="font-weight: bold;"&gt;settings.py&lt;/span&gt;&lt;/code&gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Edit &lt;span style="font-weight: bold;"&gt;mysite/urls.py&lt;/span&gt; and uncomment the line below “Uncomment this for admin:”&lt;/li&gt;
&lt;li&gt;&lt;code&gt;manage.py syncdb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Goto &lt;a href="http://127.0.0.1:8000/admin/"&gt;http://127.0.0.1:8000/admin/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Done&lt;/li&gt;
&lt;li&gt;Further instructions can be found &lt;a href="http://www.djangoproject.com/documentation/tutorial02/"&gt;here&lt;/a&gt; &lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-9171658902736837472?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/9171658902736837472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=9171658902736837472' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/9171658902736837472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/9171658902736837472'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2008/04/django-compact-tutorial.html' title='Django Compact Tutorial'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-8696993937626058619</id><published>2008-03-27T23:52:00.014+01:00</published><updated>2009-11-06T22:15:57.670+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='os x'/><title type='text'>Django with XAMPP MySQL on OS X Leopard</title><content type='html'>Ran into a bit of trouble trying to install &lt;span style="font-weight: bold;"&gt;Django &lt;/span&gt;and using &lt;span style="font-weight: bold;"&gt;MySQL Connector &lt;/span&gt;for &lt;span style="font-weight: bold;"&gt;Python&lt;/span&gt;. There is no &lt;span style="font-style: italic;"&gt;ready-made&lt;/span&gt; MySQL connector for Python on OS X so one has to download the source and build it. A great tutorial can be found &lt;a href="http://antoniocangiano.com/2007/12/22/how-to-install-django-with-mysql-on-mac-os-x/"&gt;here&lt;/a&gt;. The tutorial only works for a MySQL package which contains the necessary source files for compiling the connector.  I prefer to use &lt;span style="font-weight: bold;"&gt;XAMPP &lt;/span&gt;(&lt;span style="font-weight: bold;"&gt;MAMPP&lt;/span&gt; for Mac) and its prepackaged applications, where MySQL happens to be one of them. One can build the MySQL Connector against the XAMPP version by doing the following: &lt;ol&gt;&lt;li&gt;Download the MySQL package from &lt;a href="http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg"&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Copy the &lt;b&gt;include&lt;/b&gt; directory from the package you just downloaded to the same directory where XAMPP &lt;b&gt;mysql/bin&lt;/b&gt; resides, i.e., &lt;b&gt;include&lt;/b&gt; is a sibling to &lt;b&gt;bin&lt;/b&gt; and child to &lt;b&gt;mysql&lt;/b&gt; &lt;/li&gt;
&lt;li&gt;Add the &lt;b&gt;xampp-files/mysql/bin&lt;/b&gt; directory to the &lt;b&gt;$PATH&lt;/b&gt; variable, i.e., &lt;code&gt;&gt;&gt; export PATH=$PATH:/Applications/xampp/xampp-files/mysql/bin&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Follow through with the rest of the instructions given &lt;a href="http://antoniocangiano.com/2007/12/22/how-to-install-django-with-mysql-on-mac-os-x/"&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;You can now use Django and XAMPP MySQL together! &lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-8696993937626058619?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/8696993937626058619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=8696993937626058619' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/8696993937626058619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/8696993937626058619'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2008/03/django-with-xampp-on-os-x-leopard.html' title='Django with XAMPP MySQL on OS X Leopard'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-2087249066937131685</id><published>2008-03-27T10:45:00.010+01:00</published><updated>2009-11-06T23:38:03.795+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web design'/><title type='text'>Thumbnails with Image Magick</title><content type='html'>An easy way to do batch image operations is to use the Image Magick tools.  Had to create thumbnails several times and never actually remembered the command:  &lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&gt;&gt; convert arena_*.jpg -thumbnail 50% small_arena_%d.jpg&lt;/code&gt;  &lt;br /&gt;
&lt;br /&gt;
Check out &lt;a href="http://www.imagemagick.org/Usage/thumbnails"&gt;this&lt;/a&gt; link for more info.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-2087249066937131685?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/2087249066937131685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=2087249066937131685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/2087249066937131685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/2087249066937131685'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2008/03/thumbnails-with-image-magick.html' title='Thumbnails with Image Magick'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-8284679591456368126</id><published>2008-03-01T22:18:00.005+01:00</published><updated>2009-11-06T22:19:43.115+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='vtk'/><title type='text'>VTK in Windows</title><content type='html'>I found myself going over some Visualization labs that I co-assisted in 2007. Back then I went through the labs using emacs on a solaris workstation, now I decided to give Windows a whirl.&lt;br /&gt;
&lt;br /&gt;
First I downloaded &lt;a href="http://www.microsoft.com/express/vc/"&gt;Visual C++ 2008 Express&lt;/a&gt;  which is free to download.  Next was &lt;a href="http://www.vtk.org/"&gt;VTK&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
A great tutorial on how to setup VTK on Windows can be found at &lt;a href="http://vtkblog.blogspot.com/"&gt;http://vtkblog.blogspot.com/.&lt;/a&gt; Check out the &lt;span style="font-weight: bold;"&gt;Install Guide&lt;/span&gt; in the right column.  And that's it. I spent half a day trying to get things to run smoothly before I found Peter's site. Made things a lot easier, cheers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-8284679591456368126?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/8284679591456368126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=8284679591456368126' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/8284679591456368126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/8284679591456368126'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2008/03/vtk-in-windows.html' title='VTK in Windows'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2682512101871425755.post-121366977131945425</id><published>2008-03-01T16:55:00.003+01:00</published><updated>2008-03-01T22:33:34.056+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><title type='text'>C++ with Netbeans in Windows</title><content type='html'>The C/C++ plugin in Netbeans for Windows uses the development tools found in Cygwin.

GNU C++ compiler (g++), make and gdb are found in &lt;span style="font-weight: bold;"&gt;cygwin&lt;/span&gt; which can be downloaded from &lt;a href="http://cygwin.com/"&gt;http://cygwin.com/,&lt;/a&gt;

&lt;ol&gt;&lt;li&gt;Download &lt;span style="font-weight: bold;"&gt;setup.exe&lt;/span&gt; from the cygwin site&lt;/li&gt;&lt;li&gt;Run &lt;span style="font-weight: bold;"&gt;setup.exe&lt;/span&gt; and choose to install g++, gdb and make (inside &lt;span style="font-weight: bold;"&gt;devel&lt;/span&gt; category)&lt;/li&gt;&lt;li&gt;Add &lt;span style="font-weight: bold;"&gt;cygwin_dir/bin &lt;/span&gt;directory to environment &lt;span style="font-weight: bold;"&gt;PATH&lt;/span&gt; variable&lt;/li&gt;&lt;li&gt;In Netbeans, install &lt;span style="font-weight: bold;"&gt;C/C++&lt;/span&gt; plugin&lt;/li&gt;&lt;/ol&gt;
See also&lt;a href="http://www.netbeans.org/kb/60/cnd/quick-start.html"&gt; http://www.netbeans.org/kb/60/cnd/quick-start.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2682512101871425755-121366977131945425?l=backtothecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://backtothecode.blogspot.com/feeds/121366977131945425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2682512101871425755&amp;postID=121366977131945425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/121366977131945425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2682512101871425755/posts/default/121366977131945425'/><link rel='alternate' type='text/html' href='http://backtothecode.blogspot.com/2008/03/c-with-netbeans-in-windows.html' title='C++ with Netbeans in Windows'/><author><name>Michael</name><uri>http://www.blogger.com/profile/03200041972289612122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
