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
class FamilyConnectCell < UITableViewCell | |
def rmq_build | |
rmq(self.contentView).tap do |q| | |
# Add your subviews, init stuff here | |
# @foo = q.append(UILabel, :foo).get | |
# | |
# Or use the built-in table cell controls, if you don't use | |
# these, they won't exist at runtime | |
# q.build(self.imageView, :cell_image) |
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
def tableView(table_view, cellForRowAtIndexPath: index_path) | |
data_row = @data[index_path.row] | |
#cell = table_view.dequeueReusableCellWithIdentifier(ALERTS_CELL_ID) || begin | |
# rmq.create(AlertsCell, :alerts_cell, reuse_identifier: ALERTS_CELL_ID).get | |
#end | |
cell ||= AlertsCell.alloc.initWithStyle(UITableViewCellStyleSubtitle, reuseIdentifier:ALERTS_CELL_ID).autorelease | |
cell = rmq.build(cell, :alerts_cell).get |
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
# Validation Growth Plan | |
# STEP 1: Validation Tool/Utility | |
# STEP 2: Check on Validity of RMQ selected | |
# STEP 3?: Place validation on a specific input, that will watch and validate onchange | |
# The following a is a suggested workflow for Step 2 | |
# Example project validation method |
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 'date' | |
require 'koala' | |
class BirthdayLiker | |
FACEBOOK_TOKEN = 'your_oauth_key' | |
BIRTHDAY_WORDS = %w(birthday bday birfday birth born hbd) | |
THANKS_OPTIONS = ['Thank you!', 'Thanks!', 'Appreciate it!', 'Danke!', ':)'] | |
DATE_TIME_FORMAT = '%Y-%m-%d' | |
def initialize(birthdate, opts={}) |
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
class MainActivity < Android::App::Activity | |
def onCreate(savedInstanceState) | |
super | |
seekBar = Android::Widget::SeekBar.new(self) | |
seekBar.setMax(200) | |
seekBar.setProgress(100) | |
textView = Android::Widget::TextView.new(self) |
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
# requires earlier use of self.tableView.sectionHeaderHeight = 0 | |
# + this | |
def tableView(table_view, heightForHeaderInSection:section) | |
# nasty hack to hide empty section | |
if @data[section].empty? | |
0 | |
elsif @data[section - 1].empty? #squeeze follow up section | |
20 | |
else |
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
def purchase_single_product(identifier) | |
NSLog "Starting purchase process for #{identifier}." | |
@iap_helper = IAPHelper.new(NSSet.setWithArray([identifier])) | |
@iap_helper.cancelled = cancelled_transaction | |
@iap_helper.success = transaction_successful | |
@iap_helper.request_product_info do |success, products| | |
if success && products.is_a?(Array) && products.count == 1 | |
@iap_helper.buy_product(products.first) | |
else |
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
# ~~ ENCODING TO Base64 ~~ # | |
start = "This is a test".dataUsingEncoding(NSUTF8StringEncoding) | |
#=> This is a test | |
encoded = start.base64EncodedStringWithOptions(0) | |
#=> "VGhpcyBpcyBhIHRlc3Q=" | |
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
class MainActivity < Android::App::Activity | |
attr_reader :webview | |
def onCreate(savedInstanceState) | |
super | |
@webview = Android::Webkit::WebView.new(self) | |
settings = @webview.settings | |
settings.savePassword = true | |
settings.saveFormData = true |
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
def gant | |
puts "Gant is awesome" | |
end |
OlderNewer