Code Planet

为了发现更大的世界


  • 首页

  • 关于

  • 标签

  • 分类

  • 归档

Invictus

发表于 2013-09-29 | 更新于 2015-08-15 | 分类于 poem
_----by William Ernest Henley_
_Out of the night that covers me,_
_Black as the pit from pole to pole,_
_I thank whatever gods may be_
_For my unconquerable soul._
_In the fell clutch of circumstance_
_I have not winced nor cried aloud._
_Under the bludgeonings of chance_
_My head is bloody, but unbowed._
_Beyond this place of wrath and tears_
_Looms but the Horror of the shade,_
_And yet the menace of the years_
_Finds and shall find me unafraid._
_It matters not how strait the gate,_
_How charged with punishments the scroll,_
_I am the master of my fate:_
_I am the captain of my soul._

生而孤独

发表于 2013-09-29 | 更新于 2015-08-15 | 分类于 essay

今天在知乎上看到这个问题——什么样的美打动过你?被@高山流囧回答中的这个The Earthrise图片戳中。

Visual Studio环境变量配置

发表于 2013-09-23 | 更新于 2015-08-15 | 分类于 c/cpp
**在开发过程中,究竟怎样来让 Visual Studio 链接这些 lib 及 dll 文件会比较好呢?**
阅读全文 »

VTK+VS10(64bitWin7)安装配置

发表于 2013-09-23 | 更新于 2015-08-15 | 分类于 c/cpp
1.下载:**vtk-5.10.1.zip**源程序**vtkdata-5.10.1.zip** 数据(vtk相关安装程序下载:http://vtk.org)**cmake-2.8.2-win32-x86.zip**(cmake程序下载:[http://www.cmake.org/HTML/Index.html](http://www.cmake.org/HTML/Index.html))
阅读全文 »

英语学习方法(收集自知乎)

发表于 2013-09-22 | 更新于 2015-08-15 | 分类于 Language Study
1.如何做到流畅阅读英文资料和听懂国外公开课?
阅读全文 »

wxPython学习笔记

发表于 2013-09-21 | 更新于 2015-08-15 | 分类于 python
1.下载,安装wxPython。注意应该选择与本机上python相同的版本。
地址:[http://www.wxpython.org/download.php#stable](http://www.wxpython.org/download.php#stable)
阅读全文 »

《相信未来》

发表于 2013-09-20 | 更新于 2015-08-15 | 分类于 poem
----食指
当蜘蛛网无情地查封了我的炉台
当灰烬的余烟叹息着贫困的悲哀
我依然固执地铺平失望的灰烬
用美丽的雪花写下:相信未来
阅读全文 »

tiny bug

发表于 2013-08-01 | 更新于 2015-08-15 | 分类于 python

写csv的时候随便起了个名字,然后贴代码,出现下面的错误:

Traceback (most recent call last):
  File "D:\workspace\PyTest\csvTest\csv.py", line 1, in <module>
    import csv
  File "D:\workspace\PyTest\csvTest\csv.py", line 3, in <module>
    writer = csv.writer(file('your.csv', 'wb'))
AttributeError: 'module' object has no attribute 'writer'

显然是import问题,可是csv模块是python本身集成的。google之,原来是文件名的问题。
随手把文件名起了csv.py,所以成了自身import自身

参考:http://www.daniweb.com/software-development/python/threads/425633/pythoncsv-module-object-has-no-attribute-writer

python中的除法

发表于 2013-07-31 | 更新于 2015-08-15 | 分类于 python

传统除法

如果是整数除法则执行地板除,如果是浮点数除法则执行精确除法。

>>>1/2
0
>>>1.0/2.0
0.5

精确除法

除法总是会返回真实的商,不管操作数是整形还是浮点型。执行from future import division 指令就可以做到这一点。

>>>from __future__ import division
>>>1/2
0.5
>>>1.0/2.0
0.5

阅读全文 »

python安装第三方包时setuptools错误解决方法

发表于 2013-07-30 | 更新于 2015-08-15 | 分类于 python

安装openpyxl遇到下面的错误:

ImportError: No module named setuptools
此种情况只要安装下setuptools模块即可 1.官方下载[https://pypi.python.org/pypi/setuptools/0.9.8](https://pypi.python.org/pypi/setuptools/0.9.8) 2.安装模块
C:\setuptools-0.9.8>python setup.py install
3.继续安装openpyxl能够顺利进行
C:\openpyxl-1.6.2>python setup.py install
running install
running bdist_egg
1…101112
Lu Xiaohua

Lu Xiaohua

116 日志
33 分类
86 标签
GitHub E-Mail
© 2019 Lu Xiaohua
由 Hexo 强力驱动 v3.8.0
|
主题 – NexT.Muse v7.0.0