摘要: import pickleclass Bird(object): fly = True legs = 2 def __init__(self) : print("初始化") def callback(self,call): call(); def getfunction(self): #闭包 def ret(): print('callback running') return ret; summer = Bird()#序列化picklestring = pickle.dumps(summer);print(picklestring)summer.callb 阅读全文
posted @ 2013-02-28 17:31 洪 阅读(153) 评论(0) 推荐(0)
摘要: # coding: UTF-8import os,sys,codecsfrom stat import *root = 'D:/hjhtemp/cdt8' #pathsearch = 'buildConsoleLines' #keywordsearch_file_type = '.java' #file typedef worktree(top,callback): for f in os.listdir(top): pathname = os.path.join(top,f) mode = os.stat(pathname)[ST_MODE] 阅读全文
posted @ 2013-02-28 10:07 洪 阅读(335) 评论(0) 推荐(0)
摘要: 线的匹配 提取出线条,白色背景, 对比相同点的颜色匹配比例 阅读全文
posted @ 2013-02-20 09:00 洪 阅读(172) 评论(0) 推荐(0)
摘要: IPreferenceStore store= EditorsUI.getPreferenceStore(); store.setValue(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER,true); 阅读全文
posted @ 2013-02-17 14:15 洪 阅读(322) 评论(0) 推荐(0)
摘要: private static Shell windowShell; public static void active() { if (null != windowShell && !windowShell.isDisposed()) { if (!windowShell.getMinimized()) { windowShell.setMinimized(true); } windowShell.setMinimized(false); windowShell.forceActive(); windowShell.forceFocus(); } } 阅读全文
posted @ 2013-02-17 14:12 洪 阅读(224) 评论(0) 推荐(0)
摘要: ConfigurationScope.INSTANCE.getNode(IDEWorkbenchPlugin.IDE_WORKBENCH) 阅读全文
posted @ 2013-02-17 14:10 洪 阅读(289) 评论(0) 推荐(0)
摘要: /** * 去掉扩展点org.eclipse.ui.console.consoleFactories */ Object masterTaken = LLTUtil.getClassUtil().getFieldValue( Platform.getExtensionRegistry(), "masterToken"); //$NON-NLS-1$ if (null != masterTaken) { for (IExtension item : Platform .getExtensionRegistry() .getExtensionPoint( ... 阅读全文
posted @ 2013-02-02 15:41 洪 阅读(423) 评论(0) 推荐(0)
摘要: ProgressRegion progressRegion = new ProgressRegion(); progressRegion.createContents( statusLine, (WorkbenchWindow) PlatformUI.getWorkbench() .getActiveWorkbenchWindow()); 阅读全文
posted @ 2013-02-02 15:26 洪 阅读(171) 评论(0) 推荐(0)
摘要: CCorePlugin.getIndexManager().reindex((ICProject) elem); 阅读全文
posted @ 2013-02-02 15:25 洪 阅读(197) 评论(0) 推荐(0)
摘要: WorkbenchPage page = (WorkbenchPage) this.getWindowConfigurer().getWindow() .getActivePage();LayoutPart part = page.getPerspectivePresentation().findPart(CDTPlugin.CDTView, null);ViewPane vp = (ViewPane) part;final ViewStack vs= (ViewStack) vp.getContainer();TabbedStackPresentation tp = (TabbedSt... 阅读全文
posted @ 2013-01-29 10:21 洪 阅读(315) 评论(0) 推荐(0)