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/env ruby | |
#! coding: utf-8 | |
class Bowling | |
def initialize() | |
@pins = [] | |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'open-uri' | |
require 'json' | |
uri="http://api.atnd.org/events/?format=json&event_id=" + ARGV[0] | |
json_string="" | |
open(uri){|f| | |
json_string=f.read |
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
nmap ,l :call PHPLint()<CR> | |
function PHPLint() | |
let result = system(&ft . ' -l ' . bufname("")) | |
echo result | |
endfunction |
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/env ruby | |
# -*- coding: utf-8 -*- | |
require "CSV" | |
list=Array.new | |
rows = CSV.open(ARGV[0],"rb:windows-31j") | |
rows.shift | |
rows.each do |row| | |
list.push row |
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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Terminal</name> | |
<identifier>private.swap_control_and_commnand</identifier> | |
<only>TERMINAL</only> | |
<autogen>--KeyToKey-- KeyCode::CONTROL_L, KeyCode::COMMAND_L</autogen> | |
<autogen>--KeyToKey-- KeyCode::COMMAND_L, KeyCode::CONTROL_L</autogen> | |
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
public static Class<?> getGenericClass(Class<?> clazz) throws IllegalArgumentException { | |
Type[] t = clazz.getGenericInterfaces(); | |
if (t.length == 0) { | |
Class<?> parent = clazz.getSuperclass(); | |
if (parent == null) { | |
throw new IllegalArgumentException(clazz.getName()); | |
} | |
return getGenericClass(parent); |
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
#!/bin/bash | |
exec ruby -Ke -I ~/src/ruby/ruby-refm/bitclust/lib ~/src/ruby/ruby-refm/bitclust/bin/refe.rb -d ~/src/ruby/ruby-refm/db-1_9_2/ "$@" |
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 static org.hamcrest.CoreMatchers.is; | |
import static org.junit.Assert.*; | |
import org.junit.Test; | |
public class CharacterTest { | |
@Test | |
public void test() { | |
assertThat(Character.isJavaIdentifierPart('文'), is(true)); |
OlderNewer