This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test; | |
import java.util.Random; | |
public class RandomCreate { | |
private int[] bitArray; | |
/** | |
* overLoad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def prime(n) | |
k=2 | |
c=0 | |
if n==1 | |
print("false","\n") | |
else | |
while k<n-1 | |
b=n%k | |
if b==0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Iterator; | |
public interface Aggregate { | |
public abstract Iterator<Book> iterator(); | |
} |
OlderNewer