close

天空的城

2016-03-01
编程语言
次阅读

由一个例子到python的名字空间

前言

python里面最核心的内容就是:名字空间(namespace)


例子引入

Read More

Comments
  • namepsace
  • python
2016-02-28
编程语言
次阅读

python默认参数问题及其简单应用

python 里面一个常见的陷阱就是函数的默认参数问题。 文档中这样描述python的默认参数:

Default parameter values are evaluated when the function definition is executed. This means that the expression is evaluated once, when the function is defined, and that the same “pre-computed” value is used for each call.

Read More

Comments
  • default-parameter
  • python
2015-12-30
工具使用
次阅读

Ubuntu登录windows远程主机

在linux下连接远程linux主机的时候,可以通过ssh连接,但是登录 windows主机的话,ssh就不好使了,这个时候,一般使用rdesktop这个小工具来 来远程登录.

安装 直接包管理器安装就好:

1
sudo apt-get install rdesktop

Read More

Comments
  • Ubuntu
  • remote windows
2015-12-30
编程语言
次阅读

switch中default的认识

偶然看到关于switch的一个基本例子,结果因为好长时间不用,导致遗忘-- 虽然很简单,还是记录一下.

直接上代码:

Read More

Comments
  • CPP
  • switch
2015-12-15
前端
次阅读

bootstrap的modal打开左右抖动问题

使用bootstrap modal的时候,在 open 的瞬间,导致被遮罩的窗体左右移动,看着很不舒服,于是查了一些资料是因为 打开的时候,会给body加上modal-open,因此y滚动条没了,页面宽度变大,所以元素就右移了.

Read More

Comments
  • bootstrap
  • modal
2015-12-15
前端
次阅读

居中显示bootstrap modal

在使用 bootstrap modal 的时候, 默认的样式不是居中遮罩显示的,看着很别扭 而且还不想去修改它自身的代码,就在网上查了查, 看到这篇博客的方法还是很不错,转载记录于此 http://www.abeautifulsite.net/vertically-centering-bootstrap-modals/

只需要在你的js代码里面加入这样几个函数就可以,很清晰的code .

Read More

Comments
  • bootstrap
  • center
  • modal
2015-12-14
工具使用
次阅读

Ubuntu 32位安装clang-3.7. 与 YouCompleteme

问题

2017.1.28更新: YouCompleteme 安装步骤

配置了半下午+一晚上的 vim , 使用的是github上的这个配置: k-vim 结果完全卡在了YouCompleteMe上,提示没有clang-3.7.0, 折腾了好长时间,终于可以安装好了。 赶紧记录下=.=

Read More

Comments
  • Ubuntu
  • YouCompleteMe
  • clang
  • vimrc
2015-12-11
杂七杂八
次阅读

电脑连上无线无法上网 dns-probe-possible

问题

电脑可以连上无线,但是无法打开登录页面,报如下错误代码:

1
dns probe possible
重置无线网卡之类的都不奏效, 后来查了google,一行命令解决--记录于此。 参考:

Read More

Comments
  • dns
2015-12-05
编程语言
次阅读

Python:使用codecs解析文本中U+2028分隔符的异常

在使用python codecs读取文本内容的时候,会遇到U+2028的分隔符, 会自动把它作为行分隔符,U+2028之后的内容,会丢失。 在网上查过了之后,最容易的解决方法就是不使用codecs.

Read More

Comments
  • U+2028
  • python
2015-12-04
工具使用
次阅读

Ubuntu截屏软件:ScreenShot

以前在Ubuntu下截图一般使用系统自带的截图工具,按键盘的PrtSc保存到本地,再发图片,很不方便。 后来偶然发现了一款在Ubuntu下的类似QQ截图的小工具:DeepinScrot,很好用! 记录在此

Read More

Comments
  • ScreenShot
  • Ubuntu
2015-12-04
工具使用
次阅读

明白Git的一张图[转]

前段时间接触github, 在具体使用上,也是一知半解;正常可以使用,但是一旦遇到冲突就比较乱,不知道如何解决, 说白了就是不明白里面的道道。后来YYW给了一张图,挺清晰的,比较适合入门!

直接上图: github

Read More

Comments
  • github
2015-12-01
工具使用
次阅读

GitHub+Hexo+Ubuntu 搭建过程

环境准备

环境要求如下:

  • nodejs
  • git

具体的安装不再赘述。 

Read More

Comments
  • hexo
  • ubuntu
« Prev1…345