Skip to content

Instantly share code, notes, and snippets.

void delanteDerecha(int velocidad){
Serial.print("Delante derecha!");
controlMotor("del_der", 1, 0);
controlMotor("del_izq", 1, velocidad);
controlMotor("atr_der", 1, velocidad);
controlMotor("atr_izq", 1, 0);
}
void controlMotor(String motorStr,int mdirection, int velocidad){
int IN1;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
*
* @author michel
*/
public class NewMain {
angular.module('myApp')
.controller('FilmsController', ['$scope','$location','Film','Auth' ,function($scope, $location, Film,Auth){
$scope.allTags = [];
$scope.selectedTags = [];
Film.query(function(response) {
$scope.films = response ? response : [];
$scope.allTags = getTags();
$('#multi-select').dropdown();
/**
* PARA EJECUTAR -> node script.js > script.sql
*/
var films = [
{
id: 1,
title: "Assassin's Creed",
year: 2017,
country: "Francia",
@Maes95
Maes95 / exportAsPDF.js
Last active March 15, 2017 11:17
Simple export HTML element to PDF
function exportToPDF(title, id, css){
setTimeout(function () {
var printWindow = window.open("", "", "width=1000, height=800");
printWindow.document.write('<html><head><title>'
+title
+'</title>'
+css
+'</head><body onload="window.print()">'
+ document.getElementById(id).innerHTML
+ '</body></html>');
function exportAsJSON(fileName, myJsonObject){
var data = "text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(myJsonObject));
var a = document.createElement('a');
a.href = "data: "+data;
a.download = fileName+".json";
a.click();
}
var someData = {
name: "John",