由买买提看人间百态

topics

全部话题 - 话题: override
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
M******o
发帖数: 121
1
来自主题: Programming版 - 问一个关于Android Java的问题
加个override就清楚了
new OnClickListener() {
@Override
public void onClick(View v) {
。。。。。
}
}
q****x
发帖数: 7404
2
来自主题: Programming版 - 几个C++书写风格疑问
dtor算不算必须override的?如果算,只标注dtor不就好了?
这个建议更复杂啊。子类标override要和基类的=0一一对应…
p*****g
发帖数: 7
3
来自主题: Programming版 - cassandra async 问题

From http://stackoverflow.com/questions/22322510/is-there-a-good-way-to-check-whether-a-datastax-session-executeasync-has-throw
You could try something like this since the ResultSetFuture implements
ListenableFuture from the Guava library:
ResultSetFuture resultSetFuture = session.executeAsync("SELECT * FROM
test.t;");
Futures.addCallback(resultSetFuture, new FutureCallback() {
@Override
public void onSuccess(@Nullable com.datastax.driver.core.ResultSet
result... 阅读全帖
l**********n
发帖数: 8443
4
来自主题: Programming版 - scala的def或val是冗余的
The compiler can infer the return type from what is being returned but it
can’t infer the types of the parameters so we’ll have to leave those
explicit specifications in.
We can however remove the return keyword to further reduce the amount of
ceremony in the method.
If we don’t use the return statement, the compiler will just assume that we
want to return the value of the last statement.
There's another consequence: in a subclass, you can override a def with a
val or a def, but you can only ove... 阅读全帖
c*****e
发帖数: 3226
5
AbstractQueuedSynchronizer 果然是神器,以前做那道h2O 的题总觉得不对,
用神器就舒服多了,而且感觉基本上是对的。欢迎提错。
值得改进的地方就是 countH & countO 可以直接存到 state integer 里面去。
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.AbstractQueuedSynchronizer;
public class H2O {
MySync sync = new MySync();
CountDownLatch latch = new CountDownLatch(3);
Object guard = new Object();
Data data = new Data();
class Data {
Object h1;
Object h2... 阅读全帖
g*****g
发帖数: 34805
6
来自主题: Programming版 - 如何快速处理大量网上xml文件?
你丫还不服,这才几行的东西,现抄个例子,异步,要写本地文件的话加两行,要
configure各种timeout再加几行。
Connection Pool,keep alive啥的人都已经做好了。我老人家说过多少次,轮子是第
一生产力,你们成天吵语言。有空像我老熟悉一堆轮子,不比你们懂一堆语言有用多了。
import com.ning.http.client.*;
AsyncHttpClient asyncHttpClient = new AsyncHttpClient();
for(String url : urls) {
asyncHttpClient.prepareGet(url).execute(new AsyncCompletionHandler
(){
@Override
public Response onCompleted(Response response) throws Exception{
System.out.println(response);
return response;
}
... 阅读全帖
c*********e
发帖数: 16335
7
来自主题: Programming版 - 如何快速处理大量网上xml文件?
goodbug,下面这一行该写在哪呢?每一个url都要接收response,这个过程还是
synchronous的吧?
String bodyResponse = f.get();

你丫还不服,这才几行的东西,现抄个例子,异步,要写本地文件的话加两行,要
configure各种timeout再加几行。
Connection Pool,keep alive啥的人都已经做好了。我老人家说过多少次,轮子是第
一生产力,你们成天吵语言。有空像我老熟悉一堆轮子,不比你们懂一堆语言有用多了。
import com.ning.http.client.*;
AsyncHttpClient asyncHttpClient = new AsyncHttpClient();
for(String url : urls) {
asyncHttpClient.prepareGet(url).execute(new AsyncCompletionHandler
(){
@Override
public Response onCompleted(Response respons... 阅读全帖
c*********e
发帖数: 16335
8
来自主题: Programming版 - 如何快速处理大量网上xml文件?
en,goodbug是对的。看了一下他的代码,不需要用什么future,这样就是accomplish
asynchronous (non-blocking) operation without using a Future if you want to
receive and process the response in your handler。
发信人: goodbug (好虫), 信区: Programming
标 题: Re: 如何快速处理大量网上xml文件?
发信站: BBS 未名空间站 (Tue Aug 25 14:45:04 2015, 美东)
你丫还不服,这才几行的东西,现抄个例子,异步,要写本地文件的话加两行,要
configure各种timeout再加几行。
Connection Pool,keep alive啥的人都已经做好了。我老人家说过多少次,轮子是第
一生产力,你们成天吵语言。有空像我老熟悉一堆轮子,不比你们懂一堆语言有用多了。
import com.ning.http.client.*;
AsyncHttpClient asyncHttpClient ... 阅读全帖
r******l
发帖数: 10760
9
来自主题: Programming版 - 请教一个Java编程问题
Java里面的anonymous class只能使用final的变量。如果我需要使用普通变量,下面两
个做法那个好呢?
1. 定义一个新的final变量
int abc;
public void TestMethod() {
final int finalAbc = abc;
xxx.queueEvent(new Runnable() {
@Override
public void run() {
finalAbc.foo();
finalAbc.bar();
}
});
}
2. 定义一个新的Runnable的子类,这样就可以直接用非final的变量了
int abc;
class myRunnable implements Runnable {
@Override
public void run() {
abc.foo();
abc.bar();
}
}
public void TestMethod() {
final... 阅读全帖
T*******n
发帖数: 493
10
来自主题: TeX版 - Dr.XXX 的点后面要空格吗?
Dr.\ Donald Knuth's middle initial is `E'\@. Really!
By default (La)TeX treats lowercase letter + period as end of
sentence and follows that with a larger space, and it treats
uppercase letter + period as an initial or abbreviation and
does not assume that it is the end of a sentence. So use
`\ ' (\ + space) to override the first case, and \@. to override
the second case.
T*******n
发帖数: 493
11
default in-line math $\sum_{i=0}^\infty x_i$
override in-line math $\displaystyle\sum_{i=0}^\infty x_i$
default display math \begin{equation} \sum_{i=0}^\infty x_i \end{equation}
override display math \begin{equation} \textstyle\sum_{i=0}^\infty x_i \end{
equation}
e****e
发帖数: 19
12
来自主题: Windows版 - Re: 关于防火墙----请教
many
such as
1) protocols (IP,UDP,TCP...) and ports (21,23...)
tcp+21=FTP
2) source/dest. Net/IP addresses
I guess your one rule overrides another. for a simple
example,
rule a)deny IP address 131.122.111.x
rule b)allow ftp all
a) will override b) since the default is deny
N***a
发帖数: 149
13
来自主题: MedicalCareer版 - MEDICAL ETHICS 137 cases
MEDICAL ETHICS 137 cases:
________________________
1. A 25- year old mother refused immunization for her 2-month old son. The
social worker spoke to the mother. (Important for Board examination)
Next step in management: immunization should be given for the benefit of the
child.
2. A 30-year old mother refused surgery for suspected appendicitis for her 6
-year old daughter. The social worker spoke to the mother. (Important for
Board examination)
Next step in management: surgical removal of the ap... 阅读全帖
b*****l
发帖数: 8603
14
2007年的,不知道你们说的是不是这个。祝好。
medical ethics more than hundred cases
Sep 24th, 2007, 12:17pm
1. A 25- year old mother refused immunization for her 2-month old son. The
social worker spoke to the mother. (Important for Board examination)
Next step in management: immunization should be given for the benefit of the
child.
2. A 30-year old mother refused surgery for suspected appendicitis for her 6
-year old daughter. The social worker spoke to the mother. (Important for
Board examination)
Next step in ma... 阅读全帖
D******4
发帖数: 47
15
来自主题: Quant版 - 请教: c++ 重载问题
遇到一个关于terminate() 在 c++里的重载问题,请问各位大虾这个如何是好。。
Which of the following methods can a developer use to override the default
ter
minate() function in C++?
A. Write the terminate() function with two int arguments.
B. Write the terminate() function with a runtime_error
argument.
C. Pass the address of the overriding function to the
set_terminate() functi
on.
D. Write the terminate() function with one int argument.
E. Write the terminate() function with a runtime_... 阅读全帖
S*********g
发帖数: 5298
16
我来给你贴一个正经ninjatrader的code
#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Strategy;
#endregion
// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
///
/// Simple moving average cross over str... 阅读全帖
z***c
发帖数: 32
17
来自主题: Statistics版 - 一个proc format的问题
请问proc format library =library;
value name1
1=
2=
3=
;
value name2
1=
2=
3=
4=
;
run;
如果用了name1的名字和name2一样会出现什么情况,是不是name2 override name1?
但是在一个很正规的数据中间看到这个现象,不知道其中有什么奥妙?如果真的后者
override前面的话,为什么还要有前面的那个format呢?
谢谢!
j****e
发帖数: 158
18
use ods tagsets excel
ods listing close;
ods tagsets.ExcelXP path='output-directory' file='aedata.xml' style=SUGI31;
ods tagsets.ExcelXP options(sheet_name='Data - Trial 1');
* Proc PRINT #1 here w/ style override;
ods tagsets.ExcelXP options(sheet_name='Data - Trial 2');
* Proc PRINT #2 here w/ style override;
ods tagsets.ExcelXP options(sheet_name='Summary - Trial 1');
* Proc TABULATE #1 here;
ods tagsets.ExcelXP options(sheet_name='Summary - Trial 2');
* Proc TABULATE #2 here;
ods tagsets.Exc
w*******y
发帖数: 60932
19
Attachment 493897
a) GunVault MultiVault Deluxe Pistol Gun Safe w/ Motion Detector
GunVault GV2000C-DLX
DELUXE and big enough for multiple handguns. NEW COUPON BELOW
Product ID: 064-GV2000C-DLX
Model: GunVault GV2000C-DLX
Sale: $124.20+ FREE SHIPPING & NO TAX in most states
5% COUPON: 350331
Final Price: $118
Save: $76
Reg: $194.95
Google Products $121+S&H:
http://www.google.com/search?q=Gunvault GV2000C-DLX Multi Vault Deluxe Gun Safe&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&cli... 阅读全帖
w*******y
发帖数: 60932
20
This deal is B&M only and YMMV!!
Details:
Kmart weekly ad has PS Move sports champions bundle for $50 this week
Best buy weekly ad had a free Navigation controller wiith either the Move
sports champions bundle or Tiger woods Bundle.
Steps:
1. If possible, grab a Kmart weekly ad to make the process easier or just
have it up on your smartphone
2. Give cashier Sports champions bundle and ask for PM to Kmart for $50
3. MGR will have to come over to override the price.
4. After price override (and ho... 阅读全帖
w*******y
发帖数: 60932
21
TRU - Buy any Skylanders Spyro's Adventures Starter Pack (360,PS3,WII,PC/MAC
,3DS) for $69.99 ($59.99 if pc/mac) and get a Skylanders Spyro's Adventure
Pack - Kit for FREE (normally $19.99)
ToysRUs has a two day sale that started this morning. I received an email
about it and you can see the sale on their website here:
Link:
http://toysrus.shoplocal.com/ToysRus/default.aspx?action=entryf
If the above link does not work, go to toysrus.com and click on Monster 2
Day Sale, then Click here for Al... 阅读全帖
w*******y
发帖数: 60932
22
This is a YMMV deal. It's not going to be at every store, so don't complain
when it's not at the one by you/you waste your gas/etc.
Staples just put the OmniTech 10-Sheet Micro-Cut Shredder on clearance for $
54.50. I found it at that price at 5 different stores so I think it's
national now. It sells regularly for $149.99. That makes it eligible for the
$50 credit when you trade one in.
I have done this 4 times so far. The only issue I had once was a manager
trying to say it doesn't count for th... 阅读全帖
j**n
发帖数: 13789
23
关于中国部分译文:
(博讯 boxun.com)
1.一个针对全球的电脑攻击行动:
一个中国的线人,在一月份的一份电报中,告诉美国驻北京大使馆,中共政治局指示
入侵Google(谷歌)位于中国的电脑系统.
针对Google(谷歌)的入侵行动,是中国政府组织策划的电脑攻击行动的其中一部分.
中国政府招募的私人保安专家和黑客,负责发动这些攻击.
电报说,自2002年起,中国政府的黑客已经成功入侵美国政府,西方盟国,达赖喇嘛和
美国企业的电脑.

2.一个最终瓦解北韩(朝鲜)的游戏:
美国和韩国官员已经讨论过朝鲜统一的前景,应该发生在北韩(朝鲜)经济困难和政
治转型导致国家内乱.
据美国驻首尔(汉城)人员透露,南韩(韩国)甚至考虑到为中国提供商业利益诱惑.
她在二月份告诉华盛顿(美国),韩国官员认为,适当的商业交易将"有助于解决"让中
国考虑同意与一个统一的韩国相处的问题.而且韩国统一后,中国与美国之间将会形成一
个"良性同盟"关系.

3.它们(电报)展示了美国官员对于中国崛起和俄罗斯民主倒退的应... 阅读全帖
g***g
发帖数: 804
24
来自主题: ChinaNews版 - 我爸刚才跟我骂问题馒头了
英国的帝制就是假的,皇帝的权力不能被议会给override了
f*******a
发帖数: 663
25
转一个凤凰网的分析,看着事实比较多,个人感觉还算靠谱
确实如论坛上一些朋友所分析的,由信号故障+override所诱发,个人也认为这种分析
较为合理
http://www.btsmth.com/show_topic.php?en_name=RailWay&gid=701220
g*********r
发帖数: 9366
26
哪里有没有住处的
“睡大街上” 是猥琐女的夸张讲法
离婚后大不了回父母家住
这种实际生活中见得多了
而且记住,最新解释override 以前说法
s**********e
发帖数: 110
27
来自主题: ChinaNews版 - 被强制失踪将被合法化
http://www.nytimes.com/2011/09/03/world/asia/03china.html?_r=1&
BEIJING — Last Jan. 27, an Inner Mongolian rights activist, Govruud
Huuchinhuu, suddenly vanished after leaving a hospital where she had
undergone treatment for cancer. On Feb. 16, the Beijing human-rights lawyer
Tang Jitian vanished after being forcibly taken away by police officers. On
May 30, an ethnic Uighur, Ershidin Israel, vanished after being deported to
China from Kazakhstan as a terrorism suspect. In the next two weeks, th... 阅读全帖
z****0
发帖数: 3942
28
来自主题: ChinaNews版 - 啊呀,真的上任了,谢谢大家
可以投票override版务?
g*********r
发帖数: 9366
29
中国新闻版 根据本班版规, 组建5人仲裁团
仲裁团作为独立,中立第三方,主要用于监督制衡版务权利,维护各位水友的言论自由

仲裁团将以版规为依据,以公平公开为原则, 在版内上诉和板斧弹劾中起主导作用。
仲裁团有权override 部分版务,具体作用和做法请见我的版规草案。
http://www.mitbbs.com/article_t2/ChinaNews/32442315.html
希望赞同言论自由的理性老ID踊跃报名,服务各路将军。仲裁团成员政治观点不限,但
是必须是支持言论自由的理性资深ID, (资格同站方规定的版主申请资格)
大家可以自荐, 举荐(须被举荐ID同意)。谢谢大家, 鞠躬!
m********y
发帖数: 21909
30
你很合适,你律师出身,很适合当监察官。他的意思就是可以override斑竹,这个你在
行,再说了,就是因为没有过,才新鲜。
W*****2
发帖数: 1043
31
来自主题: ChinaNews版 - 中国是否正在走向法西斯主义?
http://bbs.wenxuecity.com/currentevent/451255.html
美国已经在法西斯国家的边缘了
2012-02-20 12:42:28
http://www.paulcraigroberts.org/2012/02/20/silencing-the-critic
Silencing The Critics
by Paul Craig Roberts, 20 February 2012
In 2010 the FBI invaded the homes of peace activists in several states and
seized personal possessions in what the FBI–the lead orchestrator of fake
“terrorist plots”–called an investigation of “activities concerning the
material support of terrorism.”
Subpoenas were issued to compel ant... 阅读全帖
l********y
发帖数: 2489
32
基因可以override所有习惯。老板的老丈人从不吃除土豆以外的蔬菜,现在91还硬朗。
这个就真是人比人得死,货比货得扔。
H****S
发帖数: 1359
33
这个节目赛制上的设计是导致嘉宾和评委之间矛盾的源头。个人觉得两方打分都很重要
,缺了后者,这就是不是最强大脑,缺了后者,这就不能算是电视节目了。所以两方打
分的结果都应该在最后揭示。这样可以避免科学评委一味根据个人口味去override嘉宾
打分。当然科学评委还是可以祭出1分和10分大招来直接无视嘉宾,但是不觉得任何人
敢于一而再,再而三的这么弄。
w******r
发帖数: 3156
34
法治还是人治不是看法律条文程序完善不完善,而是看大家是不是真的按法律办事情是
不是真的把法律当回事。
秦朝号称法家,法律更明细了吧,到二世手里随意就破坏掉了。
唐律代表中国法律的一个高峰,到武则天手上,废纸一张,还不是酷吏横行。
君主的旨意大过国家的法律,从最高层就在破坏法律,你说这是人治社会还是法治社会
?你看看现今世界符合法治社会定义的国家,有哪个是总统主席可以金口玉言,随便
override法律的?
g****a
发帖数: 1959
35
法律归根到底是政治
政治永远可以override 法律. 这即便在今天的法制米国也同样适用
k***g
发帖数: 7244
36
呵呵,那还不如说物自体是一个 base class,有 immeasurable 的 derived classes
,每个 derived class 有自己的 constructor, methods overriding ,平时观测到的
现象,不过是某个 derived class 的 instance, 所谓的规律不过是这个 derived
class 的 methods,通过观察 objects, 我们能发现一个 class 的 member vars 和
methods,但是这些都是 conditional on 这个 class (譬如宏观世界里的牛顿力学)
,但是我们无法通过观测和实验找到最初的那个 base class.
f**k
发帖数: 15238
37
来自主题: Military版 - 我到有一记炸三峡大坝
任何程序控制的,一般都可以手动override, 实在不行到电机房直接拉闸.
u****n
发帖数: 7521
38
http://www.foreignpolicy.com/articles/2010/08/13/the_georgia_syndrome
Two years after a disastrous war, Tbilisi is booming, but Georgians remain
on edge, for one overriding reason: They're not sure Barack Obama loves them
enough.
。。。。。。
w*****3
发帖数: 568
39
【 以下文字转载自 ChinaNews 讨论区 】
发信人: jnyn (hamster), 信区: ChinaNews
标 题: 纽约时报报道维基解密:中共政治局发动入侵Google电脑的行动.
发信站: BBS 未名空间站 (Sun Nov 28 17:08:28 2010, 美东)
关于中国部分译文:
(博讯 boxun.com)
1.一个针对全球的电脑攻击行动:
一个中国的线人,在一月份的一份电报中,告诉美国驻北京大使馆,中共政治局指示
入侵Google(谷歌)位于中国的电脑系统.
针对Google(谷歌)的入侵行动,是中国政府组织策划的电脑攻击行动的其中一部分.
中国政府招募的私人保安专家和黑客,负责发动这些攻击.
电报说,自2002年起,中国政府的黑客已经成功入侵美国政府,西方盟国,达赖喇嘛和
美国企业的电脑.

2.一个最终瓦解北韩(朝鲜)的游戏:
美国和韩国官员已经讨论过朝鲜统一的前景,应该发生在北韩(朝鲜)经济困难和政
治转型导致国家内乱.
据美国驻首尔(汉城)人员透露,南韩(韩国)甚至考虑到为... 阅读全帖
j****n
发帖数: 7636
40
是太天真。 可是要按法律的话,人大好像应该可以 override 国务院。
c*****t
发帖数: 10738
41
来自主题: Military版 - 公共场所到底可以随便照相么?
交通法规里明确有说警察可以override红绿灯啊。哪条法规说了警察可以说哪里不能照
相哪里可以照?

样。
p*****o
发帖数: 82
42
北非革命浪潮到底会波及多大,多远,目前还只是一个未知数.不过伊斯兰世界的蠢蠢
欲动是何其明显,突尼斯已经基本成功,老大哥埃及也顶不住了,在中东的沙特好像也
有异动的报道。
突尼斯,埃及,沙特这些国家有一个共同点就是经济相对稳定,发展势头也不错,民众
相对富裕,整个社会已经稳定发展了几十年了,但是政治就比较保守,最明显的就是国
家元首基本可以连续执政二十年以上。不过街头革命的意义有多大,成功率如何,对国
家政治进程的帮助有多大,还值得期待。这一波浪潮是否能够轻易化解,穆巴拉克,阿
普杜拉等等估计得废一番心思了。
二十一世纪的第二个十年有多少期待?
懒得翻译!
Cairo, Egypt (CNN) -- Thousands of protesters spilled into the streets of
Egypt on Tuesday, an unprecedented display of anti-government rage inspired
in part by the tumult in the nearby North African nation of Tunisia.... 阅读全帖
x*********g
发帖数: 11508
43
发信人: xiongmao (思而不学则妄,学而不思则怠), 信区: NewExpress
标 题: zz拍马屁拍到菊花上,南都周刊“堵城突围”
发信站: 水木社区 (Sun Feb 13 13:23:55 2011), 站内
《南都周刊》2011年第2期的主题是“堵城突围”,以最近北京的摇号上车牌为切入点
,聚焦中国大城市的堵车问题。忧国忧民之余,南方系的记者们还是发扬了普世精神的
优良传统,不忘狂舔美国干爹一番,祭出号称美国历史上最昂贵的交通整治工程——波
士顿中央干道隧道工程(Central Artery/Tunnel Project,俗称Big Dig),大赞美国
政府如何改善城市交通状况,如此规模庞大的工程又如何在施工过程中没有扰民,等等
等等。
(原文链接《波士顿:不再是“世上最大停车场”》 http://www.nbweekly.com/Print/Article/11812_0.shtml
且不说这篇文章一大半都是对维基词条“big dig”的直接抄袭和生硬翻译(中国写新
闻不用注明来源的习惯真是便宜死这帮东拼西凑信口雌黄的孙子们了)。我只是很好奇
,南都周刊... 阅读全帖
s****i
发帖数: 2993
44
cat I II III refer to the equipments. both airport and aircraft need to
support.
most time they use autopilot although pilot can override.
only a handful of airports and AC supports cat III.
g**y
发帖数: 1342
45
巴马override联合国
d****z
发帖数: 9503
46
http://www.world-nuclear.org/info/inf78.html
Enrichment in Earth's crust
Many analyses have been made of the uranium in the rocks forming the
continental and oceanic crusts, and in samples of the Earth's mantle
exposed as uplifted slices in mountain belts or as 'xenoliths' in
basalts and kimberlites (hosts of diamonds).
We can have some confidence that these measurements are robust for the
crust and upper mantle of the Earth, but less confidence that we know
the abundance of uranium in the lower... 阅读全帖
l*********n
发帖数: 74
47
什么,什么算贪污受贿,不必有一国总理来解释
说到底,中国不是法制社会。政和法不独立。政凌驾于法之上。对于高层,法律是政斗
的工具,法律是为政治力量较强一方服务;对于小民,法律就是个装饰,政府随时可以
override之
h*********n
发帖数: 11319
48
文盲+技术盲又来现眼了
美国的所有自动化装置都有手动override,哪怕最先进的核潜艇上也保留了二战式的阀
门,开关
反而是苏联这种不相信,不重视飞行员主观能动性的,喜欢搞全自动系统。
苏联的核潜艇成员数一贯比美国少
尤里加加林对东方号没有任何控制权
苏联国土防空军的飞行员脱离地面导引站就不知道怎么飞
都是这一思想的体现。
s***d
发帖数: 15421
49
美国也是,政府agent制定规章制度执行法律,如果有异议,议会可以override或者就该法律,但
是一般都不会发生
b*******8
发帖数: 37364
50
来自主题: Military版 - 说下这个动车事故
这样做政治上有问题。比如前车上有恐怖分子,正要遥控放在中南海的炸弹,光祖别无
选择,命令后车撞上去。这种情况下,党的命令应该Override计算机指令。
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)