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 MoveCharacters() | |
{ | |
for(auto character : Sys::Characters) | |
{ | |
double &x = character->position->x; | |
double &y = character->position->y; | |
if(Input::inputs[Input::RIGHT]) | |
x += 1; | |
if(Input::inputs[Input::LEFT]) |
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
# imagine, for a second: | |
db = new db('mysql:localhost'); | |
results = ( | |
select | |
(name, age, photo) | |
from | |
(db.elePHPants) | |
where | |
(age > 16) |
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
use strict; | |
use File::Find; | |
use Data::Dumper; | |
my @ext = qw(\.c \.h \.cpp \.hpp); | |
my %stats; | |
sub search | |
{ |
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
// Septalicensed under the CC0, ISC, MIT, New-BSD, WTFPL, GNU All-Permissive, and Unlicense licenses. | |
// Code for splitting up a commandline-like string into a series of arguments, where \ escapes certain characters, including space, and "" escapes full arguments | |
std::vector<std::string> arglist; | |
std::string scraparg(""); | |
bool escape = false; | |
bool encapsulate = false; | |
for(auto character : command) | |
{ |
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/share/ibus-anthy/engine/tables.py: | |
= 'nm' : ('ん', 'm'), | |
+ 'nn' : ('ん', 'n'), | |
= 'np' : ('ん', 'p'), | |
>/usr/share/ibus-anthy/engine/romaji.py | |
=def romaji_correction_rule_get(k, d): | |
- return ('ん', k[1:2]) if k[0:1] == 'n' and not k[1:2] in "aiueony'" else d | |
+ return ('ん', k[1:2]) if k[0:1] == 'n' and not k[1:2] in "aiueoy'" else d |
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
#if _WIN32 | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
static inline FILE* wrap_fopen(const char* X, const char* Y) | |
{ | |
size_t X_S = MultiByteToWideChar(CP_UTF8, 0, X, -1, NULL, 0)*sizeof(wchar_t); | |
size_t Y_S = MultiByteToWideChar(CP_UTF8, 0, Y, -1, NULL, 0)*sizeof(wchar_t); | |
std::wstring W_X(X_S, L'#'); | |
std::wstring W_Y(Y_S, L'#'); | |
MultiByteToWideChar(CP_UTF8, 0, X, -1, &W_X[0], X_S); |
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 <SDL2/SDL.h> | |
#undef main | |
#include <stdio.h> | |
#include <stdint.h> | |
SDL_Rect d = {0, 0, 800, 600}; | |
int mouse_x = 0; | |
int mouse_y = 0; | |
int main() |
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/env python | |
from sys import argv, exit | |
from mmap import mmap | |
from struct import unpack, iter_unpack | |
#documented (poorly) by bgiop.py | |
opcodes = { | |
#-1 = unknown | |
# push : number of elements pushed to the stack | |
# pull: number of elements pulled from the 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
#include "fft.hpp" | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <math.h> // cos | |
#include <vector> // lazy | |
#include <String.h> // strerror | |
// "Hann" window. This is essentially just the shape of a cosine | |
// from 0.0 to 1.0 to 0.0. The difference from a cosine window is |
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
# Modified to spit out main script content in utf-8 | |
# use "Phiber's Kirikiri tool. File:Kikiriki.rar" from https://tlwiki.org/?title=Tools#KiriKiri2.2FKAG3 to extract script files from realta nua's vanilla .exe files | |
# copy said scripts all into the same folder (ovewrite or don't copy files with the same name, do not rename) and delete non-script ones (menu, macro, subroutine, etc) | |
# krkr line counter script | |
# | |
# How to run: | |
# | |
# (1) Organize game scripts into directories one level below where this script resides. |
OlderNewer