VMware 安装运行 deepin 虚拟机 | 体验中国深度

VMware 安装运行 deepin 虚拟机 | 体验中国深度

一、安装步骤 第一步,准备系统镜像 镜像在官网下载即可。 深度官网:https://www.deepin.org/zh/ 第二步,创建虚拟机 在Vmware Wordstation 中新建一个虚拟机,选择标准安装即可,镜像直接加载刚刚下载好的镜像即可,在选择客户机操作系统时选择 Ubuntu 64 位。 ...

August 13, 2020 | 4 分钟 | 1531 字 | Tianlun Song
计算机基础之位运算 | 按位取反

计算机基础之位运算 | 按位取反

程序中的所有数在计算机内存中都是以二进制的形式储存的。位操作是程序设计中对位模式或二进制数的一元和二元操作。在许多古老的微处理器上,位运算比加减运算略快,通常位运算比乘除法运算要快很多。在现代架构中,情况并非如此:位运算的运算速度通常与加法运算相同(仍然快于乘法运算)。(摘自维基百科) ...

August 6, 2020 | 4 分钟 | 1892 字 | Tianlun Song
解决拉取github仓库报错“gnutls_handshake() failed”问题

解决拉取github仓库报错“gnutls_handshake() failed”问题

本文首发于:https://blog.frytea.com/archives/421/ gnutls_handshake() failed: The TLS connection was non-properly terminated. 最近为新配置的虚机拉取库,但是从 GitHub 拉取库总是出问题,查阅网上文献将问题锁定在代理,但是找了一圈还是没有找到答案。 ...

July 27, 2020 | 1 分钟 | 285 字 | Tianlun Song
Vim安装插件管理器Vundle

Vim安装插件管理器Vundle

安装vundle $ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim 默认安装在/.vim/bundle/vundle下; 配置说明: 插件有三种类型: Github上vim-scripts仓库的插件 Github上非vim-scripts仓库的插件 不在Github上的插件 对于不同的插件,vundle自动管理和下载插件的时候,有不同的地址填写方法,有如下三类: 在Github上vim-scripts用户下的仓库,只需要写出repos(仓库)名称 在Github其他用户下的repos, 需要写出"用户名/repos名" 不在Github上的插件,需要写出git全路径 配置vundle插件: 可以在终端通过vim打开~/.vimrc文件, ...

July 26, 2020 | 3 分钟 | 1361 字 | Tianlun Song
Ubuntu下为vim安装YouCompleteMe插件

Ubuntu下为vim安装YouCompleteMe插件

前提条件 已安装 Vundle (参考 Vim安装插件管理器Vundle) Vim 版本 ≥ Vim 7.4.1578+ (查看 vim --version) 安装 第一步,使用Vundle安装YouCompleteM 在.vimrc中添加以下内容 Plugin 'Valloric/YouCompleteMe' 然后拉取源码(或是 :PluginInstall 也可) ...

July 26, 2020 | 1 分钟 | 419 字 | Tianlun Song
VIM 创建程序文件自动添加头部注释

VIM 创建程序文件自动添加头部注释

修改 /etc/vimrc 或 ~/.vimrc,在文件最后添加以下内容: " 当新建 .h .c .hpp .cpp .mk .sh等文件时自动调用SetTitle 函数 autocmd BufNewFile *.[ch],*.hpp,*.cpp,Makefile,*.mk,*.sh exec ":call SetTitle()" " 加入注释 func SetComment() call setline(1,"/*================================================================") call append(line("."), "* Copyright (C) ".strftime("%Y")." IEucd Inc. All rights reserved.") call append(line(".")+1, "* ") call append(line(".")+2, "* 文件名称:".expand("%:t")) call append(line(".")+3, "* 创 建 者:SongTL, songtianlun@comleader.com.cn") call append(line(".")+4, "* 创建日期:".strftime("%Y年%m月%d日")) call append(line(".")+5, "* 描 述:") call append(line(".")+6, "*") call append(line(".")+7, "================================================================*/") call append(line(".")+8, "") call append(line(".")+9, "") endfunc " 加入shell,Makefile注释 func SetComment_sh() call setline(3, "#================================================================") call setline(4, "# Copyright (C) ".strftime("%Y")." IEucd Inc. All rights reserved.") call setline(5, "# ") call setline(6, "# 文件名称:".expand("%:t")) call setline(7, "# 创 建 者:SongTL, songtianlun@comleader.com.cn") call setline(8, "# 创建日期:".strftime("%Y年%m月%d日")) call setline(9, "# 描 述:") call setline(10, "#") call setline(11, "#================================================================") call setline(12, "") call setline(13, "") endfunc " 定义函数SetTitle,自动插入文件头 func SetTitle() if &filetype == 'make' call setline(1,"") call setline(2,"") call SetComment_sh() elseif &filetype == 'sh' call setline(1,"#!/system/bin/sh") call setline(2,"") call SetComment_sh() else call SetComment() if expand("%:e") == 'hpp' call append(line(".")+10, "#ifndef _".toupper(expand("%:t:r"))."_H") call append(line(".")+11, "#define _".toupper(expand("%:t:r"))."_H") call append(line(".")+12, "#ifdef __cplusplus") call append(line(".")+13, "extern \"C\"") call append(line(".")+14, "{") call append(line(".")+15, "#endif") call append(line(".")+16, "") call append(line(".")+17, "#ifdef __cplusplus") call append(line(".")+18, "}") call append(line(".")+19, "#endif") call append(line(".")+20, "#endif //".toupper(expand("%:t:r"))."_H") elseif expand("%:e") == 'h' call append(line(".")+10, "#pragma once") elseif &filetype == 'c' call append(line(".")+10,"#include \"".expand("%:t:r").".h\"") elseif &filetype == 'cpp' call append(line(".")+10, "#include \"".expand("%:t:r").".h\"") endif endif endfun 使用效果: ...

July 26, 2020 | 2 分钟 | 564 字 | Tianlun Song
VIM个性化配置(一)

VIM个性化配置(一)

配置 只需在Home目录创建一个 ~/.vimrc ****文件即可以配置 vim 了,如需安装插件,在 ~/.vim 目录下创建一个bundle文件夹,插件装在里面。(需安装 Vundle 插件管理器),将以下内容拷入~/.vimrc ****文件中即可。 ...

July 26, 2020 | 5 分钟 | 2138 字 | Tianlun Song
Vim 版本升级(Vim8)

Vim 版本升级(Vim8)

安装步骤 第一步,下载源码 到Vim官方Github仓库下载目前最新的Vim Release版本 wget https://codeload.github.com/vim/vim/tar.gz/v8.2.1258 第二步,解压 $ mv v8.2.1258 vim-v8.2.1258.tar.gz $ tar -xvzf vim-v8.2.1258.tar.gz 第三步,编译安装 $ cd vim-8.2.1258/ $ ./configure --prefix=$HOME/.local --enable-python3interp=yes && make && make install 这里注意一下我们需要用configure配置一下安装的路径,将Vim8安装到自己账户的目录下,避免干扰到系统上的其他用户 --enable-python3interp=yes 添加 python3 支持 在这里可能会遇到 no terminal library found 错误: ...

July 26, 2020 | 1 分钟 | 350 字 | Tianlun Song
Windows 开机自启VMware虚拟机

Windows 开机自启VMware虚拟机

由于进行Linux下软件开发,需要频繁使用 VMware 虚拟机,为提高效率找到一种开机启动启动 VMware 虚拟机的方法,可以大大提升效率。 第一步,编写脚本 首先编写 自启 脚本 vm_start.bat ,内容如下: ...

July 22, 2020 | 2 分钟 | 507 字 | Tianlun Song
VIM 创建程序文件自动添加头部注释

VIM 创建程序文件自动添加头部注释

修改 /etc/vimrc ,在文件最后添加以下内容: " 当新建 .h .c .hpp .cpp .mk .sh等文件时自动调用SetTitle 函数 autocmd BufNewFile *.[ch],*.hpp,*.cpp,Makefile,*.mk,*.sh exec ":call SetTitle()" " 加入注释 func SetComment() call setline(1,"/*================================================================") call append(line("."), "* Copyright (C) ".strftime("%Y")." IEucd Inc. All rights reserved.") call append(line(".")+1, "* ") call append(line(".")+2, "* 文件名称:".expand("%:t")) call append(line(".")+3, "* 创 建 者:SongTL, songtianlun@comleader.com.cn") call append(line(".")+4, "* 创建日期:".strftime("%Y年%m月%d日")) call append(line(".")+5, "* 描 述:") call append(line(".")+6, "*") call append(line(".")+7, "================================================================*/") call append(line(".")+8, "") call append(line(".")+9, "") endfunc " 加入shell,Makefile注释 func SetComment_sh() call setline(3, "#================================================================") call setline(4, "# Copyright (C) ".strftime("%Y")." IEucd Inc. All rights reserved.") call setline(5, "# ") call setline(6, "# 文件名称:".expand("%:t")) call setline(7, "# 创 建 者:SongTL, songtianlun@comleader.com.cn") call setline(8, "# 创建日期:".strftime("%Y年%m月%d日")) call setline(9, "# 描 述:") call setline(10, "#") call setline(11, "#================================================================") call setline(12, "") call setline(13, "") endfunc " 定义函数SetTitle,自动插入文件头 func SetTitle() if &filetype == 'make' call setline(1,"") call setline(2,"") call SetComment_sh() elseif &filetype == 'sh' call setline(1,"#!/system/bin/sh") call setline(2,"") call SetComment_sh() else call SetComment() if expand("%:e") == 'hpp' call append(line(".")+10, "#ifndef _".toupper(expand("%:t:r"))."_H") call append(line(".")+11, "#define _".toupper(expand("%:t:r"))."_H") call append(line(".")+12, "#ifdef __cplusplus") call append(line(".")+13, "extern \"C\"") call append(line(".")+14, "{") call append(line(".")+15, "#endif") call append(line(".")+16, "") call append(line(".")+17, "#ifdef __cplusplus") call append(line(".")+18, "}") call append(line(".")+19, "#endif") call append(line(".")+20, "#endif //".toupper(expand("%:t:r"))."_H") elseif expand("%:e") == 'h' call append(line(".")+10, "#pragma once") elseif &filetype == 'c' call append(line(".")+10,"#include \"".expand("%:t:r").".h\"") elseif &filetype == 'cpp' call append(line(".")+10, "#include \"".expand("%:t:r").".h\"") endif endif endfun 使用效果: ...

July 20, 2020 | 2 分钟 | 555 字 | Tianlun Song