摘要:
# proto文件定义```javapackage lm;message Foo{ required int32 id = 1;}message Bar{ required int32 id = 1 [default = 12]; required string str= 2 [... 阅读全文
摘要:
猜想主要是因为图形显示用了OpenGL加速造成不稳定。我的运行环境是:Ubuntu 10.04 LTS 64bitMatlab R2010b解决方法是启动时用:$MATLAB_DIR/bin/matlab --softwareopenglsoftwareopengl参数的意义,$MATLAB_DIR/bin/matlab中有说明:# -softwareopengl## On unix platforms (excluding MAC) this option selects# between hardware and software opengl im... 阅读全文
摘要:
1 from Tkinter import * 2 import ttk 3 import threading 4 import random 5 import time 6 7 class PgBarFrm(Frame): 8 def __init__(self, root, max_len): 9 self.root = root10 Frame.__init__(self, root)11 12 self.pb_val = IntVar() # pbar variable13 self.pb_max = max... 阅读全文
摘要:
GUI用的是Tkinter,在主线程执行,子线程是工作线程"""ttk.Progressbar demo, with multi-threadingauthor: nn0p data: 2013.04.24"""from Tkinter import *import ttkimport threadingimport randomimport timeclass UIThread: def __init__(self, root, count=10): self.count = count self.value = 0 self.b_ 阅读全文
摘要:
IPython supplies you the convenience of editing code from command prompt, the magic command %edit. However in Windows it will use notepad as default editor which is not suitable for editing python source code. Here is the method to config the editor option.As IPython official doc said:Editor configu 阅读全文
摘要:
With importing the model, the methods mainly depends on the os.path model:# method 1import _module_print _module_.__file__ # method 2import os.path print os.path.abspath(_module_.__file__) print os.path.dirname(_model_.__file__) # method 3import sys sys.modules['_model_']Without importing th 阅读全文
摘要:
In python, class and instance are both objects.<Learning Python> says that,When we run a class statement, we get a class object.When we call a class object, we get an instance object.Such confusing definitions. 阅读全文
摘要:
Did an investigation on how much time a phd student spend on reading textbooks/papers, learning models,understanding algorithms, programming/coding, implementing algorithms...The information is from web resources.A phd student's blog postHe settled several categorizations of his activities:under 阅读全文
摘要:
Can MATLAB pass by reference?If you are attempting to use pass-by-reference to modify the input argument passed into a function, the answer to the question depends on whether the input is a handle object or a value object. The two types of objects are describedin the Object-Oriented Programming(http 阅读全文
摘要:
Stephen Tashi Posts: 2,174Recognitions: Science Advisor Quote by nn0p [B]Would some explain about what are the differences between them? Linear algebra is focused on vector spaces. Linear transformations betwee... 阅读全文