Skip to content

Instantly share code, notes, and snippets.

View qnighy's full-sized avatar

Masaki Hara qnighy

View GitHub Profile
module test030;
import tango.io.Stdout: Stdout;
void main( ){
int value = 100;
if( value == 100 ){
Stdout( "VALUE is 100." )( );
}
if( value != 100 ){
Stdout( "VALUE is not 100." )( );
}
#include <iostream>
using namespace std;
template <int a, int b>
struct gcm
{
static const int value = gcm<b, a%b>::value;
};
template <int a>
#include <iostream>
template<int x, int y, int z>
struct tak;
template<int x, int y, int z, bool x_lte_y>
struct _tak
{
static const int value = tak<tak<x-1,y,z>::value,tak<y-1,z,x>::value,tak<z-1,x,y>::value>::value;
};
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.awt.image.*;
import javax.swing.*;
import java.io.*;
import java.util.ArrayList;
public class Bingoer extends JFrame implements ActionListener, KeyListener {
private Timer timer;
@qnighy
qnighy / Makefile
Created April 15, 2009 09:07
Makefile I use
#!/bin/make
CC = gcc
CXX = g++
# 1. use VERY STRICT warning option.
# 2. use NEW STANDARD C/C++ option.
# 3. use BRAND NEW gcc extension.
CFLAGS = \
-O2 -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings \
#!ruby -Ku
require "socket"
require "yaml"
class RP2P
def save_stat
File.open("stat#@port.yml", "w") do|file|
YAML.dump(@stat, file)
%:include /\
\
*\*\*\*\*\*\*\
konyanyachiwa!
*\*\*\*\*\*\*\
/ <stdio.h>
int ma\
in (a,b)
int a;
#include <stdio.h>
int main(void)
{
puts("Hello, world!");
return 0;
}
#include <stdio.h>
int main(int argc, char *argv[], char *envp[])
{
puts("Hello, world!");
return 0;
}
#include <stdio.h>
int main(void) {
int var0;
var0 = 2;
printf("%d\n", var0);
var0 = 4;
printf("%d\n", var0);
var0 = 3 + 5;
printf("%d\n", var0);