Skip to content

Instantly share code, notes, and snippets.

@mattn
mattn / .classpath
Created August 8, 2012 04:51
業務プログラマがFizzBuzz書いたらどうなるか ( ref: http://d.hatena.ne.jp/irof/20120808/p1 )
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/usr/share/java/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="/usr/share/java/junit4.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
@sasamijp
sasamijp / Penis.java
Created May 3, 2013 11:11
千本チンポ 夜に紛れ 君の膣に 届かないよ
public class Penis {
public static void main (String[] args) {
int n = 0;
while (n <= 1000) {
System.out.println("チンポ");
n++;
}
}
}
public class Main {
public static main(String... args) {
Map<Integer, Map<Position, Box>> backingMap = Maps.newHashMap();
Supplier<Map<Position, Box>> factory = newMapFactory();
Table<Integer, Position, Box> table = Tables.newCustomTable(backingMap, factory);
Integer rowKey = 0;
Position columnKey = getPosition();
@sasamijp
sasamijp / gist:5670218
Last active December 17, 2015 20:49
素数吐いてる
public class Sosu {
public static void main(String[] args){
for(int n = 2 n<100; n++){
boolean sosu=true;
for(int i=2;i<n;i++){
if(n%i==0) {
sosu=false;
break;
}
@sasamijp
sasamijp / Sosuhantei.java
Created May 29, 2013 13:56
素数分け鳥
import java.io.*;
public class Sosuhantei {
public static void main(String[] args) {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try {
System.out.println("数字を入力");
String line = reader.readLine();
int n = Integer.parseInt(line);
@sasamijp
sasamijp / FizzBuzz.rb
Last active December 18, 2015 07:29
やったねたえちゃん
for num in 1..gets.to_i do
print "Fizz" if num % 3 == 0
print "Buzz" if num % 5 == 0
print num if num % 3 != 0 and num % 5 != 0
end
@nk0t
nk0t / helloworld.asm
Created June 18, 2013 09:04
HelloWorld
BITS 32
mov eax, 4
mov ebx, 1
push 0x0a21646c
push 0x726f576f
push 0x6c6c6548
mov ecx, esp
mov edx, 12
int 0x80
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.8.0"
@.endl = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@.fizz = private unnamed_addr constant [8 x i8] c"fizz%d\0A\00", align 1
@.buzz = private unnamed_addr constant [8 x i8] c"buzz%d\0A\00", align 1
@.fizzbuzz = private unnamed_addr constant [12 x i8] c"fizzbuzz%d\0A\00", align 1
define i32 @main() #0 {
entry:
@Nucleareal
Nucleareal / FizzBuzz.cs
Last active December 25, 2015 16:39
C#でFizzBuzz(122文字)
foreach(var v in Enumerable.Range(1,100)){Console.WriteLine(v%15==0?"FizzBuzz":v%3==0?"Fizz":v%5==0?"Buzz":v.ToString());}
@flour4445
flour4445 / JosouPlugin.java
Created October 19, 2013 14:29
女装プラグインの中身
package net.flourity.javatter.plugin.josou;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.nio.charset.Charset;
import java.util.regex.Pattern;
import twitter4j.Status;
import twitter4j.TwitterException;