This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$peoples = array( | |
array("name" => "jeffrey", "age" => 28), | |
array("name" => "john", "age" => 20) | |
); | |
// the common way | |
function array_pluck($toPluck, $arr) { | |
$ret = array(); | |
foreach($arr as $item) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func enumerateFonts(){ | |
for fontFamily in UIFont.familyNames() { | |
println("Font family name = \(fontFamily as! String)"); | |
for fontName in UIFont.fontNamesForFamilyName(fontFamily as! String) { | |
println("- Font name = \(fontName)"); | |