由买买提看人间百态

topics

全部话题 - 话题: null
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
f***g
发帖数: 10
1
来自主题: Database版 - in DBMS, is NULL=NULL valid?

A value of NULL indicates the value is unknown. A value of NULL is different
from an empty or zero value. No two null values are equal. Comparisons between
two null values, or between a NULL and any other value, return unknown because
the value of each NULL is unknown.
Null values usually indicate data that is unknown, not applicable, or to be
added at a later time. For example, a customer's middle initial may not be
known at the time the customer places an order.
s**********i
发帖数: 711
2
来自主题: Database版 - in DBMS, is NULL=NULL valid?

NULL is NULL. null is not unkown. if you know a value
is null, it's not any other value, it's just null.
basically null means no set value.
a***y
发帖数: 2803
3
来自主题: Database版 - 请问:IS NULL和 = NULL的区别
SET VOLUMN1 = NULL 是赋值;
is null是相当于 == null,但是sql里面不允许用 == null.所以只能用英语写出来,is
null,is not null.
g****w
发帖数: 523
4
来自主题: JobHunting版 - 请教输入可能为null的处理方法
初学者请教一个入门级问题。面试的时候如果有个输入为数组,我们需要判断这个数组
是不是null。我一般问面试官需不需要处理null的情况?如果需要处理,是立马return
null还是抛异常。
我之前碰到的面试官都说直接返回null就行(如果输出也是数组)。那天碰到一个面试
官反问我觉得应该怎样?我想了想,因为觉得返回null相当于把错误往后传了,就说应
该抛异常。然后他就让我写,我当时就傻了,因为平时没写过抛异常,我就写了个
throw new Exception()。面试官估计当场无语,他先帮我改成throw new
NullPointerException()。然后问我,这是checked还是unchecked。我答不上来,就让
我跳过这个问题了。
所以我想请教面试的时候,对于可能输入为null的情况,正确处理是什么?如果想抛异
常,应该怎么写?是不是不用写多余语句,系统自己会抛异常?
on
发帖数: 199
5
来自主题: Statistics版 - Null Hypothesis
Now I got more confused, since it seems some conflicting answers above :-)
Foxman, I guess your point is that data in my example is a classification
problem, since a ball is either from A or B; OK, let's forget about that one
.
In practice, we often have a typical null hypothesis; for example, to test a
treatment is effective, the null is not effective; to test if a person is
ill based on a blood test, the null is that the person is healthy, etc.
My question is: From a pure statistical theory po... 阅读全帖
s****7
发帖数: 2507
6
来自主题: Statistics版 - p-value 和 null hypothesis
现在在做单位的minitab training.这个null hypothesis 弄不明白。
null hypothesis 是说sample mean = popullation mean.
The p-value is the probability of obtaining at least as extreme results
given that the null hypothesis is true whereas the significance or alpha (α
) level is the probability of rejecting the null hypothesis given that it is
true.
问题: obtain at least as extreme results 是什么意思?
In any experiment or observation that involves drawing a sample from a
population, there is always the possibility that an ob... 阅读全帖
x****g
发帖数: 39
7
来自主题: JobHunting版 - BST 里面的 null 是啥意思?
leetcode easy BST LCA problem:
的 test case 里面的 BST 有 node 是 null,
[5,3,6,2,4,null,null,1], node with value 1, node with value 4
Output:
null
Expected:
3
[5, 3, 6, 2, 4] 是如下的 BST 吧? null 插入到哪里呢?
5
3 6
2 4
y****i
发帖数: 5690
8
来自主题: Database版 - Null in C and Null in Oracle
What's the difference?
I know that Null is Oracle means no set value and it's not comparable.
Null==Null in Oracle doesn't make sense.
While how different is it compared to Null in C?
n********6
发帖数: 1511
9
来自主题: Database版 - 请问:IS NULL和 = NULL的区别
以下例子中为什么一个用is null,另一个用 =null?
SELECT * FROM TABLE
WHERE VOLUMN1 IS NULL
VS.
UPDATE TABLE
SET VOLUMN1 = NULL
版本:SQL SERVER 2005
d**e
发帖数: 6098
10
In oracle, say select max,
col1 col2 col3
--------------------
a b 1
a b 2
c d 4
c d
-------------------
group by col1, col2, i want something like a/b will return 2, c/d return
null, since c/d has a null value.
"select col1, col2, max(col3) from table group by col1, col2" doesn't work.
Is ia any way to make the max function return null if there is a null value
in the column?
Thanks!
b********g
发帖数: 404
11
来自主题: Programming版 - 弱问c++里有没有NULL这个keyword?
sorry,我说的MS包装就是MS对windows开发时定义好的意思,
null确实不是关键字,也是被提前定义好的
/* define NULL pointer value */
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
X****r
发帖数: 3557
12
来自主题: Programming版 - printf("%s\n", NULL)的结果
唉,敢情我白讲了啊。
在printf里用%s来打印NULL是错误的,会导致未定义的结果,无论是
printf("%s", NULL);还是printf("%s\n", NULL);
注意未定义的结果包括“正确”的结果,但这是没有保证的,回头gcc一升级说不定
printf("%s", NULL);也seg fault了。琢磨这个基本上没有任何用处,你只
需要知道不用%s来打印NULL就行了。
x******a
发帖数: 6336
13
A'= the transpose of A?
the null spaces should be the same?
Ax=0 => A'Ax=0 => Null(A)\subset Null (A'A)
A'Ay=0 => y'A'Ay=0, i.e, (Ay, Ay)=0 => Ay=0
=> Null(A'A)\subset Null(A).
on
发帖数: 199
14
来自主题: Statistics版 - Null Hypothesis
Type I / II errors depend on what is the null hypothesis... Let me use an
example. Suppose two manufacturers A and B produce similar ping-pong balls.
On average, balls by A have a higher average weight than by B. Now we have
100 balls, and we want test if these balls are from A or B (the truth is one
of them, say).
In this case, we can test Null Hypothesis the balls produced by A; or a Null
Hypothesis is Ball produced by B.
My question is: it seems we can flip a Null Hypothesis depending on what... 阅读全帖
d****o
发帖数: 1055
15
是不是有错?永远返回true。
因为 else if(fast==slow||fast->next==slow)
这里在最开始的时候fast永远等于slow?
我写了一个看看有问题吗?
bool isCycle(node *head)
{
if(!head) return false;
node *p1 = head;
node *p2 = head;
while(p1!=NULL && p2!=NULL)
{
p2 = p2->next;
if(p2==NULL) return false;
if(p2==p1) return true;
p2 = p2->next;
if(p2==NULL) return false;
if(p2==p1) return true;
p1=p1->next;
if(p1==p2) return true;
}
return false;
}
h*********o
发帖数: 230
16
直接print是可以的,如果我想返回节点的话,总是空的,为什么 啊?
大虾们 帮忙解释一下啊
public static TreeNode deepestTreeNode(TreeNode root){
if(root==null)
return null;
int height=treeHeight(root);
TreeNode res=null;
deepestTreeNode(root,height-1,0, res);
return res;

}

public static void deepestTreeNode(TreeNode root, int h,int start,
TreeNode node){
if(root==null)
return;
if(start==h){
node=root;
// System.out.p... 阅读全帖
f***g
发帖数: 10
17
should define a deault not null value, example:
create table #tmp (aaa int not null primary key)
insert into #tmp values(1)
insert into #tmp values(2)
alter table #tmp
add bbb int default 0 not null
the statement
"alter table #tmp
add ccc int not null"
will fail
s*******y
发帖数: 558
18
下面这个例子里面 makenull函数传入一个ArrayList的instance, 在函数里把它
设为null, 但是函数返回后, main函数里的这个instance并不为null.
这是为什么阿?
public class test {
public static void makenull(java.util.ArrayList s){
s = null;
}
public static void main(String[] args) {
java.util.ArrayList s = new java.util.ArrayList();
test.makenull(s);
// after test.makenull function, s is NOT null
}
}
b******n
发帖数: 592
19
来自主题: Programming版 - stl iterator has "NULL" like const?
My suggestion is not to do this, but I think you can use use
your own null:
vector null;
vector::iterator nullIt = null.begin();
since nullIt is pointing to this special vector, it can be used as your
special
value for null for other vectors.
I would use hash to keep my data and use list to keep iterators if I have to
. To me, hash memory layout is more stable (not if it grows).

the
c****e
发帖数: 7
20
Null matrix in MATLAB contains all zeros, but it's not the same with the
empty matrix[], e.g. a=[]. You can use null matrix in this way: 0A=A0=0, 0
is the null matrix and A is any matrix. You can say the null matrix has a
property of commutative just like the identity matrix of I.
s******r
发帖数: 1524
21
来自主题: Statistics版 - Help! proc sql;cout not null value.
So I wonder it is a bug of my SAS. It did count null value as well. I set
the value to '00'X. Maybe it is not a good way to assign null value?
Actually I run following code first
count(distinct case when A in ('01',,'02') then B else null end) as ...
However SAS took null as a variable instead value. So I used following code
instead
count(distinct case when A in ('01',,'02') then B else '00'x end)
The code works on oralce database but not on SAS. :(
x**********0
发帖数: 163
22
来自主题: Statistics版 - Null Hypothesis
I have seen a similar one in a textbook.
There are two identically appearing bowls of jelly beans. Bowl 1 contains 60
red and 40 black jelly beans, and bowl 2 contains 40 red and 60 black jelly
beans. Therefore, the proportion of red jelly beans, p, for the two bowls
are
Bowl 1: p = 0.6
Bowl 2: p = 0.4.
One of the bowls is sitting on the table, but you do not know which one it
is.
You suspect that it is bowl 2, but you are not sure.
To test your hypothesis that bowl 2 is on the table, you sample... 阅读全帖
w*******t
发帖数: 62
23
来自主题: JobHunting版 - 问个Print null的问题
为什么 1 和 2 的结果不同?
1. printf("%s\n", NULL);
结果: Segmentation fault (core dumped)
2. printf("add string %s\n", NULL);
结果: add string (null)
b******d
发帖数: 115
24
This is part of my trigger code:
.....
select @a = FLD_A,
@b = FLD_B,
@c = FLD_C
from inserted
insert into TBL_A
values('A', @a+','+@b+','+@c)
.....
Now the problem is FLD_B may not be populated and thus has a
NULL value in the table. the '+' operator returns NULL if a
NULL string is part of the concatenation. The only way to
get around is to add
if ISNULL(@b)
@b=' '
before the insert.
Is there any better way of doing it? There will be dozens of
fields like FLD_B, and I real
h****e
发帖数: 204
25
来自主题: Database版 - in DBMS, is NULL=NULL valid?
nop, NULL is NULL, which means uncomparable "value", if this makes some
sense to you.
l********h
发帖数: 16
26
来自主题: Database版 - in DBMS, is NULL=NULL valid?
What did you try to do?
Why did you want to compare NULL to NULL?
Could you provide your SQL statement?
h*****n
发帖数: 439
27
来自主题: Database版 - in DBMS, is NULL=NULL valid?
well, maybe this is useful for dating service, bf/gf search engine. :P
select a.ID, a.FirstName, a.LastName, b.ID, b.FirstName, b.LastName
from Male a, Female b
where ( a.GirlFriendID IS NULL and a.IsGay = FALSE and
b.BoyFriendID IS NULL and b.IsLesbian = FALSE)
t****r
发帖数: 66
28
来自主题: Database版 - Null in C and Null in Oracle

that is null, not NULL
c*******e
发帖数: 8624
29
来自主题: Database版 - 请问:IS NULL和 = NULL的区别
set你不用=用什么?
is null是个判定,null本身不是一个值
B*****g
发帖数: 34098
30
CASE SUM(CASE WHEN col3 IS NULL THEN 1 ELSE 0 END) WHEN 0 THEN COUNT(*) ELSE
NULL END

.
value
k**g
发帖数: 1558
31
来自主题: Database版 - 有包子!sql 怎么不rank Null
试过下面的,不行。第一个非Null的数据Ntile就是6,我一共有10000+数据
select *,
(CASE WHEN PB IS NOT NULL THEN NTILE(100) OVER(ORDER BY PB ASC) ELSE NULL
END) AS Rnk_PB6
into #temp6
from #temp5
k**g
发帖数: 1558
32
来自主题: Database版 - 有包子!sql 怎么不rank Null
现在出现的问题是Null 有rank,而且rank不一样,见如下:
value rank
null 1
null 2
3 3
4 4
s**********o
发帖数: 14359
33
TEST NULL只有 IS NULL 或者IS NOT NULL
其他的就当不存在
l**t
发帖数: 452
34
【 以下文字转载自 Programming 讨论区,原文如下 】
发信人: leot (leot), 信区: Programming
标 题: 请问excel的null是什么符号?
发信站: The unknown SPACE (Sat Jun 28 01:32:11 2003) WWW-POST
我要从一个MS Excel文件读数据。但是如何判断一个cell中的内容是不是null呢?
好像当这个cell的数据的format为data的时候,null表示该cell为空。
然而当该cell 的格式为其他的时候,如general,text,number...我的java程序就不认为
该cell为空。那这个时候,如何判断此cell 是否为空呢?
谢谢
t****t
发帖数: 6806
35
来自主题: Programming版 - 弱问c++里有没有NULL这个keyword?
你从哪里听说的这个说法
null或者NULL从来都不是keyword
NULL是C/C++头文件里定义的常量, 也不是MS包装的
b*******g
发帖数: 513
36
来自主题: Programming版 - matlab里边的 null matrix怎么个用法。
有时候看到有些matlab codes里有null matrix,譬如a=[],然后就直接用a来作运算。
感觉有点迷惑。null matrix到底是什么样的matrix在matlab里?是一个随机的矩阵?
然后这个随机矩阵的value都是随机的?那用null matrix进行iteration,和给a赋一个
初值再进行iteration结果一样吗?不懂,望指点。多谢。
l******d
发帖数: 530
37
来自主题: Programming版 - printf("%s\n", NULL)的结果
#include
int main(){
printf("Hello %s\n", NULL);
fflush(stdout);
printf("%s\n", NULL);
fflush(stdout);
return 0;
}
在linux上用gcc编译运行结果为
Hello (null)
Segmentation fault
什么原理?
l******d
发帖数: 530
38
来自主题: Programming版 - printf("%s\n", NULL)的结果
刚发现格式串里面的\n是关键
printf("%s", NULL)执行没出错,输出(null)
print("%s\n", NULL)执行错了,Seg. fault
搞不懂了

t
l******d
发帖数: 530
39
来自主题: Programming版 - printf("%s\n", NULL)的结果
那为什么
printf("%s", NULL); //not fault
printf("%s\n%s\n", NULL, NULL); //not fault
又可以呢?这个我看着原帖楞是想不明白,直到Xentar解释了:printf("%s\n", str)
被优化成puts(str),而printf("%s", str)不被优化。
l**t
发帖数: 452
40
【 以下文字转载自 Programming 讨论区,原文如下 】
发信人: leot (leot), 信区: Programming
标 题: 请问excel的null是什么符号?
发信站: The unknown SPACE (Sat Jun 28 01:32:11 2003) WWW-POST
我要从一个MS Excel文件读数据。但是如何判断一个cell中的内容是不是null呢?
好像当这个cell的数据的format为data的时候,null表示该cell为空。
然而当该cell 的格式为其他的时候,如general,text,number...我的java程序就不认为
该cell为空。那这个时候,如何判断此cell 是否为空呢?
谢谢
l**t
发帖数: 452
41
【 以下文字转载自 Programming 讨论区,原文如下 】
发信人: leot (leot), 信区: Programming
标 题: 请问excel的null是什么符号?
发信站: The unknown SPACE (Sat Jun 28 01:32:11 2003) WWW-POST
我要从一个MS Excel文件读数据。但是如何判断一个cell中的内容是不是null呢?
好像当这个cell的数据的format为data的时候,null表示该cell为空。
然而当该cell 的格式为其他的时候,如general,text,number...我的java程序就不认为
该cell为空。那这个时候,如何判断此cell 是否为空呢?
谢谢
b*******g
发帖数: 513
42
有时候看到有些matlab codes里有null matrix,譬如a=[],然后就直接用a来作运算。
感觉有点迷惑。null matrix到底是什么样的matrix在matlab里?是一个随机的矩阵?
然后这个随机矩阵的value都是随机的?那用null matrix进行iteration,和给a赋一个
初值再进行iteration结果一样吗?不懂,望指点。多谢。
b*******g
发帖数: 513
43
来自主题: Mathematics版 - matlab里边的 null matrix怎么个用法。
有时候看到有些matlab codes里有null matrix,譬如a=[],然后就直接用a来作运算。
感觉有点迷惑。null matrix到底是什么样的matrix在matlab里?是一个随机的矩阵?
然后这个随机矩阵的value都是随机的?那用null matrix进行iteration,和给a赋一个
初值再进行iteration结果一样吗?不懂,望指点。多谢。
b*******g
发帖数: 513
44
来自主题: Statistics版 - matlab里边的 null matrix怎么个用法。
有时候看到有些matlab codes里有null matrix,譬如a=[],然后就直接用a来作运算。
感觉有点迷惑。null matrix到底是什么样的matrix在matlab里?是一个随机的矩阵?
然后这个随机矩阵的value都是随机的?那用null matrix进行iteration,和给a赋一个
初值再进行iteration结果一样吗?不懂,望指点。多谢。
on
发帖数: 199
45
来自主题: Statistics版 - Null Hypothesis
Let me simplify it further, and put some numbers:
Average weight of balls from A is 1. From B is 1.1 Their STDs are 0.1
Now we got a ball. Its weight is 1.05. We try to test if this ball is brand
A or B.
It seems me that we can test either of the following:
1) Null Hypothesis: the ball is from A.
or 2) Null Hypothesis: the ball is from B.
My question is: from a statistical view, there is nothing which would
dictate 1) or 2) should be Null Hypothesis. Either would be fine and can be
chosen depend... 阅读全帖
d**e
发帖数: 6098
46
因为一开始res=null,没有任何地址可言
你可以将它放到另一个class里
class TreeNodeWithHeight {
private int height;
private TreeNode node;
public TreeNodeWithHeight() {
height = 0;
node = null;
}
public TreeNodeHeight(int height, TreeNode node) {
this.height = height;
this.node;
}
public void setHeight(int height) {...}
public void setNode(TreeNode node) {...}
public int getHeight() {...}
public int getNode() {...}
}
-----------
TreeNodeWithHeight res = TreeNodeWithHei... 阅读全帖
n*****g
发帖数: 178
47
请问leetcode上这个表达是什么意思:
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
不懂这一行:
ListNode(int x) : val(x), next(NULL) {}
求指教!谢谢!
x****g
发帖数: 39
48
来自主题: JobHunting版 - BST 里面的 null 是啥意思?
为嘛一定是6?null > 5 不成立的
另外 2,4 的左右子树默认也是 null 吧,却没列出来
s********i
发帖数: 1629
49
来自主题: PennySaver版 - P来的MACY卡写着NULL,什么情况?
sneakpeeq来的25刀macy卡,打印出来,大大的NULL。
balance查过了,是25没错。这个NULL是什么情况?会不会到时候不给我用啊?
有TX买过吗?
z********e
发帖数: 8818
50
来自主题: Zhejiang版 - 求教:为啥总是null? (转载)
【 以下文字转载自 Programming 讨论区 】
发信人: zhuifengke (追风客), 信区: Programming
标 题: 求教:为啥总是null?
发信站: BBS 未名空间站 (Sat Mar 29 17:48:44 2014, 美东)
JavaScript菜鸟尝试写JS,程序请看:
http://js.do/hoccpan/35648
HTML这块:

JS这块:
function uploadlist() {
var selectstar=doc... 阅读全帖
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)