消息类型码 | 含义 |
---|---|
UA1115 | A+H市场状态 |
UA1202 | 3 心跳消息(Heartbeat) |
UA2102 | A+H个股行情 |
UA2107 | A+H个股集合竞价 |
This file contains 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
cd c:\ | |
mkdir dart_bleeding | |
svn co http://gyp.googlecode.com/svn/trunk build/gyp | |
mkdir dart-repo | |
set Path=%PATH%;c:\dart_bleeding\build\gyp\ | |
git svn clone -rHEAD "https://dart.googlecode.com/svn/branches/bleeding_edge/dart" dart | |
gclient config "https://dart.googlecode.com/svn/branches/bleeding_edge/deps/all.deps" | |
cd dart | |
gclient sync | |
gclient runhooks |
This file contains 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
all: | |
gcc -O2 -fpic -c -o symbol.o symbol.c | |
gcc -O -shared -fpic -o symbol.so symbol.o |
This file contains 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
static void LearnCompoundExpression() { | |
scoped_ptr<CompoundExpression> tuple(new CompoundExpression()); | |
tuple->AddAs("from", ConstString("Supersonic: ")); | |
tuple->AddAs("say", | |
If(Less(ConstInt32(28), ConstInt32(29)), | |
ConstString("Hello"), | |
ConstString("World"))); | |
tuple->AddAs("comma", ConstString(",")); | |
tuple->AddAs("new", Plus(ConstInt32(2012), ConstInt32(1))); | |
scoped_ptr<Operation> compute(Compute(tuple.release(), Generate(10))); |
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
#include "lua5.1/lua.h" | |
#include "lua5.1/lauxlib.h" | |
#include "lua5.1/lualib.h" | |
// Measuring lua vm memory usage. | |
// build: gcc main.c -llua5.1 -lm -ldl -fPIC | |
static size_t mem_used = 0; |
This file contains 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 repl() | |
local cmd, res, msg1, msg2 | |
-- R | |
io.write '>' | |
cmd = io.read() | |
if not cmd or #cmd == 0 then | |
return repl() | |
end | |
res, msg1 = loadstring(cmd, 'repl') | |
if not res then |
This file contains 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
-- | |
-- Created by IntelliJ IDEA. | |
-- User: andi | |
-- Date: 14-4-27 | |
-- Time: 下午7:07 | |
-- To change this template use File | Settings | File Templates. | |
-- | |
local sqrt = require("math").sqrt | |
local re = require("re") |
This file contains 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
template <class T, typename M> | |
T* container_of(M *m, const M T::*mp) { | |
static const T * null = reinterpret_cast<const T *>(null); | |
static const ptrdiff_t offset = reinterpret_cast<const ptrdiff_t>(&(null->*mp)); | |
return reinterpret_cast<T*>(reinterpret_cast<char*>(m) - offset); | |
} |
This file contains 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
cmake_minimum_required (VERSION 2.8) | |
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) | |
project (QuantBox_XAPI) | |
set(CMAKE_CXX_FLAGS "-std=c++11") | |
include_directories(.) | |
include_directories(QuantBox_Queue) | |
#add_subdirectory(./) | |
set(QUEUE_SRC_LIST | |
QuantBox_Queue/readerwriterqueue.h |
This file contains 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 <iomanip> | |
/* | |
一个如下的内存分配方法,初始分配2^n条记录,然后按倍增的方式。 | |
当达到2^(n+m)时,改为每次分配2^(n+m)的方式进行。 | |
在这种分配方法下,给定记录编号,算出记录所属的内存块及其在内存块中的偏移。 | |
*/ |
OlderNewer