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) 2022 orIgo <mrorigo@gmail.com> | |
* | |
* Cycle exact 6502 (2A03) emulator. | |
* | |
* - To initialize the cpu, provide an initialized `cpu_bus_t *` with memory read/write primitives to `cpu_init()` . | |
* - For each tick/cycle, call `cpu_tick()` with the returned `cpu_t *`, checking the return value to detect HLT. | |
* - To cause an NMI request, call `cpu_nmi()`. | |
*/ | |
#include "cpu.h" |
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
import java.util.LinkedList; | |
import java.nio.charset.Charset; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.FileOutputStream; | |
public class Log4Simple | |
{ | |
public enum Level { |
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
%% Double Cola problem in Erlang | |
%% https://codeforces.com/problemset/problem/82/A | |
-module(main). | |
-export([start/1]). | |
start(N) -> | |
io:fwrite( | |
cola(N-1, [ {"Sheldon", 1}, | |
{"Leonard", 1}, |