工程
2017
python numpy 用法 简明手册
原文链接
感谢stanford,感谢原作者的翻译,我调整了一下代码格式,可以当做手册来用了,毕竟之前没怎么写过py 23333
archlinux/manjaro 下 安装 qq/tim
参考资料:install qq/tim on linux with wine
wine运行qq不能输入账号
This tutorial introduces how to install QQ/TIM in Linux with Wine, which had been tested on ArchLinux with Wine 2.4.
libgfortran.so.4 missing under archlinux
。。。哭了哦。。终于解决了这个bug
参考资料:
libgfortran broken? libgfortran=3.0 should not be install with numpy <= 1.9
conda升级anaconda ValueError的解决办法
conda update anaconda 后提示
1ValueError: unsupported format character ')' (0x29) at index 49 查到了这个:anaconda update issue
I have narrowed this down to the following packages:
package build psutil-1.2.1 py27_0 hard-link pycparser-2.10 py27_0 hard-link pykit-0.1.0 np18py27_2 hard-link pyparsing-2.0.1 py27_0 hard-link by calling "conda install anaconda" and then successfully installing everything else one at a time. These four packages consistently exhibit the described behaviour. (note: pykit depends on pycparser so may itself be ok - can't tell) 我先把psutil卸载掉,重新update了一下,成功。
vim下python 的配置
由于最近要做数字图像处理的大作业,以及之后一段时间,估计写python多一些,所以打算花些时间配置下vim. # 1. 一键执行 # 其实之前一直有的。。不过没有效果,就没有管。发现问题是,python对应的filetype为"python",而不是"py" # 1func! CompileRunGcc() 2 exec "w" 3 if &filetype == 'c' 4 exec "!g++ % -o %<" 5 exec "! ./%<" 6 elseif &filetype == 'cpp' 7 exec "!g++ % -std=gnu++11 -Wall -o %<" 8 exec "! ./%<" 9 elseif &filetype == 'java' 10 exec "!javac %" 11 exec "!java %<" 12 elseif &filetype == 'sh' 13 :!./% 14 elseif &filetype == 'python' 15 " exec "!python %" 16 " exec "!python %<" 17 exec "!python2.7 %" 18 endif 19endfunc 2.代码补全 # 不想折腾了。。既然ycm也支持python,就先用用看好了。。不行再换别的。 # 放一段ycm for python的配置文件 # 1"默认配置文件路径" 2let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py' 3"打开vim时不再询问是否加载ycm_extra_conf.py配置" 4let g:ycm_confirm_extra_conf=0 5set completeopt=longest,menu 6"python解释器路径" 7let g:ycm_path_to_python_interpreter='/usr/bin/python' 8"是否开启语义补全" 9let g:ycm_seed_identifiers_with_syntax=1 10"是否在注释中也开启补全" 11let g:ycm_complete_in_comments=1 12let g:ycm_collect_identifiers_from_comments_and_strings = 0 13"开始补全的字符数" 14let g:ycm_min_num_of_chars_for_completion=2 15"补全后自动关机预览窗口" 16let g:ycm_autoclose_preview_window_after_completion=1 17" 禁止缓存匹配项,每次都重新生成匹配项" 18let g:ycm_cache_omnifunc=0 19"字符串中也开启补全" 20let g:ycm_complete_in_strings = 1 3. 语法检查 # Syntastic大家都知道了。。。。看到了异步检测插件ALE,打算试一下。 # ale_github # 需要注意的是,这个插件需要vim 8.0+的特性。。。 # 放一波配置文件 # 1""""""""""""""""""for ale begin """""""""""""""" 2let g:ale_sign_column_always = 1 "保持侧边栏可见: 3 4let g:ale_sign_error = '>>' "改变错误和警告标识符 5let g:ale_sign_warning = '--' 6let g:ale_statusline_format = ['⨉ %d', '⚠ %d', '⬥ ok'] "改变状态栏信息格式 7 8"自定义跳转错误行快捷键: 9nmap <silent> <C-k> <Plug>(ale_previous_wrap) 10nmap <silent> <C-j> <Plug>(ale_next_wrap) 11"消除某excption not caught的警告 12let g:ale_emit_conflict_warnings = 0 4. 编程提示(jedi-vim) # 据说是vim写python的神器。。。装来看看。。。 # 据说默认配置就够了,先不折腾了 # # #
vundle error detected while processing function
好久没装新插件了,最新要配下python,发现安装时候满屏的错误。。。 # 最后发现是shell的锅,因为我用的是fish,在.vimrc文件中添加 # 1set shell=/bin/bash 即可。 # 以及说下可能的其他原因,虽然我没遇到 # * 对于arch系,可能从aur中安装的版本out ot data * 可能没有把.vimrc中vundle的配置从set rtp+=~/.vim/bundle/vundle更新成set rtp+=~/.vim/bundle/vundle.vim * 可能项目名称用了" 而不是' 以及顺手查了下bundle和Plugin的区别。。。 # 简单来说。。Plugin是新写法,bundle是正在被淘汰的写法,不过由于兼容性的原因,仍然在使用。。。 # 以后使用plugin的写法就好。 # 参考资料
qt 5.x 初探 (5)
qt_5.9_ui_doc
还是比直接写代码方便点。。。所以不妨学习一个!
以及。。。qt在2017年6月1号发布了5.9。。。所以之前是5.8。。。现在变成5.9了。。。
g++ 编译多个源文件(转载)
参考资料
一. 常用编译命令选项 假设源程序文件名为test.c。
无选项编译链接 用法:#gcc test.c 作用:将test.c预处理、汇编、编译并链接形成可执行文件。这里未指定输出文件,默认输出为a.out。
qt 5.x 学习笔记 (2)
先来放一波过程中用到的资料和官方文档好了。
basic layout_qt5.8
QBoxLayout Class_qt5.8
QString Class 5.8
QChar Class qt 5.8
ubuntu 包管理(apt-get)损坏的解决办法
症状是不管安装什么,都会说有一大堆依赖无法安装。。。
大概是: a depends b[i],but b[i] is not be installed. (b==0..n)