M*********r 发帖数: 70 | 1
我的程序建立很多线程通向一个服务器,这些线程分别从服务器下载。当线程达到5000时
Unless you run a large-scale application in a mainframe with 5000 CPUs, I dont
see any reason to spawn 5000 threads. The overhead of thread context switching
alone will make your design look silly. If you deal with I/O related problems,
I suggest you take a look at NIO introduced in JDK1.4. Specifically using
selector is far better a choice to deal with I/O multiplexing than forking
thread. Check out the following article:
http://www.onjava.com/pub/a/on |
|
a*****p 发帖数: 1285 | 2 我想在menuBar和toolBar里面加同一个function,selector,点一下按钮,给变量A 真
,再点一下,给变量A 假。
我用了JToggleButton,调用ItemListener, 单再menuBar或者toolbar里面加这个
button是可以得。但是搞了半天没搞定
再menuBar和toolBar里面都加这个button。
action下面好加,但是没找到怎么实现一个button得switch作用。
togglebutoon可以实现switch作用,但是不知道怎么加到toolbar和menubar里面。是同
时都加。。
想问问大虾们这个功能一般怎么可以实现。 |
|
a*****p 发帖数: 1285 | 3 public class MouseComponent extends JComponent {
public MouseComponent() {
shapes = new ArrayList();
lines = new ArrayList();
bounds = new ArrayList();
current = null;
startpoint = null;
endpoint = null;
isSelected = false;
eraserSelected = false;
cursorPointer = false;
isLine = false;
clear = false;
filled = false;
shapeIndex =... 阅读全帖 |
|
|
k******n 发帖数: 451 | 5 可以通过改善xpath selector提高稳定性。
httpclient估计会比较难,商业网站一般都是jsp生成html,你一般需要分析html。
你可以试试直接call summit form。 |
|
N****w 发帖数: 21578 | 6 zh_CN.UTF-8 登录的,gnome-language-selector 里也选默认为中文了。
输入汉字倒是可以显示,telnet mitbbs.com 就不行
总是忘记怎么折腾的。。。 |
|
v******a 发帖数: 45075 | 7 还有,我现在的apple和vista启动直接进vista, 没有grub那样的菜单可选,装了下acr
onis os selector, 就不能进vista, 只能进apple, 诡异 |
|
E*V 发帖数: 17544 | 8 你当初怎么装的?我不知道acr onis os selector这个东西。。
acr |
|
|
l*********s 发帖数: 5409 | 10 if you put the panel in the vertical position, you can increase the
width to see the window title. However, this is a bad idea to begin with
since usually the window titles are too long.
To solve this issue,"window list" applet needs to automatically adjust
the orientation of fonts as other applets do. However, even if such
configurability does exists it is hidden from the end users.
If I were in your shoes, I will add "window selector" applet to the top
panel do the multitasking.
ps. The top an |
|
s**h 发帖数: 1889 | 11 thx。等我搜搜window selector/list看能不能搞好.
字就 |
|
G*****h 发帖数: 33134 | 12 以前有个 font-selector 的程序能显示所有的 fonts
怎么没有了。。。
哪个程序能干这事。。? |
|
p**********g 发帖数: 9558 | 13 Linux的gdt表的第一项就是给这个准备的
从书里抄了这么一段
The first entry of the GDT is always set to 0. This ensures the logic
address with a null Segment Selector will be considered invalid, thus
causing a processor exception.
呵呵,要不怎么叫segmentation fault呢 |
|
D*******a 发帖数: 3688 | 14 this is about null segment selector, not null pointer.
segmentation fault is generally caused by accessing non-existant memory or
denied access. |
|
c*******9 发帖数: 9032 | 15 【 以下文字转载自 board 讨论区 】
发信人: cocoa2009 (贪吃猫), 信区: board
标 题: Re: Re: Re: 申请成立MacDev(可口苹果)版
发信站: BBS 未名空间站 (Sun Feb 1 23:16:03 2009)
UIBarButtonItem *playItem = [[[UIBarButtonItem alloc] initWithTitle:
NSLocalizedString(@"Play", @"") style:UIBarButtonItemStyleBordered
target:self action:@selector(
play:)] autorelease];
怎样pass play: 后面的argument |
|
|
c*******9 发帖数: 9032 | 17 @selector(: play:) 想传参数 到play
-play:(NSString)itemName{
}
传itemName
这个问题对我的项目不是太重要,一般点button不需要传参数,
只是好奇。 |
|
a*****p 发帖数: 1285 | 18 【 以下文字转载自 Java 讨论区 】
发信人: aaandpp (不知道), 信区: Java
标 题: 实在搞不定了,问问大虾,java里面得itemListener
发信站: BBS 未名空间站 (Sat Mar 19 23:01:30 2011, 美东)
我想在menuBar和toolBar里面加同一个function,selector,点一下按钮,给变量A 真
,再点一下,给变量A 假。
我用了JToggleButton,调用ItemListener, 单再menuBar或者toolbar里面加这个
button是可以得。但是搞了半天没搞定
再menuBar和toolBar里面都加这个button。
action下面好加,但是没找到怎么实现一个button得switch作用。
togglebutoon可以实现switch作用,但是不知道怎么加到toolbar和menubar里面。是同
时都加。。
想问问大虾们这个功能一般怎么可以实现。 |
|
c******s 发帖数: 48 | 19 菜鸟来求习题。
老师上课讲的内容都听懂了,可是一做题,就不会了。
求
(1) scheme programming 。顺便请问下scheme编程有没有套路?
(2)Boolean expression 化简,或者证明两个Boolean expression 相等
(3)按要求设计circuit, 用NOR, NAND, AND, OR, NOT, selector
最好是有答案的。
我在google上没有找到,有的要教师有密码的才能看答案。 |
|
b*******r 发帖数: 713 | 20 菜鸟,想让mitbbs杂碎,特别是每天的八卦新闻和菌斑的东西少一些,研究了半天abp网
站http://adblockplus.org/en/filters,现学网页element selector的东西
弄了个这样的abp规则,哪位像我一样蛋疼的可以试试。我用的是chrome浏览器,已经
装了adblock plus,订阅了ChinaList+EasyList。下面是在abp的options->add your
own filters->Edit filters as raw text添加的
!front page rules
mitbbs.com##td[width="130"]
www.mitbbs.com##table[width="541"]:nth-of-type(1)
www.mitbbs.com##table[width="541"]:nth-of-type(2)
www.mitbbs.com##table[width="541"]:nth-of-type(3)
www.mitbbs.com##table[width="541"]:nth-of-type(4)
www.... 阅读全帖 |
|
o**2 发帖数: 168 | 21 上周 cplus2009 同学有个问题(http://www.mitbbs.com/article_t/Programming/31253813.html),涉及到GUI程序中线程之间转换的问题。就是controls都要在UIthread(Swing或SWT)里操作,而后台的logic要在非UIthread里操作。
我当时说了FMP可以轻易淘汰掉这种thread-base的编程技术,于是趁这个长周末,把对
UIthread的支持做进了FMP。想要试用的,可以在此download 2.0 jar:https://
github.com/fastmessenger/RI-in-Java/blob/master/fmp-2.0-bin.jar?raw=true
这里我借用 cplus2009 同学的问题作为范例:他的问题是有一个界面,上面有一个
BROWSE按钮,按了后弹出一个文件选择对话框。用户选好文件后,将文件名显示在
BROWSE按钮前面的text里。这里文件选择用来代表后台的耗时操作。
用FMP的,可以这样设计:一个Frontend class用来access UI controls... 阅读全帖 |
|
|
g*****g 发帖数: 34805 | 23 A Selector is a Java NIO component which can examine one or more NIO
Channels, and determine which channels are ready for e.g. reading or writing
. It's just a coin name.
Async is not about making programmers' life easier, it's about making
performance better.
I |
|
r****y 发帖数: 26819 | 24 说得有点过了。priority level of selector不看文档就知道有这回事,凭自己瞎猜试
出文档规定来的人只怕不多吧。 |
|
t*********h 发帖数: 941 | 25 完全不懂jquery 查了一下他那个手册 不就是一个个选吗
$('#make-me-blue').blue();
$('section:eq(0) :last-child').blue()
$('section:eq(1) span:eq(0)').blue()
$('section:eq(1) i:eq(1)').blue()
$('section:eq(1) div:eq(1) div').blue()
不过都是selector的应用啊 对backend没啥帮助 |
|
|
k**********g 发帖数: 989 | 27
Start with Java Executors.
Learn how to use it just like the Runnable and Callable class.
http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/E
For example, if your goal is to write Android programs, (1) Executors is
basically all you need - the only other things you need are (2) thread
safety on Android, and (3) understand when and why you need to call Activity
.runOnUiThread() in some situations
C++ didn't have anything in the standard library comparable to Java
Executors. Design-by... 阅读全帖 |
|
z****e 发帖数: 54598 | 28 连@Component都来了
也开始大搞class了
话说这部分代码如果不认真看,一不小心就看成是java了
@Component({selector: 'my-app'})
@View({template: 'Hi {{ name }}'})
// Component controller
class MyAppComponent {
constructor() {
this.name = 'Ali';
}
} |
|
m***i 发帖数: 2480 | 29 scrapy selectors
or 从 google cache parse |
|
m***i 发帖数: 2480 | 30 scrapy selectors
or 从 google cache parse |
|
e*******o 发帖数: 4654 | 31 我有个脚本抓贴
就是下载网页 用CSS selector 提取内容
感觉应该有更好的办法 比如买买提的第三方客户端 应该不是一个个帖爬的
有大牛知道么?多谢 |
|
a*o 发帖数: 19981 | 32 nero can do it, file -> burn image -> in file selector, allow all entensions |
|
|
O****C 发帖数: 368 | 34 完全不能打开。
我已经重装几次都不行。麻烦你们帮我看看error report。 谢谢。
Microsoft Error Reporting log version: 2.0
Error Signature:
Exception: EXC_BAD_ACCESS
Date/Time: 2014-09-10 22:55:06 +0000
Application Name: Microsoft OneNote
Application Bundle ID: com.microsoft.onenote.mac
Application Signature: ONMC
Application Version: 15.2.140713
Crashed Module Name: MicrosoftOffice
Crashed Module Version: 15.2.140713
Crashed Module Offset: 0x00071f94
Blame Module Name: MicrosoftOffice
Blame Module Version: 15.2.140713
Blame Modu... 阅读全帖 |
|
w*******r 发帖数: 36 | 35 SnadBoy's Revelation v1.1
Saved passwords are great - one less thing to remember. The
dialog
appears with those charming asterisks and your simply hit
enter. Of
course, there comes a time that you actually do need to
remember
that password - what to do???
SnadBoy's Revelation allows you to 'see behind' the
asterisks and
remember the password.
How to...
> With the dialog containing the password visible start up
Revelation.
> Left click on the 'Password Field Selector' and drag it
over
the pass |
|
h*****n 发帖数: 439 | 36 When you buy a box of transparencies, you can find a label on the box,
indicating how high the temperature can the transparencies keep in shape.
The higher the temperature, the higher the price.
and usually temperature in
laser color printer > laser b/w printer > photocopier > ink jet printer
check for more detail in
http://selector.3m.com/vsd2/ss.asp?FAM=transfilm |
|
M***a 发帖数: 175 | 37 Using the "data selector", you can select any data region to do the fitting. |
|
p*****t 发帖数: 966 | 38 这个其实最关键的还是对接收机的影响
因为手机不同频段的信号可能会交调出非常靠近接受频率的信号
由于非线性,灵敏度和频带选择的一些原因
这个信号可能会淹没了需要的信号
比如本振相位噪声 镜频抑制不够 pre selctor, post-selector选择性不够, 噪声带
宽太大 等等
ls有人说的Blocking effect差不多就这意思
所以和你手机频率多少没多大关系 理论上发射任何频率都会有影响 |
|
|
c*******4 发帖数: 154 | 40 用origin做了contour图,然后要对图进行数据分析
现在我想随便在contour图上选择一个区域,然后把这个区域里面的zyz提取出来进行积分
用了region data selector,但是无法进行积分之类的操作
有谁能帮忙吗?或者根本就不是这么做的? |
|
f***y 发帖数: 118 | 41 这是个可以免费安装在ipod touch,palm,window mobile,blackberry上的小软件,用
来Search and Browse U.S. Preventive Services Task Force (USPSTF)
recommendations.
在此处下载,http://epss.ahrq.gov/PDA/index.jsp
注意不能用IE打开,可以用google和firefox浏览器打开。
ipod touch用户可以直接在app store上找到下载。
适合内科,家庭科的住院医或者做OB时用。 |
|
z*******n 发帖数: 1034 | 42 来自主题: MobileDevelopment版 - Swift 出现了个func,既不是个word也不是众所周知的abbreviation
Keywords and Punctuation
The following keywords are reserved and can’t be used as identifiers,
unless they’re escaped with backticks, as described above in Identifiers.
Keywords other than inout, var, and let can be used as external parameter
names in a function declaration or function call without being escaped with
backticks.
Keywords used in declarations: associatedtype, class, deinit, enum,
extension, func, import, init, inout, internal, let, operator, p... 阅读全帖 |
|
P*****r 发帖数: 1308 | 43 回馈一下版面,月初去北欧Cruise,特意比较了一下Sprint BYOD unlimited的global
roaming和FP global 3-in-1 SIM在那边的使用情况,两台机器都是三星的S7官方无锁
版(930U),Android 7.0
首先一点,对于双模手机,切换cdma和gsm模式的时候,最简单就是热插拔sim,这样插
入新sim,系统识别后自动充启并设置。对于从cdma转FP的gsm,需要手动设置一下apn
:freedompop.foggmobile.com,在fp gsm 模式下prl/profile update的设置被隐藏。
而对于gsm转回sprint cdma,update prl和profile一下,network selector好像被隐
藏。
Sprint的global roaming是free included在那个byod的plan里面的,我原本以为
sprint cdma的sim只能用在cdma网络下id LTE的,所以觉得在外国漫游的时候估计没什
么卵用,因为cdma的服务商还是少数,但是使用过程中发现那个sim其实也可以连在gsm
的... 阅读全帖 |
|
x*b 发帖数: 5723 | 44 M Performance Parts Available this May
M Performance Brake System - $2,300 MSRP
M Performance Exhaust - $1,250 MSRP
M Performance Steering Wheel - $800 MSRP
Black Kidney Grilles - $130 MSRP
Sport Stripes - $250 MSRP
Carbon Fiber Mirror Caps - $650 MSRP
Carbon Fiber and Alcantara Interior Trim - $950 MSRP
Carbon Fiber Selector Lever - $180 MSRP
Double-Spoke 20" Wheels - $4,750 MSRP
M Performance Parts Available this November/December
Power Kit for 335i(I heard it's going to be ~330-340hp)
Front S... 阅读全帖 |
|