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
#import <UIKit/UIKit.h> | |
#import <QuartzCore/QuartzCore.h> | |
@interface HeaderView : UIView { | |
UILabel *titleArea; | |
} | |
@property (nonatomic, strong, readwrite) UILabel *titleArea; |
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
mysqlコマンド | |
mysql> CHANGE MASTER TO | |
MASTER_HOST='10.0.0.10', | |
MASTER_USER='ユーザー', | |
MASTER_PASSWORD='パスワード', | |
MASTER_LOG_FILE='mysqld-bin.000002', | |
MASTER_LOG_POS=123; | |
設定ファイル | |
[master] |
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
brew install readline | |
brew link readline | |
CONFIGURE_OPTS="--with-readline-dir=/usr/local" rbenv install 1.9.3-p194 |
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
cd /usr/local/src | |
wget http://ftp.riken.jp/Linux/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm | |
rpm -ivh epel-release-5-4.noarch.rpm | |
yum -y install make gcc gcc-c++ zlib-devel openssl-devel httpd-devel curl-devel readline-devel tk-devel libyaml-devel ncurses-devel gdbm-devel sqlite-devel | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz | |
tar zxvf ruby-1.9.3-p327.tar.gz | |
cd ruby-1.9.3-p327 | |
./configure | |
make && make install | |
cd .. |
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
sqlite3 -html main.db "select timestamp, from_dispname, body_xml from Messages where chatname like '%chatid'" |
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 GridViewController < AQGridViewController | |
def viewDidLoad | |
@data = ['001.jpg', '002.jpg', '003.jpg', '004.jpg', '005.jpg', '006.jpg', '007.jpg', '008.jpg', '009.jpg', '010.jpg'] | |
@grid_view = AQGridView.alloc.initWithFrame(self.view.bounds) | |
@grid_view.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight | |
@grid_view.autoresizesSubviews = true | |
@grid_view.delegate = 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
304 <method selector='setCellSize:'> | |
305 <arg declared_type='struct CGSize' type='{CGSize=ff}' name='cellSize' index='0'/> | |
306 <retval declared_type='void' type='v'/> | |
307 </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
# -*- coding: utf-8 -*- | |
$:.unshift("/Library/RubyMotion/lib") | |
require 'motion/project' | |
require 'bundler' | |
Bundler.require | |
Motion::Project::App.setup do |app| | |
app.name = 'app_name' | |
app.device_family = [:iphone, :ipad] | |
app.icons = ['icon.png', 'iconx2.png'] |
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
#coding: utf-8 | |
class BluetoothController < UIViewController | |
attr_accessor :session, :peer_id, :peers, :state, :text_field | |
def viewDidLoad | |
self.title = 'bluetooth test' | |
self.view.backgroundColor = "#FFFFFF".to_color | |
screen = UIScreen.mainScreen.bounds | |
self.text_field = UITextField.alloc.initWithFrame [[0, 30], [200, 26]] |
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
#coding: utf-8 | |
class CameraController < UIViewController | |
def loadView | |
self.view = UIImageView.alloc.init | |
end | |
def viewDidLoad | |
BW::Device.camera.any.picture(media_types: [:movie, :image]) do |result| | |
image = result[:original_image] | |
image_view = UIImageView.alloc.init |