__name__和__main__的使用#hello.pydef sayHello(): str="hello" print(str);if __name__ == "__main__": print ('This is main of module "hello.py"') sayHello()这 ...
分类:
编程语言 时间:
2017-05-16 12:52:55
阅读次数:
166
假设android系统中的API或者apk无法读写usb设备。可能是没有加入读写usb的权限,须要依照例如以下方法进行设置: 1. 在android.hardware.usb.host.xml文件里加入例如以下内容 <permissions> <featurename="android.hardwa ...
分类:
移动开发 时间:
2017-05-16 11:13:14
阅读次数:
187
详细提示如下: An internal error occurred during: "Initializing Java Tooling". Illegal exception table range in class file org/eclipse/jdt/internal/compiler/ ...
分类:
编程语言 时间:
2017-05-16 11:12:49
阅读次数:
370
Some time we need to get specific service path and then do something you want. there are 2 way to get specific service path bellow. private static str ...
分类:
其他好文 时间:
2017-05-16 11:06:53
阅读次数:
148
TForm窗体 this->Visible this->Showing true: 显示 fale:关闭 这个可用 this->Active true:显示完成 fales:还没show完 ...
今天运行项目遇到了一个很奇怪的问题, 由于之前的Eclipse没有正常关闭(也就是直接杀死进程,而没有关闭Tomcat)。 等再次运行tomcat项目的时候一直报错说是JVM_Bind, 自己在网上查说是端口号被占用。 出现这种情况属于两张情况: 第一种情况:是原来javaw.exe没有结束掉而又创 ...
分类:
其他好文 时间:
2017-05-16 10:58:05
阅读次数:
177
第一步:写一个累继承Activity第二步:重写onCreate方法第三步:在主配置文件中注册activity <activity android:name=".类名" android:label="@string/app_name"> <intent-filter> <!--app的入口--> < ...
分类:
其他好文 时间:
2017-05-16 10:11:02
阅读次数:
178
观察者模式定义了一种一对多的依赖关系,让多个观察者对象同时监听某一个主题对象。这个主题对象在状态上发生变化时,会通知所有观察者对象,使它们能够自动更新自己。 这里主要讲一下学习内置观察者的记录,在JAVA语言的java.util库里面,提供了一个Observable类以及一个Observer接口,构 ...
分类:
编程语言 时间:
2017-05-16 09:52:53
阅读次数:
164