Skip to content

Instantly share code, notes, and snippets.

View ayato-p's full-sized avatar
💪

ayato-p ayato-p

💪
  • UZABASE, inc.
  • Tokyo, Japan
  • 20:09 (UTC +09:00)
View GitHub Profile
;; package
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
(require 'cl)
(defvar installing-package-list
'(
anything
execute: (form_id, success_proc, fail_proc) ->
$form_obj = $(form_id)
_url = $form_obj.attr('action')
_type = $form_obj.attr('method')
_data = new FormData($form_obj[0])
$.ajax
type: _type
url: _url
processData: false
import java.util.List;
/**
* Created with IntelliJ IDEA.
* User: ayato
* Date: 5/24/14
* Time: 4:22 PM
* To change this template use File | Settings | File Templates.
*/
public class ClassPerformance {
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
public class Main {
public static void main(String[] args) {
List<Employee> employees = new ArrayList<>();
employees.add(new Employee("hoge", 3));
employees.add(new Employee("fuga", 1));
fun <T> Array<T>.component1() = this.get(0)
fun <T> Array<T>.component2() = this.get(1)
class HQ9Plus(private val src: String) {
private var count = 0
fun eval() {
src.forEach {
when(it){
fun Int.isZero() = this == 0
fun Int.lt(other: Int) = this < other
fun Int.lte(other: Int) = this <= other
fun Int.gt(other: Int) = this > other
fun Int.gte(other: Int) = this >= other
class KotlinF_ck {
private var tokens = charArray()
private var jumps = hashMapOf<Int, Int>()
package test;
import java.util.Random;
public class RandomCreate {
private int[] bitArray;
/**
* overLoad
def prime(n)
k=2
c=0
if n==1
print("false","\n")
else
while k<n-1
b=n%k
if b==0
#! /usr/bin/ruby
def collatz(n)
print n.to_s+"\n"
if n%2 == 0
collatz(n/2)
elsif n != 1
collatz(n*3+1)
end
end
import java.util.Iterator;
public interface Aggregate {
public abstract Iterator<Book> iterator();
}