#cup 小確幸

Discoholic 🪩


izzy's playlists!
Mike Driver
trying on a metaphor

JVL
hello vonnie
Stranger Things
"I'm Dorothy Gale from Kansas"

taylor price
DEAR READER

tannertan36

Kiana Khansmith
dirt enthusiast

pixel skylines
NASA

PR's Tumblrdome
almost home

seen from Sri Lanka
seen from United States
seen from United States
seen from United States

seen from Malaysia
seen from Malaysia

seen from United States
seen from United States

seen from Canada

seen from Japan
seen from United States

seen from United States

seen from Türkiye
seen from France

seen from United States
seen from Bangladesh

seen from Costa Rica

seen from Malaysia
seen from Germany
seen from United States
@ananfang
#cup 小確幸

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Fall
意外的百岳 #taiwan #mountain
CAShapeLayer is an interesting new subclass of CALayer available in 3.0 and now 10.6, and it’s got some pretty cool features.
A shapelayer represents an arbitrary shape that gets rendered onscreen. The shape is defined by its path property which takes a CGPathRef. The path can be anything. So in...
Andy: I'm the king of the sleeping

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
National Day of the Republic of China
For more photos of today’s celebration, search the hashtags #Taiwan and #Taipei, and visit the 中華民國總統府 (Office of the President) location page.
Taiwanese everywhere celebrated their 101st National Day (國慶日), also known as Double Ten Day or Double Tenth Day today. The holiday commemorates the start of the Wuchang Uprising of October 10, 1911, which led to the collapse of the Qing Dynasty in China and establishment of the Republic of China on January 1, 1912. The Government of the Republic of China later lost control of mainland China and relocated to Taiwan in 1949. The National Day is now mainly celebrated in Taiwan, but is also celebrated by some Overseas Chinese.
iOS 多國語言小記
.m檔 所有需要多國語言的字串,利用NSLocalizedString來標記 NSLocalizedString(@"fat boy", @"TARGET.m"); 利用command line指令genstrings來產生一份所有NSLocalizedString標記的字串文字檔 genstrings -o en.lproj *.m (預設檔名為Localizable.strings) 最後透過xcode去新增需要對應的語言.strings檔即可
.storyboard檔、.nib檔 利用command line指令ibtool先產生.storyboard檔的對應.strings,將這個.strings改成目標語言.strings檔後,再用ibtool結合原.storyboard檔跟目標語言.strings檔,生成目標語言的.stroyboard檔即可。 ibtool --generate-strings-file en.lproj/MainStoryboard.strings en.lproj/MainStoryboard.storyboard ibtool --strings-file ja.lproj/MainStoryboard.strings --write ja.lproj/MainStoryboard.storyboard en.lproj/MainStoryboard.storyboard
CALayer小記
shouldRasterize
若有用到CALayer的一些處理,如陰影或圓角,若是用向量的方式,在scroll的時候會造成很大的效能負擔,所以可以將shouldRasterize設成YES,將圖片轉成點陣圖。並要調整rasterizationScale,否則在retina的螢幕下會「糊糊的」。範例如下:
layer.shouldRasterize = YES; layer.rasterizationScale = [[UIScreen mainScreen] scale];
masksToBounds
如果要將UIView切圓角,要把masksToBounds設成YES,這樣才可以看得出效果。
Sessions and Cookies
The session stores until the browser closed, and the cookie stores permanently.
練肖話一下就忘了,餅乾可以永留傳。(Translated by Pang)
The cake is a lie...
params in ActionController::Base
Parameters
All request parameters, whether they come from a GET or POST request, or from the URL, are available through the params method which returns a hash. For example, an action that was performed through /posts?category=All&limit=5 will include{ "category" => "All", "limit" => "5" } in params.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
False in Ruby
Everything other than nil and false itself is true
Red, Green and Refactor
Write a failing test => Red
Implement code to get the test to pass => Green
Refactor the code, changing its form without changing its function (if necessary) => Refactor
rake is ...
rake = 'Ruby make'
The 'yield' statement in Ruby
在Ruby語言中,可以將一個block關聯到一個method call,只要將block放在這個method call的最後面即可。
https://gist.github.com/3186238
yield指令用在method裡面,代表關聯在這個method的block。
https://gist.github.com/3186216
yield指令也可以帶有parameters
https://gist.github.com/3186253
因此可以從這個角度來解釋each,each method call裡面,把目標的項目一個一個列出來,並當成一個parameter丟到yield裡面。而yield要做的事情,就看關聯的block而定。
「持續」
最近的感覺就像晨間作業到一半的時候,有種放下就可以快活的誘惑。原來堅持是件那麼偉大的事呀。

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Block in Ruby 兩種形式
Block在Ruby裡可寫成兩種形式,包含在{...}間,或是在do...end間,如下:
https://gist.github.com/3174532
Symbols in Ruby
在使用hash時,可能會重複用大量的string來當成key。
https://gist.github.com/3174069
以上面為例,這兩個'name'其實是不同的string物件,因此在越來越多的hash狀況下,會有記憶體不夠的危險。
https://gist.github.com/3174208
若改用symbol來做為key (e.g. :name),則其中兩個:name其實是同一個物件,就不會有越多hash,越多key來佔記憶體的危險了。