import monthdelta as md
import datetime as dt
import math as math
def quarter(month):
return int(math.ceil(month/3.0))
#end def
d0 = md.date.today()
dates = [d0 + md.monthdelta(i) for i in range(1, 20)]
yyyymms = [d.year*100 + d.month for d in dates]
yymms …Don't Do Statistics If You Don't Really Undestand It

Lies, damned lies, and statistics.
As a statistician I'm very glad to see that statistics is being widely used in many areas. However, time after time I found that it is really dangerous for people who don't really understand statistics to use it. As we all know that there are …
Input and Output in C++
Check the io directory on the page https://bitbucket.org/dclong/cpp-learn/src
for some illustrative examples for the following discussions.
-
You can format output of numbers using functions
std::setpresicionandstd::setwin theheader. -
When you read data from a file into an array or write data …
Common Mistakes in C++ Code and Ways to Debug
Debugging
- gdb is a excellent command tool for debugging C/C++ code.
Syntax Mistakes
-
Missing "}". When this happens, you usually get lots of error message when you compile your code. And these error messages are often hard to understand and seems not related to your code.
-
Missing template arguments. This …
Differences Between Vector and ArrayList in Java
A good summay is here.
Power Settings in Linux with GNOME Desktop
Full control of the power settings in Linux with Gnome Desktop can be done through dconf-editor at org->gnome->settings-daemon->plugins->power. The default way to determine low battery, critical low battery and to carray out critical low action is by counting left battery time. You can change the way …