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
#include<stdio.h> | |
#include<time.h> | |
void delay(unsigned int mseconds) | |
{ | |
clock_t goal = mseconds + clock(); | |
while (goal > clock()); | |
} | |
int main() | |
{ | |
int i; |
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
#include <fstream> | |
#include <string> | |
using namespace std; | |
int main() { | |
string fileName = "myfile.txt"; | |
ifstream inputData; | |
//open the file, if error, bail out |
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 os | |
>>> os.environ.keys() | |
KeysView(<os._Environ object at 0x013B8C70>) | |
>>> list(os.environ.keys()) | |
['TMP', 'COMPUTERNAME', 'USERDOMAIN', 'PSMODULEPATH', 'COMMONPROGRAMFILES', | |
...many more deleted... | |
'NUMBER_OF_PROCESSORS', 'PROCESSOR_LEVEL', 'USERPROFILE', 'OS', 'PUBLIC', 'QTJAVA'] | |
>>> os.environ['TEMP'] |
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
#include "WPILib.h" | |
/******************************* | |
* RobotDemo.cpp * | |
* * | |
* Created on: Jan 20, 2013 * | |
* Author: Team1967 * | |
*******************************/ | |
/********************************************************************************************** |
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
scp -P22 -r local_file username@remote_url:/remote/directory/ | |
#P22 is port 22, which SSH uses |
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
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
int array[2][2] = | |
{ 1, 2, 3, 4 }; | |
string converted = "{"; |
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
#ifdef WINDOWS | |
#include <direct.h> | |
#define GetCurrentDir _getcwd | |
#else | |
#include <unistd.h> | |
#define GetCurrentDir getcwd | |
#endif | |
int main() | |
{ |
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
#include <unistd.h> | |
#include <sys/types.h> | |
#include <pwd.h> | |
#include <iostream> | |
#include <fstream> | |
using namespace std; | |
int main() | |
{ | |
int myuid; |
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
{ | |
"FRAME_RATE": 120, | |
"LASER": { | |
"COLOR": [ | |
255, | |
255, | |
255 | |
], | |
"EDGE_DEATH": true, | |
"PULSE_LIFE": 100 |
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
#include <iostream> | |
#include <fstream> | |
using namespace std; | |
const int WIDTH = 2000; | |
const int HEIGHT = 300; | |
const int COLOR = 3; //0=red, 1=green, 2=blue | |
//void main(int argc, char** args[]) |
OlderNewer