当我尝试使用pip升级matplotlib时,它会输出:
Downloading/unpacking matplotlib from https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.4.0.tar.gz#md5=1daf7f2123d94745feac1a30b210940c
Downloading matplotlib-1.4.0.tar.gz (51.2MB): 51.2MB downloaded
Running setup.py (path:/tmp/pip_build_root/matplotlib/setup.py) egg_info for package matplotlib
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [1.4.0]
python: yes [2.7.6 (default, Mar 22 2014, 22:59:38) [GCC
4.8.2]]
platform: yes [linux2]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.8.2]
six: yes [using six version 1.7.3]
dateutil: yes [using dateutil version 2.2]
tornado: yes [using tornado version 4.0.1]
pyparsing: yes [using pyparsing version 2.0.2]
pycxx: yes [Couldn't import. Using …Run Code Online (Sandbox Code Playgroud) 最近想在Mac上试试Z shell。但是我想继续将命令历史记录保存到 ~/.persistent_history,这就是我在 Bash ( ref ) 中所做的。
但是,参考链接中的脚本在 Zsh 下不起作用:
log_bash_persistent_history()
{
[[
$(history 1) =~ ^\ *[0-9]+\ +([^\ ]+\ [^\ ]+)\ +(.*)$
]]
local date_part="${BASH_REMATCH[1]}"
local command_part="${BASH_REMATCH[2]}"
if [ "$command_part" != "$PERSISTENT_HISTORY_LAST" ]
then
echo $date_part "|" "$command_part" >> ~/.persistent_history
export PERSISTENT_HISTORY_LAST="$command_part"
fi
}
run_on_prompt_command()
{
log_bash_persistent_history
}
PROMPT_COMMAND="run_on_prompt_command"
Run Code Online (Sandbox Code Playgroud)
有没有人可以帮助我让它工作?非常感谢!
我正在尝试构建一个构造函数,将一个数组作为一个参数,重载另一个采用标量的人.代码如下.
#include <iostream>
template <typename T>
class SmallVec { // This is a 3 dimensional vector class template
public:
T data[3] = {0}; // internal data of class
template <typename U>
explicit SmallVec(const U& scalar) { // if a scalar, copy it to each element in data
for(auto &item : data) {
item = static_cast<T>(scalar);
}
}
template <typename U>
explicit SmallVec(const U* vec) { // if a vector, copy one by one
for(auto &item : data) {
item = …Run Code Online (Sandbox Code Playgroud) arrays ×1
bash ×1
c++ ×1
constructor ×1
matplotlib ×1
pip ×1
python ×1
shell ×1
templates ×1
zsh ×1