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 Student { | |
private String firstName; | |
private String lastName; | |
private String course; | |
private String gender; | |
private double height; | |
private double weight; | |
public Student() { | |
setFirstName("ひろき"); |
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.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
public class Cat { | |
public static void main(String...args) { | |
for (int i = 0; i < args.length; i++) { | |
System.out.println("ファイル名: " + args[i] + "===="); | |
try { |
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 BadBank { | |
// 預金残高 | |
private int value = 0; | |
// 預け入れ・引き出し | |
public void addMoney(int money) { | |
// 現在残高を保存 | |
int currentValue = value; | |
// 状況表示 | |
System.out.println(Thread.currentThread() + " がaddMoneyに入りました"); |
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; | |
public class ArrayListTest1 { | |
public static void main(String...args) { | |
ArrayList<String> list = new ArrayList<String>(); | |
list.add("Alice"); | |
list.add("Bob"); | |
list.add("Chris"); |
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 python3 | |
# 面倒なので関数化とかしてないよ | |
end = 1000 | |
print([x if x % 3 != 0 and x % 5 != 0 | |
else 'FizzBuzz' if x % 15 == 0 | |
else 'Buzz' if x % 5 == 0 | |
else 'Fizz' for x in range(1,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 python3 | |
def isOdd(i): | |
return False if i & 0x1 == 0 else True | |
def isEven(i): | |
return not isOdd(i) | |
if __name__ == '__main__': | |
for x in range(100): |
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
set-option -g prefix C-j | |
setw -g utf8 on | |
set -g status-utf8 on | |
set -g mouse-select-pane on | |
setw -g mode-mouse on | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
set -g base-index 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
#!/usr/bin/env python3 | |
import sys | |
import random | |
argv = sys.argv | |
argc = len(argv) | |
if argc not in {2, 3}: | |
print("Usage: pass_gen digis [mode(1:number,2:lower,4:upper,8:specials]") |
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 jp.ac.it_college.std.nakasone.actionbartab; | |
import android.app.ActionBar; | |
import android.app.Activity; | |
import android.app.Fragment; | |
import android.app.FragmentTransaction; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.LayoutInflater; | |
import android.view.View; |
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 jp.ac.it_college.std.nakasone.servicetest; | |
import android.app.Activity; | |
import android.content.ComponentName; | |
import android.content.Intent; | |
import android.content.ServiceConnection; | |
import android.os.Bundle; | |
import android.os.IBinder; | |
import android.view.View; |
OlderNewer