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
using System.Collections.Generic; | |
using System.IO; | |
using System.Timers; | |
namespace Ruyut | |
{ | |
public class TimerLog | |
{ | |
private static System.Timers.Timer _timer; | |
private static readonly string FileName = "D:\\log.log"; |
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
using System; | |
using System.IO; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Ruyut | |
{ | |
public class SyncWriteFile | |
{ | |
private static readonly ManualResetEvent ManualResetEvent = new ManualResetEvent(true); |
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 app.ruyut.test.okhttp | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.util.Log | |
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.launch | |
import okhttp3.OkHttpClient | |
import okhttp3.Request |
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
var https = require("https"); | |
var fs = require('fs'); | |
var url = "https://data.ntpc.gov.tw/od/data/api/28AB4122-60E1-4065-98E5-ABCCB69AACA6?$format=json"; | |
https.get(url, function (response) { | |
var data = ""; | |
console.log("start"); | |
response.on("data", chunk => { |
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 "pch.h" | |
#include <iostream> | |
#include "stdlib.h" | |
#include "time.h" | |
#include "string.h" | |
#define SIZE 7 | |
#define DIM 21 | |
// 0, 1, 2 3 4 5 6 | |
// A, B, C, D, E, F, ERD | |
char ERD[SIZE][SIZE] = { { 0, 1, 1, 0, 0, 0, 0 },//0 |
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 "pch.h" | |
#include <iostream> | |
#include "stdlib.h" | |
#include "time.h" | |
#include "string.h" | |
#define SIZE 7 | |
#define DIM 21 | |
// A,B,C,D,E,F,ERD | |
char ERD[SIZE][SIZE] = { {0,1,0,0,0,0,0},//A | |
{1,0,2,0,4,0,0},//B |
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
{"lastUpload":"2020-03-14T01:30:09.898Z","extensionVersion":"v3.4.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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApp2 | |
{ | |
class Program | |
{ |
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
//905-2 | |
#include<stdlib.h> | |
#include<stdio.h> | |
int main() { | |
FILE *fi;//宣告檔案指標 | |
double ss;//宣告雙精浮點數 | |
fi = fopen("dnumber.dat", "r");//使用讀取的方式開啟檔名為dnumber.dat的檔案 | |
while (fscanf(fi, " %lf ", &ss) != EOF) {//如果讀不到資料就跳出 | |
printf("%.2lf\n", ss);//列印雙精浮點數 | |
} |
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
//905-1 | |
#include<stdlib.h> | |
#include<stdio.h> | |
int main() { | |
FILE *fi;//宣告檔案指標 | |
double ss;//宣告雙精浮點數 | |
fi = fopen("dnumber.dat", "w");//使用寫入的方式開啟檔名為dnumber.dat的檔案 | |
do { | |
printf("請輸入浮點數:"); |