Skip to content

Instantly share code, notes, and snippets.

View nokok's full-sized avatar
💤

Noriyuki Kazusawa nokok

💤
View GitHub Profile
@nokok
nokok / Hoge.krf
Last active August 29, 2015 14:11
type HogeType : SuperType <- Interface1 Interface2 Interface3
#private
def zero : Int = 0
def addOne : Int -> Int = (x) -> x + 1
### AppCode ### | ### https://raw.github.com/github/gitignore/master/Global/arc
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCod <
<
## Directory-based project format <
.idea/ <
# if you remove the above rule, at least ignore user-specific <
# .idea/workspace.xml <
# .idea/tasks.xml <
# and these sensitive or high-churn files: <
# .idea/dataSources.ids <
import java.util.function.IntFunction;
import java.util.stream.IntStream;
public class CodeIQ_Collatz {
static IntFunction<Integer> d = n -> n / 2;
static IntFunction<Integer> m = n -> n * 3 + 1;
static IntFunction<Integer> ev = n -> {
if (n % 2 == 0)
return d.apply(n);
object CodeIQ_Collatz {
val d = (n: Int) => n / 2
val m = (n: Int) => n * 3 + 1
def ev(n: Int) =
if (n % 2 == 0)
d(n)
else
m(n)
@nokok
nokok / Main.java
Last active August 29, 2015 13:56
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
public class Main {
#しゃうさぎ氏雑コラグランプリ
____
/ \
@nokok
nokok / bighoge.txt
Created November 4, 2013 12:49
HOGE
#### ####
#### ####
###########################################################################################
###########################################################################################
###########################################################################################
###########################################################################################
###########################################################################################
###########################################################################################
##################
@nokok
nokok / NullPo.java
Created October 23, 2013 15:40
話題のぬるぽ
import java.util.*;
public class NullPo{
static String out = "";
public static void main(String[] args){
char[] base = {'n','u','l','l','p','o'};
while(isEnd()){
char c = base[new Random().nextInt(5)];
System.out.print(c);