装饰器: 可以解释为函数,装饰器就是装饰函数; 功能:装饰器本身是函数,用来装饰其他函数的。 就是为其他函数添加附加功能。 例1: def test1(): pass def test2(): pass test1() test2() 此时需要给源码test1和test2添加记录日志功能。 函数表示 ...
分类:
编程语言 时间:
2018-06-17 23:49:06
阅读次数:
182
http://www.verejava.com/?id=17159306674727 public class Test2 { public static void main(String[] args) { for(int i=1;ihttp://www.verejava.com/?id=1715 ...
分类:
编程语言 时间:
2018-06-16 12:03:37
阅读次数:
126
假如有下面这样简单的xml内容: 读文档的内容 修改和删除xml文档的内容 新生成了文件test2.xml 文件test.xml被修改成: 新增xml文件 生成的内容: ...
分类:
其他好文 时间:
2018-06-14 01:01:30
阅读次数:
184
1 ```html 2 <!DOCTYPE html> 3 <html lang="en"> 4 <head> 5 <meta charset="UTF-8"> 6 <title>Title</title> 7 </head> 8 <body> 9 <div> 10 <div class="c1"> ...
分类:
其他好文 时间:
2018-06-13 15:18:00
阅读次数:
129
python showmxmodel.py 2>&1 | tee log.txtresult is('stage3_unit2_bn1_beta', (256L,))('stage3_unit2_bn3_beta', (256L,))('stage3_unit11_bn1_gamma', (256L ...
分类:
Web程序 时间:
2018-06-12 17:09:26
阅读次数:
602
from greenlet import greenletdef test1(): print('12') gr2.switch() #切换到gr2 print('34') gr2.switch()def test2(): print('56') gr1.switch() print('78')gr ...
分类:
其他好文 时间:
2018-06-10 23:09:33
阅读次数:
281
构造函数 构造函数为了提供初始化用的, 构造函数有:默认构造函数,拷贝构造函数 #include <iostream> using namespace std; // 同一个项目最好不要有相同的类名(防止串包) // 默认构造函数:可以写成有参数的并且,形参写上初始值 class Test2 { p ...
分类:
编程语言 时间:
2018-06-10 20:41:50
阅读次数:
164
mysql去重面试总结 前言:题目大概是这样的。 建表: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 CREATE TABLE `test2` ( `id` int(11) NOT NULL AUTO_INCREMENT, `peopleId` int(11) ...
分类:
数据库 时间:
2018-05-31 19:24:35
阅读次数:
189
遇见的问题: 1.Resource leak: 'context' is never closed spring实例化时 public void test2() { ApplicationContext ctx = new ClassPathXmlApplicationContext("applic ...
分类:
编程语言 时间:
2018-05-30 16:08:44
阅读次数:
154
创建进程的方式中有个 callback ,也就是回调. 看代码: 主进程 一直在重复 print(' 主进程-pid=%d ' %os.getpid()) 这一句话, 当子进程 执行完 test 之后,有个返回值 haha 然后主进程放下手中的工作去执行 test2 ,返回值就是传进去的参数 .这就 ...
分类:
编程语言 时间:
2018-05-25 01:40:15
阅读次数:
222