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 <Windows.h> | |
using namespace std; | |
int _baseAddress = 0x5B15825C; | |
int main(){ | |
DWORD pid; | |
HANDLE hProcess; |
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 SRV_IP "127.0.0.1" | |
#include <arpa/inet.h> | |
#include <netinet/in.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <unistd.h> | |
#include <string.h> |
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 SRV_IP "127.0.0.1" | |
#include <arpa/inet.h> | |
#include <netinet/in.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <unistd.h> | |
#include <string.h> |
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
import socket | |
import sys | |
import subprocess | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
server_address = ('localhost', 11112) | |
print >>sys.stderr, 'starting up on %s port %s' % server_address | |
sock.bind(server_address) |
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
#ifndef LIST_H | |
#define LIST_H | |
template <class T> | |
class List { | |
public: | |
List() { | |
this->size = 0; | |
this->capacity = 10; | |
this->array = new T[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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
from django.shortcuts import render | |
from django.http import JsonResponse, HttpResponse | |
import requests | |
from requests_toolbelt import SSLAdapter | |
from OpenSSL import SSL | |
from subprocess import check_output | |
import shutil |
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, |
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
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
// 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(); |