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
var Crawler = require("crawler").Crawler; // https://github.com/sylvinus/node-crawler | |
var S = require('string'); | |
var fs = require('fs'); | |
// A list of some patterns that will show up in webcam URLs | |
var patterns = ["jpg/image.jpg\?r=" | |
, "mjpg/video.mjpg" | |
, "record/current.jpg" | |
, "cgi-bin/faststream.jpg" | |
, "oneshotimage.jpg" |
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
#include <iostream> | |
using namespace std; | |
int main () | |
{ | |
int foo[4]; | |
double bar[4]; | |
// Print out the memory addresses of all 4 elements of "foo" | |
for(int i=0; i<4; i++) |
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
// tostring2.cpp | |
#include <iostream> | |
using namespace std; | |
class Rectangle { | |
public: | |
void init(float _x, float _y, float _width, float _height) { | |
x = _x; | |
y = _y; | |
width = _width; |
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
// tostring.cpp | |
#include <iostream> | |
using namespace std; | |
class Rectangle { | |
public: | |
void init(float _x, float _y, float _width, float _height) { | |
x = _x; | |
y = _y; | |
width = _width; |
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
#include <iostream> | |
using namespace std; | |
int foo; // static memory allocation | |
void f() | |
{ | |
int bar; // automatic memory allocation | |
cout << "&bar = " << &bar << endl; |
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
#include <iostream> | |
using namespace std; | |
class Player { | |
public: | |
string name; | |
float xPos; | |
float yPos; | |
double timeAlive; | |
}; |
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
#include <iostream> | |
using namespace std; | |
int main () | |
{ | |
int foo; | |
cout << "sizeof(foo) = " << sizeof(foo) << endl; | |
} |
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 drawSnowman() | |
{ | |
ofPushStyle(); | |
// Head | |
ofFill(); | |
ofSetColor(255,255,255); | |
ofCircle(50, 50, 25); | |
ofCircle(50, 90, 30); | |
ofCircle(50, 160, 50); |
NewerOlder