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
const express = require('express'); | |
const cors = require('cors'); | |
const bodyParser = require('body-parser'); | |
const request = require('request'); | |
const port = 8088; | |
const app = express(); | |
app.use(cors()) |
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 com.habaco.test.js2webview | |
import android.os.Build | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.util.Log | |
import android.webkit.JavascriptInterface | |
import android.widget.Toast | |
import kotlinx.android.synthetic.main.activity_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
//店鋪 | |
public class FishShop { | |
int curFishAmount=0; // 魚當前的數量 | |
int containment=10000; // 可存放魚獲最大容量(10000) | |
int times=0; // 交易次數 | |
public synchronized void putFish(int amount, String fisherName){ | |
if (curFishAmount+amount<=containment){ // 當前魚獲的存量若小於最大容量 | |
curFishAmount+=amount; // 入存貨 | |
System.out.println(fisherName + "進貨 "+ amount + " 條魚," + " 目前共有 " + curFishAmount + " 條魚."); |
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
public class Horse implements Runnable{ | |
static int rankh=1; // 利用 static 使其他 Horse 共用此變數(名次) | |
int runSpeed; // 跑速不大於 5 | |
int sleepTime; // 休息不大於 1 秒 | |
int totalSleepTime =0; // 總共是睡了多久啊 | |
int range=0; // 起跑點 | |
int end = 500; // 終點 | |
String horseName; |
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.FileReader; | |
import java.io.IOException; | |
import java.util.HashMap; | |
public class Shop { | |
public static void main(String[] args) throws IOException { | |
/* example data: | |
A,4 | |
B,3 |
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 Test01; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
public class StudentArrayList { |
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.FileReader; | |
import java.io.IOException; | |
// 2個分數加減乘除 | |
public class Q940308 { | |
public static void main(String[] args) throws IOException{ | |
String fileName = "940308.SM"; | |
FileReader fr = new FileReader(fileName); | |
BufferedReader br = new BufferedReader(fr); |
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.FileReader; | |
import java.io.IOException; | |
// 車流量 | |
public class Q940307 { | |
public static void main(String[] args) throws IOException { | |
String fileName = "940307.SM"; | |
FileReader fr = new FileReader(fileName); | |
BufferedReader br = new BufferedReader(fr); |
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.FileReader; | |
import java.io.IOException; | |
// 身份證驗證 | |
public class Q940306 { | |
public static String sample = "ABCDEFGHJKLMNPQRSTUVXYWZIO"; | |
public static void main(String[] args) throws IOException{ | |
String fileName = "940306.SM"; | |
FileReader fr = new FileReader(fileName); |
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 Quiz; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
// 2矩陣相加 (等邊的方矩陣) | |
public class Q940305 { | |
public static void main(String[] args) throws IOException{ | |
String fileName = "940305.SM"; |
NewerOlder