Skip to content

Instantly share code, notes, and snippets.

View baquiax's full-sized avatar
🇬🇹

Alexander Baquiax baquiax

🇬🇹
View GitHub Profile
/* 2 dimension arrays */
var skillMatrix=null;
var matrix=null;
//var stars=null;
/* Single arrays */
var rCov=[];
var cCov=[];
var rows=0;
var cols=0;
var dim=0;
@baquiax
baquiax / MatrixOfDistances.php
Last active November 16, 2016 21:13
Using Google Maps to calculate distances
<?php
header("Content-type: text/csv");
header('Content-disposition: attachment;filename="matrix.csv"');
$matrix = array( );
$titles = array();
$allPositions = array("14.597518,-90.514900",
"14.599453,-90.515419",
"14.597998,-90.512912",
@baquiax
baquiax / adsvideo.js
Created November 27, 2015 06:34
Ads Video JS
jQuery(document).ready(function() {
if(window.location.hash) {
console.log("Pasa el hash " + window.location.hash);
jQuery(window).load(function() {
if ( window.location.hash.length > 0) {
console.log("Pasa el hash length " + window.location.hash.length);
var adIdFrame = window.location.hash;
console.log("id: " + adIdFrame);
console.log(jQuery("" + adIdFrame));
var videoIframe = jQuery("" + adIdFrame).closest(".centerAd").siblings(".videoPlayer:first");
@baquiax
baquiax / Spotify
Last active August 29, 2015 14:21
Spotify test
<?php
// Se incluye la clase
include_once("spotify.class.php");
// Se rescatan los datos de una uri de spotify
$data = spotify::get('spotify:artist:1yxSLGMDHlW21z4YXirZDS');
echo json_encode($data, JSON_UNESCAPED_SLASHES);
//var_dump($data);
?>
<?php
@baquiax
baquiax / Line Tracker
Last active August 29, 2015 14:20
Automaton Line Tracker
#include < Servo.h >
Servo servoLeft; // Define left servo
Servo servoRight; // Define right servo
int vG = 96;
int vL = 85;
int left = A3;
int right = A0;
int midLeft = A2;
int midRight = A1;
@baquiax
baquiax / Lab11
Created March 31, 2015 22:59
Lab11 CC5
create database lab11;
use lab11;
create table marinero (
sid int,
name varchar(50) not null,
rating int not null,
age numeric(4,2),
primary key(sid)
);
@baquiax
baquiax / Lab10
Last active August 29, 2015 14:17
Lab10 CC5
CREATE DATABASE IF NOT EXISTS lab10;
USE lab10;
create table if not EXISTS suppliers (
sid int,
sname varchar(100),
address varchar(200),
primary key(sid)
);
create table if not EXISTS parts (
@baquiax
baquiax / lab09
Last active August 29, 2015 14:17
Lab 09 CCV
CREATE DATABASE if not exists lab9;
USE lab9;
create table if not exists estudiante (
carne SMALLINT NOT NULL,
nombre varchar(100),
especialidad varchar(100),
ciclo varchar(10),
edad TINYINT,
primary key (carne)
@baquiax
baquiax / SymonsSays
Last active August 29, 2015 14:17
Symons Says
#include "pitches.h"
/* PINES DE ENTRADA
* [2-6] pines de entrada (push-button), 2 = start
* [23] potenciometro (Velocidad).
* [24-27] pines de salidas para LEDs
* Pin 40 Salida Analoga para bocina
*/
const int potentiometerPin = 23;
@baquiax
baquiax / Ast.java
Last active August 29, 2015 14:06 — forked from diegofigueroa/Ast.java
package compiler.ast;
import java.io.*;
import compiler.parser.*;
import compiler.lib.*;
import org.antlr.v4.runtime.tree.*;
public class Ast{