This file contains hidden or 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
var | |
a = 0, | |
b = 1, | |
t; | |
while (n > 0) | |
{ | |
t = a; | |
a = b; | |
b += t; | |
n = n - 1; |
This file contains hidden or 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
#directory_controller.rb | |
class DirectoryController < UIViewController | |
def viewDidLoad | |
super | |
self.title = "Directory" | |
@table = UITableView.alloc.initWithFrame(self.view.bounds) | |
self.view.addSubview @table | |
@table.dataSource = self | |
@table.delegate = self |
This file contains hidden or 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
People.get_people do |data| | |
@data = data | |
end | |
def self.get_people(&block) | |
BW::HTTP...do |response| | |
@people = BW::JSON... | |
block.call(@people) | |
end |
This file contains hidden or 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
People.get_people do |data| | |
@data = data | |
end | |
def self.get_people(&block) | |
BW::HTTP...do |response| | |
@people = BW::JSON... | |
block.call(@people) | |
end |
This file contains hidden or 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
#!/usr/bin/env dtrace -s | |
/* | |
* DTrace script to observe UNIX socket reads/writes for RubyMotion apps running | |
* in the iOS Simulator. | |
* | |
* Usage: sudo dtrace_rubymotion_repl <pid of running RubyMotion iOS app> | |
* | |
*/ | |
syscall::sendto:entry |