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.继续阅读 »
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 继续阅读 »
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.继续阅读 »
This blog was sent to openstack-discuss mailing list originaly.
As the official Victoria release is approaching and it has been a long time
silence for Trove in the upstream, I think it's good time for me as the Trove
PTL for the last 3 dev cycles to have a project update. The things that will be
described below have 继续阅读 »
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 :).继续阅读 »
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")
继续阅读 »
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 继续阅读 »
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)继续阅读 »