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
pico-8 cartridge // http://www.pico-8.com | |
version 16 | |
__lua__ | |
local player={ | |
x=28, | |
y=28, | |
hw=4, -- half width | |
hh=4, -- half height | |
v=2, -- velocity |
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
package com.example; | |
import java.util.List; | |
import java.util.function.BiConsumer; | |
import java.util.function.BinaryOperator; | |
import java.util.function.Predicate; | |
import java.util.function.Supplier; | |
import java.util.stream.Collector; | |
import java.util.stream.Collector.Characteristics; | |
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
package com.example; | |
import javax.el.*; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.function.Supplier; | |
public class ELTest { | |
public static void main(String[] args) { | |
ELManager elManager = new ELProcessor().getELManager(); |
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
package com.example; | |
import javax.xml.bind.DatatypeConverter; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.InputStream; | |
import java.math.BigInteger; | |
import java.security.MessageDigest; | |
public class MD5Sum { |
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
@Resource(mappedName = "ignoreStuckMES") | |
private ManagedExecutorService executorService |
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
'use strict'; | |
var Alexa = require('alexa-sdk'); | |
//========================================================================================================================================= | |
//TODO: このコメント行より下の項目に注目してください。 | |
//========================================================================================================================================= | |
//Replace with your app ID (OPTIONAL). You can find this value at the top of your skill's page on http://developer.amazon.com. | |
//Make sure to enclose your value in quotes, like this: var APP_ID = "amzn1.ask.skill.bb4045e6-b3e8-4133-b650-72923c5980f1"; | |
var APP_ID = undefined; |
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
package com.example; | |
import java.util.Random; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.ScheduledExecutorService; | |
import java.util.concurrent.ScheduledFuture; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.TimeoutException; | |
import java.util.logging.Logger; |
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
<java jar="junit-platform-console-standalone-1.0.0.jar" fork="true"> | |
<arg value="--disable-ansi-colors" /> | |
<arg value="--reports-dir"/> | |
<arg path="dest/test-result" /> | |
<arg value="-cp"/> | |
<arg path="dest/classes/java;dest/classes/test;lib/provided;lib/test" /> | |
<arg line="-p com.example" /> | |
<arg line="-n .*Test*$" /> | |
</java> |
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
try (Stream<String> stream = Files.lines(Paths.get("file.txt"))) { | |
stream.forEach(System.out::println); | |
} catch (IOException ignore) { } |
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
Map<String, Function<String, String>> switchCase = new HashMap<>(); | |
switchCase.put("A", String::toLowerCase); | |
switchCase.put("a", String::toUpperCase); | |
Stream.of("A", "a", "aaa", "bbb") | |
.map(str -> Optional.ofNullable(switchCase.get(str)) | |
.map(f -> f.apply(str)) | |
.orElse(str)) | |
.forEach(System.out::println) |