Skip to content

Instantly share code, notes, and snippets.

View splitline's full-sized avatar
[object Object]

\ splitline

[object Object]
View GitHub Profile
#include <iostream>
using namespace std;
class Fraction{
public:
double getDouble();
void setNumerator(int numerator);
void setDenominator(int denominator);
void outputReducedFraction();
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
using namespace std;
class Pointer {
public:
Pointer() {
_isNull = 0;
_vals=new vector<int>();
// ID/Name :B10530027 黃志仁
// Date:March 30.2017
// Last Update:March 30.2017
// Problem statement : Pointer-Advanced
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#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; // 迷宮大小
// Author: 黃志仁
// Stu ID: B10530027
// Class: 四不分一甲
// Problem: Word Game
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
char grid[4][4];
#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++)
// 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();
#define greenPin 9
#define bluePin 10
#define redPin 11
#define magPIN A1
#define VAL 4
int r = 0;
int g = 0;
{
"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,