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
.classpath | |
.project | |
.settings/* | |
target |
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" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.sun.glassfish</string> | |
<key>Disabled</key> | |
<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
require "net/http" | |
def get_ids(screen_name) | |
url = "http://api.twitter.com/1/followers/ids.json?screen_name=" + screen_name | |
ids_response = Net::HTTP.get_response(URI.parse(url)).body | |
/\[(.*)\]/.match(ids_response)[1].split(",").map { |x| x.to_i }.sort | |
end | |
id1_followers = get_ids(ARGV.shift) | |
id2_followers = get_ids(ARGV.shift) |
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 String substringByte(String str, int length) { | |
int len = 0; | |
StringBuffer buff = new StringBuffer(); | |
if(str == null) return null; | |
for(int i = 0;i < str.length();i++) { | |
if(str.charAt(i) <= 0x7f) { |
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
SELECT * FROM shops WHERE | |
( | |
SELECT management_division_value | |
FROM shop_management_divisions | |
WHERE management_division_id = 7 AND shop_management_divisions.shop_id = shops.id | |
) = 1 AND | |
( | |
SELECT management_division_value | |
FROM shop_management_divisions | |
WHERE management_division_id = 8 AND shop_management_divisions.shop_id = shops.id |
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
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
ignorecase = true | |
[remote "sqale"] | |
url = ssh://sqale@gateway.sqale.jp:2222/zephiransas/test.git | |
fetch = +refs/heads/*:refs/remotes/sqale/* |
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
require 'rubygems' | |
require 'roo' | |
book = Roo::Excelx.new("/Users/zephiransas/Desktop/Book1.xlsx") | |
book.default_sheet = book.sheets.first | |
p "--------------" | |
p book.cell(1, 'A') | |
p book.cell(1, 'B') | |
p "--------------" |
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 class Problem1 { | |
public static void main(String... args) { | |
int value = Streams.intRange(1, 1000).filter(i -> i % 3 == 0 || i % 5 == 0).sum(); | |
System.out.println(value); | |
} | |
} |
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 class Problem2 { | |
public static void main(String... args) { | |
List<Integer> data = new ArrayList<>(); | |
int ix = 0; | |
while (true) { | |
ix++; | |
int v = fib(ix); | |
if(v > 4_000_000) break; | |
data.add(v); | |
} |
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 void test1() { | |
int sum = 0; | |
for(int i = 1;i < 1000;i++) { | |
if(i % 3 == 0 || i % 5 == 0) sum+= i; | |
} | |
System.out.println(sum); | |
} |
OlderNewer