Skip to content

Instantly share code, notes, and snippets.

View TheZoq2's full-sized avatar
🦀
🦀 Always rust! 🦀

Frans Skarman TheZoq2

🦀
🦀 Always rust! 🦀
View GitHub Profile
@TheZoq2
TheZoq2 / main.c
Last active April 24, 2016 16:15
#include "stdlib.h"
#include "stdio.h"
#include "time.h"
#include "math.h"
#define q printf(
#define yolo ;
#define index i >> 1
const int ARRAY_SIZE = 10;
[22:28:55 INFO]: msbailey121212 fell from a high place
[22:29:04 INFO]: msbailey121212 issued server command: /home pt
[22:29:45 INFO]: msbailey121212> nah
[22:29:49 INFO]: msbailey121212> i have water
[22:30:00 INFO]: msbailey121212> but i have picks too
[22:30:52 INFO]: msbailey121212 fell from a high place
[22:31:01 INFO]: msbailey121212 issued server command: /home pt
[22:32:29 INFO]: msbailey121212> noooooooooooooo
[22:32:34 INFO]: msbailey121212> its all gone!!!!!!!!!!!!!!!!!!!!!!!!!!
[22:32:40 INFO]: msbailey121212> i quit this erver
enum State
{
LOAD_DATA,
MODIFY_DATA,
SAVE_DATA,
FUCK_YOU,
}
State state = LOAD_DATA;
someOtherFunction : Int -> Int
someOtherFunction test =
test
someFunction : Int -> Bool
someFunction a =
if a == someOtherFunction then True else False
float test = 0.3;
std::string testAsString = std::to_string(test);
std::cout << testAsString << std::endl;
//This prints 0.300000
QApplication a(argc, argv);
testAsString = std::to_string(test);
std::cout << testAsString << std::endl;
macro_rules! qstruct
{
($name:ident
($($param_name:ident: $param_type:ty),*$(),+)
{
$($mem_name:ident : $mem_type:ty = $mem_value:expr),*$(),+
})
=>
{
//Create the struct itself
avr-gcc -x c -funsigned-char -funsigned-bitfields -DDEBUG -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atmega1284p -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)"
avr-gcc -Wl,-Map="$(OutputFileName).map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mrelax -mmcu=atmega1284p
avr-gcc -Wa,-gdwarf2 -x assembler-with-cpp -c -mmcu=atmega1284p -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -mrelax -Wa,-g
fn recursion_helper(node_json: &json::Object, remaining_path: mut Vec<Children>)
{
let first_child, second_child = get_node_children(node_json);
let current_intersection = remaining_path.pop();
//Find which node should be traversed and which node should be
let traverse_node, balance_node = match current_intersection
{
None => {return},
pub enum JsonHandlerError
{
ReadFail(io::Error),
DecoderError(json::DecoderError),
EncoderError(json::EncoderError)
}
impl convert::From<io::Error> for JsonHandlerError
{
fn from(error: io::Error) -> JsonHandlerError
from copy import deepcopy
import pdb
EMPTY_CHAR = "."
PLAYER_CHAR = "x"
def change_piece_at(pos, board, new):
board[pos[0]][pos[1]] = new