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
# chi sono | |
[contatti] | |
ciao sono andrea, lavoro qui a 2hire come sviluppatore embedded e smontacose. | |
Visto che chi non sa fare insegna, oggi voglio parlarvi di entity component system e perché penso sia veramente bello | |
e perché non l'ho mai usato | |
# survey | |
vedo un po' di facce conosciute. | |
quanti di voi sono programmatori puri? | |
quanti sono programmatori per necessità di videogioco? |
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 <cstdint> | |
namespace l { | |
namespace memory{ | |
enum class Type: uint8_t {nil=0, num, ptr, utf32, broken_heart, last }; | |
const char* type_name[] {"nil", "num", "ptr", "utf32", "broken_heart", "last"}; | |
using Val = uint32_t; |
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
(define (v+ a b) | |
(vector-map + a b)) | |
(define (v- a b) | |
(vector-map - a b)) | |
(define (vmag a) | |
(sqrt (fold-left + 0 (vector->list (vector-map (lambda (a) (expt a 2)) a))))) | |
(define (dist a b) |
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
lua: | |
local a = {} | |
local b = {} | |
local cose = {[a]='uno', [b]='due'} --> cose contiene due chiavi differenti | |
python: |
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() { | |
Serial.begin(115200); | |
while(!Serial); | |
} | |
template<int execTime> | |
class Counter{ | |
struct CountGuard{ | |
Counter* pt; |
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 <SD.h> | |
#include<Wire.h> | |
/** | |
* Based on https://www.arduino.cc/en/Tutorial/Datalogger for SD card writing | |
* * SD card attached to SPI bus as follows: | |
* ** MOSI - pin 11 | |
* ** MISO - pin 12 | |
* ** CLK - pin 13 | |
* ** CS - pin 10 (for MKRZero SD: SDCARD_SS_PIN) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// | |
// Created by andrea on 15/09/15. | |
// | |
#include <mutex> | |
#include <deque> | |
#include <condition_variable> | |
using namespace std; |
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
Tree = function(lbl, lT, rT){ | |
this.label=lbl | |
this.leftTree= lT | |
this.rightTree= rT | |
}; | |
function isAlphaNumeric(char) { | |
var code | |
code = char.charCodeAt(0); | |
if (!(code > 47 && code < 58) && // numeric (0-9) |