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
from machine import Pin, Timer | |
import utime, math | |
led = Pin(25, Pin.OUT) | |
tim = Timer() | |
pIdx = 0; | |
x = 0; | |
latestPrime=0; |
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
/dts-v1/; | |
/plugin/; | |
/ { | |
compatible = "brcm,bcm2708"; | |
fragment@0 { | |
target = <&sound>; | |
__overlay__ { | |
compatible = "simple-audio-card"; |
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> | |
#include <string> | |
#include <algorithm> | |
#include <map> | |
int main(int argc, char *argv[]) | |
{ | |
std::ifstream file("words.txt"); |
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
// C++11 style observer pattern implementation using lambda for scoped | |
// connection management. | |
// | |
// Copyright (c) 2012 Nick C. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
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 <vector> | |
using namespace std; | |
int main () | |
{ | |
vector<int> v{12,324,45,65,787,9}; //Uniform initialization | |
cout << "In vector: "; | |
for (auto val : v) {cout << val << ", ";} //Range based for | |
int m = 5; |