联想黄金斗士s8畅玩版增强版的PIN码忘了怎么办?

帐号:密码:下次自动登录{url:/nForum/slist.json?uid=guest&root=list-section}{url:/nForum/nlist.json?uid=guest&root=list-section}
贴数:12&分页:Keep Looking For发信人: Machael (Keep Looking For), 信区: Python
标&&题: pl.show()程序阻塞的问题有没有办法解决?
发信站: 水木社区 (Fri Jan&&6 20:05:26 2017), 转信 && 用matplotlib的plot()绘图, 用show()显示图形窗口
这个show()是个阻塞函数, 只有关闭窗口后程序才会继续执行
这在有的调试的时候不方便, 例如程序执行一半, 我想看看当前的信号波形, 又不想关闭窗口.
请问有没有办法解决plot绘图的阻塞问题?
注: pl.ion()解决不了,程序执行时窗口会一闪即逝
-- && ※ 来源:·水木社区 ·[FROM: 221.226.97.*]
blank发信人: wushunchao (blank), 信区: Python
标&&题: Re: pl.show()程序阻塞的问题有没有办法解决?
发信站: 水木社区 (Fri Jan&&6 21:40:54 2017), 转信 && 我一般是用fig.show(): && import matplotlib.pyplot as plt
fig=plt.figure()
ax=fig.add_subplot(111)
ax.plot(x,y)
fig.show() && 【 在 Machael (Keep Looking For) 的大作中提到: 】
: 用matplotlib的plot()绘图, 用show()显示图形窗口
: 这个show()是个阻塞函数, 只有关闭窗口后程序才会继续执行
: 这在有的调试的时候不方便, 例如程序执行一半, 我想看看当前的信号波形, 又不想关闭窗口.
: ...................
&& -- && ※ 来源:·水木社区 newsmth.net·[FROM: 223.87.244.*]
青芝坞发信人: pasuka (青芝坞), 信区: Python
标&&题: Re: pl.show()程序阻塞的问题有没有办法解决?
发信站: 水木社区 (Fri Jan&&6 22:04:32 2017), 转信 && pyplot里面的ion, draw, pause三者缺一不可
另外再搭配deque和Threading
【 在 Machael (Keep Looking For) 的大作中提到: 】
: 用matplotlib的plot()绘图, 用show()显示图形窗口
: 这个show()是个阻塞函数, 只有关闭窗口后程序才会继续执行
: 这在有的调试的时候不方便, 例如程序执行一半, 我想看看当前的信号波形, 又不想关闭窗口.
: ...................
&& -- && ※ 来源:·水木社区 newsmth.net·[FROM: 180.174.2.*]
Keep Looking For发信人: Machael (Keep Looking For), 信区: Python
标&&题: Re: pl.show()程序阻塞的问题有没有办法解决?
发信站: 水木社区 (Sun Jan&&8 22:51:45 2017), 转信 && 试了一下, 这种用法好像只能在ipython的交互模式下有点用,不会阻塞ipython窗口,
但是在pycharm的调试中还是不行,连续执行就是窗口一闪即逝,
分步执行fig.show()时窗口不会绘图
还是需要执行一次plt.show()才能把图绘制出来
还是没有解决问题... && 【 在 wushunchao (blank) 的大作中提到: 】
: 我一般是用fig.show():
: import matplotlib.pyplot as plt
: x=[0,1,2]
: ...................
&& -- && ※ 来源:·水木社区 newsmth.net·[FROM: 58.37.136.*]
blank发信人: wushunchao (blank), 信区: Python
标&&题: Re: pl.show()程序阻塞的问题有没有办法解决?
发信站: 水木社区 (Sun Jan&&8 23:48:22 2017), 站内 && 我就只是在cpython中这么用。pycharm中没试过,wingide也没试过。
这么干的好处是,比较清楚fig1,fig2,...和ax1,ax2,...和line1,line2,...
是什么个关系,好控制。 && 不知道plt.ion()能行不。 && 【 在 Machael (Keep Looking For) 的大作中提到: 】
: 试了一下, 这种用法好像只能在ipython的交互模式下有点用,不会阻塞ipython窗口,
: 但是在pycharm的调试中还是不行,连续执行就是窗口一闪即逝,
: 分步执行fig.show()时窗口不会绘图
: ...................
&& -- && ※ 来源:·水木社区 newsmth.net·[FROM: 117.175.131.*]
玄清|黑白猫熊@静若处子动如光发信人: xuanqing (玄清|黑白猫熊@静若处子动如光), 信区: Python
标&&题: Re: pl.show()程序阻塞的问题有没有办法解决?
发信站: 水木社区 (Mon Jan&&9 07:07:46 2017), 转信 && 把图形持久化呗
后面想怎么整就怎么整了 && 【 在 Machael (Keep Looking For) 的大作中提到: 】
: 试了一下, 这种用法好像只能在ipython的交互模式下有点用,不会阻塞ipython窗口,
: 但是在pycharm的调试中还是不行,连续执行就是窗口一闪即逝,
: 分步执行fig.show()时窗口不会绘图
: ...................
Fan list&&&&&&&& 陈道明、蒋雯丽、林志玲、林语堂(随长大待续中……)
-----------get busy living, not get busy dying-----------
无玄无清|不舍不得&&&&&&&&消化不吸收,既不轻松也没营养,严禁之
既玄且清|有舍有得&&&&&&&&珍惜拥有,驾驭自己
外玄内清|小舍小得&&&&&&&&柳下惠就是柳下惠,CN还是CN
玄者自清|大舍大得&&&&&&&&boy 2 man, 道阻且长…… &&&& ※ 来源:·水木社区 newsmth.net·[FROM: 123.123.198.*]
Romapecker发信人: Romapecker (Romapecker), 信区: Python
标&&题: Re: pl.show()程序阻塞的问题有没有办法解决?
发信站: 水木社区 (Mon Jan&&9 08:29:35 2017), 站内&&[累计积分奖励: 500/0] && plt.show(block=False) && 【 在 Machael 的大作中提到: 】
: 用matplotlib的plot()绘图, 用show()显示图形窗口&&
: 这个show()是个阻塞函数, 只有关闭窗口后程序才会继续执行&&
: 这在有的调试的时候不方便, 例如程序执行一半, 我想看看当前的信号波形, 又不想关闭窗口.&&
: 请问有没有办法解决plot绘图的阻塞问题?&& && #发自zSMTH@Redmi Note 3
-- && ※ 来源:·水木社区 ·[FROM: 223.104.3.*]
duchour发信人: duchour (duchour), 信区: Python
标&&题: Re: pl.show()程序阻塞的问题有没有办法解决?
发信站: 水木社区 (Mon Jan&&9 08:38:41 2017), 转信 && 嗯嗯。 && 这个是真正的解决方法。
居然到这里才出现。
【 在 Romapecker 的大作中提到: 】
: plt.show(block=False)
: #发自zSMTH@Redmi Note 3
-- && ※ 来源:·水木社区 ·[FROM: 117.100.66.*]
kacha无极限发信人: loiol (kacha无极限), 信区: Python
标&&题: Re: pl.show()程序阻塞的问题有没有办法解决?(3)
发信站: 水木社区 (Mon Jan&&9 09:35:33 2017), 站内 && 波形信号果断上gnuradio&& &&&& 【 在 Machael () 的大作中提到: 】
: 用matplotlib的plot()绘图, 用show()显示图形窗口
: 这个show()是个阻塞函数, 只有关闭窗口后程序才会继续执行
: 这在有的调试的时候不方便, 例如程序执行一半, 我想看看当前的信号波形, 又不想关闭窗口.
: 请问有没有办法解决plot绘图的阻塞问题?
发自xsmth (iOS版)
-- && ※ 来源:·水木社区 ·[FROM: 117.136.40.*]
Keep Looking For发信人: Machael (Keep Looking For), 信区: Python
标&&题: Re: pl.show()程序阻塞的问题有没有办法解决?
发信站: 水木社区 (Mon Jan&&9 11:14:11 2017), 站内 && 谢谢! 有用
【 在 Romapecker 的大作中提到: 】
: plt.show(block=False)&&
: 【 在 Machael 的大作中提到: 】&&
: ...................
--来自微水木3.2.0
-- && ※ 来源:·水木社区 ·[FROM: 116.236.165.*]
文章数:12&分页:[已解决] 如何用 showplinfo标签 调用当前文章ID下的评论
帝国cms - 安全、强大、稳定、灵活
&1/2 &&&&1&&&
用户头衔:举人
精华贴&&&:0
发贴数&&&:167
经验值&&&:652
注册时间:
【】&&&[第&1&楼]
[已解决] 如何用 showplinfo标签 调用当前文章ID下的评论
我不想用JS调用评论,想将 “评论调用标签 (showplinfo)” 置于内容页模板中,并只调用当前信息内容ID下的评论。请问如何写?能将该标签& & “[showplinfo]调用条数,标签模板ID,栏目ID,信息ID,显示推荐评论,操作类型[/showplinfo]”& & 中的& & “信息ID”& &改为当前ID即可 ,但不知如何写。
[该贴被修改 1 次,最后修改时间
15:51:28 ]
已设置保密
用户头衔:举人
精华贴&&&:0
发贴数&&&:167
经验值&&&:652
注册时间:
【】&&&[第&2&楼]
用 'selfinfo' 这个是不行的
已设置保密
用户头衔:探花
精华贴&&&:0
发贴数&&&:4137
经验值&&&:9763
注册时间:
【】&&&[第&3&楼]
[showplinfo]调用条数,标签模板ID,$navinfor[classid],$navinfor[id],显示推荐评论,操作类型[/showplinfo]
已设置保密
用户头衔:举人
精华贴&&&:0
发贴数&&&:167
经验值&&&:652
注册时间:
【】&&&[第&4&楼]
非常感谢! 可以了
已设置保密
用户头衔:探花
精华贴&&&:0
发贴数&&&:4137
经验值&&&:9763
注册时间:
【】&&&[第&5&楼]
原帖由 many1 于
15:51:05 发表非常感谢! 可以了
已设置保密
用户头衔:举人
精华贴&&&:0
发贴数&&&:499
经验值&&&:1449
注册时间:
【】&&&[第&6&楼]
原帖由 CoolFire 于
15:42:57 发表[showplinfo]调用条数,标签模板ID,$navinfor[classid],$navinfor[id],显示推荐评论,操作类型[/showplinfo]
已设置保密
用户头衔:举人
精华贴&&&:0
发贴数&&&:278
经验值&&&:680
注册时间:
【】&&&[第&7&楼]
已设置保密
用户头衔:进士
精华贴&&&:0
发贴数&&&:1069
经验值&&&:3091
注册时间:
【】&&&[第&8&楼]
已设置保密
用户头衔:书生
精华贴&&&:0
发贴数&&&:18
经验值&&&:45
注册时间:
【】&&&[第&9&楼]
可以的,我也用过的。
A5站长助手www.zssoft.net
已设置保密
用户头衔:进士
精华贴&&&:0
发贴数&&&:777
经验值&&&:2186
注册时间:
【】&&&[第&10&楼]
已设置保密
&1/2 &&&&1&&&
使用EBB代码
使用smile代码
自动分析url
自动分析img
&&(按 Ctrl+Enter 直接提交)
Powered by:&&Version 2.2.1此文是接上文/zzltjnh/archive//3080058.html问题解决之后遇到的一个新问题,我的页面上有一个UIScrollView和一个定时器用来记录当前考试模式下的剩余时间,问题出现了:当我滑动滚动试图时,定时器的方法便不在运行(即被UI主线程阻塞)。google一下找到了解决办法:将定时器放在非主线程中执行将更新UI的操作放到主线程,这样UI主线程和定时器就能互不干扰的相互工作了,以下是主要代码:
1 #import "CountdownTool.h"
3 @interface CountdownTool()
UILabel *_lblS
NSTimer *_
8 @property (nonatomic, assign) NSI
9 @property (nonatomic, assign) NSI
10 @property (nonatomic, assign) NSI
11 @property (nonatomic, copy) NSString
12 @property (nonatomic, copy) NSString
13 @property (nonatomic, copy) NSString
14 @property (nonatomic, assign) NSInteger totalS
16 @implementation CountdownTool
17 @synthesize hour = _
18 @synthesize minute = _
19 @synthesize second = _
20 @synthesize totalSeconds = _totalS
22 - (void)dealloc
[_lblShow release];
[_strHour release];
[_strMinute release];
[_strSecond release];
[super dealloc];
31 - (id)initWithFrame:(CGRect)frame
self = [super initWithFrame:frame];
if (self) {
_lblShow = [[UILabel alloc] initWithFrame:self.bounds];
_lblShow.backgroundColor = [UIColor clearColor];
_lblShow.font = [UIFont systemFontOfSize:15];
_lblShow.textColor = [UIColor yellowColor];
_lblShow.textAlignment = NSTextAlignmentC
_lblShow.numberOfLines = 1;
[self addSubview:_lblShow];
46 - (id)initWithFrame:(CGRect)frame andMinutesNum:(NSInteger)minute
if (self = [self initWithFrame:frame]) {
self.totalSeconds = minute * 60;
//多线程启动定时器
[NSThread detachNewThreadSelector:@selector(startTimer) toTarget:self withObject:nil];
55 - (void)startTimer
_timer = [NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(timerFire) userInfo:nil repeats:YES];
[[NSRunLoop currentRunLoop] run];
60 - (void)handleWithTotalSeconds
self.hour = _totalSeconds/3600;
self.minute = _totalSeconds%3600/60;
self.second = _totalSeconds%3600%60;
if (_hour &= 0) {
_lblShow.text = [NSString stringWithFormat:@"%@:%@",_strMinute,_strSecond];
_lblShow.text = [NSString stringWithFormat:@"%@:%@:%@",_strHour,_strMinute,_strSecond];
71 - (void)setHour:(NSInteger)hour
if (_hour & 10) {
self.strHour = [NSString stringWithFormat:@"0%d",_hour];
self.strHour = [NSString stringWithFormat:@"%d",_hour];
80 - (void)setMinute:(NSInteger)minute
if (_minute & 10) {
self.strMinute = [NSString stringWithFormat:@"0%d",_minute];
self.strMinute = [NSString stringWithFormat:@"%d",_minute];
89 - (void)setSecond:(NSInteger)second
if (_second & 10) {
self.strSecond = [NSString stringWithFormat:@"0%d",_second];
self.strSecond = [NSString stringWithFormat:@"%d",_second];
98 - (void)setTotalSeconds:(NSInteger)totalSeconds
_totalSeconds = totalS
[self performSelectorOnMainThread:@selector(handleWithTotalSeconds) withObject:nil waitUntilDone:YES];
103 - (void)timerFire
if (_totalSeconds == 0) {
[_timer invalidate];
self.totalSeconds -= 1;
阅读(...) 评论()2869人阅读
IPhone开发高级系列(36)
我的问题是这样,我的页面上有一个UIScrollView和一个定时器用来记录当前考试模式下的剩余时间,问题出现了:当我滑动滚动试图时,定时器的方法便不在运行(即被UI主线程阻塞)。google一下找到了解决办法:将定时器放在非主线程中执行将更新UI的操作放到主线程,这样UI主线程和定时器就能互不干扰的相互工作了。
在另一个项目中,还解决了一个问题:手机验证码,获取按钮,点击获取后,会开始倒计时一段时间,按钮不可点,按钮上的文字不断变化。
获取验证码
120秒后重新获取
119秒后重新获取
以下是主要代码:
1 #import &CountdownTool.h&
3 @interface CountdownTool()
UILabel *_lblS
NSTimer *_
8 @property (nonatomic, assign) NSI
9 @property (nonatomic, assign) NSI
10 @property (nonatomic, assign) NSI
11 @property (nonatomic, copy) NSString
12 @property (nonatomic, copy) NSString
13 @property (nonatomic, copy) NSString
14 @property (nonatomic, assign) NSInteger totalS
16 @implementation CountdownTool
17 @synthesize hour = _
18 @synthesize minute = _
19 @synthesize second = _
20 @synthesize totalSeconds = _totalS
22 - (void)dealloc
[_lblShow release];
[_strHour release];
[_strMinute release];
[_strSecond release];
[super dealloc];
31 - (id)initWithFrame:(CGRect)frame
self = [super initWithFrame:frame];
if (self) {
_lblShow = [[UILabel alloc] initWithFrame:self.bounds];
_lblShow.backgroundColor = [UIColor clearColor];
_lblShow.font = [UIFont systemFontOfSize:15];
_lblShow.textColor = [UIColor yellowColor];
_lblShow.textAlignment = NSTextAlignmentC
_lblShow.numberOfLines = 1;
[self addSubview:_lblShow];
46 - (id)initWithFrame:(CGRect)frame andMinutesNum:(NSInteger)minute
if (self = [self initWithFrame:frame]) {
self.totalSeconds = minute * 60;
//多线程启动定时器
[NSThread detachNewThreadSelector:@selector(startTimer) toTarget:self withObject:nil];
55 - (void)startTimer
_timer = [NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(timerFire) userInfo:nil repeats:YES];
[[NSRunLoop currentRunLoop] run];
60 - (void)handleWithTotalSeconds
self.hour = _totalSeconds/3600;
self.minute = _totalSeconds%3600/60;
self.second = _totalSeconds%3600%60;
if (_hour &= 0) {
_lblShow.text = [NSString stringWithFormat:@&%@:%@&,_strMinute,_strSecond];
_lblShow.text = [NSString stringWithFormat:@&%@:%@:%@&,_strHour,_strMinute,_strSecond];
71 - (void)setHour:(NSInteger)hour
if (_hour & 10) {
self.strHour = [NSString stringWithFormat:@&0%d&,_hour];
self.strHour = [NSString stringWithFormat:@&%d&,_hour];
80 - (void)setMinute:(NSInteger)minute
if (_minute & 10) {
self.strMinute = [NSString stringWithFormat:@&0%d&,_minute];
self.strMinute = [NSString stringWithFormat:@&%d&,_minute];
89 - (void)setSecond:(NSInteger)second
if (_second & 10) {
self.strSecond = [NSString stringWithFormat:@&0%d&,_second];
self.strSecond = [NSString stringWithFormat:@&%d&,_second];
98 - (void)setTotalSeconds:(NSInteger)totalSeconds
_totalSeconds = totalS
[self performSelectorOnMainThread:@selector(handleWithTotalSeconds) withObject:nil waitUntilDone:YES];
103 - (void)timerFire
if (_totalSeconds == 0) {
[_timer invalidate];
self.totalSeconds -= 1;
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:1283340次
积分:13085
积分:13085
排名:第765名
原创:192篇
转载:103篇
评论:266条
(2)(3)(1)(2)(2)(6)(2)(3)(4)(2)(2)(1)(5)(12)(5)(4)(2)(3)(8)(12)(7)(23)(3)(8)(7)(21)(6)(10)(40)(19)(3)(12)(17)(1)(1)(13)(4)(10)(2)(6)(1)(1)本帖子已过去太久远了,不再提供回复功能。

我要回帖

更多关于 联想黄金斗士s8畅玩版 的文章

 

随机推荐