Skip to content

Instantly share code, notes, and snippets.

. ".\Get-RegKeyLastWriteTime.ps1"
#$errorActionPreference = "SilentlyContinue"
set-variable -name SSIPath -value "<your beloved directory address>" -option constant
set-variable -name FlagError -value 1 -option constant
set-variable -name FlagFree -value 2 -option constant
set-variable -name FlagUser -value 3 -option constant
@luchiel
luchiel / U.cpp
Created June 29, 2012 00:29
Ukkonen-san
#include <cstdio>
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <map>
using namespace std;
struct Node;
@luchiel
luchiel / mcmf.cpp
Created June 13, 2012 10:47
MCMF (MCF, actually)
#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
const int INF = 100000000; //one time <= 10^6
struct Edge
{
int v, time;
@luchiel
luchiel / regexp.cpp
Created June 1, 2012 05:51
beginner's regular expressions
#include <iostream>
#include <string>
#include <cassert>
#include <exception>
#include <utility>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
@luchiel
luchiel / main.cpp
Created December 23, 2011 02:38
SSE and mathphysics
#include <cstdio>
#include <iostream>
#include <cmath>
#include <cassert>
using namespace std;
const int SIZE = 32;
const float T = 0.2f;
const float H = 0.4f;
@luchiel
luchiel / linear_cache.asm
Created December 3, 2011 03:51
Caches. Both randoms give the same chaotic result =(
.586
.model flat, stdcall
include E:\studies\__asm\masm32\include\msvcrt.inc
include E:\studies\__asm\masm32\include\kernel32.inc
includelib E:\studies\__asm\masm32\lib\kernel32.lib
includelib E:\studies\__asm\masm32\lib\msvcrt.lib
ExitProcess proto :DWORD
@luchiel
luchiel / clique.cpp
Created November 10, 2011 08:41
With pivoting
#include <cstdio>
#include <iostream>
#include <cstring>
#include <vector>
//Bron–Kerbosch
using namespace std;
int n, m;
@luchiel
luchiel / gist:1271698
Created October 8, 2011 00:58
CGrammar
%token IDENTIFIER CONSTANT STRING_LITERAL SIZEOF
%token INT FLOAT DOUBLE CONST VOID
%token STRUCT
%token IF ELSE WHILE DO FOR CONTINUE BREAK RETURN
primary_expression = IDENTIFIER | CONSTANT | STRING_LITERAL | '(' expression ')' ;
postfix_expression =
primary_expression |
postfix_expression '[' expression ']' |
@luchiel
luchiel / coolsort.asm
Created October 6, 2011 14:12
Merge is good. Merge must be done. Merge is done.
.386
.model flat, stdcall
include \masm32\include\msvcrt.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\msvcrt.lib
print proto
randomize proto
@luchiel
luchiel / sort.asm
Created September 26, 2011 02:01
ASM-1
.386
.model flat, stdcall
include \masm32\include\msvcrt.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\msvcrt.lib
print proto
randomize proto