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 setup() { | |
| // put your setup code here, to run once: | |
| Serial.begin(9600); | |
| } | |
| void loop() { | |
| // put your main code here, to run repeatedly: | |
| auto x = random(1,100); | |
| Serial.println(x); | |
| delay(1000); |
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
| // scrivere una funzione che dati due vettori, crei un terzo vettore | |
| // i cui elementi sono gli elementi comuni dei vettori di partenza senza | |
| // ripetizioni | |
| #include <algorithm> | |
| #include <iostream> | |
| #include <vector> |
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 "DHT.h" | |
| DHT dht(2,DHT11); | |
| void setup() { | |
| // put your setup code here, to run once: | |
| Serial.begin(9600); | |
| dht.begin(); | |
| } |
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> | |
| #include <array> | |
| using matrice4x3 = std::array<std::array<int,4>,3>; | |
| using 😊 = int; | |
| int main() { | |
| matrice4x3 mat; | |
| //std::array<std::array<int,4>,3> mat; |
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> | |
| #include <vector> | |
| #include <optional> | |
| bool esiste(const std::vector<int>& v,int value) { | |
| for(auto i =0; i < v.size(); i++) { | |
| if (v[i] == value) { | |
| return true; | |
| } |
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 <array> | |
| #include <vector> | |
| #include "raylib.h" | |
| #define SCREEN_WIDTH 1000 | |
| #define SCREEN_HEIGHT 800 | |
| using pallina_info = std::array<float,4>; |
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 <vector> | |
| #include "raylib.h" | |
| #define SCREEN_WIDTH 800 | |
| #define SCREEN_HEIGHT 450 | |
| #define CELL_SIZE 2 | |
| #define GRID_WIDTH (SCREEN_WIDTH / CELL_SIZE) | |
| #define GRID_HEIGHT (SCREEN_HEIGHT / CELL_SIZE) |
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 <vector> | |
| #include "raylib.h" | |
| const int screen_width = 800; | |
| const int screen_height = 450; | |
| const int tile_size = 20; | |
| const int righe = screen_height/tile_size; | |
| const int colonne = screen_width/tile_size; | |
| int n_celle_vive(const std::vector<bool>&world,int col, int row) { |
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 <vector> | |
| #include "raylib.h" | |
| const int screen_width = 800; | |
| const int screen_height = 450; | |
| const int tile_size = 20; | |
| //------------------------------------------------------------------------------------ | |
| // Program main entry point |
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 <vector> | |
| #include "raylib.h" | |
| const int screen_width = 800; | |
| const int screen_height = 450; | |
| const int tile_size = 20; | |
| //------------------------------------------------------------------------------------ | |
| // Program main entry point |