Java is definitely pass by reference. However, String is immutable, that is
why you can not change its value by reference. If you want to output "
Goodbye", you can use reflection. The code is below.
private void mutate(Object str) {
try {
Field field = String.class.getDeclaredField("value");
field.setAccessible(true);
char[] newValue = "Goodbye".toCharArray();
field.set(str, newValue);
Field field2 = String.class.getDeclaredField("count");
field2.setAccessible(tr... 阅读全帖
我的数据情况如下:
每个ID有多组重复测量的值,但是有的没有测量值
ID field1 field2 filed3
1
1 z
1 x y Null
2 a
2 Null b c
.
.
.
n
n e f
n d Null Null
想通过query得到每个field最后一个非空的数值,即:
ID field1 field2 filed3
1 x y z
2 a b c
...
n d e f
用total,last 得出的只能得到最后一组值:
ID field1 field2 filed3
1 x y Null
2 Null b c
n d Null Null
谢谢大家啦!
select t1.id, t1.f1,t2.f2,t3.f3
from (select id, last(field1) as f1
from table1
where field1 is not null
group by id) t1,
(select id, last(field2) as f2
from table1
where field2 is not null
group by id) t2,
(select id, last(field3) as f3
from table1
where field3 is not null
group by id) t3
where t1.id = t2.id
and t1.id= t3.id
or
select t0.id,
(select last(t1.field1) from table1 t1 where t1.id = t0.id and t1.fie
ld1 is not null) AS field1,
(select last(t2.field2) from table1 t2 wher
一个select query,criteria是field1等于1,field2是group by field3里最大的。
我写了下面的query,可是总告诉我最多只能return一个record,而在我的data set里
符合标准的应该有几百个才对。我用Access2007。请高人指点。
SELECT Table.*
FROM Table
WHERE Field1 = 1
AND Table.Field2 = (SELECT max(Field2) FROM Table GROUP BY Field3)
我写了一个语句:select id from table1 as a inner join table2
as b on a.field1=b.field1 and a.field2 in (1,2) where
b.field2='str'
在sql server中通过了,但我想在access中使用,可能是inner join
出了问题,希望指教,谢谢!
no delete. Here is the pseduo scripts:
package ETL
function load_feed1
return LOAD.IMPORT('A')
end;
function load_feed2
return LOAD.IMPORT('B')
end
end ETL
package LOAD
function IMPORT(externalTable as varchar2) return number
MERGE INTO targetTable x using externalTable y
on x.key = y.key
WHEN MATCHED THEN UPDATE
set field = y.field
WHEN NOT MATCHED THEN INSERT
(field1, field2) values (y.field1, y.field2);
保险起见Access里写两个QUERY吧
QUERY1: SELECT FIELD3, MAX(FIELD2) AS MAXFIELD2 FROM TABLE GROUP BY FIELD3
QUERY2: T.* FROM QUERY1 Q1, TABLE T WHERE FIELD1=1
AND Q1.MAXFIELD2=T1.FIELD2 AND Q1.FIELD3=T.FIELD3
one table as
field1 field2 field3 filed4
1 3 4 5
2 3 2 1
for each row, the formua is
field1!+field2!+field3+field!
N! means N*(N-1)*....*2*1
how to find the formuala for N! in oracle?
right now my query in c# looks like this,
Table1Entry bMfi = MyDB.Table1.Single(x => x.Name == "abc");
Table1 is like this {Name, field1, field2}.
now i break Table1 into 2 tables,
Table0 has {id, Name};
Table1 has {id, field1, field2}.
What's the easiest way to do a query based on Name now ?
我的 Outline of Contributions 就是这一项里小标题,是我自己加在律师写的PL里的
,再充实了一些内容。我觉得这样突出了重点,一目了然。可能跟其他PL里的模板区别
不大。不过如果能真正做到条理清楚、内容简洁、重点突出,基本上就没问题了。
I. Brief summary of credentials (one page)
A. Dr. XXX has contributed original scientific contributions of major
significance in the field (six and a half pages)
A.1 Dr. XXX is the first scientist to DO SOMETHING in FIELD1 with
programmable TECHNIQUE (Based on first-authored paper #1)
A.2 Dr. XXX independently developed the technology to fabricate SOMETHINGs
in FIELD2... 阅读全帖
正打算写contribution这部分,看到模板有不同的写法,想问一下关于几个要点怎么分
配的问题。
我同事的1A RFE刚过不久,所以我本来是想按他RFE contribution部分来写的:
1. My original scientific research work has been published in top
scientific journals and conferences with very high impacts.
2. My original scientific research work has been selected to present orally
in the largest international conference in my field.
3. My original scientific research work has been widely cited in
publications on top scientific journals by experts in my field from leading
re... 阅读全帖
SELECT max(Field2) FROM Table GROUP BY Field3 出来时一个SET的VALUES,你是没
显示FIELDS3, 不是一个确定的数值,所以不行,因为没有FIED3显示,你的INNER QUERY
出来没有意义,这个GROUP BY肯定是要放在外面的,BEIJING好像是对的。但每个FIELD3只能有一个RECORD,还不是你想要的
LOAD DATA
INFILE 'input_File.csv’
INTO TABLE tableName
FIELDS TERMINATED BY ","
(field1,
field2,
field3,
field4)
....
question: 可不可以在字段后面加上一个"select id from..."来自动赋值给某一字段?
not sure what u r talking about.....
but let me try to answer...
basically for the data part, the jsp page would have things like
backendData.field1
backendData.field2
backendData.field3
while the controllers (action class) define where you can the backendData,
for example, SController.execute() would call SBusDelegate.getData()...
what UI framework u use?
不用什么dreamweaver的coldfusion。
首先搞清楚apache的数据结构
一般安装在xxx.../htdocs (如 /usr/local/apache/htdocs )
其实用Javascript, Java or Jsp都好,用php会更方便。
用php编写一个小文件如group_upload.php,它的内容是简单的form.
field1 :选择原文件在哪里
field2 :目标文件要放到哪里
group member premisson:Yes, or No
upload button(按这个就上传):这是关键,写一个function内部拷贝/上传文件
...
把group_upload.php放到/htdocs下或子目录/htdocs/yoursubfolder就行了
最好和mysql一起用,这样可方便排序和检索
say in c i have this
struct MyStruct {
struct MyHeader myHeader;
struct MyPayload myPayload;
};
struct MyHeader{
int id;
char name[MAX];
}
struct MyPayload {
int field1;
short field2;
.... // could be very long
}
what's the best ways in python pls ?
Here is my sas code;
%macro va_111(field1,field2,new_var);
Data c;
merge mydata1 (in=a) mydata2;
by id;
if a;
%if &filed1=2 %then &new_var=0;
%else %if &filed2=" " and &filed1 =. %then &new_var=0;
%else &new_var=1;
run;
%mend;
%va_111(usuage,drugname,status);
Sas log:
WARNING: Apparent symbolic reference FILED1 not resolved.
ERROR: A character operand was found in the %EVAL function or %IF condition
where a numeric operand
is required. The condition was: (&filed1)=2
ERROR: The macr