Skip to content

Instantly share code, notes, and snippets.

#include "astar.hpp"
#include "vector.hpp"
#include <algorithm>
#include <iterator>
#include <vector>
#include <queue>
#include <cassert>
using Index = int;
3>P:\Programming\Libraries\boost_1_58_0\boost/variant/variant.hpp(978): error C3066: there are multiple ways that an object of this type can be called with these arguments
3> P:\Programming\Libraries\perseus\code\src\executable\perseus_print.cpp(37): note: could be 'void print_visitor::operator ()(const perseus::detail::ast::void_expression &) const'
3> P:\Programming\Libraries\perseus\code\src\executable\perseus_print.cpp(42): note: or 'void print_visitor::operator ()(const perseus::detail::ast::string_literal &) const'
3> P:\Programming\Libraries\perseus\code\src\executable\perseus_print.cpp(47): note: or 'void print_visitor::operator ()(uint32_t) const'
3> P:\Programming\Libraries\perseus\code\src\executable\perseus_print.cpp(52): note: or 'void print_visitor::operator ()(bool) const'
3> P:\Programming\Libraries\perseus\code\src\executable\perseus_print.cpp(57): note: or 'void print_visitor::operator ()(const perseus::detail::ast::identifier &) const'
3> P:\Programming\Librari
BOOST_AUTO_TEST_CASE( call_and_return_factorial )
{
auto code = create_code_segment(
// stack: [-4: n] (supplied by executor)
opcode::relative_load_stack, std::uint32_t( 4 ), std::int32_t( -4 ),
// stack: [-8: n (return value memory, to be overwritten)] [-4: n]
// result = factorial( n )
opcode::call, label_reference( "factorial" ),
// stack: [factorial( n )]
opcode::exit,
// include your class here
#include <iostream>
#include <sstream>
#include <string>
void unless( const bool condition, const std::string& error )
{
if( !condition )
{
@mrwonko
mrwonko / topicbot.py
Created September 6, 2013 17:56
irc bot for reading out the topic
import socket, signal, sys
nickname = "TopicBot"
server = "irc.arloria.net"
port = 6667
channel = "#jacoders"
blacklist = { "ghbot" }
RPL_WELCOME = "001"
RPL_TOPIC = "332"
@mrwonko
mrwonko / BiochemistTest.java
Last active December 18, 2015 13:49
Uni Ueb05 Tests
package willitests;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.not;
import static org.junit.Assert.*;
import lab.employees.Biochemist;
import org.junit.Test;
public class BiochemistTest {
@mrwonko
mrwonko / topicbot.py
Created April 10, 2013 19:10
IRC bot that reads out the topic to anyone who joins
import socket, signal, sys
nickname = "TopicBot"
server = "irc.arloria.net"
port = 6667
channel = "#jacoders"
blacklist = { "ghbot" }
RPL_WELCOME = "001"
RPL_TOPIC = "332"
@mrwonko
mrwonko / uniqueJapackModels.txt
Created March 19, 2013 10:30
A list of models in GTK Radiant's JAPack that are in no way redundant (i.e. they are not included in assets1.pk3 and they're not just an .ase version of an available md3 model)
models/chunks/metal/vjun_metal1_1.md3
models/chunks/metal/vjun_metal1_2.md3
models/chunks/metal/vjun_metal1_3.md3
models/chunks/metal/vjun_metal1_4.md3
models/chunks/metal/vjun_metal2_1.md3
models/chunks/metal/vjun_metal2_2.md3
models/chunks/metal/vjun_metal2_3.md3
models/chunks/metal/vjun_metal2_4.md3
models/items/bacta.md3
models/items/psd_big.md3
@mrwonko
mrwonko / animation.cfg
Created March 18, 2013 00:22
vtol vehicle for jedi academy
// Animation Data generated from Blender Markers
// name start length loop fps
BOTH_GEARS_OPEN 0 15 -1 20
BOTH_GEARS_CLOSE 0 15 -1 -20
BOTH_WINGS_OPEN 15 20 -1 20
BOTH_WINGS_CLOSE 15 20 -1 -20
BOTH_VS_IDLE 14 1 -1 20
ROOT 14 1 -1 20
@mrwonko
mrwonko / thiscall_test.c
Created March 16, 2013 20:14
Testing calling __thiscall functions (member functions) from (inline) asm (MSVC)
#include "stdafx.h"
#include <stdio.h> //printf
#include <stdlib.h>//system
class OpaqueClass
{
public:
OpaqueClass(const char* name) : mName(name) {}