We hear a lot about loops, especiallyforloops. So what, in fact, are they? They’re just pieces of code that repeat the same commands several times, un...
分类:
编程语言 时间:
2014-11-30 18:31:01
阅读次数:
143
首先看一个简单的没有线程支持的情况下的顺序执行:
from time import sleep, ctime
def loop0():
print('start loop 0 at:', ctime())
sleep(4)
print('loop 0 done at:', ctime())
def loop1():
print('start loop 1 ...
分类:
编程语言 时间:
2014-11-29 21:44:04
阅读次数:
351
在做clojure代码练习时,总是会优先想到使用 loop, redurce,map方式,自己构建执行函数。这样没有错,只是应该使用更多的高级函数,如comp, ->, -->, filter, group等更高级别抽象的函数构建,使代码更简洁。目前之所以这样,或许是因为对很多函数不熟悉,还有就是思...
分类:
其他好文 时间:
2014-11-29 14:32:35
阅读次数:
141
ExplanationCreate a window.Start event loop. This event loop will run until user terminates it by pressing e, E, q, Q.Access same window via its name....
分类:
其他好文 时间:
2014-11-28 16:04:41
阅读次数:
140
使用多线程的方式1、函数式:使用threading模块threading.Thread(e.g target name parameters) 1 import time,threading 2 def loop(): 3 print("thread %s is running..." % ...
分类:
编程语言 时间:
2014-11-28 16:02:20
阅读次数:
267
以前从没遇到过这种问题,发现自重装系统后,就开始触发这个bug了.从error-log等视图里点击打开的java文件或者xml文件时,出现”unhandled event loop exception”错误,出错信息如下: Exception Stack Trace:org.eclipse.swt....
分类:
系统相关 时间:
2014-11-28 01:02:57
阅读次数:
383
declare cursor c_t is select table_name from user_tables;table_name user_tables.table_name%type;begin open c_t;loop fetch c_t into table_name;exit whe...
分类:
数据库 时间:
2014-11-27 10:21:51
阅读次数:
193
如下几句是制作fat.img的方法:
mkdir fat_disk
mkfs.vfat -n [挂载名称] -v -C fat.img [fat分区大小]
mount -o loop,iocharset=utf8 fat.img fat_disk/
cp -rfv 资源路径//* fat_disk/
umount fat_disk/
挂载点名称...
分类:
移动开发 时间:
2014-11-26 18:58:14
阅读次数:
298
批量将表名变为大写begin for c in (select table_name tn from user_tables where table_name upper(table_name)) loop begin execute immediate 'alter table "'...
分类:
数据库 时间:
2014-11-25 18:15:34
阅读次数:
340