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
package jenkins | |
import "hash" | |
// Jenkins hash function | |
type jenkins uint32 | |
func New32() hash.Hash32 { | |
var j jenkins = 0 | |
return &j; |
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
COMPILER CompilationUnit | |
CHARACTERS | |
tab = '\u0009' . | |
lf = '\u000a' . | |
cr = '\u000d' . | |
digit = "1234567890" . | |
letter = 'A' .. 'Z' + 'a' .. 'z' + '_'. |
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 <stdlib.h> | |
#include <string.h> | |
#include <wchar.h> | |
#include <windows.h> | |
/* | |
* Poor Mans Windows Java Unicode Command Line Passer. | |
* Easily uses up to 4kb of stack. | |
*/ |
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
package org.csdgn.expr.coco; | |
import java.math.BigDecimal; | |
COMPILER CompilationUnit | |
public Expr tree; | |
CHARACTERS | |
digit |
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
bool power_plant::has_power(uint64_t time) { | |
return shutdown_time > time; | |
} | |
void power_plant::powerup(uint64_t time) { | |
//set next shutdown time to 4-12 days in the future | |
shutdown_time = time + 24 * (4 + (rand() % 8)); | |
for(int i = 0; i < buildings.size(); ++i) { | |
buildings[i].powerup(); | |
} |
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
SRC_PATH = src | |
OBJ_PATH = obj | |
CC = clang | |
CFLAGS = -std=c11 -Wall -Wpointer-arith -Wwrite-strings -Wuninitialized -pedantic | |
LDFLAGS = -static-libgcc -lmingw32 | |
TARGET = elsewhere.exe | |
CFLAGS += -DSDL |
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
/* | |
Copyright (c) 2014, Robert Maupin <chasesan> | |
Permission to use, copy, modify, and/or distribute this software for any | |
purpose with or without fee is hereby granted, provided that the above | |
copyright notice and this permission notice appear in all copies. | |
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
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
/** | |
* Jackrabbit Industries Automation Controller (JRIAC) | |
* Version 1.1 | |
*/ | |
// CONSTANTS | |
const string BlockPrefix = "[Automated]"; | |
//const string GroupPrefix = "[Automated]"; //TODO | |
// Set Programmable Block screen to 0.4 font size, recommend Monospace font. |
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/python3 | |
import io | |
import os | |
import lz4.block | |
from glob import glob | |
FILE_PATH = os.path.dirname(os.path.realpath(__file__)) | |
def uint32(data): | |
"""Convert 4 bytes to a little endian unsigned integer.""" |
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/python3 | |
# Copyright 2021, Robert Maupin | |
# Copying and distribution of this file, with or without modification, are | |
# permitted in any medium without royalty, provided the copyright notice and | |
# this notice are preserved. This file is offered as-is, without any warranty. | |
import io | |
import os | |
import lz4.block |