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
- (void)initButtons{ | |
NSLog(@"MainViewController.initButtons"); | |
CGFloat totalHeight = BUTTON_ORIGIN_Y; | |
for(NSDictionary* section in arraySections){ | |
NSString* title = [section objectForKey:@"title"]; | |
UIButton* button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; | |
[button addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchDown]; | |
[button setTitle:title forState:UIControlStateNormal]; |
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
#define PADDING_VERTICAL 5.0f | |
#define BUTTON_HEIGHT 40.0f | |
#define BUTTON_WIDTH 160.0f | |
#define BUTTON_ORIGIN_X (320.0f - BUTTON_WIDTH)/2.0f | |
#define BUTTON_ORIGIN_Y 20.0f | |
- (void)initButtons{ | |
NSLog(@"MainViewController.initButtons"); | |
CGFloat totalHeight = BUTTON_ORIGIN_Y; | |
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 ApplicationController < ActionController::Base | |
protect_from_forgery | |
before_filter :authenticate_user!, :store_location | |
def stored_location_for(resource) | |
nil | |
end | |
def after_sign_in_path_for(resource) |
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 gps_activity | |
@sidebar_units = Unit.where(:fleet_id => @chosen_fleets_array).not_hidden.order("NAME") | |
unless params[:unit_ids].blank? | |
@chosen_units_array = params[:unit_ids] | |
else | |
@chosen_units_array = @sidebar_units.collect{ |u| [u.id]} | |
end | |
conditions = {:fleet_id => @chosen_fleets_array} |
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
==> Installing libxml++ dependency: glibmm | |
==> Downloading http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.22/glibmm-2.22.2.tar.gz | |
File already downloaded in /Users/rupert/Library/Caches/Homebrew | |
==> ./configure --prefix=/usr/local/Cellar/glibmm/2.22.2 | |
checking for a BSD-compatible install... /usr/bin/install -c | |
checking whether build environment is sane... yes | |
checking for a thread-safe mkdir -p... build/install-sh -c -d | |
checking for gawk... no | |
checking for mawk... no | |
checking for nawk... no |
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
PROG = ncm | |
INCDIR = include libsai | |
BUILDDIR = build | |
LIBSAI = libSAI.a | |
DEPENDS = .depend | |
HOST := $(shell hostname) | |
USER := $(shell id -un) |
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 "HJImageView.h" | |
#import "JSONKit.h" | |
#import "ASIHTTPRequest.h" | |
#import "Country.h" | |
#import "ApplicationConstants.h" | |
#import "MainTableViewConstants.h" |
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
/usr/local/Cellar[master]% brew install gmp | |
==> Downloading http://ftpmirror.gnu.org/gmp/gmp-5.0.2.tar.bz2 | |
######################################################################## 100.0% | |
==> ./configure --prefix=/usr/local/Cellar/gmp/5.0.2 --enable-cxx --build=x86_64-apple-darwin | |
==> make | |
==> make install | |
==> make check | |
/usr/local/Cellar/gmp/5.0.2: 11 files, 2.4M, built in 3.2 minutes | |
brew install gmp 158.17s user 68.52s system 116% cpu 3:14.86 total | |
/usr/local/Cellar[master]% brew install php --with-apache --with-mysql |
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
CREATE FUNCTION pymax (a integer, b integer) | |
RETURNS integer | |
AS $$ | |
if a > b: | |
return a | |
return b | |
$$ LANGUAGE plpythonu; | |
SELECT pymax(1,2) #=> 2 |
OlderNewer