分享Fit an Ornstein–Uhlenbeck process with discrete time series data

As we know, a Brownian motion is usually formulated as $$dx_t = \mu\,dt+\sigma\,dW_t$$ which is the continuous case of a random walk. In some cases, it is quite convenient to use this formulation to describe the characteristic of asset prices due to its highly unpredictable behavior. 继续阅读 »

分享475D&#58; CGCDSSQ (Time limit exceeded on test 9)

Problem Description: Given a sequence of integers a1, …, an and q queries x1, …, xq on it. For each query xi you have to count the number of pairs (l, r) such that 1 ≤ l ≤ r ≤ n and gcd(al, al + 1, …, ar) = xi. is a greatest common divisor of v1, v2, …, vn, that is equal to a largest positive integer that divides all 继续阅读 »

分享Auto Timer in OGL

For the performance tuning, the simplest way is to record how many time is elapsed in a function. The only difficulty we’re facing is that: there maybe many exit for a function. Thanks to C++’s constructor/deconstructor feature, it’s easy for developer to record the elsaped time. 继续阅读 »

分享Learning how to learn

Last month I have study a course on Coursera, it is called Learning how to learn. It is a course that teach you how to learn efficiently. I made some notes about it and share here. (I just list each view point which I think is important, but I think I can figure out better way to show next time) 继续阅读 »

分享China-Service Recognition Achievement at IBM

Thanks for your recognition, that makes me exciting and exciting! How time fast! It's really lucky for me to live in such a great team; I'd like to wok here with you for another 50 years, just not sure whether I can see screen clearly when I'm 80 years old :). 继续阅读 »

分享python 循环引用

1. import module 流程 首先，明确一下 import module_name 和 from module_name import module_element 是两条可执行的语句。 其次，sys.modules 里记录了当前 run time 下所有已经导出的 module。 继续阅读 »

分享Two Syntax Styles of xmake

Recently, xmake's description syntax has been enhanced to support two different grammar styles at the same time. The set-add style The key-val style The set-add style This is xmake's classic style, for example: lua target("test") set_kind("static") add_defines("DEBUG") add_files("src/*.c", "test/*.cpp") 继续阅读 »

分享Google C++ Mocking Framework for Dummies

What Is Google C++ Mocking Framework? When you write a prototype or test, often it's not feasible or wise to rely on real objects entirely. A mock object implements the same interface as a real object (so it can be used as one), but lets you specify at run time how it will be used and what it should do (which methods 继续阅读 »