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 <vector> | |
#include <math.h> | |
#include <string> | |
#include <iomanip> | |
using namespace std; | |
void sub_into(vector< vector<double>> A, double r); | |
void gaussian_elimination(vector< vector<double>> *matrix, int m); |
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
oldList = [{a:1},{b:2},{c:3}]; | |
currentList = [{a:1},{b:2},{c:3},{d:4}]; | |
oldJSON = oldList.map(JSON.stringify); | |
newList = currentList.filter(function(obj){ | |
return oldJSON.indexOf(JSON.stringify(obj)) == -1; | |
}); |
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
/* Replace "dll.h" with the name of your header */ | |
#include "dll.h" | |
#include <windows.h> | |
#include <tchar.h> | |
typedef long (__cdecl * CompressType)(unsigned char *, int *, unsigned char *, int); | |
typedef long (__cdecl * UncompressType)(unsigned char *, int *, unsigned char *, int); | |
CompressType Bcompress = NULL; | |
UncompressType Buncompress = NULL; |
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
var express = require("express"); | |
var session = require("express-session"); | |
var app = express(); | |
app.use(session({ | |
secret: 'sfsrvwzsfsdf', | |
cookie: { | |
maxAge: 60000 | |
} | |
})); |
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
var TIME = 30; | |
var EXIT_MES = ["一樣", "人妖", "幹"]; | |
var SEND_MES = "幹"; | |
var stopWaitMessage; | |
var stopWaitExitMessage; | |
var css = document.createElement("style"); | |
document.body.appendChild(css); | |
css.innerHTML = "\ |
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
var _res = []; | |
for (var i in res){ | |
if (res[i].type == type){ | |
_res.push(res[i]); | |
} | |
} | |
return _res; | |
=> |
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
for (var i in res.record[0]){ | |
this.box[i] = res.record[0][i]; | |
} | |
=> | |
this.box = angular.extend(this.box, res.record[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
var fs = require('fs'), | |
http = require('http'), | |
https = require('https'), | |
express = require('express'), | |
bodyParser = require('body-parser'), | |
request = require('request'), | |
crypto = require('crypto'), | |
FBToken = '', | |
port = 443, | |
options = { |
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
GET /ssoIndex.do?apUrl=http://aps.ntut.edu.tw/course/tw/courseSID.jsp&apOu=aa_0010-&sso=true&datetime1=1462113196935 HTTP/1.1 | |
Host: nportal.ntut.edu.tw | |
Connection: keep-alive | |
Pragma: no-cache | |
Cache-Control: no-cache | |
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 | |
Upgrade-Insecure-Requests: 1 | |
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36 | |
Referer: http://nportal.ntut.edu.tw/myPortal.do?thetime=1462111534039_true | |
Accept-Encoding: gzip, deflate, sdch |
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
function f(){} | |
// f 是一個 function | |
var o = {} | |
// o 是一個 object | |
function C(){ | |
return this; | |
} | |
// C 是一個 Class |