自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 资源 (2)
  • 收藏
  • 关注

原创 显示Python异常抛出所在行

实例代码:try: code;except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info(); fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] print(exc_type, fname, exc_tb.tb_linen

2013-08-24 01:35:09 2757 1

转载 用python输出Unicode值代表的汉字

原文地址:http://hi.baidu.com/dujun/item/4523b13af070c3bf134b14f2>>> a = "u'\u4e2d'">>> print au'\u4e2d'>>> print eval(a)中

2013-08-15 05:16:21 1554

原创 Python 输出货币格式数据

>>> import locale>>> a = {'size': 123456789, 'unit': 'bytes'}>>> print(locale.format("%(size).2f", a, 1))123456789.00>>> locale.setlocale(locale.LC_ALL, '') # Set the locale for your system'

2013-08-14 21:01:33 5611

原创 Python 设置源文件编码格式

在文件第一行添加:# -*- coding: UTF-8 -*-此种方式为Emacs编码指定风格。或者使用如下方式(Python内建方式?)#coding=utf-8或#coding:utf-8

2013-08-08 17:21:17 1110

转载 Python 字典结构遍历

原文地址:http://5iqiong.blog.51cto.com/2999926/806230dict={"a":"apple","b":"banana","o":"orange"} for i in dict: print "dict[%s]=" % i,dict[i] for (k,v) in dict.items(): print "di

2013-08-06 20:12:26 680

翻译 RCP: 代码方式设置View为不可关闭样式

原文地址:http://stackoverflow.com/questions/10146058/eclipse-rcp-programmatically-setting-a-view-to-not-be-closeable在Perspective的初始化函数createInitialLayout(final IPageLayout layout)中设置指定视图的样式。代码

2013-08-03 21:13:23 1388

原创 RCP获取插件目录中图像文件

代码示例: // 获取类所在插件。 Bundle bundle = FrameworkUtil.getBundle(View.class); // 获取相对与插件的位置。 URL url = FileLocator.find(bundle, new Path("icons/" + file), null); // 获取图像描述符。 ImageDescripto

2013-08-03 16:46:09 918

原创 RCP: 确定ISelection 发送者

方式一:使用Object的getClass().getName()获取类名,然后比较名称中是否包含特定字符串。

2013-08-02 20:16:48 678

原创 RCP 视图间通信:SWT Canvas向JFace ViewPart发送消息

问题:如何在一个SWT Canvas控件里面发送消息给JFace ViewPart 控件。实现的功能:在Canva内点击鼠标时,能将点击位置发送给ViewPart控件,供其处理后显示。解决方案:使用一个ViewPart作为Canvas的父控件,:public class CanvasViewPart extends ViewPart implements ISelectio

2013-08-02 17:58:25 2004

原创 Velocity Reference Notation "$!" Meaning.

$! means Quiet Reference Notation When Velocity encounters an undefined reference, its normal behavior is to output the image of the reference. For example, suppose the following reference appea

2013-08-01 15:01:56 985

vim7 中文手册

vim7中文手册 pdf版

2008-01-07

vim7 win

vim7 for windows

2008-01-07

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除