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
# Originally written on 2017-04-26 19:03. | |
# Welcome to my fancy Shift JIS explanation and simple implementation in Python. | |
# | |
# If you haven't heard of Shift JIS, it's a single or double-byte encoding for | |
# the JIS X 0201 and JIS X 0208 character sets, a bit like UTF-8 is for Unicode. | |
# | |
# The key feature of Shift JIS is being able to use both character sets at once, | |
# retaining legacy half-width ASCII and Katakana characters from JIS X 0201. | |
# |
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) 2013 Jookia | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: The above copyright | |
notice and this permission notice shall be included in all copies or |
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
15,17c15,17 | |
< --- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8135, si_status=0, si_utime=0, si_stime=0} (Child exited) --- | |
< --- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8134, si_status=0, si_utime=0, si_stime=0} (Child exited) --- | |
< --- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8133, si_status=0, si_utime=0, si_stime=0} (Child exited) --- | |
--- | |
> --- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8165, si_status=0, si_utime=0, si_stime=0} (Child exited) --- | |
> --- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8164, si_status=0, si_utime=0, si_stime=0} (Child exited) --- | |
> --- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8163, si_status=0, si_utime=0, si_stime=0} (Child exited) --- | |
299c299 | |
< open("", O_RDONLY) = -1 ENOENT (No such file or directory) |
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 <string.h> | |
int is_palindrome(const char* text) | |
{ | |
/* Set the forward and backward iterators to outside | |
the string as they move in the first iteration. */ | |
const char* forward = &text[0] - 1; | |
const char* backward = &text[strlen(text)]; | |
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 <ctime> | |
#include <cstdlib> | |
#include <iostream> | |
using namespace std; | |
class feline | |
{ | |
public: | |
feline(void) |
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
int stepStatus; | |
do | |
{ | |
stepStatus = sqlite3_step(statement); |
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 <iostream> | |
#include <cassert> | |
#include "endian.hpp" | |
int main(void) | |
{ | |
assert(flipEndian(long(0x123456789ABCDEF)) == long(0xEFCDAB8967452301)); | |
assert(flipEndian(int(0x12345678)) == int(0x78563412)); | |
assert(flipEndian(short(0x1234)) == short(0x3412)); | |
assert(flipEndian(char(0x12)) == char(0x12)); |
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 <stdint.h> | |
// Some defines useful for tweaking the interpreter. | |
#define CELL uint8_t | |
#define CELL_COUNT (30000) | |
#define LOOP_STACK_SIZE (256) |
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> | |
// Some defines useful for tweaking the interpreter. | |
#define DATA char | |
#define CELL unsigned char | |
#define CELL_COUNT 30000 | |
#define LOOP_STACK_SIZE 32 |