Skip to content

Instantly share code, notes, and snippets.

View GantMan's full-sized avatar
🤖
Being a Machine Learning beast

Gant Laborde GantMan

🤖
Being a Machine Learning beast
View GitHub Profile
<div ng-app ng-controller="Controller">
<input ng-model="myCheck" type="checkbox" />
<input ng-show="myCheck" type="text">
</div>
@GantMan
GantMan / delegate_module.rb
Created August 26, 2013 03:03
Suggested code for fade-in of splash.
def open_screen(screen, args={})
screen = screen.new if screen.respond_to?(:new)
self.home_screen = screen
self.window ||= self.ui_window.alloc.initWithFrame(UIScreen.mainScreen.bounds)
self.window.rootViewController = (screen.navigationController || screen)
splash_fade = args.respond_to?(:splash_fade)
class RootController < UIViewController
def viewDidLoad
super
@my_web_view = UIWebView.alloc.initWithFrame(view.bounds)
@my_web_view.delegate = self
@my_web_view.scalesPageToFit = FALSE
view.addSubview(@my_web_view)
@GantMan
GantMan / _README.md
Last active October 14, 2020 04:08
Gist of solutions to RubyWarrior by Gant Laborde
@GantMan
GantMan / Code Combat.md
Last active August 6, 2021 01:09
Gist of code for CodeCombat - http://codecombat.com/

CodeCombat.com Solutions

Here's a simple gist of my Code Combat solutions. May it be useful to anyone who is teaching, playing, or learning Javascript.

Code Combat Site

@GantMan
GantMan / family_connect_cell.rb
Last active August 29, 2015 13:57
rmq_build checking this out
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)
@GantMan
GantMan / new.rb
Last active August 29, 2015 13:58
RMQ switching from Default to Subtitle Table Cell
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
@GantMan
GantMan / example.rb
Created July 1, 2014 15:52
Validation use Example
# 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
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={})
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)