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
require 'io/console' | |
require 'open3' | |
require 'pp' | |
begin | |
require 'coderay' | |
rescue LoadError # might not already have syntax highlighting | |
end | |
class App |
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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
static NSString *CellIdentifier = @"Cell"; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
// Configure the cell... | |
if (!cell) { | |
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault | |
reuseIdentifier:CellIdentifier] autorelease]; | |
} |
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
// | |
// by Mark Boszko | |
// | |
// Expanded from code by DAMIEN LE BERRIGAUD | |
// http://meliondesign.blogspot.com/2010/02/mapping-uiwebview-links-to.html | |
// | |
// | |
// Sample code to return a method call, | |
// with or without argument, from UIWebView | |
// links with format: |
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
############################################### | |
# place in /app/helpers/application_helper.rb # | |
############################################### | |
def bodytag_id | |
a = controller.class.to_s.underscore.gsub(/_controller$/, '') | |
b = controller.action_name.underscore | |
"#{a}-#{b}".gsub(/_/, '-') | |
end | |