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
#include <iostream> | |
using namespace std; | |
class Fraction{ | |
public: | |
double getDouble(); | |
void setNumerator(int numerator); | |
void setDenominator(int denominator); | |
void outputReducedFraction(); |
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
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <sstream> | |
using namespace std; | |
class Pointer { | |
public: | |
Pointer() { | |
_isNull = 0; | |
_vals=new vector<int>(); |
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
// ID/Name :B10530027 黃志仁 | |
// Date:March 30.2017 | |
// Last Update:March 30.2017 | |
// Problem statement : Pointer-Advanced | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <sstream> |
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
#include <iostream> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <time.h> | |
#include <GLUT/glut.h> | |
int g[100][100], used[100][100]; | |
int dx[] = {0,0,1,-1}; | |
int dy[] = {1,-1,0,0}; | |
int n=10; // 迷宮大小 |
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
// Author: 黃志仁 | |
// Stu ID: B10530027 | |
// Class: 四不分一甲 | |
// Problem: Word Game | |
#include <iostream> | |
#include <string> | |
#include <fstream> | |
using namespace std; | |
char grid[4][4]; |
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
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <utility> | |
using namespace std; | |
char grid[4][4]; | |
bool used[4][4] = {0}; | |
void clear(){//set all used array to false | |
for (int i = 0; i < 4; i++) | |
for (int j = 0; j < 4; j++) |
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
// UserData轉換測試 | |
const data = '{"UserID" : "1", "UserName" : "dev", "Account" : {"Value" : 210504751746}}'; | |
console.log(JSON.parse(data) as UserData); // 數值成功轉換,但data.Account不具有任何Account Class的特性 | |
const d = new UserData(); | |
Object.assign(d, JSON.parse(data)); // 數值成功轉換,但data.Account不具有任何Account Class的特性 | |
console.log(d); | |
// Account轉換測試 | |
const acc = '{"Value" : 210504751746}'; | |
const a = new Account(); |
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
www |
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
#define greenPin 9 | |
#define bluePin 10 | |
#define redPin 11 | |
#define magPIN A1 | |
#define VAL 4 | |
int r = 0; | |
int g = 0; |
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
{ | |
"courses": [ | |
{ | |
"semester": "1061", | |
"course_id": "CS2003301", | |
"ge_type": "", | |
"name": "數位邏輯設計", | |
"outline_link": "http://info.ntust.edu.tw/faith/edua/app/qry_linkoutline.aspx?semester=1061&courseno=CS2003301", | |
"credit": 3, | |
"required_subject": true, |