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 processing.net.*; | |
import java.util.*; | |
Client voice_client; | |
PImage target_img, edge_img; | |
PFont font; | |
void setup() { | |
voice_client = new Client(this, "127.0.0.1", 10500); | |
target_img = loadImage("sample.jpg"); |
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
#-*-coding:utf-8 -*- | |
require "diegst/sha1" | |
require "radix" | |
class ConsitentHashing | |
def initialize(n = Integer, nodes) | |
@virtual_num = n | |
@ring = {} | |
@keys = [] | |
@nodes = [] |
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 <string.h> | |
#include <stdint.h> | |
#include <iostream> | |
#include <fstream> | |
#include "SDL.h" | |
class RAM; | |
class CPU; | |
class PPU; | |
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
http://www.maroon.dti.ne.jp/koten-kairo/works/hard/crtc1/display_genri.html | |
https://code.google.com/p/webrtc/issues/detail?id=383 |
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 <string> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <SDL2/SDL.h> | |
#define __DEBUG_FLAG__ 1 | |
class INESParser { | |
const char *rom_path; | |
uint8_t *prg_rom = NULL; |
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
diff -ur litenes/src/fce/cpu.c litenes2/src/fce/cpu.c | |
--- litenes/src/fce/cpu.c 2014-11-17 23:59:46.283859234 +0900 | |
+++ litenes2/src/fce/cpu.c 2014-11-18 00:01:49.787853728 +0900 | |
@@ -46,7 +46,7 @@ | |
#define cpu_update_zn_flags(value) cpu.P = (cpu.P & ~(zero_flag | negative_flag)) | cpu_zn_flag_table[value] | |
-#define cpu_branch(flag) if (flag) cpu.PC = op_address; | |
+#define cpu_branch(flag) if (flag) cpu.PC = op_address; op_cycles += 1; | |
#define cpu_compare(reg) int result = reg - op_value; \ |
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
function generateCounter2(a) | |
{ | |
var b=String(a).split(""); | |
if(b.length>=4) | |
{ | |
b.splice(b.length-3,0,',') | |
} | |
if(b.length>=8) | |
{ | |
b.splice(b.length-7,0,',') |
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
#-*- coding:utf-8 -*- | |
require "net/http" | |
require "json" | |
require "nokogiri" | |
class ODA | |
ODA_hdr = { | |
"Host" => "www2.onlinedisassembler.com", | |
"Content-Type" => "application/x-www-form-urlencoded; charset=UTF-8", | |
"Referer" => "http://www2.onlinedisassembler.com/odaweb/", |
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
table = { | |
"aarch64" => "ARM Architecture 64bit State", | |
"alpha" => "DEC Alpha(Alpha AXP), alpha:ev(4~6)=Alpha (4~6)", | |
"arc" => "Synopsys DesignWare ARC Processor, arc:(5~8)=ARC (5~8)" | |
"arm" => "ARM armv(2~5)=ARMv(2~5), v2a, v3m, v4t, v5t, v5te", | |
"xscale" => "Intel XScale (ARM Architecture)", | |
"ep9312" => "ARM (ARM 920T based)", | |
"iwmmxt" => "Intel Wireless MMX Technology(iWMMXt) iwmmxt2=iWMMXt 2", | |
"avr" => "Atmel AVR avr:(1,2,25,3,31,35,4,5,51,6,101,102,103,104,105,106,107)=AVR (1..107)", | |
"bfin" => "Blackfin Processor", |
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
struct OAMData { int y, x, tile, flags; }; | |
void render_line(int line) { | |
int x,c = 0; | |
struct OAMData oam_per_line[10]; | |
unsigned int *screen_buff = sdl_get_framebuffer(); | |
for(int i = 0; i < 40; i++) { // 40 * 4byte = 160byte (0xfe00 ~ ) | |
int y = mem_get_raw(0xfe00 + (i * 4)) - 16; | |
if(line < y || line >= y + 8 + (sprite_size * 8)) continue; | |
oam_per_line[i].y = y; | |
oam_per_line[i].x = mem_get_raw(0xfe00 + (i * 4) + 1) - 8; |
OlderNewer