| 項目 | 現状 | 案1 | 案2 | 案3 |
|---|
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 FizzBuzz { | |
| public static void main(String[] args) { | |
| for (int i = 1; i <= 30; i++) { | |
| int a =(int)Math.pow(0, i % 3); | |
| int b =(int)Math.pow(0, i % 5); | |
| System.out.print("Fizz".repeat(a)); | |
| System.out.print("Buzz".repeat(b)); | |
| System.out.println(Integer.toString(i).repeat((a ^ 1) * (b ^ 1))); | |
| } | |
| } |
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
| apiVersion: v1 | |
| name: istio | |
| version: 0.8.0 | |
| description: Helm chart for all istio components | |
| keywords: | |
| - istio | |
| - security | |
| - sidecarInjectorWebhook | |
| - mixer | |
| - pilot |
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
| ❯ minikube start \ | |
| --extra-config=controller-manager.cluster-signing-cert-file="/var/lib/localkube/certs/ca.crt" \ | |
| --extra-config=controller-manager.cluster-signing-key-file="/var/lib/localkube/certs/ca.key" \ | |
| --extra-config=apiserver.admission-control="NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" \ | |
| --kubernetes-version=v1.10.0 \ | |
| --memory=4096 |
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
| # Create a service account for Helm and grant the cluster admin role. | |
| # It is assumed that helm should be installed with this service account | |
| # (tiller). | |
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: tiller | |
| namespace: kube-system | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1beta1 |
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 org.openqa.selenium.Platform; | |
| import org.openqa.selenium.remote.BrowserType; | |
| import org.openqa.selenium.remote.CapabilityType; | |
| import org.openqa.selenium.remote.DesiredCapabilities; | |
| import org.openqa.selenium.remote.RemoteWebDriver; | |
| driver = { | |
| def capabilities = new DesiredCapabilities(); | |
| capabilities.setCapability(CapabilityType.BROWSER_NAME, BrowserType.FIREFOX); | |
| capabilities.setCapability(CapabilityType.PLATFORM_NAME, Platform.LINUX); |
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.Collections; | |
| import java.util.List; | |
| import java.util.stream.Stream; | |
| /** | |
| * こんなつぶやきを見かけたので、debugオプションつけて雰囲気見てみたお話。 | |
| * https://twitter.com/mike_neck/status/976358507011178496 | |
| * | |
| * jshell> var list = List.of("foo", "bar") | |
| * list ==> [foo, bar] |
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
| jshell> Var var(){return new Var();} | |
| | created method var(), however, it cannot be referenced until class Var is declared | |
| jshell> class Var{Var1 var = new Var1();} | |
| | created class Var, however, it cannot be referenced until class Var1 is declared | |
| jshell> class Var1{Var var(){return new Var();}} | |
| | created class Var1 | |
| jshell> var var = var().var.var(); |
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.List; | |
| import static java.util.stream.Collectors.toList; | |
| // I've referenced this post: | |
| // https://developer.oracle.com/java/jdk-10-local-variable-type-inference | |
| public class Main { | |
| public static void main(String[] args) { | |
| var products = List.of( |
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.demo; | |
| import org.junit.Test; | |
| import java.time.LocalDate; | |
| import java.time.chrono.JapaneseDate; | |
| import java.time.format.DateTimeFormatter; | |
| import java.time.format.DateTimeParseException; | |
| import java.time.format.ResolverStyle; | |
| import java.util.Locale; |