Skip to content

Instantly share code, notes, and snippets.

View pr00thmatic's full-sized avatar

Ruth García pr00thmatic

View GitHub Profile
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
;;smart compilling in a keystroke
(global-set-key [f12] 'compile)
;;shush toolbar! shush menubar!
(menu-bar-mode 0)
(tool-bar-mode 0)
;; load the file
(require 'gnuplot-mode)
(add-to-list 'load-path "~/.emacs.d/lisp/gnuplot-mode/")
@pr00thmatic
pr00thmatic / genericity.cpp
Last active August 29, 2015 14:00
genericidad en C++ : Recorriendo un vector cualquiera, y ejecutando un procedimiento cualquiera con cada uno de sus elementos :D
#include <string>
#include <vector>
#include <iostream>
using namespace std;
template<typename _devolver_, typename _tipoVector_>
_devolver_ recorrer(vector<_tipoVector_> V,
_devolver_ procedimiento(int, //indice
_devolver_, //la respuesta anterior
@pr00thmatic
pr00thmatic / supermercado
Created May 11, 2014 15:29
el problema "supermercado" del qr de coderoads coding contest (tarda unos 5 minutos en generar las respuestas del caso difícil D:)
//#define NDEBUG
#include <cstring>
#include <string>
#include <queue>
#include <math.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <sstream>
//#define NDEBUG
#define INF numeric_limits<int>::max()
#include <limits>
#include <string>
#include <queue>
#include <math.h>
#include <iostream>
#include <vector>
#include <algorithm>
@pr00thmatic
pr00thmatic / filosofos-hambrientos
Last active July 22, 2021 00:17
El problema de los filósofos hambrientos (Dining Philosophers Problem). Comentado en español.
/*
Name : Dining Philosophers Problem
Author : jishnu7
Web : http://thecodecracker.com
Date : 26-Sep-2010
Description : C Program to solve Dining philosophers problem
License : GNU GPL License
Traducido al español y comentado por Vengadora.
*/
var game = new Phaser.Game(800, 600,
Phaser.AUTO, '',
{ preload: preload,
create: create,
update: update
}
);
// función indispensable para phaser.
function preload() { //Cargando los recursos que necesitaremos.
game.load.image('wall', 'assets/wall.png');
game.load.image('acera', 'assets/acera.png');
game.load.spritesheet('uno', 'assets/uno.png', 16, 16);
}
game.add.tileSprite(0,0,
game.world.width,
game.world.height,
'acera',
0
);