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>
#include <Windows.h>
using namespace std;
int _baseAddress = 0x5B15825C;
int main(){
DWORD pid;
HANDLE hProcess;
#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>
@splitline
splitline / owo.c
Last active November 30, 2017 06:35
#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>
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)
#ifndef LIST_H
#define LIST_H
template <class T>
class List {
public:
List() {
this->size = 0;
this->capacity = 10;
this->array = new T[0]();
# -*- 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
{
"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,
#define greenPin 9
#define bluePin 10
#define redPin 11
#define magPIN A1
#define VAL 4
int r = 0;
int g = 0;
// 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();