This file contains hidden or 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.stream.Stream; | |
/** | |
* | |
* @author naoki | |
*/ | |
public class ThreadMultiWithLock { | |
static class Context{ | |
String str; | |
int i = 0; |
This file contains hidden or 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 interface Syllogism { | |
interface さかな{} | |
interface およぐ{} | |
interface さば{} | |
さかな majorPremise(さば s); | |
およぐ minorPremise(さかな f); | |
default およぐ conclusion(さば s){ | |
return minorPremise(majorPremise(s)); |
This file contains hidden or 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
long max = 9_000_000_000_000_000_001L; | |
System.out.println(max); | |
double fl = max; | |
System.out.println(fl); | |
long max_i = (long) fl; | |
System.out.println(max_i); |
This file contains hidden or 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 Random { | |
public static void main(String[] args) { | |
for(int i = 0; i < 100; ++i){ | |
System.out.println(rand()); | |
} | |
} | |
static int seed = 55; |
This file contains hidden or 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.awt.Graphics; | |
import java.awt.image.BufferedImage; | |
import javax.swing.ImageIcon; | |
import javax.swing.JFrame; | |
import javax.swing.JLabel; | |
/** | |
* | |
* @author naoki | |
*/ |
This file contains hidden or 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.awt.Graphics; | |
import java.awt.GridLayout; | |
import java.awt.image.BufferedImage; | |
import java.util.ArrayList; | |
import java.util.DoubleSummaryStatistics; | |
import java.util.List; | |
import java.util.Random; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; | |
import javax.swing.ImageIcon; |
This file contains hidden or 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.awt.Graphics; | |
import java.awt.GridLayout; | |
import java.awt.image.BufferedImage; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.DoubleSummaryStatistics; | |
import java.util.List; | |
import java.util.Random; | |
import java.util.stream.Collectors; |
This file contains hidden or 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.awt.Color; | |
import java.awt.Font; | |
import java.awt.Graphics2D; | |
import java.awt.image.BufferedImage; | |
import java.util.Random; | |
import javax.swing.ImageIcon; | |
import javax.swing.JFrame; | |
import javax.swing.JLabel; | |
/** |
This file contains hidden or 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
Vagrant.configure("2") do |conf| | |
conf.vm.box = "bento/centos-7.1" | |
conf.vm.define "console", primary: true do |host| | |
host.vm.network "private_network", ip: "192.168.34.21" | |
end | |
conf.vm.define "target" do |host| | |
host.vm.network "private_network", ip: "192.168.34.22" | |
end |
This file contains hidden or 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
Vagrant.configure("2") do |conf| | |
conf.vm.box = "bento/centos-7.1" | |
conf.vm.define "console", primary: true do |host| | |
host.vm.network "private_network", ip: "192.168.34.21" | |
host.vm.provision "shell", inline: <<-SHELL | |
yum -y install epel-release | |
yum -y install ansible | |
SHELL | |
end |