You can not make the ArrayList null in this example. While if you want to
just clear the ArrayList, this works:
public static void makeEmpty(java.util.ArrayList s) {
s.clear();
}
BTW: makenull is not a good name, make it makeNull, using the java
convention.
This might be a very typical falut:
"The AXIS engine could not find a target service to invoke!
targetService is null."
The service is deployed to the web server and I actually
can see it from the list with wsdl showed correctly.
I don't expect the problem to be identified immediately. One
simpler question is:
where is the "targetService" defined?
Thanks in advance.
An empty list is always better than null, always invoke the method and let
the object handle the behavior is always the correct way to do. You can
create a NullList class implementing List interface and assign several
default behaviors to it.
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呢
I have a the following data structure:
std::vector::iterator> X (x_sz);
Question: what is the initial value for X[0]..X[x_sz-1]? Do we have a "NULL"
iterator here?
"NULL"
no. if u use it without setting a valid value it would be undefined
behavior. if u need an initial state u can use pointer to iterator, which
is more convoluted though.
So it seems I have to take the following weird detour?
std::list dummy_queue;
std::list::iterator dummy_it (dummy_queue.end());
X.resize(x_sz, dummy_it);
What if dummy_queue is changed later? That means the value in X is stale and potentially dangerous?
Any better solution? We don't have such headache if we just use self-defined doubly linked list and the initial value NULL for X elements. I expect a stl based solution can achieve similar behaviour.
and potentially dangerous?
defined doubly linked list and the initial value NULL for X elements. I
expect a stl based solution can achieve similar behaviour.
first question is why u have to use X, not the list directly? do u want
random access dummy_queue? u can add a X::iterator member to dummy queue
elements; when u delete from dummy_queue, u need to delete the element in
X first through X::iterator( note delete in vector is not very efficient
). but it's convoluted, why do u have to use X?
JS这块:
function uploadlist() {
var selectstar=document.getElementById("selectstar");
if (!selectstar) {
wordlist.value="is null";
return;
}
。。。
为什么老是跳到 if 里面去呢??(也就是说,得不到sel... 阅读全帖
【 以下文字转载自 Programming 讨论区,原文如下 】
发信人: oldbare (oldbare), 信区: Programming
标 题: how to find IP of current server of UNIX by C language(NULL)
发信站: The unknown SPACE (Tue Dec 5 00:32:44 2000) WWW-POST
thanks a lot.
I am using proc sql to count distinct value. However it sounds proc sql
count null value as well. Anybody has the idea how to handle it or it is
only a bug of SAS?
Thanks,
Can anybody help me?
If I turn off the "Firth" then the two null model fit statistics are the
same (-2LOG L). But my data has quasi-complete problem and "Firth" should
give me more reliable results.
Thanks!
I have a table like this:
color size fruit
red big apple
red small apple
green big apple
yellow small orange
red small orange
when I do:
select color, size, count(*) group by color, size;
I got:
red big 1
red small 2
green big 1
yellow small 1
but what I need is to also return the NULL group count such as:
red big 1
red small 2
green big 1
green small 0
yellow small 0
yellow small 1
how I can do the query in mysql?
thank you all.
of course you can switch your null hypothesis with alternative, but won't
make any difference in the testing result.
For example if you test \mu<5 vs. \mu>5, and your test statistic is 2, then
the p value is the right hand side of the standard normal distribution which
is <0.05.
Then you switch you hypothesis to \mu>5 vs \mu<5, then your test statistic
is still 2, but your p value is the left hand side of the normal
distribution which is >0.05.
so no matter what hypothesis you choose, you won't ... 阅读全帖
小东西,
thanks a lot for your example. It seems confirming my own example is a
reasonable one anyway :-)
If at least in some cases, one can flip null / alternative hypothesis, then
type I and type II errors would flip too correspondingly. That was actually
what I really wanted to get confirmation..
when building a scorecard for credit/risk, I am puzzled on how to deal with
the null value. three choices:
1. set as a constant such as: 0
2. set as average
thanks!
I do not think there is a general answer for your question. Otherwise it is
not a question anymore.
you had better to do some research over null value to see whether they are
random distributed or some pattern.