<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
| /** | |
| * 分析豆瓣阅读查看电子书的逻辑 | |
| * | |
| * 主要用到的JavaScript为 | |
| * 1. OzJS(管理模块) | |
| * 2. jQuery(base库) | |
| * 3. Backbone.js(web application框架) | |
| * | |
| * 过程分析 | |
| * -------- |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| #Origin | |
| $ git clone <origin repo> | |
| $ cd <origin directory> | |
| $ git remote rm origin | |
| $ git filter-branch --subdirectory-filter ./ -- --all | |
| $ git add . | |
| $ git commit | |
| $ pwd | |
| #Target |
| package main | |
| import ( | |
| "bytes" | |
| "encoding/hex" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net" |
| webserver: webserver.c libuv/uv.a http-parser/http_parser.o | |
| gcc -I libuv/include \ | |
| -lrt -lm -lpthread -o \ | |
| webserver webserver.c \ | |
| libuv/uv.a http-parser/http_parser.o | |
| libuv/uv.a: | |
| $(MAKE) -C libuv | |
| http-parser/http_parser.o: |
| // http://www.ietf.org/rfc/rfc1928.txt | |
| // Tested with: curl http://www.google.se/ --socks5 1080 --proxy-user foo:bar | |
| var States = { | |
| CONNECTED:0, | |
| VERIFYING:1, | |
| READY:2, | |
| PROXY: 3 | |
| }; |
| #include <ares.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/socket.h> | |
| #include <arpa/inet.h> | |
| #include <netinet/in.h> | |
| #include <netdb.h> | |
| #include <stdarg.h> | |
| #include <string.h> | |
| #include <ctype.h> |