Skip to content

Instantly share code, notes, and snippets.

@yutopp
yutopp / gist:2329130
Created April 7, 2012 13:55
ぐぬぬ
#include "include/code_stub.hpp"
#include "include/assembler.hpp"
#include <iostream>
int main() {
ytd::assembler::code_stub code( 2048 );
namespace x86 = ytd::assembler::ia_32;
using namespace x86::registers;
#include <iostream>
#include <Windows.h>
int main() {
typedef unsigned char byte_t;
byte_t* const p = reinterpret_cast<byte_t*>( ::VirtualAlloc( NULL, 1024, MEM_COMMIT, PAGE_EXECUTE_READWRITE ) );
if ( p == NULL )
return -1;
@yutopp
yutopp / urlEncode
Created March 23, 2012 04:39
ぐぬぬ
#import("dart:utf",prefix:"utf");
class Url {
static String encodeUtf8( final String src ) => _encode( src, (s)=>utf.encodeUtf8(s) );
static String _encode( final String rawSrc, List f(final String) )
=> new String.fromCharCodes( ( final List src, List dst ) {
src.forEach(
(c) =>
dst.addAll(
class parent
{
homu() => child.o();
var child;
}
class child extends parent
{
child() { super.child = this; }
o() => print( "o" );
class ho
{
const ho();
number() => 5;
}
class hoge {
static homu() => _i.number();
static final _i = const ho();
}
@yutopp
yutopp / あだぷた
Created February 1, 2012 05:08
Range AdaptorみたいなものをDartで実装しようとしてナムサン
//----- Iterators -----
//referencable
interface ReferencableIterator<E> {
clone();
E reference();
/*operator equals*/
bool operator==( it );
}
//forward
@yutopp
yutopp / hsp_d_2.hsp
Created January 20, 2012 09:43
カオス・・・
ho
#deffunc ho "ちくわむしゃむしゃHSP!
mes "エンダァァ
@yutopp
yutopp / hsp_d_1.hsp
Created January 20, 2012 09:37
なぜ動く?(HSP3.3)
ho : stop
#deffunc ho int s, 5