Friday, December 5, 2014

build ejabberd mac osx 10.9.5

try to build ejabberd from source on mac osx 10.9.5.
after installing homebrew, autoconf, automaker, libtool, erlang, I still have an error when making.

configure: error: libyaml library was not found

brew install libyaml does not help. and manually download libyaml and make install does not help either. although it's indeed in /usr/local/include

After installing  xcode 6.1 and command line tools for osx 10.9 for xcode 6.1,
the issue is gone. ^_^

Thursday, December 4, 2014

osx install brew autoconf automake

install brew and others in osx

install homebrew first

  ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  brew install autoconf

  brew install automake


Tuesday, July 8, 2014

[ios] how to tell ios binary is 32 or 64 bit


use lipo command
xcrun -sdk iphoneos lipo -info $(FILENAME)

Monday, August 12, 2013

[ios] uiimage low memory warning for large images


when i load a very large image like > 5M jpg, I got low memory warning, and finally crash.

how to downsize a very large image
https://developer.apple.com/library/ios/samplecode/LargeImageDownsizing/Introduction/Intro.html#//apple_ref/doc/uid/DTS40011173

Wednesday, May 22, 2013

[ios] iphone simulator file system location

open a terminal, then cd ~/Library/Application\ Support/iPhone\ Simulator
then I can see 6.1 folder.
The app folder will be in 6.1/Applications/xxxxx  where xxxx is the app id. or you can check all folders to find where is your app.

Thursday, May 16, 2013

[ios] some issue: async, guid, priority queue, view fade-in, image reflection



How do I wait for an asynchronously dispatched block to finish?


http://stackoverflow.com/questions/4326350/how-do-i-wait-for-an-asynchronously-dispatched-block-to-finish


Waiting on asynchronous methods using NSCondition


http://stackoverflow.com/questions/14013947/waiting-on-asynchronous-methods-using-nscondition




How to create a GUID/UUID using the iPhone SDK


http://stackoverflow.com/questions/427180/how-to-create-a-guid-uuid-using-the-iphone-sdk


/ JCPriorityQueue


https://github.com/jessedc/JCPriorityQueue/tree/experimental/heap-queue


Fade/dissolve when changing UIImageView's image


http://stackoverflow.com/questions/7638831/fade-dissolve-when-changing-uiimageviews-image


No-fuss reflections – generating reflections the easy way in iOS


http://aptogo.co.uk/2011/08/no-fuss-reflections/

[ios] the correct behavior of nsoperation waitUntilFinished


from network search: 
think you may have missed expectations for the behavior. If you are expecting the completionBlock to be fired beforewaitUntilFinished releases the control flow, then your expectations are out of alignment. The completion block is dispatched asynchronously back to the success/failure queue, so its not going to be triggered until the run loop spins.
What you can do instead is waitUntilFinished and then access the responsePropertyList and errorproperties of the operation instead of the completion block.