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.lang.annotation.Annotation; | |
import java.lang.reflect.Method; | |
public class ECJProblem { | |
private static final String nantoka = "kantoka"; | |
public String doSomething(@TestAnnotation(nantoka) String nantoka) { | |
return "doushita"; | |
} |
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; | |
import java.util.List; | |
import java.util.Scanner; | |
public class Main { | |
/** | |
* 添字人数になるように会社を選んだ組み合わせの時の総コスト。 | |
* {@link #NOT_ASSIGNED} の場合はそのような組み合わせは存在しない。 | |
*/ | |
static int[] costByNumOfMember; |
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.List; | |
import java.util.OptionalInt; | |
import java.util.Scanner; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; | |
public class Main { | |
/** | |
* 全ての会社を選択した場合の人数 |
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; | |
import java.util.List; | |
import java.util.Scanner; | |
import javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; | |
import javax.script.ScriptException; | |
public class Main { |
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.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; | |
public class Main { | |
public static void main(String[] args) throws Exception { | |
StringBuilder script = new StringBuilder(); |
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
class Fraction { | |
/** | |
* 値を素因数分解して返します。 | |
* 素数を x で連結する表記です。 | |
* 10 => 2x2x5x5 | |
* */ | |
static String factorize(long val) { | |
if(val == 1L){ | |
return "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
<?php | |
class BasicAuthComponent extends Component { | |
public function startup(Controller $controller) { | |
if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_USER'] !== BASIC_USERID || $_SERVER['PHP_AUTH_PW'] !== BASIC_PASSWD) { | |
$controller->autoRender = false; | |
$controller->response->header('WWW-Authenticate: Basic realm="Please enter your ID and password"'); | |
$controller->response->statusCode(401); | |
$controller->response->send(); | |
$this->_stop("id / password Required"); | |
} |
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 org.example; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.core.MediaType; | |
@Path("/sample") | |
public class EndPoint { |
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 org.example; | |
import org.apache.commons.lang3.SystemUtils; | |
import java.util.Arrays; | |
public class Kantoka { | |
public static void main(String[] args) { | |
System.out.println("This is Kantoka"); | |
System.out.println(args.length); |
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 org.example; | |
public class Calc { | |
int remainder(int dividend, int divisor) { | |
return dividend % divisor; | |
} | |
} |
OlderNewer