Blog Archive 2015 sensu checklog issue Apr 15 2015 package.el and projectile Mar 26 2015 toastmaster speech 5 Mar 24 2015 find out parent HTML element of a webelement in selenium Mar 21 2015 cats and mice by Tommy Douglas Mar 21 2015 install cocoapod plugin Mar 18 2015 partial chef template Mar 16 2015 Converge failed with error message undefined local variable or method xxx Mar 15 2015 XCode exception Mar 13 2015 Table Topic Master Mar 12 2015 drag and drop is bad for data center Mar 12 2015 how to use check-log.rb in windows Mar 10 2015 trying packer Mar 08 2015 emacs on osx Mar 08 2015 gwmi vs wmic Mar 07 2015 ruby gem ssl problem Mar 06 2015 Download file with lynx Mar 06 2015 Forced to apply Windows update Mar 05 2015 madness of powershell Mar 04 2015 sensu mailer problem Mar 04 2015 prevent failed task stops provisioning Mar 03 2015 find out script location in bash Mar 03 2015 to quickly test a hipchat api token Mar 02 2015 How to identify and kill process spawned by a tmux session? Mar 02 2015 Lesson from learning to use vagrant, chef and sensu Mar 02 2015 how to get sensu hipchat plugin to work Feb 28 2015 sudo and glob Feb 28 2015 Using chef sudo cookbook Feb 27 2015 Toastmaster speech 4 Feb 27 2015 gem install hipchat problem 2 Feb 27 2015 gem install hipchat problem Feb 26 2015 cannot remove file Feb 26 2015 installing sensu client 0.14 and 0.17.beta1 Feb 26 2015 Some useful apt and dpkg command Feb 26 2015 How to add apt mulitverse in chef Feb 26 2015 sensu plugin problem Feb 26 2015 knife did not create any data bag Feb 25 2015 resize tmux window Feb 25 2015 tmux resizing pane Feb 25 2015 useful vbox command Feb 23 2015 Innovation Feb 22 2015 switching to zsh Feb 21 2015 My toastmaster speech 3 Feb 21 2015 Don’t let private and public key sit in the same folder when vagrant up Feb 19 2015 chsh Feb 18 2015 AWS Dynamo Exception: 400 Bad Request Feb 17 2015 It happens too often Feb 16 2015 setting value in chef cooking Feb 16 2015 solution to php needs version number problem Feb 15 2015 chef: No version specified, and no candidate version available for php Feb 15 2015 kitchen converge creates two VMs Feb 14 2015 error running the motd example of the chef book Feb 14 2015 kitchen converge problem 2 Feb 14 2015 A successful run of kitchen init Feb 14 2015 berkshelf problem with kitchen converge Feb 14 2015 strange gem install error Feb 14 2015 Two way to create chef cookbooks Feb 14 2015 generate public key fingerprint Feb 14 2015 ssh forwarding in vagrant and private github repository Feb 13 2015 nosetests –failed keeps picking up removed test Feb 13 2015 Providing mysqld password to chef provisioner in vagrant Feb 11 2015 Cannot find a resource matching ruby_block[sensu_service_trigger] Feb 08 2015 brew and cast Feb 08 2015 ochiwa unable to connect to sensu Feb 06 2015 mandrill is sending me a strange template name Feb 05 2015 Authenticate Mandrill Webhook Call in Python Feb 04 2015 Search for javascript code in development console in chrome Feb 04 2015 Update ChefDK in OSX Feb 04 2015 a little gotcha with @patch Feb 02 2015 chef, brekshelf and data bag Jan 20 2015 best way to install chefdk on OSX Jan 19 2015 basic rvm Jan 18 2015 dict in coffeescript Jan 18 2015 My attempt at toastmaster speech #2 Jan 13 2015 2014 dictionary in swift Nov 06 2014 init chain rule in swift Sep 18 2014 @IBDesignable and @IBInspectable Sep 18 2014 Swift ternanry operator ? Sep 18 2014 autorelease in swift Sep 18 2014 Swift closure error: Boolean is not Convertible to Void Sep 17 2014 Values of type NSInteger should not be used as format arguments Sep 14 2014 Unrecognized selector -replacementObjectForKeyedArchiver: Sep 12 2014 javascript and hoisting Sep 12 2014 css overflow Sep 12 2014 Starting an angularjs project with bower Sep 12 2014 make iphone vibrate Sep 10 2014 Difference between handling ‘self’ in Python and Swift Sep 10 2014 ngTouch Sep 04 2014 semi-colon in swift Sep 04 2014 What is tag fieldset? Sep 01 2014 Ex 2.2 Aug 29 2014 kUTTypeURL undefined Aug 29 2014 Ex 2.1 Aug 27 2014 html vs xhtml Jul 26 2014 install mirage failed Jul 06 2014 opam install log Jul 06 2014 homebrew problem Apr 15 2014 design pattern Mar 31 2014 9x9 suduko solver Mar 24 2014 octopress deploy rejected Mar 22 2014 4x4 suduko solver in erlang Mar 16 2014 sometimes it is not obvious at the beginning Mar 15 2014 when top bar is enabled… Mar 10 2014 quicklook Mar 10 2014 keyboard in iOS Mar 07 2014 Current time in objective-c and python Mar 06 2014 SpaceX and redundancy Mar 06 2014 how to make a label recognise a tape Mar 06 2014 yield to maturity Mar 06 2014 quick 32nd lookup Mar 05 2014 missing curses library Mar 05 2014 x in y in c++ Mar 04 2014 bottle and parameters Mar 03 2014 NSLog macro Mar 03 2014 TIL R is presinstalled in OSX Mar 02 2014 Prepare a maverick usb Mar 01 2014 Create a NSArray from NSMutualArray Feb 28 2014 urlencode unicode Feb 23 2014 CAGradientLayer Feb 22 2014 Some objective-c note-to-self Feb 19 2014 NSNotification and view controller Feb 19 2014 capture part of ios screen as image Feb 17 2014 Land tax is adjustable Feb 16 2014 conda update Feb 15 2014 Changing NSTimeZone Feb 14 2014 Timezones in objective-c Feb 13 2014 chastised by a CoreFoundation class Feb 12 2014 missing the viewDidLoad event Feb 11 2014 dispatch_once Feb 09 2014 scrollViewDidScroll is not called Feb 03 2014 Mixing C++ and Objective-c in XCode Feb 02 2014 bid-ask spread and swap spread Jan 29 2014 weak reference in block Jan 23 2014 RequestAnimationFrame Jan 20 2014 Html 5 resources Jan 20 2014 compile debug_info Jan 18 2014 class cluster Jan 17 2014 Using automator in OSX Jan 11 2014 resize images in a Stackoverflow post Jan 10 2014 firefox build failure on osx Jan 09 2014 Dependency on MathJax.js Jan 06 2014 inline plot in ipython Jan 06 2014 Make picker 2 data dependent on the selected row of picker 1 Jan 05 2014 swap convention Jan 04 2014 conda and ipython Jan 03 2014 pandas - dateutil.parser import error Jan 03 2014 category vs class extension Jan 01 2014 2013 swizzle Dec 31 2013 User defined runtime attribute Dec 31 2013 conda install ipython problem Dec 30 2013 Finally firefox is built Dec 28 2013 Fixing qt4 dependency of pyqt4 Dec 27 2013 Mach problem: Failed at Unified_cpp_2 Dec 24 2013 Mach problem: Could not compile basic X program Dec 24 2013 Mach problem: gstreamer backend Dec 24 2013 Mach problem: Library requirements (gtk+-2.0 >= 2.10.0 gtk+-unix-print-2.0 glib-2.0 gobject-2.0 gdk-x11-2.0) not met Dec 24 2013 Mach problem: C++ compiler cannot create executables Dec 24 2013 mach problem Dec 24 2013 How to do a multi-line string in objective-c Dec 19 2013 ownership rule exception Dec 19 2013 Need to write a proper unit test in objective-c Dec 19 2013 Using NSURLConnection to read json data Dec 18 2013 cannot init a class object Dec 16 2013 UIScrollView and contentSize Dec 16 2013 Incorrect way to use JSONKit? Dec 13 2013 JSONKit exception Dec 12 2013 ivar error message: Autosynthesized property ‘delegate’ will use synthesized instance variable ‘_delegate’, not existing instance variable ‘delegate’ Dec 11 2013 Discount Margin of FRN Dec 09 2013 Aquamacs crashed in maverick Dec 05 2013 Assignment statement in Lua vs Python Dec 05 2013 How to install pygame in osx Dec 04 2013 testing pygame installation Dec 04 2013 pip install pygame warning/error messages Dec 04 2013 power consumption of erlang compilation Dec 04 2013 osx specific error with erlang compilation Dec 04 2013 Building erlang R16B02 Dec 04 2013 NSInvalidArgumentException when using count Dec 03 2013 Grab Dec 02 2013 easy_install scipy problem Nov 30 2013 pod spec lint Nov 30 2013 easy_install numpy Nov 29 2013 SystemUIServerApp Nov 28 2013 JSONKit: isa is deprecated Nov 28 2013 rvm install problem Nov 27 2013 Get image file size Nov 27 2013 Riak Content Type Sep 12 2013 riak allow-multi Aug 15 2013 Octopress’s Liquid Exception Aug 13 2013 Learn something about /tmp on OSX today Aug 12 2013 var in R Aug 11 2013 How to make riak listen to IP other than localhost Aug 09 2013 Simple Swap Calculation Aug 04 2013 Git tip 1 Aug 03 2013 Why we should love repost Aug 02 2013 Luck and Skill Aug 01 2013 Different Type of Database Models Jul 29 2013 Concurrency and Parallelism Jul 26 2013 MFA Jul 17 2013 global:send_message Jul 17 2013 pong and pang in erlang Jul 16 2013 A useful Sybase tool Jul 15 2013 More blog maintenance Jul 12 2013 Switch and enum in Objective-c Jul 08 2013 Ruby quirk? Jul 06 2013 Simple script to convert Blogger posts to Github pages Jul 03 2013 keep vi swp file in tmp Jun 29 2013 Problem with shifting python code right in emacs Jun 28 2013 Good and Bad of Octopress Jun 23 2013 git status says file is modified even if… Jun 22 2013 dyld: library not loaded Jun 22 2013 How to install beautifulsoup in python3 Jun 20 2013 Using Octopress Jun 19 2013 Just installed RVM Jun 12 2013 Note to self Jun 12 2013 In light of the NSA PRISM scandal, I recommend these two videos from ‘Conversation with History’ series: Jun 10 2013 Weird error message of ‘say’ in 10.8.4 Jun 09 2013 OSX terminal and .bashrc Jun 08 2013 AFS Jun 08 2013 The core of lisp Jun 07 2013 NSDocument and First Responder Jun 07 2013 Useful OSX API to find home and temp directory Jun 06 2013 Health system in Oregon Jun 06 2013 A word in your ear: Rhyming slang Jun 05 2013 Two ways to build file names Jun 05 2013 Basename-equivalent in Objective-C Jun 04 2013 TED: Paola Antonelli: Why I brought Pac-Man to MoMA - Paola Antonelli (2013) Jun 04 2013 purl Jun 03 2013 Drone Warfare Jun 02 2013 erlang mode in emacs is very handy. Jun 01 2013 When I start up emacs in shell, I got this error message: May 31 2013 Adding SSZipArchive to Podfile May 30 2013 SSToolkit May 29 2013 brew local modification error and solution May 15 2013 Whenever you think you need urllib2, you actually need requests May 14 2013 Algorithms for Making Good Decisions May 12 2013 Useful erlang function May 09 2013 TED: Parkinson’s, depression and the switch that might turn them off - Andres Lozano (2013) May 09 2013 XPath, Python and Erlang May 08 2013 To find out where homebrew keeps the files of a formula May 07 2013 Single quote is for something else in erlang May 06 2013 homebrew May 01 2013 Trying out cocoapods May 01 2013 Emacs fu 2 Apr 30 2013 homebrew and erlang R16B Apr 30 2013 Emacs fu 1 Apr 27 2013 Using sbt in ubuntu Apr 17 2013 Native Client: See only ‘Status: Creating embed: newlib’ in Chrome Feb 18 2013 libtoolize Jan 02 2013 2012 Easiest way to set up JAVA_HOME in OSX Dec 06 2012 XCode linker error Dec 03 2012 What is Portable Native Client? Dec 02 2012 How to set up virtualenv and use pip in python 3.3 Nov 18 2012 VirtualEnv and Python 3.3 Nov 13 2012 Steven Pinker: Linguistics as a Window to Understanding the Brain Oct 23 2012 What is going on? Need to find out how to override the mirror url. Oct 14 2012 Scala IDE Oct 14 2012 Bovine Spongiform Encephalopathy (BSE) aka Mad Cow Disease Oct 11 2012 Simple R vector Sep 27 2012 “Python Epiphanies” by Stuart Williams Sep 26 2012 Was about to hit ‘brew install git’. Then I realised I’d already have git installed Sep 26 2012 The most cost-effective way to store a DNA sequence … is the DNA itself Sep 23 2012 Side effect programming is bad Sep 20 2012 Scala build tool Sep 19 2012 iMac woe Sep 16 2012 Human Behavioral Biology by Robert Sapolsky Sep 10 2012 Pathogen: manage vim runtimepath Sep 09 2012 External Harddisk, Airport Extreme and Time Capsule Sep 07 2012 iTune Festival Sep 07 2012 Population - Can We Begin to Talk Sensibly? Sep 05 2012 Doing python programming on osx Sep 04 2012 Donkey anaphora Sep 03 2012 Gargoyle Sep 02 2012 Doing a clean install of Mountain Lion. Sep 01 2012 50th Anniversary of LISP 1.5 Programmer’s Manual Aug 30 2012 Scottish independence referendum is 2 years away. Aug 27 2012 Recapitalize the poors Aug 26 2012 It is frustrating to use Windows Aug 22 2012 Predictably Irrational Aug 21 2012 Regular Polyhedra Aug 20 2012 ‘Comparing the 2012 drought to the Dust Bowl droughts of the 1930s’ by Dr. Jeff Masters Aug 19 2012 ‘Winner Take All: The Race for the World’s Resources’ by Dambisa Moyo Aug 18 2012 A way to generate random password in erlang Aug 17 2012 Delete a row from UITableView Aug 16 2012 Put the events into historical perspective Aug 15 2012 Latest update of Google Chrome makes the cpu fan of my mac book pro spin like crazy. Switch back to firefox for now Aug 14 2012 Output from “brew install python3“. Need to check why symlink step failed Aug 14 2012 The importance of the idea of ‘map’ Aug 13 2012 How to dismiss a modal view controller which is created by a segue in storyboard? Aug 12 2012 Calculate cash flows in python Aug 11 2012 Calculate regular payment based on rate, number of payment and PV Aug 10 2012 UIViewController::setMoviePlayerController Aug 09 2012 Got this error message in xcode Aug 08 2012 In ocaml, “let rec” defines a recursive function, for example: Aug 07 2012 Wat Aug 06 2012 Encountered this error when adding core data support to my ios project Aug 05 2012 Google search intext: operator Aug 05 2012 Doing complex math in python Aug 04 2012 Trying to retrofit coredata into an iOS Tabbed application. Kind of painful. Aug 04 2012 Geometrical interpretation of Qubit Aug 03 2012 The Ferguson Principle Aug 03 2012 Sometimes it is quite fun to answer some questions in Stackoverflow: you can help someone seeking answer and you may also learn a new thing or two yourself in the process. Aug 02 2012 Dirac’s ket notation Aug 01 2012 Normalization on the complex amplitudes Aug 01 2012 Qubits Jul 31 2012 In a linear superposition of any k states, the probability amplitude is normalised to 1 Jul 31 2012 Common Python Beginner Mistake (3) - use of append Jul 31 2012 Base class stream API Jul 30 2012 The more I know about about oCaml, the more interesting it appears to me. Jul 30 2012 Algebraic data type Jul 29 2012 This class is not key value coding-compliant for the key ‘xyz’ Jul 29 2012 python exceptions in python antlr package Jul 28 2012 It has become my habit that I use google search to do simple arithmetic. Now Google improves it further by adding a calculator interface. Jul 28 2012 Dfa class Jul 26 2012 The Grand Chessboard by Zbigniew Brzezinski (12) Jul 25 2012 The Grand Chessboard by Zbigniew Brzezinski (11) Jul 24 2012 The Grand Chessboard by Zbigniew Brzezinski (10) Jul 23 2012 Classes in recognizers.py Jul 22 2012 Casting is optional Jul 22 2012 The Grand Chessboard by Zbigniew Brzezinski (9) Jul 21 2012 Remote virtual interface (RVI) Jul 20 2012 The Grand Chessboard by Zbigniew Brzezinski (8) Jul 19 2012 The Grand Chessboard by Zbigniew Brzezinski (7) Jul 18 2012 Petrine Doctrine Jul 17 2012 The Grand Chessboard by Zbigniew Brzezinski (6) Jul 16 2012 Use “currentTitle“ to obtain the caption title of a “UIButton“ Jul 15 2012 XIST Jul 14 2012 Minimum font size: 13 points Jul 13 2012 The Grand Chessboard by Zbigniew Brzezinski (5): Russia and Ukraine Jul 12 2012 Comfortable minimum size: 44x44 points Jul 11 2012 The Grand Chessboard by Zbigniew Brzezinski (4) Jul 11 2012 numpy sum and axis Jul 10 2012 The Grand Chessboard by Zbigniew Brzezinski (3) Jul 10 2012 The Grand Chessboard by Zbigniew Brzezinski (2) Jul 10 2012 The Grand Chessboard by Zbigniew Brzezinski (1) Jul 09 2012 Singleton Jul 08 2012 Simple Numpy example. To illustrate the use of “arange“ and “resize“ Jul 08 2012 Sometimes “easy_install“ drives me nut Jul 08 2012 My easy_install script is installed to “/usr/local/share/python“ Jul 08 2012 Got this when running “brew install python3“ Jul 08 2012 Creational pattern in python Jul 08 2012 I was thinking that the rocket had twenty thousand components, and each was made by the lowest bidder Jul 02 2012 Milk Spot Jul 02 2012 python setup.py sdist Jul 01 2012 A Palindromic Chinese Sonnet Jun 30 2012 ‘Bobby Fischer’ by David Tang Jun 30 2012 use “xcode-select“ to select which XCode to run e.g. Jun 29 2012 It is how to list schemes in a xcode project Jun 28 2012 It is a very old news, back in 2004: Jun 28 2012 A scheme calls a number of targets Jun 27 2012 Plans are nothing; planning is everything. Jun 27 2012 Error: No developer directory found at /Developer Jun 26 2012 Emacs-style key bindings are built into Cocoa Jun 26 2012 Authors@Google: Joseph Stiglitz Jun 25 2012 Command-E to quick search; Command-G for repeat in-file search Jun 25 2012 In XCode, Option + Command + ‘Click on a symbol’ will open the definition in a second window Jun 25 2012 Japan before 1937 Jun 24 2012 One use case of Apple TV: Stream WWDC video onto the TV. Jun 24 2012 new llvm c compiler warning flag “-Weverything” Jun 23 2012 Got “To update this application, sign in to the account you used to purchase it” error when trying to update XCode. Jun 22 2012 First Responder Jun 21 2012 Chugger Jun 18 2012 chillax Jun 17 2012 Gambit scheme built-in help Jun 16 2012 Chales Dicken and USA Jun 16 2012 Hopefully it is a solution to my problem Jun 14 2012 Most important layout related logic are inside MyMovieViewController in the MediaPlayer_iPhone example Jun 12 2012 Finally figure out the back button title not set issue. Jun 12 2012 For some reason I cannot set the title of the “backBarButtonItem“ of “navigationItem“ programmatically. I can only set it in the InterfaceBuilder. Jun 11 2012 Having some simple fun with gambit-scheme Jun 11 2012 Annoying. Cannot get the subview resized automatically, despite doing this: Jun 10 2012 How to bring a subview to the front when you tap it? Jun 10 2012 Rational Trigonometry Jun 09 2012 Quote of the Day Jun 06 2012 Apparently I am not the only who mistook Emma Stone for Linsay Lohan. Jun 05 2012 Pasta with Shrimp and Broccoli in a nice Garlic Pesto Jun 05 2012 Did a ‘git commit .’ but did not realised the commit has failed. Jun 02 2012 MPMoviePlayerViewController May 31 2012 It is very easy to remove the tab bar at the bottom. May 31 2012 I bought some powdered water but I don’t know what to add May 30 2012 Basic Collections in Objective-C May 30 2012 Tab bar controller (reading 1) May 29 2012 Problem: Cannot use ‘push’ segue between a UITableview cell and another controller May 28 2012 Frame vs Bound May 28 2012 ‘Growing up Asian in Australia’ by Alice Pung May 27 2012 iPod library May 27 2012 Interface type cannot be statically allocated May 27 2012 The debugger will stop at the “UIApplicationMain“ line May 27 2012 When I select a prototype cell, it does not follow segue and show the destination controller, as defined in the storyboard above. May 26 2012 Sample use of pragma mark May 26 2012 Added a UITableVIew to my custom controller. Now I want to be able to add a segway to a cell in this table view. May 26 2012 Can you spot the problem here? May 26 2012 Hit a EXC_BAD_ACCESS exception. May 26 2012 Dispatch IO May 25 2012 Justinian I May 25 2012 GLPK - the GNU Linear Programming Kit May 25 2012 ‘12 Byzantine Rulers: The History of The Byzantine Empire’ by Lars Brownworth May 24 2012 Need to refresh my memory about how to do array or dictionary in objective-c… May 24 2012 What is the difference between a porcupine, hedgehog and echidna? May 24 2012 Trying out “ ALAssetsLibrary“ May 24 2012 Installing Ubuntu 12.04 server. May 24 2012 Encountered this problem when trying to deploy app to the phone May 23 2012 When creating the new project in Xcode, the ‘Class prefix’ should be of reasonable length (say 2 to 6 characters). May 23 2012 BRIC: Brazil, Russia, India, China May 22 2012 OSX cflags May 22 2012 ImportError: No module named _ckernel May 22 2012 Underfitting -> high bias May 22 2012 Changed a controller to be a subclass of UITableViewController and got this May 21 2012 Installing pyML by running “python setup.py install“ May 21 2012 I do not usually run “source activate” before running the python runtime in a virtualenv env. However it seems to work OK without. May 21 2012 pip cannot find the pyML package May 20 2012 Let’s try May 20 2012 Turbulence ahead. Hold Tight! May 19 2012 Trying out iTerm2. Does not work well with vi by default (up/down arrow keys are not recognised) May 18 2012 NSLog May 18 2012 odict May 18 2012 libsvm May 17 2012 Churchill’s influence in Washington has declined significantly after 1942 May 17 2012 svmtrainer May 16 2012 There is no _insertAfter_ in JavaScript May 15 2012 Population of Sweden was 7 millions in 1945. It is around 9 millions in 2010. May 15 2012 Slicing magic May 15 2012 A Paganini’s 24th caprice is on my iPhone. Beautiful music but I have no idea why it is there. May 14 2012 ‘Shakespeare’ by Bill Bryon May 13 2012 One way to separate the keys and values of a dictionary into two lists May 09 2012 Reading list: May 07 2012 Get pid of the current process in erlang May 06 2012 brew install google-go May 05 2012 Solution to the pip scipy problem May 05 2012 Hiroyasu Koga May 05 2012 It is a follow-up on an May 04 2012 The pip cannot install scipy properly. May 03 2012 Apparently my first attempt to run ‘./bin/pip install scipy’ in virtualenv on OSX lion has failed with bunch of error messages. But second run just miraculously fine. May 03 2012 scipy and pybrain May 02 2012 Trying to “pip install numpy“ on ubuntu, and got this: May 02 2012 Installing scipy in ubuntu May 02 2012 Install virtualenv May 01 2012 Very old easy_install Apr 30 2012 Install python 2.7 using brew Apr 30 2012 Preserve leading zero when converting hex value into binary Apr 30 2012 I don’t tell lawyer jokes. Lawyers don’t think they’re funny and everyone else doesn’t think they’re jokes. Apr 29 2012 __get__ Apr 29 2012 Updating Virtual box to version 4.1.14 Apr 29 2012 byte-compiling error Apr 28 2012 Follow-up on a previous Apr 28 2012 pip, setuptools, easy_install and distribute Apr 28 2012 Followup piece of my last gcc 4.2 problem Apr 28 2012 To free up harddisk space on mac… Apr 27 2012 I think I finally understand what the problem is. Apr 26 2012 I mis-typed the tumblr url to tumbr.com, and it takes me to this tumblr-themed “survey” site Apr 25 2012 I want to enable Apr 25 2012 After reinstalling Xcode 4.3, I lost the gcc-4.2. Apr 24 2012 If I have removed a file by accident, and want to reinstate the file form a source code repository, then… Apr 23 2012 Sometimes my time is spent on things which are mundane and mindless. Today is a good example… Apr 22 2012 In AD287 Diocletian divided Roman Empire into East and West Apr 10 2012 Start reading ‘The Trial’ by Kafka Apr 10 2012 Some useful UIViewController properties Apr 09 2012 viewDidLoad Apr 09 2012 My syslog is full of these error messages Apr 07 2012 ‘Inflation clock ticks for Big Ben’ by Michael West Apr 06 2012 Biannual vs biennial Apr 06 2012 Euler Identity is voted the most beautiful mathematic formula in 1988 Apr 05 2012 The opposite to faith is not doubt. It is certainty. Apr 02 2012 Convolution Mar 29 2012 Tourette syndrome Mar 28 2012 A patriot loves his country; a nationalist hates all others Mar 27 2012 Downward causation Mar 26 2012 Libertango performed by Ikuko Kawai Mar 25 2012 The size of Antarctica is almost twice as large as Australia (14,000,000 km2 vs 7,617,930 km2) Mar 24 2012 Parapet Mar 23 2012 Pomposity Mar 22 2012 Irascibility Mar 21 2012 Charlatanism Mar 20 2012 Development of Beam Guidance in WWII Mar 19 2012 EXC_BAD_ACCESS Mar 19 2012 Acolytes Mar 18 2012 Prevaricate Mar 17 2012 Getting this: “Couldn’t register com.abc.MyApp with the bootstrap server. Error: unknown error code.” when trying to run a unit test in AppCode. Mar 17 2012 Incongruous Mar 16 2012 Disappointed at MS powershell Mar 15 2012 Gaiety Mar 15 2012 Market hasn’t really changed all these years Mar 14 2012 Start reading the book ‘A World without Ice’ by Henry Pollack Mar 14 2012 Finally finished the book, “Winston’s War: Churchill, 1940-1945” by Max Hastings Mar 13 2012 Powershell Mar 12 2012 I have these buttons that for some reason will send message to two ‘slots’: one to the controller and the other to the responders. Mar 09 2012 How to convert an NSString into an NSNumber? Mar 08 2012 How to wrap an exception in a custom exception with original stacktrace and re-raise? Mar 07 2012 Was getting ‘class has no selector alloc’ method error when I wrote Mar 06 2012 Lord Stern on climate change in LSE (23/2) Mar 05 2012 RBA Bulletin: ‘Australian Capital Flows And the Financial Crisis’ Mar 05 2012 You have to jog around your own neighborhood before you’re ready to run a marathon! Mar 04 2012 Augmented assignment in Python Mar 03 2012 Do custom initialisation in ViewDidLoad of a ViewController Mar 03 2012 There is no such thing as NSFloat Mar 02 2012 Add two NSNumbers together Mar 02 2012 Watched Mar 01 2012 Minoan civilization Feb 29 2012 The fathers of Andrew Jackson, 7th President of the USA; Rutherford B Hayes, 19th President of the USA; and Bill Clinton, 42nd President of the USA, all died before their sons were born Feb 28 2012 Hack up a calculator GUI relatively effortlessly :-) Feb 27 2012 You can be right for the wrong reasons… Feb 26 2012 Guillain-Barre syndrome Feb 25 2012 ‘Winston’s War: Churchill, 1940-1945’ by Max Hastings Feb 25 2012 Carlos Ghosn Feb 24 2012 Arcsine law of P/L Feb 23 2012 A fast nickel is better than a slow dollar Feb 22 2012 Common Python Beginner Mistake (2) - return value ‘None’ Feb 21 2012 When there is a positive correlation between the financing rate r and a future contract subjected to marks-to-market rules, the future will be convex and will trade above the forwards of the same delivery Feb 21 2012 Encountered this objective-c compilation error: Feb 20 2012 Jean-Dominique Bauby Feb 17 2012 Objective-c protocol syntax Feb 15 2012 Trying to declare a class in objective-c… Feb 13 2012 Dev in a Box Feb 11 2012 There is nothing so practical as a good theory Feb 10 2012 Queen Victoria and Hemophilia Feb 06 2012 Generally speaking, the errors in religion are dangerous; those in philosophy only ridiculous Feb 02 2012 Know my erlang module (3): yecc Jan 24 2012 Installing JDEE for emacs: Problem with avltree Jan 24 2012 Know my erlang module (2): erl_scan Jan 23 2012 I always thought sharks lay eggs Jan 23 2012 Numerical Algorithms: encryption Jan 22 2012 Know my erlang module (1): cover Jan 22 2012 VirtualBox upgrade Jan 18 2012 Michael Gazzaniga - Free Yet Determined and Constrained (Michael Gazzaniga) Jan 16 2012 Trying to build LibreOffice on osx. Encountered this error message: Jan 16 2012 Python 3.3 build missing package Jan 15 2012 Problem solved: compiling python 3.3 on osx Jan 15 2012 gcc vs llvm-gcc on osx Jan 13 2012 Chinese names according to Old Tradition Jan 13 2012 Illegal guard expression for IF in erlang Jan 10 2012 The contamination principle dictates that every nonlinear security commands time value, positive if the security is convex and negative if it is concave. Jan 10 2012 I must have done something silly with the DYLD_LIBRARY_PATH. This is an error I got when running svn Jan 10 2012 Just installed ‘otx’, an OSS implementation of ‘otool’ Jan 04 2012 Just learn something new (to me) about bash: Jan 04 2012 What is going on? Jan 04 2012 2011 Brew symlink exception Dec 31 2011 How to retrieve session information of a @WebMethod call in Spring Framework Dec 30 2011 Design Pattern in Python Dec 29 2011 my python 3.3 compilation ends in this Dec 29 2011 Autoconf on Lion Dec 28 2011 A simple example of using hg Dec 28 2011 port vs brew Dec 28 2011 port is corrupted Dec 28 2011 hg problem Dec 28 2011 The City of London shows that logic has its limits and that the City lies outside them. Dec 22 2011 Just find out about boks_sshd Dec 22 2011 EFP Dec 21 2011 Oracle Solaris 11 Package Management with IPS Dec 12 2011 Computer scientists study Artificial Intelligence; Economists study Natural Stupidity Dec 07 2011 Make me feel excited about Particle Filter too Nov 24 2011 Research turns money into idea; Innovation turns idea into money Nov 14 2011 Up and Down the Ladder Of Abstraction Nov 14 2011 Three Forms of Learning Nov 13 2011 P(SPAM|’today is secret’) Nov 01 2011 Laplace Smoothing Oct 31 2011 switch statement requires all the case labels to be constant at compile time Oct 31 2011 D-seperation Oct 24 2011 What is the “chflags“ in osx? To find out Oct 18 2011 When answer is Excel, it is probably not Oct 06 2011 Alternative to Wikipedia Sep 19 2011 Use of java.uTIL.concurrent.Executor stops tomcat from stopping Sep 15 2011 A neat way to generate SQL in Java Sep 13 2011 Common Python Beginner Mistake (1) - Shadowing Sep 13 2011 To turn on SQL tracing in Hibernate Sep 12 2011 If you command-click the title bar of “Preview“, the directory stack will show up Sep 10 2011 Java 1.7 preview edition on OSX Sep 10 2011 Sometimes software development is really just about complexity management Sep 10 2011 brew install couchdb Sep 09 2011 Lambda in Java Sep 09 2011 Apple and OpenJDK Sep 09 2011 lldb Sep 07 2011 Question to self: python and xcode Sep 07 2011 Hong Kong Triumvirate? Sep 07 2011 voltdb Sep 06 2011 Brew update issue on Lion Sep 02 2011 Last warning. Aug 30 2011 erlang’s “ configure“ sTILl reports these components as missing: Aug 30 2011 Trying to build erlang on scientific linux. Aug 30 2011 Enabling STM in python Aug 29 2011 Try to use “git“ on a cpython code base (which uses hg as the VCS). Was thinking: Need to come up with a “.gitignore“ myself, probably. Turns out there is a “.gitignore“ in the repository. Glad need not to do this extra work Aug 28 2011 IAN: Indexed Amortizing Notes Aug 28 2011 comm Aug 27 2011 “gcc“ on Scientific Linux is 4.4.5. The latest stable is 4.6.1. Aug 20 2011 [http://www.scientificlinux.org/](Scientific Linux ) Aug 20 2011 Installing Scientific Linux… Apparently 256M RAM is not sufficient Aug 19 2011 Balmain Pier Aug 19 2011 Rbind - bind data frame by rows Aug 17 2011 Top most useful R trick: str Aug 16 2011 Learn something about dis Aug 16 2011 Discovered two useful modules in python Aug 07 2011 Why iOS developer should wait for the 15’ MPA Aug 07 2011 Xcode 4.1.1 is out Aug 06 2011 g++ and clang++ Aug 06 2011 A simple clang version check Aug 06 2011 Lion Aug 03 2011 XCode 4.1 does not play too well with ‘Full screen’ mode. If I connect an iPhone to the MBP, the Xcode will show a dialog box to ask me if I want to capture the latest iOS. The dialog box appears in the Organiser windows, but it is totally inaccessible. (You can see between the gap of two desktop when doing three-fingers swipe) Aug 03 2011 LSE has a public lecture about the rise and decline of Wallonia, Belgium. Sounds interesting. Aug 03 2011 Finally killed the _perl_ job that owns the alert window. Killed the parent _uninstalld_ (?) process too Aug 03 2011 Xcode installation woe Aug 03 2011 XCode 4.2 beta also does not work with Lion. Uninstalled. Aug 03 2011 Xcode 3 no longer works with Lion. Need to figure out how to remove it properly. (Is running “uninstall-developer-folder“ all I need?) Aug 02 2011 A yard is a jargon for ‘billions’ in trading Aug 01 2011 NaCl (Native Client) reached ABI stability Aug 01 2011 Trying to write something to test my tumbler->twitter->google+ link, but could not think of anything that will not get me into trouble. May as well just stick to old school _Test_ Jul 31 2011 Trying to link my tumblr to twitter, then to Google+ Jul 31 2011 Openstack: cloud technology written in python Jul 27 2011 Libc++. Looks powerful Jul 25 2011 New _auto_ keyword in c++0x and obj-c Jul 25 2011 TTBA Jul 25 2011 For MSSQL2000, a row cannot exceed the size of a page, which is 8KB - overhead i.e. 8060 bytes. 8KB is the size of a continuos disk space for storing, read and writing data. Jul 25 2011 Cars with zero emission and no noise? Jul 24 2011 Use Cmd+Ctrl+’F’ to exit full screen mode in Lion Jul 23 2011 iTune 10.4 (80) has a new look. Jul 22 2011 Grand Central Dispatch and critical section. Jul 21 2011 Europython 2011 presentation slide/video are now available Jul 20 2011 99c silence track on iTune Jul 20 2011 Mac Book Air Jul 20 2011 R problem on WinXP Jul 20 2011 Did a stupid thing. Jul 19 2011 Console log is filled with messages like this Jul 19 2011 How to customise your math.sqrt()? Jul 17 2011 Bonjour Jul 16 2011 Advantage of giving little Python introductory courses Jul 16 2011 To lock screen easily in OSX Snow Leopard… Jul 16 2011 Trivial, unrealistic example of the application of “ partial()“ Jul 15 2011 Thinking about how to introduce the “functool.partial“ function in python to non-python programmers. Jul 15 2011 Python 3.2.1 is released Jul 12 2011 For work reason I installed Windows 7 for some investigation. The interface irks me to no end… Jul 11 2011 Get rid of self Jul 11 2011 Why do you need explicitly have the ‘self’ argument into a Python method? Jul 11 2011 The Emperor’s New Clothes Jul 10 2011 Bought an App from AppStore but the download has been stalled half way through. Jul 08 2011 Bunch of c-python development tasks that are marked as ‘easy’ Jul 08 2011 Cannot get preview of html or dvi to work in _Lyx_. It complaints about “LaTeX Error: Unknown graphics extension: .ps.“ Jul 07 2011 Predictably Random: Meta thinking on GIL killing Jul 05 2011 Sybase: how to add a connection definition to ASE isql? Jul 05 2011 Some useful vim trick Jul 04 2011 Sleep(-1) actually means something in Windows Jul 02 2011 To start a headless VirtualBox instance Jun 30 2011 Sorting vs Ordering Jun 30 2011 http://en.wikipedia.org/wiki/Dihedral_angle Jun 30 2011 afconvert - audio format tools on osx Jun 29 2011 ufsdump Jun 29 2011 http://en.wikipedia.org/wiki/Soft_wood Jun 28 2011 Inflation has moved up recently, but the Committee anticipates that inflation will subside to levels at or below those consistent with the Committee’s dual mandate as the effects of past energy and other commodity price increases dissipate. Jun 27 2011 WWDC 2011 videos are out. Need to watch all of them! Jun 27 2011 To hide object files in C/C++ project in Eclipse CDT Jun 27 2011 The amount the U.S. military spends annually on air conditioning in Iraq and Afghanistan: $20.2 billion. Jun 27 2011 http://camel.apache.org/python.html Jun 26 2011 Diff tools on OSX Jun 26 2011 http://en.wikipedia.org/wiki/Jimmy_Cha Jun 26 2011 voltdb Jun 26 2011 “/etc/inet/netmasks“ is the official SVr4 name of the netmasks Jun 26 2011 NIS vs LDAP Jun 26 2011 The five layers of the TCP/IP layering model are listed here: Jun 25 2011 VirtualBox is so cool Jun 25 2011 View the packet statistics on solaris Jun 25 2011 Just found an old receipt for 4 GB RAM I purchased on 12 Aug 2009. It was for my last Mac Book Pro (pre-unibody model). It costed me A$220. Jun 24 2011 CPython test coverage Jun 23 2011 http://hg.python.org/cpython/ Jun 22 2011 Seems like it is a solution to the problem I described Jun 22 2011 Annoying error message when trying to compile latest python default branch in OSX Jun 22 2011 _svn update _is again split into two stage process in _hg_: Jun 22 2011 ‘svn info’ in hg Jun 22 2011 The python build on solaris express is a partial success Jun 22 2011 Tried to build _python_ in _Solaris Express 11_. Jun 22 2011 http://bugs.python.org/issue12267 Jun 21 2011 http://wwwsearch.sourceforge.net/mechanize/ Jun 20 2011 Angelika Langer’s Java Generics FAQs Jun 20 2011 [http://code.google.com/p/guava-libraries/source/browse/trunk/guava/src/com/google/common/collect/Sets.java](this) Jun 20 2011 Trying to compile _python 3.2_ on _winxp_ using VS Express 2008. Basically all the other express version (2003, 2005 and 2010 ) won’t work. Jun 20 2011 Now let’s try install _erlang_ on _Solaris Express_: Jun 19 2011 Windows Vista (and by extension Windows 7) seems to have adopted the idea of Jun 19 2011 _gksu_ - a GTK+ su frontend Jun 19 2011 VirtualBox ‘non-optimal setting’ warning Jun 19 2011 Fedora does not use inittab to control runlevel any more Jun 19 2011 Boustrophodonic Jun 19 2011 Installing erlang via apt-get in Ubuntu 11.04 Jun 19 2011 Quite a lot. Jun 18 2011 My Fedora instance refused ssh connection. Needed to disable the iptable in order to get it working Jun 18 2011 On unix like systems, ActiveMQ is running on port 61616 Jun 18 2011 Moving onto “More Effective C++” Jun 18 2011 Item 50: Improve your understanding of C++ Jun 18 2011 Item 49: Familiarize yourself with the standard library Jun 18 2011 ARC Jun 18 2011 Item 47: Ensure that non-local static objects are initialized before they’re used Jun 17 2011 RAII stands for Jun 17 2011 Encountered Jun 16 2011 A _telomere _is a region of repetitive DNA sequence at the end of a chromosome, which protects the end of the chromosome from deterioration or from fusion with neighbouring chromosomes. Jun 16 2011 The Bible clearly states that God brought before Adam all the beasts of the field and all the fowl of the air. What about the fish? Did Adam name the fish? Jun 16 2011 I just realised today how versaTILe Apple hardware is. A mac can basically boot off a USB flash drive or an external harddisk. Jun 16 2011 Wasted a few CD-R/DVD-R because I used the ‘Burn’ option to write the iso images to the disks. OSX will treat the iso files as data file. Jun 16 2011 Should always use Safari to book a Apple Genius Bar session. The online reservation does not work too well in Chrome. Jun 15 2011 Item 48: Pay attention to compiler warnings Jun 14 2011 Item 46: Prefer compile-time and link-time errors to runtime errors Jun 14 2011 Item 45: Know what functions C++ silently writes and calls Jun 14 2011 TODO: Investigate how to run virtualbox vm instances on osx using launchctl. Jun 14 2011 This Jun 14 2011 Usb flash drive for OSX Snow Leopard installation Jun 14 2011 To query for a list of vm, do this: Jun 13 2011 Moving onto the Miscellany section of ‘Effective C++’ Jun 13 2011 Item 44: Say what you mean; understand what you’re saying Jun 13 2011 Item 43: Use multiple inheritance judiciously Jun 13 2011 Item 42: Use private inheritance judiciously Jun 13 2011 Item 41: Differentiate between inheritance and templates Jun 13 2011 Item 40: Model ‘has-a’ or ‘is-implemented-in-terms-of’ through layering Jun 13 2011 Item 39: Avoid casts down the inheritance hierarchy Jun 13 2011 OpenRTB Jun 13 2011 Item 38: Never redefine an inherited default parameter value Jun 13 2011 Item 37: Never redefine an inherited nonvirtual function Jun 13 2011 Item 36: Differentiate between inheritance of interface and inheritance of implementation Jun 12 2011 Item 35: Make sure public inheritance models ‘isa’ Jun 12 2011 Item 34: Minimize compilation dependencies between files Jun 12 2011 Install erlang on a ubuntu 10.10 instance Jun 12 2011 To install ssh service to a Ubuntu server Jun 11 2011 Reading Jun 09 2011 Watching WWDC 2011 keynote Jun 07 2011 Seems like I have polluted my python installation a little bit. There are two python2.6 Jun 07 2011 To install command md5sum in brew, run Jun 07 2011 $MACOSX_DEPLOYMENT_TARGET mismatch Jun 07 2011 http://www.abc.net.au/rn/bigideas/stories/2011/3234042.htm Jun 06 2011 Antonio Canova Jun 06 2011 _JVMTI_ stands for Jun 05 2011 Esc-option triggers code completion in xcode Jun 05 2011 Item 33: Use inlining judiciously Jun 05 2011 Item 32: Postpone variable definitions as long as possible Jun 05 2011 Item 31: Never return a reference to a local object or to a dereferenced pointer initialized by new within the function Jun 05 2011 Item 23 revisited Jun 05 2011 Item 30: Avoid member functions that return non-const pointers or references to members less accessible than themselves Jun 05 2011 Item 29: Avoid returning ‘handles’ to internal data Jun 05 2011 Item 27: Explicitly disallow use of implicitly generated member functions you don’t want Jun 05 2011 Item 28: Partition the global namespace Jun 05 2011 Item 26: Guard against potential ambiguity Jun 05 2011 Item 25: Avoid overloading on a pointer and a numerical type Jun 05 2011 Item 24: Choose carefully between function overloading and parameter defaulting Jun 04 2011 Item 23: Don’t try to return a reference when you must return an object Jun 04 2011 Item 22: Prefer pass-by-reference to pass-by-value Jun 04 2011 Item 19: Differentiate among member functions, non-member functions, and friend functions Jun 03 2011 Item 21: Use const whenever possible Jun 03 2011 Item 20: Avoid data members in the public interface Jun 03 2011 c trick question Jun 03 2011 How to do Lazy Loading with NSURLConnection Jun 03 2011 Compile this and run… Jun 02 2011 Item 18: Strive for class interfaces that are complete and minimal Jun 02 2011 Item 17: Check for assignment to self in operator= Jun 02 2011 Item 16: Assign to all data members in operator= Jun 02 2011 Dalai Farmer (Bill Bailey) Jun 02 2011 Installing couchdb using brew Jun 02 2011 Fill a popover with a tableview Jun 02 2011 Null Pointer in different languages Jun 02 2011 Using const with Reference Arguments Jun 01 2011 Assignment operator is right-associative Jun 01 2011 Item 15: Have operator= return a reference to *this Jun 01 2011 ANSI C supports “const“ keyword in C99 Jun 01 2011 Item 14: Make sure base classes have virtual destructors Jun 01 2011 iPhone buttons Jun 01 2011 Item 13: List members in an initialization list in the order in which they are declared Jun 01 2011 Item 12: Prefer initialization to assignment in constructors Jun 01 2011 C++: Dynamic Array May 31 2011 C++ Weirdness May 31 2011 C++: Required Class Operations May 31 2011 Item 11: Declare a copy constructor and an assignment operator for classes with dynamically allocated memory May 31 2011 How to abort a maven build if checkstyle fails May 31 2011 Item 10: Write operator delete if you write operator new May 31 2011 Item 9: Avoid hiding the ‘normal’ form of new May 31 2011 Item 8: Adhere to convention when writing operator new and operator delete May 31 2011 United States Minor Outlying Islands May 31 2011 Item 7 revisited May 31 2011 Item 7: Be prepared for out-of-memory conditions May 31 2011 A way to remove a certain layer form a UIView’s layers May 31 2011 Item 6: Use delete on pointer members in destructors May 30 2011 Item 5: Use the same form in corresponding uses of new and delete May 30 2011 Another oldie: “Put The Blame On Mame” by Rita Hayworth May 30 2011 “Send Me to the Electric Chair” by Dinah Washington. Very interesting. May 30 2011 Etta James May 30 2011 Item 4: Prefer C++-style comments May 30 2011 Item 3: Prefer new and delete to malloc and free May 30 2011 Item 2: Prefer to May 30 2011 Item 19: Differentiate among member functions, non-member functions, and friend functions May 30 2011 Item 1: Prefer const and inline to #define May 30 2011 The _explicit_ keyword in C++ is used to declare explicit constructors. Explicit constructors are constructors that cannot take part in an implicit conversion May 30 2011 Item 38: Never redefine an inherited default parameter value May 30 2011 Alexander’s Star May 29 2011 Function arguments in C++ are passed by-value. A copy of each argument is made. A function works with the copy, not the original May 29 2011 _initialize_ is a class method which will be called before any other method is called on a class. Alternatively use a function with ___attribute__ ((constructor))_ May 29 2011 To find out what iOS device is attached to the system, we can try monitor May 29 2011 Difference between setObject:forKey: and setValue:forKey: in NSMutableDictionary May 29 2011 Boby guard technique May 28 2011 Stupid mistake May 27 2011 Counting unique items in an array May 26 2011 When I use google doc in chrome, I can directly print the document to the printer by just pressing the printer icon. May 26 2011 Liskov substitution principle May 25 2011 It is like you want to be a nun because you saw a flying nun. May 25 2011 Earn another experience point May 24 2011 For some reason my Chrome installation is gone from my window XP at work. I have to re-install and redo some setup again May 24 2011 Simple grid like arrangement on iOS May 24 2011 A friend helps you move. May 23 2011 RSS Feed Parsing Tasks (I) May 23 2011 CGAffineTransformMakeRotation vs CGAffineTransformRotate May 23 2011 net_adm can be used to discover the erlang cluster topology. May 22 2011 Note to self: _auth_ module can help us to find out the cookie of nodes. May 22 2011 Cannot add ivar to a category @interface May 22 2011 To detect iPhone 4/Retina Display May 22 2011 To add framework to a project in XCode 4 May 22 2011 Sieve of Eratosthenes, Process-Style May 21 2011 Generate a list of number May 21 2011 kick advance (back foot in, front foot kick) May 21 2011 Erlang built-in functions for working with tuples May 20 2011 $ in erlang May 20 2011 Some erlang predefined macros May 20 2011 Erlang shell command rr May 20 2011 Root View Controller’s connections May 20 2011 Detail View Controller’s connection May 19 2011 Mobius (III) May 19 2011 Loving JQuery. May 18 2011 To convert an NSString into an NSNumber May 17 2011 Trying to add SplitViewController to “self.window“ as a RootViewController. STILl not working. May 17 2011 Getting to understand more about the role of rootViewController May 17 2011 If external screen is attached to an ios device May 17 2011 UIApplicationExitsOnSuspend May 14 2011 Removing ‘*.xcodeproj/project.xcworkspace/’ can reset the window/workspace settings in xcode 4 May 14 2011 Higher order function in erlang May 13 2011 Did not know I can declare an anonymous function with multiple clauses as such: May 13 2011 Mobius (II) May 13 2011 Mobius May 13 2011 cd() in erlang on MS Windows May 12 2011 Warm Up (III) May 12 2011 Warm Up (II) May 12 2011 Warm Up May 12 2011 Happy to have enabled syntax highlight in this blog May 11 2011 Hammer May 11 2011 Reversing a list with slice in python May 04 2011 Hook and uppercut May 03 2011 GLSL May 03 2011 New OpenGL API May 03 2011 “NSManagedObject::willTurnIntoFault“ May 03 2011 Reading about GameKit and Session May 02 2011 *VBO*: OpenGL Vertex Buffer Object May 01 2011 Just learn something new to me: May 01 2011 Reading about May 01 2011 C refresher (3) May 01 2011 To sort an array of array by the array size Apr 30 2011 NSNumber is an object class whereas NSInteger is a primitive type. Apr 27 2011 A note-to-myself on “release“ Apr 27 2011 C refresher (2) Apr 27 2011 Brasilia Apr 26 2011 UIView tag and viewWithTag Apr 26 2011 C refresher Apr 25 2011 More CG APIs: CGGeometry Apr 25 2011 Latest Python Developer’s Guide: Apr 25 2011 Some CG APIs Apr 25 2011 Addis Ababa Apr 25 2011 Quartz aligns elements midway between pixels Apr 25 2011 CTM Apr 25 2011 Introduction to iPad GUI design by Omnigroup Apr 24 2011 Reflow and off-DOM node manipulation Apr 24 2011 There is this ‘Album Rating’ feature in iTune Apr 24 2011 Installing mercurial Apr 24 2011 getspent Apr 24 2011 Compiling Python 3.x ( Apr 24 2011 Tried this to build 64 bit erlang on osx: “./configure –enable-darwin-64bit; make“ Apr 22 2011 Got the following error messages when compiling a few c files in OSX Apr 21 2011 Mac OS X Objective-C 2.0 runtime library support functions and data structures are implemented in the shared library /usr/lib/libobjc.A.dylib. Apr 20 2011 NSValue is for wrapping primitive type as an object Apr 19 2011 [UIView addSubView:subview] Apr 19 2011 A fun idea Apr 18 2011 Struggled with Jquery autocomplete for a few days. It turns out I was using an unsupported version from bassistance.de Apr 18 2011 *anchor point*, the center point of a CALayer widget (i.e. (0.5, 0.5) ) Apr 16 2011 *ivar*, because it is ‘instance variable’ Apr 16 2011 -Werr or GTFO Apr 15 2011 Is there any condition where finally might not run in java? Apr 14 2011 Naming convention: -init, -new, -copy Apr 13 2011 Interesting talk: Apr 13 2011 Central Line Apr 13 2011 Learn something interesting today: Apr 12 2011 JVM: Sizing the Generations Apr 11 2011 Cocoa Binding Apr 11 2011 KVO Apr 11 2011 Learn something new today: Apr 11 2011 Example of EqualBuilder Apr 04 2011 Java vs Python (Prolog) Apr 02 2011 I was having UIWebView problem because I did not set my custom controller as the root view controller. Mar 30 2011 Let give three20 a go Mar 27 2011 Way to make a widget auto-resize to the size container view Mar 20 2011 UIWebView rotation on iPad Mar 20 2011 Difference between git clone and git pull Mar 20 2011 From the API doc Mar 20 2011 “[[webView.subviews objectAtIndex:0] setScrollEnabled:NO];“ Mar 20 2011 ASX:NTU rised by 20% on 16 Mar. Closed at 0.47 Mar 17 2011 Just realise Xcode 4 has built-in git support. Great. Mar 15 2011 Interface Builder toolbox Mar 13 2011 Cannot fully maximize the window a code editor of XCode4. Always a some pixels off from the top and bottom. Mar 13 2011 Final version of Xcode 4 seems to have fixed a lot issues I had before Mar 13 2011 Xcode 4 woe III Mar 08 2011 Getting a “Lexical or Preprocessor Issue: ‘XXXX.h’ file not found“ exception Mar 07 2011 Investigating the use of plist Mar 07 2011 ios framework problem… Mar 05 2011 Xcode 4 woe II Mar 05 2011 COMMAND + SHIFT + 4 does screen capture (by selection) inOSX Mar 05 2011 Xcode 4 woe cont’d Mar 05 2011 Checking out the example AAPlot to see how to use the core-plot Mar 02 2011 Trying out the core-plot example, then I hit this error: Feb 28 2011 Core plot related error Feb 27 2011 Xcode 4 error Feb 26 2011 Go Game 18/2/2011 Feb 18 2011 XCode 4 GM is flagging this style of code Feb 13 2011 I am doing Feb 13 2011 Exit full screen mode of chrome in osx Feb 13 2011 Change default text editor in osx Feb 13 2011 Unix Note (1) Feb 08 2011 After installing the Xcode 4 GM, it replaces the underlying Xcode executable of the Xcode icon on Dock to 4 too. Feb 08 2011 Core data 5 Feb 05 2011 maven2 archetype:generate problem Feb 04 2011 Next steps Feb 02 2011 Another EXC_BAD_ACCESS (2) Jan 29 2011 Another EXC_BAD_ACCESS Jan 29 2011 My EXC_BAD_ACCESS mystery Jan 29 2011 Core Data 4 Jan 27 2011 Looking into stacktrace related to EXC_BAD_ACCESS Jan 26 2011 Delete the working project in shell by accident! Time Machine saved the day Jan 26 2011 App just mysteriously terminates after core data fetch… Jan 26 2011 Can store data into the Core Data sqllite database, but cannot read it back Jan 25 2011 Core Data 3 Jan 24 2011 The console message is rather helpful Jan 23 2011 error: @synthesize property must be in implementation context Jan 23 2011 Core Data 2 Jan 23 2011 core data is not easy… Jan 23 2011 subversion note 2 Jan 18 2011 subversion note 1 Jan 18 2011 Core Data 1 Jan 18 2011 Fall into the same trap everytime Jan 16 2011 Finally I can bring up a login screen before the Split View in the ipad. Jan 16 2011 Splash screen on iOS Jan 13 2011 Modal View screws up the SplitView after dismiss. Jan 13 2011 iOS Idiom 2 Jan 10 2011 NSInvalidArgumentException Jan 10 2011 Some note on frame vs bounds Jan 09 2011 Cannot get UISplitViewController to rotate. Very frustrated Jan 07 2011 iOS Idiom 1 Jan 04 2011 Some UIKit classes such as “UIColor“, “UIFont“ and “UIImage“ are thread safe Jan 02 2011 Use NSZombieEnabled to catch BAD_ASSESS Jan 02 2011 2010 Use “copy“ in @properta of type NSStringy Dec 31 2010 NSIndexPath Idiom Dec 31 2010 Ambient Occlusion Dec 13 2010 1587 - A Year of No Significance (I) Dec 04 2010 algtop4 Dec 04 2010 algtop3 Dec 02 2010 Go scoring rule Dec 02 2010 Base SDK Missing Nov 30 2010 TpLink ADSL2 Modem woe Nov 25 2010 Lobster mortality in Long Island Nov 24 2010 More than one hour to sync 2100+ photo to an iPad Nov 24 2010 locate and updatedb in OSX Nov 23 2010 Trifoil Knot and Mirrored Trifoil Knot Nov 23 2010 Platonic solid Nov 22 2010 Crash Nov 19 2010 plgadd in solaris Nov 17 2010 ptree Nov 17 2010 NSView and NSControl Nov 16 2010 Objective-c: Interface builder Nov 11 2010 Objective-c: System processes Nov 11 2010 Objective-c: Notification Nov 11 2010 Objective-c: NSUserDefaults Nov 11 2010 Objective-c: Archiving Objects Nov 11 2010 Objective-c: Bundle and Resource Management Nov 11 2010 Objective-c: Working with Files Nov 11 2010 Objective-c: some foundation classes (2) Nov 11 2010 Objective-c: some foundation classes Nov 11 2010 Objective-c: autorelease Nov 10 2010 Erlang ‘bang’ Operator Nov 09 2010 Statistical Arbitrage Nov 04 2010 Risk vs Uncertainty Nov 04 2010 Solaris installation issue in VirtualBox Nov 03 2010 nltk (2) Oct 29 2010 swi-prolog (2) Oct 29 2010 swi-prolog Oct 29 2010 nltk (1) Oct 28 2010 Sun Installation: at 64%. SUNWftpr Oct 28 2010 SUNWrsgk Oct 27 2010 Xcode 4 blue Oct 27 2010 SUNWmcc Oct 27 2010 nltk and matplotlib Oct 27 2010 SUNWwbapi Oct 26 2010 nltk.download() Oct 26 2010 Solaris 10 u9 installation Oct 26 2010 NIF in erlang Oct 25 2010 iPad photo sync Oct 24 2010 dscl Oct 24 2010 MBP and SMB Oct 24 2010 There is a 10-users limit in the afp protocol Oct 24 2010 nltk setup Oct 24 2010 Reading iOS documentation on KVC Oct 20 2010 ditto Oct 20 2010 vi on black background does not work with MBP under sun Oct 20 2010 postgresql memo Oct 14 2010 Successfully compiled and built python 2.5.5 on osx 10.6 Oct 11 2010 Reading framework documentation Oct 11 2010 Overcoming compilation error Oct 08 2010 ‘struct winsize’ declared inside parameter list Oct 08 2010 -Wno-long-double Oct 08 2010 ActiveMQ build error Oct 06 2010 Hit a persistence related exception Sep 22 2010 Terminology in SplitView Sep 20 2010 EXC_BAD_ACCESS resolved Sep 14 2010 EXC_BAD_ACCESS Sep 14 2010 Abstract base class support in objective-c Sep 12 2010 Time Machine to network drive Sep 09 2010 UIViewController::viewDidLoad is not called Sep 05 2010 Optional Methods Sep 05 2010 NSArray is immutable Sep 04 2010 View and Controller Sep 04 2010 Use of Custom View Sep 02 2010 Unibody MBP Aug 31 2010 Wheel group Aug 20 2010 xcodebuild Aug 19 2010 Xcode4 and XIB files Aug 17 2010 iPhone 4 provisioning blue Aug 12 2010 Provisioning devices Aug 11 2010 Frost in July Aug 04 2010 Reading the provisioning documentation Jul 29 2010 iOS and Bluetooth Jul 26 2010 iPad bluetooth support Jul 20 2010 OpenGL ES: vsh and fsh Jul 20 2010 iOS and OpenGL ES Jul 18 2010 glColor3f and OpenGL ES 2.0 Jul 17 2010 KVO - Key Value Observation Jul 15 2010 EAGL Jul 15 2010 ‘The Grand Strategy of the Byzantine Empire’ by Edward N. Luttwak Jul 14 2010 Dashcode Jul 14 2010 Changing __MYCOMPANYNAME__ in Xcode template Jul 13 2010 Reading list of the day Jul 11 2010 epub is an open format Jul 10 2010 Learning Obj-c Jul 06 2010 Cinch Jul 01 2010 @property and @synthesize Jun 30 2010 NSLog Jun 26 2010 Positive Convexity Jun 20 2010 DAO vs DTO May 18 2010 Reuters RIC Codes Apr 20 2010 How to interpret a quote for FRA? Apr 07 2010 Macaulay Duration vs Modified Duration Apr 07 2010 Duration Mar 08 2010 Cell Biology Feb 10 2010 2008 Deep State Jun 24 2008 Importance of seeing thing Jun 22 2008 Stock Market Jun 20 2008 Noam Chomsky @ Google Jun 17 2008 One Soldier by Steven Wright Jun 09 2008 Hyperpower and Tolerance Jun 04 2008 My Favorite Comedians Jun 01 2008 Erlang - Parallel Programming without Pain May 29 2008 Going nuclear May 28 2008 What I have learnt from Eurovision May 27 2008 Wrong question? May 26 2008 Investment Survival Note 7 - Sound Accounting For Investors May 25 2008 Go and Life May 24 2008 Investment Survival Note 6 - Speculation and Investment May 24 2008 My First Mac and Virtual Box Experience May 22 2008 Militant materialism May 14 2008 Ant May 11 2008 The Importance of Being Nosy (Nosetests, Really) May 10 2008 Google Tech Talk: Economic Naturalist May 07 2008 UC Berkeley History 7B Apr 26 2008 Investment Survival Note 5 - How to Invest for Your Captial Appreciation Apr 19 2008 Python in the Corporate World Apr 16 2008 A New Energy Future Apr 15 2008 Investment Survival Note 4 - Pitfalls for the Inexperienced Apr 15 2008 Time travel Apr 11 2008 Common Questions about Working as a Python Developer Apr 09 2008 Investment Survival Note 3 - Is There An Ideal Investment? Apr 03 2008 Investment Survival Note 2 - Speculative Attitude Essential Mar 29 2008 Investment Survival Note 1 - It requires knowledge, Experience and flair Mar 26 2008 The Battle For Investment Survival Mar 18 2008 R-Word Revisited Mar 15 2008 Sydney Park Mar 14 2008 Go Chess and Life Mar 08 2008 Go Chess and Life Mar 08 2008 Mental Illness and Capital Punishment Mar 07 2008 Draft Mar 07 2008 Go chess and Life Mar 07 2008 Nature and us Mar 02 2008 Growth vs Inflation Mar 01 2008 Erlang Mailing List - String as List 3 Feb 19 2008 Erlang Mailing List - String as List 2 Feb 19 2008 Erlang Mailing List - String as List 1 Feb 19 2008 Oversocialnetworkisation Feb 19 2008 Draftttt Feb 18 2008 Dysfunctional Market? Feb 06 2008 Why I choose to learn Erlang? Feb 06 2008 A dream Feb 04 2008 Little Erlang Exercise 6 Feb 02 2008 Little Erlang Exercise 5 Feb 01 2008 Little Erlang Exercise 4 Jan 31 2008 Little Erlang Exercise 3 Jan 29 2008 Idea A Jan 28 2008 Little Erlang Exercise 2 Jan 26 2008 Little Erlange Exercise 1 Jan 11 2008 Little erlang exercise 1 (template) Jan 11 2008 France and Deregulation Jan 11 2008 2007 Have It Both Ways Dec 05 2007 erlang daemon mode Nov 30 2007 Erlang syntax 2 - Pattern matching and assignment Sep 14 2007 Erlang Syntax 1 Sep 14 2007 The R-word Sep 05 2007 House of Cards Sep 05 2007 Unfolding of Events (Subprime market) Aug 20 2007 Prologue Aug 12 2007
Mach problem: Library requirements (gtk+-2.0 >= 2.10.0 gtk+-unix-print-2.0 glib-2.0 gobject-2.0 gdk-x11-2.0) not met Dec 24 2013
ivar error message: Autosynthesized property ‘delegate’ will use synthesized instance variable ‘_delegate’, not existing instance variable ‘delegate’ Dec 11 2013
In light of the NSA PRISM scandal, I recommend these two videos from ‘Conversation with History’ series: Jun 10 2013
TED: Parkinson’s, depression and the switch that might turn them off - Andres Lozano (2013) May 09 2013
Latest update of Google Chrome makes the cpu fan of my mac book pro spin like crazy. Switch back to firefox for now Aug 14 2012
Sometimes it is quite fun to answer some questions in Stackoverflow: you can help someone seeking answer and you may also learn a new thing or two yourself in the process. Aug 02 2012
It has become my habit that I use google search to do simple arithmetic. Now Google improves it further by adding a calculator interface. Jul 28 2012
I was thinking that the rocket had twenty thousand components, and each was made by the lowest bidder Jul 02 2012
In XCode, Option + Command + ‘Click on a symbol’ will open the definition in a second window Jun 25 2012
Got “To update this application, sign in to the account you used to purchase it” error when trying to update XCode. Jun 22 2012
Most important layout related logic are inside MyMovieViewController in the MediaPlayer_iPhone example Jun 12 2012
For some reason I cannot set the title of the “backBarButtonItem“ of “navigationItem“ programmatically. I can only set it in the InterfaceBuilder. Jun 11 2012
When I select a prototype cell, it does not follow segue and show the destination controller, as defined in the storyboard above. May 26 2012
Added a UITableVIew to my custom controller. Now I want to be able to add a segway to a cell in this table view. May 26 2012
When creating the new project in Xcode, the ‘Class prefix’ should be of reasonable length (say 2 to 6 characters). May 23 2012
I do not usually run “source activate” before running the python runtime in a virtualenv env. However it seems to work OK without. May 21 2012
Trying out iTerm2. Does not work well with vi by default (up/down arrow keys are not recognised) May 18 2012
A Paganini’s 24th caprice is on my iPhone. Beautiful music but I have no idea why it is there. May 14 2012
Apparently my first attempt to run ‘./bin/pip install scipy’ in virtualenv on OSX lion has failed with bunch of error messages. But second run just miraculously fine. May 03 2012
I don’t tell lawyer jokes. Lawyers don’t think they’re funny and everyone else doesn’t think they’re jokes. Apr 29 2012
I mis-typed the tumblr url to tumbr.com, and it takes me to this tumblr-themed “survey” site Apr 25 2012
If I have removed a file by accident, and want to reinstate the file form a source code repository, then… Apr 23 2012
Sometimes my time is spent on things which are mundane and mindless. Today is a good example… Apr 22 2012
The size of Antarctica is almost twice as large as Australia (14,000,000 km2 vs 7,617,930 km2) Mar 24 2012
Getting this: “Couldn’t register com.abc.MyApp with the bootstrap server. Error: unknown error code.” when trying to run a unit test in AppCode. Mar 17 2012
I have these buttons that for some reason will send message to two ‘slots’: one to the controller and the other to the responders. Mar 09 2012
The fathers of Andrew Jackson, 7th President of the USA; Rutherford B Hayes, 19th President of the USA; and Bill Clinton, 42nd President of the USA, all died before their sons were born Feb 28 2012
When there is a positive correlation between the financing rate r and a future contract subjected to marks-to-market rules, the future will be convex and will trade above the forwards of the same delivery Feb 21 2012
Generally speaking, the errors in religion are dangerous; those in philosophy only ridiculous Feb 02 2012
The contamination principle dictates that every nonlinear security commands time value, positive if the security is convex and negative if it is concave. Jan 10 2012
I must have done something silly with the DYLD_LIBRARY_PATH. This is an error I got when running svn Jan 10 2012
Try to use “git“ on a cpython code base (which uses hg as the VCS). Was thinking: Need to come up with a “.gitignore“ myself, probably. Turns out there is a “.gitignore“ in the repository. Glad need not to do this extra work Aug 28 2011
XCode 4.1 does not play too well with ‘Full screen’ mode. If I connect an iPhone to the MBP, the Xcode will show a dialog box to ask me if I want to capture the latest iOS. The dialog box appears in the Organiser windows, but it is totally inaccessible. (You can see between the gap of two desktop when doing three-fingers swipe) Aug 03 2011
LSE has a public lecture about the rise and decline of Wallonia, Belgium. Sounds interesting. Aug 03 2011
Finally killed the _perl_ job that owns the alert window. Killed the parent _uninstalld_ (?) process too Aug 03 2011
Xcode 3 no longer works with Lion. Need to figure out how to remove it properly. (Is running “uninstall-developer-folder“ all I need?) Aug 02 2011
Trying to write something to test my tumbler->twitter->google+ link, but could not think of anything that will not get me into trouble. May as well just stick to old school _Test_ Jul 31 2011
For MSSQL2000, a row cannot exceed the size of a page, which is 8KB - overhead i.e. 8060 bytes. 8KB is the size of a continuos disk space for storing, read and writing data. Jul 25 2011
Thinking about how to introduce the “functool.partial“ function in python to non-python programmers. Jul 15 2011
For work reason I installed Windows 7 for some investigation. The interface irks me to no end… Jul 11 2011
Cannot get preview of html or dvi to work in _Lyx_. It complaints about “LaTeX Error: Unknown graphics extension: .ps.“ Jul 07 2011
Inflation has moved up recently, but the Committee anticipates that inflation will subside to levels at or below those consistent with the Committee’s dual mandate as the effects of past energy and other commodity price increases dissipate. Jun 27 2011
The amount the U.S. military spends annually on air conditioning in Iraq and Afghanistan: $20.2 billion. Jun 27 2011
Just found an old receipt for 4 GB RAM I purchased on 12 Aug 2009. It was for my last Mac Book Pro (pre-unibody model). It costed me A$220. Jun 24 2011
[http://code.google.com/p/guava-libraries/source/browse/trunk/guava/src/com/google/common/collect/Sets.java](this) Jun 20 2011
Trying to compile _python 3.2_ on _winxp_ using VS Express 2008. Basically all the other express version (2003, 2005 and 2010 ) won’t work. Jun 20 2011
My Fedora instance refused ssh connection. Needed to disable the iptable in order to get it working Jun 18 2011
A _telomere _is a region of repetitive DNA sequence at the end of a chromosome, which protects the end of the chromosome from deterioration or from fusion with neighbouring chromosomes. Jun 16 2011
The Bible clearly states that God brought before Adam all the beasts of the field and all the fowl of the air. What about the fish? Did Adam name the fish? Jun 16 2011
I just realised today how versaTILe Apple hardware is. A mac can basically boot off a USB flash drive or an external harddisk. Jun 16 2011
Wasted a few CD-R/DVD-R because I used the ‘Burn’ option to write the iso images to the disks. OSX will treat the iso files as data file. Jun 16 2011
Should always use Safari to book a Apple Genius Bar session. The online reservation does not work too well in Chrome. Jun 15 2011
Item 36: Differentiate between inheritance of interface and inheritance of implementation Jun 12 2011
Item 31: Never return a reference to a local object or to a dereferenced pointer initialized by new within the function Jun 05 2011
Item 30: Avoid member functions that return non-const pointers or references to members less accessible than themselves Jun 05 2011
Item 19: Differentiate among member functions, non-member functions, and friend functions Jun 03 2011
Item 11: Declare a copy constructor and an assignment operator for classes with dynamically allocated memory May 31 2011
Item 19: Differentiate among member functions, non-member functions, and friend functions May 30 2011
The _explicit_ keyword in C++ is used to declare explicit constructors. Explicit constructors are constructors that cannot take part in an implicit conversion May 30 2011
Function arguments in C++ are passed by-value. A copy of each argument is made. A function works with the copy, not the original May 29 2011
_initialize_ is a class method which will be called before any other method is called on a class. Alternatively use a function with ___attribute__ ((constructor))_ May 29 2011
When I use google doc in chrome, I can directly print the document to the printer by just pressing the printer icon. May 26 2011
For some reason my Chrome installation is gone from my window XP at work. I have to re-install and redo some setup again May 24 2011
Trying to add SplitViewController to “self.window“ as a RootViewController. STILl not working. May 17 2011
Removing ‘*.xcodeproj/project.xcworkspace/’ can reset the window/workspace settings in xcode 4 May 14 2011
Mac OS X Objective-C 2.0 runtime library support functions and data structures are implemented in the shared library /usr/lib/libobjc.A.dylib. Apr 20 2011
Struggled with Jquery autocomplete for a few days. It turns out I was using an unsupported version from bassistance.de Apr 18 2011
I was having UIWebView problem because I did not set my custom controller as the root view controller. Mar 30 2011
Cannot fully maximize the window a code editor of XCode4. Always a some pixels off from the top and bottom. Mar 13 2011
After installing the Xcode 4 GM, it replaces the underlying Xcode executable of the Xcode icon on Dock to 4 too. Feb 08 2011