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
use_nix |
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
void sweep(VM* vm) { | |
Object* object = vm->firstObject; // vm->firstObject might be a dangling pointer after this :/ | |
while (object) { | |
if (!object->marked) { | |
/* This object wasn't reached, so remove it from the list | |
and free it. */ | |
Object* unreached = object; | |
object = unreached->next; | |
free(unreached); |
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
add_newline = true | |
format = "$jobs$battery$time$cmd_duration$line_break$username$hostname$directory$git_branch$git_commit$git_state$git_status$hg_branch$package$golang$haskell$python$ruby$rust$terraform$nix_shell$memory_usage$character\n\n" | |
[aws] | |
disabled = false | |
[character] | |
symbol = "❯\n" | |
[cmd_duration] |
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
#include <stdio.h> | |
#include <unistd.h> | |
// Output posible para "./programName banner dame ramos" | |
/** | |
1234: Creando 3 subprocesos... | |
4444: ramos | |
5555: banner | |
6666: dame | |
1234: (= |
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
#!/usr/bin/python | |
# monto: Cantidad de dinero que falta por juntar | |
# billetes: Es constante en la recursión. Define cuales son los billetes | |
# disponibles | |
# formas: Esta lista acompañará a toda la recursión, guardando las soluciones | |
# en caso de encontrarlas. | |
# | |
# forma_actual: Esta lista va a mantener los billetes que hemos usado hasta el | |
# momento. Describe las decisiones tomadas en árbol |
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
# Probablemente encuentren que esto es algo extraño, pero | |
# luego se darán cuenta que permite expresar las ideas | |
# de manera muy clara y concisa. | |
# Usando funciones pueden lograr que su codigo separe la | |
# iteración sobre toda la imagen de lo que hay que hacer. | |
# Eso permite que escriban el loop que recorre la imagen una | |
# sola vez y que terminen simplificando el problema de cambiar | |
# toda la imagen por el de cambiar un solo pixel. |
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
#include <stdio.h> | |
void fillArray(int* array){ | |
int i=0; | |
while(1){ | |
printf("Rewrote %d to %d\n", array[i], i);//This mem access should raise a SEGFAULT soon. | |
array[i] = i; | |
++i; | |
} | |
} |
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
color(C):- color(C,Y,X), fila(Y),columna(X). | |
casilla(C,Y,X):- color(C,Y,X). | |
vecinos(Y1,X1,Y2,X2):- 1{#abs(X1-X2)==1,#abs(Y1-Y2)==1}1, 1{#abs(X1-X2)==0,#abs(Y1-Y2)==0}1, fila(Y1;Y2), columna(X1;X2). | |
1{casilla(C,Y,X):color(C)}1:- fila(Y), columna(X). | |
1{camino(C,Y1,X1,Y2,X2):fila(Y2):columna(X2)}1:- color(C,Y1,X1), color(C), fila(Y1), columna(X1). |