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 websocket; | |
import javax.websocket.*; | |
import javax.websocket.server.ServerEndpoint; | |
@ServerEndpoint(value = "/websocket") | |
public class WebsocketDemo { | |
@OnMessage | |
public String onMessage(String text){ |
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.IOException; | |
public class OneLinerFizzBuzz { | |
public static void main(String[] args) throws IOException { | |
for (int i = 1; i <= Integer.parseInt(args[0]); i++)System.out.printf("%s\n", i % 3 == 0 ? i % 5 == 0 ? "fizzbuzz": "fizz" : i % 5 == 0 ? "buzz" : String.valueOf(i)); | |
} | |
} |
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.InputStreamReader; | |
import java.io.*; | |
public class Main { | |
public static void main(String[] args) throws Exception { | |
String file = "file.txt"; | |
String str = "3"; | |
double r = Double.parseDouble(str); | |
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
#include <stdio.h> | |
static int a=0; | |
int main(void){ | |
// Here your code ! | |
printf("test\n"); | |
int f; | |
printf("%d\n",a); | |
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 CtrNum | |
{ | |
static private int count = 0; | |
private int hp; | |
private double mp; | |
public CtrNum(){ | |
hp=100; | |
mp=100; | |
count++; |
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.*; | |
class Test | |
{ | |
public static void main(String[] args) | |
{ | |
//人数分の変数を宣言しなければならない | |
int a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,....,a100; | |
double ave; |
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 Testjg{ | |
public static void main(String[] args)throws IOException{ | |
int temp = 0; //配列の中の数値を入れておく変数 | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
System.out.println("何人分の点数を入れますか"); | |
//キーボードで入力された分だけの引き出しをもつ配列(タンス)を作成 |
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.*; | |
class Test | |
{ | |
public static void main(String[] args) | |
{ | |
//人数分の変数を宣言しなければならない | |
int a1,a2,a3,a4,a5 ... a100; | |
double ave; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>TEST.html</title> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"><!--文字コード指定--> | |
<meta http-equiv="Content-Style-Type" content="text/css"><!--標準スタイルシート言語の指定--> | |
<meta http-equiv="Content-Script-Type" content="text/javascript"><!--標準スクリプト言語の指定--> | |
</head> | |
<body> | |
<h1>TEst</h1> |
NewerOlder