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
const makeImage = (elFile, file) => { | |
const elImage = document.createElement('img'); | |
elFile.appendChild(elImage); | |
const reader = new FileReader(); | |
reader.addEventListener('load', (e) => { | |
elImage.src = e.target.result; | |
}); | |
reader.readAsDataURL(file); | |
}; |
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
int fibonacci(int n, int *p){ | |
if(n == 0) { | |
p[0] = 0; | |
return p[0]; | |
}else if(n == 1){ | |
p[1] = 1; | |
return p[1]; | |
}else{ | |
p[n] = fibonacci(n-1, p) + fibonacci(n-2, p); | |
return p[n]; |
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 bottle import Bottle, run, post, request, redirect | |
import wiringpi as wp | |
app = Bottle() | |
state = 0 | |
stdict = {0:"turn off", 1:"turn on"} | |
wp.wiringPiSetupGpio() | |
wp.pinMode(2, 1) | |
@app.route('/') |
NewerOlder