I hereby claim:
- I am linuxmercedes on github.
- I am linuxmercedes (https://keybase.io/linuxmercedes) on keybase.
- I have a public key ASDa5MDDyBeo1db0m8VrKfnIUJZe8e1lQqOXSxoIgV3wrgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
trait DoStuff { | |
fn stuff(&mut self, thing: i32) -> bool; | |
} | |
struct Thing1 { | |
yup: i32, | |
} | |
impl DoStuff for Thing1 { | |
fn stuff(&mut self, thing: i32) -> bool { |
#include<iostream> | |
using namespace std; | |
#define ps(x) cout << #x << ":\t" << sizeof(x) << endl | |
int main() { | |
ps(short); | |
ps(int); | |
ps(long); | |
ps(long long); |
from DictHeap import DictHeap | |
from step import step | |
from solution import solution | |
# Loop-based A*GS algorithm | |
def search(edges, sidelen, start, goal, heuristic): | |
frontier = DictHeap() | |
explored = {} | |
# Add the start state to the frontier |
#include "astar.h" | |
void findPath(coord start, coord end, short steps, vector<coord> & path) | |
{ | |
//if we are going to where we are | |
if(start == end) | |
{ | |
path.front() = end; | |
return; | |
} |
require "set" | |
def create_idxs(str) | |
# TODO: rewrite with inject or something | |
ret = Hash.new { |hash,key| hash[key] = SortedSet.new } | |
str.chars.each_index { |i| | |
ret[str[i]] << i | |
} | |
return ret; |
#include<stdio.h> | |
int main() { | |
int a = 5; | |
int b = 3; | |
(a > b ? a : b) = 6; | |
printf("a: %i b: %i\n", a, b); | |
return 0; |
#include<iostream> | |
using namespace std; | |
int switch_case(int x) { | |
switch(x) { | |
case 1: | |
return -1; | |
case 5: | |
return 3; | |
case -7: |
def die(i, m): | |
return | |
three = [ | |
'fizz', | |
'' | |
] | |
five = [ | |
'buzz', |
TESTDIR=tests | |
TESTFILES=$(wildcard $(TESTDIR)/*.txt) | |
OUTFILES=$(TESTFILES:.txt=.result) | |
.PHONY: all lexer parser clean test cleantest | |
all: lexer | |
lex.yy.c: mipl.l |