Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0"?>
<opencv_storage>
<cascade>
<stageType>BOOST</stageType>
<featureType>HAAR</featureType>
<height>24</height>
<width>24</width>
<stageParams>
<boostType>GAB</boostType>
<minHitRate>9.9500000476837158e-01</minHitRate>
./negatives/1/1.jpg
./negatives/1/2.jpg
./negatives/1/3.jpg
./negatives/1/4.jpg
./negatives/1/5.jpg
./negatives/1/6.jpg
./negatives/1/7.jpg
./negatives/1/8.jpg
./negatives/1/9.jpg
./negatives/1/10.jpg
1/1.jpg 1 218 286 36 36
1/2.jpg 1 379 308 27 27
1/3.jpg 1 193 253 22 22
1/4.jpg 1 278 260 19 19
1/5.jpg 1 541 249 17 17
1/6.jpg 1 193 263 14 14
1/7.jpg 1 372 259 12 12
1/8.jpg 1 579 259 15 15
1/9.jpg 1 231 300 14 14
1/10.jpg 1 355 230 11 11
@jdumont0201
jdumont0201 / arduino-headless.sh
Created May 9, 2018 20:05
Arduino headlessly with ssh -X option and this script
#!/bin/bash
SCREEN=3
Xvfb :$SCREEN -nolisten tcp -screen :$SCREEN 1280x800x24 &
xvfb="$!"
DISPLAY=:$SCREEN arduino $@
kill -9 $xvfb
@jdumont0201
jdumont0201 / free_function_bad.cpp
Created May 5, 2018 08:15
Free functions: avoid
double getScreenSize(){
// ...
}
int main(){
getScreenSize();
return 0;
}
@jdumont0201
jdumont0201 / global_variables_alternative.cpp
Created May 5, 2018 08:08
Global variables alternative
#include <iostream>
class Global{
public:
static const int GLOBAL_VAR =8;
};
int main(){
std::cout << Global::GLOBAL_VAR << std::endl;
}
@jdumont0201
jdumont0201 / global_variables_avoid.cpp
Last active May 5, 2018 08:09
Avoid global scope variables
#include <iostream>
const int GLOBAL_VAR = 8;
int main(){
std::cout << GLOBAL_VAR << std::endl;
return 0;
}
class A{
int d_val;
public:
int getVal(){
return d_val;
}
void setVal(int val){
d_val=val;
}
};
class A{
public:
int d_val;
};
int main(){
A a=A();
a.val=5;
return 0;
}
class A{
int d_val;
public:
A(int val){
d_val=val;
}
};
int main(){
A a=A(5);