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
// Integer.MAX_VALUEを含まない | |
IntStream.range(1, Integer.MAX_VALUE); | |
// Integer.MAX_VALUEを含む | |
IntStream.rangeClosed(1, Integer.MAX_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
package fizzbuzz; | |
import java.util.stream.Stream; | |
public class FizzBuzzWriter { | |
public static void main(String[] args) { | |
// FizzBuzzの無限リスト | |
Stream<String> fizzbuzz = Stream.iterate(0, i -> ++i).map(i -> | |
(i % 15 == 0) ? "Fizbuzz" : | |
(i % 3 == 0) ? "Fizz" : |
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 fizzbuzz; | |
import java.util.stream.Stream; | |
public class FizzBuzzWriter { | |
public static void main(String[] args) { | |
// FizzBuzzの無限リスト | |
Stream<FizzBuzz> fizzbuzz = Stream.iterate(new FizzBuzz(0), fb -> { | |
fb.setIndex(fb.getIndex() + 1); | |
return fb; |
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
Remove-Item -Recurse -Force |
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
asadmin create-jdbc-connection-pool --datasourceclassname org.h2.jdbcx.JdbcDataSource --restype javax.sql.DataSource --property user=sa:password=password:url="jdbc:h2:file:~/sample" SamplePool |
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
asadmin create-jdbc-resource --connectionpoolid SamplePool java:app/jdbc/Sample |
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 resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd"> | |
<resources> | |
<jdbc-connection-pool datasource-classname="org.h2.jdbcx.JdbcDataSource" res-type="javax.sql.DataSource" name="SamplePool"> | |
<property name="user" value="sa"/> | |
<property name="password" value="password"/> | |
<property name="url" value="jdbc:h2:fle:~/sample"/> | |
</jdbc-connection-pool> | |
<jdbc-resource jndi-name="jdbc/SampleDS" pool-name="SamplePool/> | |
</resources> |
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
asadmin add-resources glassfish-resources.xml |
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
fastcgi.impersonate = 1 | |
fastcgi.logging = 0 | |
cgi.fix_pathinfo = 1 | |
cgi.force_redirect = 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
<?php phpinfo(); ?> |
OlderNewer