Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
Dear God, what is it like in your funny little brains? It must be so boring!

Omar Jair Purata Funes VentGrey

🤔
Dear God, what is it like in your funny little brains? It must be so boring!
View GitHub Profile
View chinook.sql
This file has been truncated, but you can view the full file.
/*******************************************************************************
Chinook Database - Version 1.4
Script: Chinook_PostgreSql.sql
Description: Creates and populates the Chinook database.
DB Server: PostgreSql
Author: Luis Rocha
License: http://www.codeplex.com/ChinookDatabase/license
********************************************************************************/
@VentGrey
VentGrey / crud.c
Created Nov 17, 2019
A small CRUD made in C using Hero / Mission perspective.
View crud.c
// -- Inclusión de cabeceras
#include <stdio.h>
#include <stdlib.h>
// -- Estrucuras
typedef struct {
int id;
char nombre[20];
@VentGrey
VentGrey / generic-stack.hpp
Created Mar 8, 2019
A simple stack implementation in C using templates (Generics)
View generic-stack.hpp
#include <iostream>
#include <cstdlib>
using namespace std;
// No se como hacer stacks ilimitados, por lo tanto
// mantendré el tope de elementos como 100
const int MAX = 100;
@VentGrey
VentGrey / eval.md
Created Mar 3, 2019
evaluator workflow
View eval.md

If you want to evalue a simple but nontheless important expression like: `5 1 2 + 4 * + 3 −´

read 5
read 1
read 2
read +. + is an operator which takes 2 args, so calculate 1+2 and replace with the result (3). The expression is now 5 3 4 * + 3 -
read 4
read *. * is an operator which takes two args, so calculate 3*4 and replace with the result, 12. The expression is reduced to 5 12 + 3 -
read +. + is an operator which takes two args, so calculate 5+12, replace by the result, 17. Now, we have 17 3 -
@VentGrey
VentGrey / mandelbrot.cpp
Created Feb 11, 2019
mandelbrotjodido.cpp
View mandelbrot.cpp
int value ( int x, int y) {
complex<float> point((float)x/width-1.5, (float)y/height-0.5);
// we divide by the image dimensions to get values smaller than 1
// then apply a translation
complex<float> z(0, 0);
unsigned int nb_iter = 0;
while (abs (z) < 2 && nb_iter <= 34) {
z = z * z + point;
nb_iter++;
}
View Escroto.c
int mandelbrotSet(double fnZ, float cnum, int nn) {
fnZ += pow(fnZ, 2) + cnum;
if(fnZ > 2)
return 0;
else if(nn == 0)
return 1;
else
return mandelbrotSet(fnZ, cnum, nn-1);
@VentGrey
VentGrey / mandelbrot.c
Created Feb 11, 2019
Una función simple para el fractal de mandelbrot
View mandelbrot.c
int mand(complex<double> z0, int max)
{
complex<double> Z = z0;
for (int i = 0; i < max; i++) {
if (abs(Z) > 2.0) {
return i;
} else {
Z = Z * Z + z0;
}
@VentGrey
VentGrey / Proyecto.md
Last active Oct 15, 2018
Una lista de recomendaciones para el proyecto final de la materia "Diseño de base de datos".
View Proyecto.md

Recursos para proyecto final

Solo son recomendaciones mías, nada personal o que se deba tomar en serio.


Editores de texto

  1. Notepad++ (Completo, Ligero) 🌟
  2. Visual Studio Code (Completo, posee Git, Personalizable, Extensible, Pesado) 🌟
  3. Sublime Text (Ligero, Personalizable, Requiere licencia) 🌟
View hello.s
.file "main.c"
.section .rodata
.LC0:
.string "Hola Mundo!"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
View rust.s
.text
.file "main0-317d481089b8c8fe83113de504472633.rs"
.section .text._ZN3std2rt10lang_start17haec5f20d0f279a35E,"ax",@progbits
.hidden _ZN3std2rt10lang_start17haec5f20d0f279a35E
.globl _ZN3std2rt10lang_start17haec5f20d0f279a35E
.p2align 4, 0x90
.type _ZN3std2rt10lang_start17haec5f20d0f279a35E,@function
_ZN3std2rt10lang_start17haec5f20d0f279a35E:
.cfi_startproc
subq $40, %rsp