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
/*----------------------------------------------------*/ | |
#pragma mark - XCTAsserts | |
/*----------------------------------------------------*/ | |
XCTAssert(expression, format...); | |
XCTAssertTrue(expression, format...); | |
XCTAssertFalse(expression, format...); | |
XCTAssertEqual(expression1, expression2, format...); | |
XCTAssertNotEqual(expression1, expression2, format...); | |
XCTAssertNil(expression, 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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
UITableViewCell *cell = | |
[tableView dequeueReusableCellWithIdentifier:REUSABLE_CELL_ID]; | |
UILabel *label = (UILabel *)[cell viewWithTag:VIEW_TAG]; | |
Model *someModel = [self getModelFromIndexPath:indexPath]; | |
// `takeUntil:` makes the RACObserve() signal complete (and thus breaks the subscription) | |
// when the cell is recycled. |
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
# =============== # | |
# Unity generated # | |
# =============== # | |
[Tt]emp/ | |
[Oo]bj/ | |
[Bb]uild | |
[Ll]ibrary/ | |
sysinfo.txt | |
# ===================================== # |
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
#! /bin/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
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
//set seed | |
srand(time(NULL)); | |
// random number in range [0,1] | |
float r = (float)rand()/RAND_MAX; | |
printf("%f\n", r); |
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
# -*- Makefile -*- | |
# Mac OSX makefile for FreeImage | |
# This file can be generated by ./gensrclist.sh | |
include Makefile.srcs | |
# General configuration variables: | |
CC_X86_64 = gcc -4.2 | |
CPP_X86_64 = g++ -4.2 | |
COMPILERFLAGS = -Os -fexceptions -fvisibility=hidden -DNO_LCMS |