This file contains hidden or 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
main(int argc, char* argv[]) | |
{ | |
// Generate a random number between MINFORKS and MAXFORKS | |
unsigned int seed = generateSeed(0); | |
int n = rand_r(&seed) % MAXFORKS + MINFORKS; | |
// Time elapsed | |
long time = 0; | |
time = elapsedTime((int)time); | |
This file contains hidden or 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
/* Prototypes */ | |
int sum(int, int); | |
int wrapper(int, int); | |
/* Main program */ | |
int main() | |
{ | |
int x = wrapper(1,1); // We pass in the two values instead. |
This file contains hidden or 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
/* Prototypes */ | |
int sum(int, int); | |
void wrapper(int, int); | |
/* Main program */ | |
int main() | |
{ | |
wrapper(1,1); // We pass in the two values instead. |
This file contains hidden or 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
/* Prototypes */ | |
int sum(int, int); | |
void wrapper(); | |
/* Main program */ | |
int main() | |
{ | |
wrapper(); |
This file contains hidden or 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
// Prototypes: | |
int sum(int, int); | |
/* Main program */ | |
int main() | |
{ | |
int z = sum(1, 1); // z will become 2 here |
This file contains hidden or 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
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event | |
{ | |
if ([[self headerView] pointInside:point withEvent:event]) | |
{ | |
return YES; | |
} | |
else if([[self table] pointInside:point withEvent:event]) | |
{ | |
return YES; |
This file contains hidden or 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) flipInWithCompletion:(MBTransitionCompletion)completion | |
{ | |
BOOL displayingPrimary = [self isDisplayingPrimaryView]; | |
UIView *frontView = [self frontView]; | |
UIView *backView = [self backView]; | |
UIView *wrapperView = [self wrapperView]; | |
[wrapperView addSubview:frontView]; | |
This file contains hidden or 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 display() | |
{ | |
// Clear the previous frame | |
glClear(GL_COLOR_BUFFER_BIT); | |
{ | |
glPushMatrix(); | |
glTranslatef(0.5, 0.5, 0); |
This file contains hidden or 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
Stocking 150 at $1 each. | |
Stocking 130 at $2 each. | |
(lldb) c | |
Process 6212 resuming | |
(lldb) p sales | |
(std::__1::vector<Sale, std::__1::allocator<Sale> > &) $0 = size=2: { | |
(Sale) [0] = { | |
(int) quantity = 0 | |
(double) pricePerUnit = 0 | |
} |
This file contains hidden or 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
// | |
// Widget.cpp | |
// 3-LinkedLists | |
// | |
// Created by Moshe Berman on 12/2/12. | |
// Copyright (c) 2012 Moshe Berman. All rights reserved. | |
// | |
#include "Widget.h" |