Posts

Showing posts from April 29, 2012

Understanding Anchor point in iOS

Image
Just to take notes for this regarding anchor point in iOS. This is taken from  developer.apple.com Specifying a Layer’s Geometry While layers and the layer-tree are analogous to views and view hierarchies in many ways, a layer's geometry is specified in a different, and often simpler, manner. All of a layer’s geometric properties, including the layer’s transform matrices, can be implicitly and explicitly animated. Figure 1  shows the properties used to specify a layer's geometry in context. Figure 1   CALayer geometry properties The  position  property is a  CGPoint  that specifies the position of the layer relative to its superlayer, and is expressed in the superlayer's coordinate system. The  bounds  property is a  CGRect  that provides the size of the layer ( bounds.size ) and the origin ( bounds.origin ). The bounds origin is used as the origin of the graphics context when you override a layer's drawing methods. Layers have an implicit  frame  tha

Comet - long-polling using Ajax

I just wanted to save this video for any references wanted to understand what Comet is. So what exactly Comet is? Comet is still using AJAX but its just a technique done in the server. It uses timestamp for comparison of updates, then AJAX request will have just to wait until the server will response, so it's the sever will have to push data to the browser. This is a long-polling method and can save traffic than running an AJAX request from time-to-time.

checkout only one file using git

First clone the repo with the following command below, git clone -n git://path/to/the_repo.git --depth 1 The -n option suppresses the default checkout of all files, and the --depth 1 option, which means it only gets the most recent revision of each file Then check out just the file you want like so: Then you can checkout the file that you wanted to get or save to your machine. $> cd the_repo $> git checkout HEAD name_of_file

Building packages in Linux from source

Always remember that when you build packages in Linux, always do consider these packages as its requirement by the compiler to build the package from source. git-core  build-essential libboost-dev  libboost-program-options-dev libboost-thread-dev  libboost-filesystem-dev scons gcc-c++ glibc-devel