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
var insertionSort = function(list) { | |
var value = 0; | |
var pos = 0; | |
for (var i = 1; i < list.length; ++i) { | |
value = list[i]; | |
pos = i - 1; | |
while (pos >= 0 && value < list[pos]) { | |
list[pos + 1] = list[pos]; | |
--pos; | |
} |
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
var bubbleSort = function(list) { | |
var n = list.length; | |
var swapped = false; | |
var i = 0; | |
var temp = 0; | |
do { | |
swapped = false; | |
for (i = 1; i < n - 1; ++i) { | |
if (list[i - 1] > list[i]) { | |
temp = list[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
string type2str(int type) { | |
string r; | |
uchar depth = type & CV_MAT_DEPTH_MASK; | |
uchar chans = 1 + (type >> CV_CN_SHIFT); | |
switch ( depth ) { | |
case CV_8U: r = "8U"; break; | |
case CV_8S: r = "8S"; break; | |
case CV_16U: r = "16U"; break; |
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
var waterData = [55,56,56,56,56,56,56,57,55,56,56,56,56,55,55,56,56,56,57,56,56,56,56,56,55,55,56,57,57,56,56,56,55,55,55,56,56,56,56,57,55,56,56,56,56,56,55,56,56,56,57,56,56,56,56,56,55,55,56,56,57,56,56,56,56,56,55,56,56,56,56,56,57,55,56,56,56,56,55,55,57,57,57,56,56,56,56,55,55,56,56,56,57,56,56,56,56,56,56,55,55,57,56,56,57,55,56,56,56,55,55,55,57,56,56,57,57,57,56,55,56,56,56,57,57,56,56,56,57,57,57,57,55,56,57,57,57,55,56,56,56,55,56,57,56,56,56,56,56,57,57,55,57,57,57,57,57,57,57,57,56,56,56,57,56,55,56,56,56,55,57,56,55,56,57,57,56,56,56,56,56,55,55,55,55,55,55,56,56,56,56,57,56,56,56,57,56,55,55,55,55,56,57,56,55,55,55,55,55,56,56,56,55,55,57,56,56,56,55,55,56,56,56,57,55,55,55,55,55,55,56,56,55,55,55,56,55,55,56,56,55,55,56,55,55,56,57,56,56,56,56,55,55,55,55,55,56,55,55,56,56,57,57,56,56,56,55,55,55,57,56,56,56,55,55,55,57,57,57,56,56,56,56,55,56,56,56,56,56,55,55,56,56,56,57,56,56,56,57,55,57,57,57,57,56,56,55,57,57,56,56,56,56,56,56,55,56,56,56,56,56,56,55,56,56,56,57,57,57,57,57,55,57,56,56,57 |
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
var midpoint = 128; | |
var data = [ | |
[52, 55, 61, 66, 70, 61, 64, 73], | |
[63, 59, 55, 90, 109, 85, 69, 72], | |
[62, 59, 68, 113, 144, 104, 66, 73], | |
[63, 58, 71, 122, 154, 106, 70, 69], | |
[67, 61, 68, 104, 126, 88, 68, 70], | |
[79, 65, 60, 70, 77, 68, 58, 75], | |
[85, 71, 64, 59, 55, 61, 65, 83], |
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 <fcntl.h> | |
#include <math.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/time.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <iostream> | |
#include <sstream> |
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 <SD.h> | |
#include <String.h> | |
const int CS_PIN = 10; | |
char BACKUP_FILE[] = "backup.txt"; | |
char PENDING_FILE[] = "pending.txt"; | |
void setup() | |
{ |
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 <math.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <opencv2/imgproc/imgproc.hpp> | |
#include <opencv2/highgui/highgui.hpp> |
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 <math.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <opencv2/imgproc/imgproc.hpp> | |
#include <opencv2/highgui/highgui.hpp> |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <iostream> | |
#include <string> | |
#include <opencv2/core/core.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include "opencv2/imgproc/imgproc.hpp" |
OlderNewer