由买买提看人间百态

topics

全部话题 - 话题: test1
首页 上页 1 2 3 4 (共4页)
s*****w
发帖数: 1527
1
来自主题: Programming版 - Nested batch file doesn't run in windows
i have root.bat, in it i have 2 lines,
test1.bat
test2.bat
when i run root, it only runs the 1st one.
so what's the correct way pls ?
l*********s
发帖数: 5409
2
来自主题: Programming版 - Nested batch file doesn't run in windows
call test1.bat
call test2.bat
t****t
发帖数: 6806
3
来自主题: Programming版 - 请教各位先贤一个Perl 问题
and where did you install Sentence.pm? The error message is pretty clear,
there is no:
C:/Perl/site/lib/Text/Sentence.pm
C:/Perl/lib/Text/Sentence.pm
./Text/Sentence.pm
If you installed in other directories, add them to @INC.

test1
p*****2
发帖数: 21240
4
test1 和 test2 可以用两个db吧 如果本来就可以并行的话
c******o
发帖数: 1277
5
来自主题: Programming版 - Scala的map和flatmap什么区别?
从下面的code 看出。
map能对一个数据(一个List, 一个Option, 一个Future) 进行操作。
applicative (ap) 能对多个数据进行操作。
monad能对对多个数据进行操作的同时,根据数据的内容动态改变操作流程。
基本上functor (map),applicative functor (ap), monad (flatMap)的区别就是这
些。
object test {
def oneVarFunc: Int => Int = {
_ + 1
}
def twoVarFunc: (Int, Int) => Int = {
_ + _
}
def optionap[A,B](a: Option[A])(f: Option[A => B]): Option[B] =
f.flatMap(t1 => a.flatMap(t2 => Some(t1(t2))))
val x1 = Some(1)
val x2 = Some(2)
val x3 = None
//functor
def test... 阅读全帖
g*********e
发帖数: 14401
6
i have an array, each of them is a string of a testname.
then a need to do a sql query "select ... where TESTNAME=testname ... " for
each tests, then collect each query result back and form the eventual
response.
[{test1: test1_query_result},
{test2: test2_query_result},
...
]
that's what i want. can anyone share usable code? Thx.
w****w
发帖数: 521
7
看看bug都改正后的性能怎样。
Test case 1:
static void test1() {
testReserve(0, 3, 7);
testReserve(0, 0, 2);
testReserve(0, 2, 8);
testReserve(0, 0, 3);
testReserve(0, 0, 10);
testReserve(0, 0, 10);
}
Reserving Start=3 Length=7
Succeed number=1 start=0 length=10
Reserving Start=0 Length=2
Succeed number=1 start=0 length=3
Reserving Start=2 Length=8
Succeed number=2 start=0 length=10
Reserving Start=0 Length=3
Succeed number=3 start=0 length=10
Reserving Start=0 Length=10
Succeed number... 阅读全帖
w****w
发帖数: 521
8
来自主题: Programming版 - 出票正确率的定义,赵,姜请进。
下面的case, 你第一第二张分同一座位就错了。
static void test1() {
testReserve(0, 3, 7);
testReserve(0, 0, 2);
testReserve(0, 2, 8);
testReserve(0, 0, 3);
testReserve(0, 0, 10);
testReserve(0, 0, 10);
}
i*f
发帖数: 85
9
【 以下文字转载自 EE 讨论区 】
发信人: iif (iif), 信区: EE
标 题: 求教一个tex中插入eps图片的问题
发信站: BBS 未名空间站 (Fri Aug 26 02:58:57 2005), 转信
我把ps格式的图片用gsview ps to eps转成了eps文件,用gsview打开看的时候一切正常
。但是当我在tex中用下一段代码试图把图贴进去的时候,最后的结果是图片上下颠倒了
,而
且不是放在caption的上面,而是下面。
\begin{figure}
\centering
\includegraphics[width=1\textwidth]{udc1.eps}
\caption{test figure 1.}
\label{fig:test1}
\end{figure}
本人tex新手,请大家帮忙看看,谢谢了!
r*********s
发帖数: 2157
10
来自主题: TeX版 - 请教图片排版问题
I use the following one, you may have a try:
\usepackage{graphicx}
\usepackage{subfigure}
\begin{figure}[htb]
\centering \mbox{ \subfigure[sub title-1]{\includegraphics[scale=.5]{test1.eps
}}\quad
\subfigure[sub title-2]{\includegraphics[scale=.5]{test2.eps}} }
\caption{caption} \label{Fig:CellDropRates}
\end{figure}
just like
xxxxx yyyy
(a)---(b)
Fig2: title
C****0
发帖数: 53
11
最近需要做一个多线程的unit test,但是总是有问题,所以不是很清楚是我的方法有问
题还是gmock不支持多线程。
大体是这样的
1.原来的class是一个QThread的subclass:
class aSubClassOfQthread: public QThread{
...
...
public:
int myFunction();
}
2.然后我用gmock mock一个aSubClassOfQthread
3.测试
TEST(SubClassOfQthread,test1){
aSubClassOfQthread thread1;
EXPECT_CALL(thread1.myFunction()).Times(1); // 期望Call 一次
int check1 = thread1.myfunction(); // 看下返回值
EXPECT_EQ(1, check1); // 看下返回值和预期是否一样
}
问题是 EXPECT_EQ(1, check1) 报错,说返回的是int function的 default value 0.
就算我在my... 阅读全帖
s*******k
发帖数: 7
12
来自主题: Mathematics版 - 一条图形IQ题
问了好些人都不懂,只能试试发到这里希望数学系的大牛看看。
请版主见谅!
打开这个网站:http://www.bergmandata.com
点击蓝体字:Download and try IQ test 1-3 with solutions and Helper.
下载了以后打开test1的29题:请问这题怎么解?
这题看了答案也没看懂,望喜欢解题的朋友指点!谢谢!
z***q
发帖数: 175
13
来自主题: MedicalCareer版 - Done with CK: 260+
CK考试终于尘埃落定。一颗悬了3个星期的心终于可以放下了。写些感受希望能帮助后
来人。
正式复习时间6个月。复习经历:
1.kaplan ck comprehensive video:全看了,推荐ob/gyn和IM
2.usmle consult qbank 71%正确率 (题太偏)
3.kaplan qbank 68%正确率 (题太偏,可以作为后期提高阅读速度)
3.uw qbank 第一遍75%,第二遍90%
4.kaplan notes:看了ob/gyn,ped,surgery,psychology
5.MTB2一遍,MTB3两遍
6.FA只看了ob/gyn
7.uwsim:260 (感觉是最接近真题的模拟)
8.usmle consult sim test:257(有真题的感觉)
9.kaplan sim test1:75% test2:82%(差,不推荐)
10.nbme forms:all online,form 6:260, form 4:257, form 3: 253, form 2
:260
11.cd:92.5%
考试前一天晚上,吸取step1考前彻夜未眠的教训,... 阅读全帖
n********a
发帖数: 53
14
来自主题: Nursing版 - 求建议!
两周之后考试 nclex-rn. 现请教如何判断weakness and strength?
我tried kaplan trainer and got totally different scores on different tests.
For example, in Psycosocial intergrity-coping/adaption, I got only 33 on
test1, but 86 on test2 and 70 on test3, so does this mean this part is my
weakness or not?
只剩两星期了, 开始有点乱了...谁给点建议呗. 谢了!
s*******e
发帖数: 23
15
Test1,不知道是怎样一个形式
google了一下,55以上是通过的底线
有人说是纯粹计算,看正确几个
有人说是选择题,对了+1,错了-2,看得分
另外据说分数不需要完全约分?
j*****4
发帖数: 12
16
【 以下文字转载自 JobHunting 讨论区 】
发信人: job2014 (test1), 信区: JobHunting
标 题: Offer 比较。(bloomberg vs quant)
发信站: BBS 未名空间站 (Tue Apr 29 09:18:43 2014, 美东)
A. Bloomberg, c++ senior programmer, 145K + 35K bonus
B. 一个不出名的risk analytic firm, derivative pricing quant. 150K + 35K
bonus
第二个公司因为知道已经有bloomberg的offer给match的。bloomberg的benefit好点。
所以钱上差不多。
不知道在bloomberg上升空间有多少?有里面的人说说么?
第二个公司听说比较稳定,基本上很少layoff,多年经验的quant大约200K+,就是感觉
没啥名气,找下家的话估计没什么帮助。
h***o
发帖数: 539
17
BBS水木清华站∶精华区
发信人: FangQ (骆驼·飞鸟·驴), 信区: MathTools
标 题: Mathematica函数及使用方法——流程控制
发信站: BBS 水木清华站 (Sat Dec 12 11:42:31 1998)
Mathematica函数及使用方法——流程控制
—————————————————————————————————————
十五、流程控制
分支
If[condition, t, f] 如果condition为True,执行t段,否则f段
If[condition, t, f, u] 同上,即非True又非False,则执行u段
Which[test1,block1,test2,block2..] 执行第一为True的testi对应的blocki
Switch[expr,form1,block1,form2,block2..]
执行第一个expr所匹配的
l*****g
发帖数: 8
18
来自主题: Science版 - [转载] LaTeX里插入图片?
Suggestion:
- Open *.gif/jpg with netscape
- print to ps file
- \includegraphics{test1.ps}
Hope this help.
r****y
发帖数: 1437
19
来自主题: Science版 - Re: MATLAB求教!!!

Because you redefine them as symbolic variables.
Solution

function z=test1(x1, y1)
syms x y z1;
z1=int((2/3*abs(-y*(6-12*x)-y*(-2+6*x))^2,y);
x=x1; y=y1;
z=eval(z1);
y****n
发帖数: 46
20
来自主题: Statistics版 - 请教一个sas编程问题
data test;
do i=1 to 5;
do j=1 to 8;
var1=i;
var2=i*j;
output;
end;
end;
drop i j;
proc sort;
by var1 var2;
run;
data test1;
set test;
by var1 var2;
if last.var1 then output;
run;
w***z
发帖数: 28
21
来自主题: Statistics版 - SQL
sorry.
using index is a good idea, Scimitar's code should work.
proc sql;
select names
from test1
where scan(upcase(names),2,',') like 'N%';
quit;
s******r
发帖数: 1524
22
来自主题: Statistics版 - SQL
In this case, compress would be necessary to handle space.
proc sql;
select names
from test1
where compress(scan(upcase(names),2,',')) like 'N%';
quit;
s********p
发帖数: 637
23
来自主题: Statistics版 - 幼儿园分水果的SAS问题
Just a simple test:
Your code:
data test1;
do i=1 to 50000;
if ranuni(999)>0.9 then fruit=1;
else if ranuni (999) > 0.85 then fruit=2;
else if ranuni(999) > 0.7 then fruit = 3;
else if ranuni(999) > 0.6 then fruit = 4;
else if ranuni(999) > 0.4 then fruit = 5;
else if ranuni(999) > 0.15 then fruit =6;
else fruit = 7;
output;
end;
run;
proc freq; tables fruit/missing; run;
Cumulative Cumulative
fruit Frequency Percent Frequency Percent
d*******8
发帖数: 321
24
先看online tutor,一定要知道各个Function的结果。然后做50和123,肯定能通过。
考题先
1, '_i&', 蒙了个答案。
2, catx, left?
3, weekdate, 要知道结果。
4, tranwrd, length?
5, format saved at where? sas catalog? work ligbrary?
6, data test1;
set test2;
vab1='ABC';
length vab1 $7.
the length of vab1 at test2 is $5.
asking the length of vab1.
这个题挺搞,出现多次,只是顺序不同。
v********5
发帖数: 46
25
6, data test1;
set test2;
vab1='ABC';
length vab1 $7.
the length of vab1 at test2 is $5.
asking the length of vab1.
这个是7 吗?
p********a
发帖数: 5352
26
来自主题: Statistics版 - 请教sas高人(数据读入)
data test;
input v1 $ v2 $ v3 $ v4 $ v5 $;
datalines;
a b c d e
7 3 4 6 9
f g h i j
10 3 23 4 6
run;
data test1(keep=var1 var2);
retain n1 n2 n3 n4 n5 '';
set test;
array nn(5) n1-n5;
array vv(5) v1-v5;
if mod(_N_,2)=1 then do;
n1=v1;n2=v2;n3=v3;n4=v4;n5=v5;
end;
else if mod(_N_,2)=0 then do;
do i=1 to 5;
var1=nn(i);var2=vv(i); output;
end;
end;
run;
proc print;
run;
h******e
发帖数: 1791
27
比如:
a= “test1”,图的标题是a+scatter plot。该如何实现?谢谢。
a********s
发帖数: 188
28
来自主题: Statistics版 - ASK FOR ONE SAS QUESTION
I do not know exactly what PROC can be used in SAS. But why do not you try
to use PROC FREQ for all variables and save the count number (eg. value=1
for test1) to new data sets. Then, calculate the percentage. GL.
y****n
发帖数: 46
29
来自主题: Statistics版 - ASK FOR ONE SAS QUESTION
%macro tt;
data old;
length name $20;
do j=1 to 1000;
name=catx('_','xx',j);
%do i=1 %to 100;
test&i=mod(floor(ranuni(2)*1000),3)+1;
%end;
output;
end;
drop j;
run;
%mend;
%tt;
data new;
array tt(100) test1-test100;
array ct1(100);
array ct2(100);
array ct3(100);
set old end=eof;
do i=1 to 100;
if tt(i)=1 then ct1(i)+1;
if tt(i)=2 then ct2(i)+1;
if tt(i)=3 then ct3(i)+1;
end;
g********d
发帖数: 2022
30
来自主题: Statistics版 - [提问]怎样sort这个dataset?
呵呵,以为又是新手问初级问题,没认真看,抱歉。你很礼貌啊,赞一个。
data Test;
input input $ outcome $ @@;
datalines;
A 0 A 0 A 0
A 1 A 1 A 1
A 2 A 2 A 2
B 0 B 0 B 0
B 1 B 1 B 1
B 2 B 2 B 2
;
run;
proc sort;
by input outcome ;run;
proc print;run;
data test1;
set test;
by input outcome;
retain x 0;
if input="A" and outcome=0 then do;
if first.outcome then x=0;x+1;end;
else if input="A" and outcome=1 then do;
if first.outcome then x=0;x+1;end;
else if input="A" and outcome=2 then do;
if first
l*****k
发帖数: 587
31
来自主题: Statistics版 - sas proc transpose
An issue that must have an elegant and simply solution.
I am trying to use transpose on a dataset, however how do
I specify all the variables?
if the are named col1, col1, etc, it is ok to use: var col1-col99
however what if they have random names, I have been trying to export
the data to excel, copy the header(variable name), then paste it back
to sas like
proc transpose data=original out=out;
var test1 result2 test2 result2........;
run;
is there a way to do this without specifying all
A*******s
发帖数: 3942
32
你的数据如果默认是按id排序的话用这个在sas里就行
data test1(rename=(new_dosage=drug_dosage));
retain new_dosage;
set test;
by id;
if first.id=1 then do;
if drug_dosage="NA" then new_dosage=0;
else new_dosage=input(drug_dosage, 3.1);
end;
else do;
if drug_dosage ne "NA" then new_dosage=input(drug_dosage, 3.1);
end;
drop drug_dosage;
run;
j*****7
发帖数: 4348
33
DIM function.
n2 = dim(test1);
array test2{n2} .......
A*******s
发帖数: 3942
34
郁闷了,有个错误咋都不明白怎么回事。
systask command '"C:\Program Files\SAS\SASFoundation\9.2\sas.exe"
-sysin "C:\threadtest.sas"
-sysparm "for test" -log "C:\logtest.txt"'
taskname=test1 status=teststatus1;
老是提示我Error: invalid file C:\threadtest.sas
为啥invalid呢,想不明白
R*********i
发帖数: 7643
35
来自主题: Statistics版 - 请教用SAS的一个数据处理的问题
data test;
input A 4. B 4. C 4. D 4. ;
datalines;
1
7
3 3
2 5
5
5 3
4 5
5 8
2 3
1
;
run;
data test1;
merge test(keep=a where=(a>.))
test(keep=b where=(b>.))
test(keep=c where=(c>.))
test(keep=d where=(d>.));
run;
However there would be a warning message.
d*******1
发帖数: 854
36
比如
FOR (I=1: 20), 每一个循环都要产生一个DATAFRAME 如 TEST1, TEST2, TEST3......,
也就是说把循环数作为DATAFRAME名字的后缀, 怎么弄呢? 谢了
R*********r
发帖数: 225
37
MySQL没有row_number, 你可以做self join,count下产生index,然后再给index 加条件。
假设有表
test1:
college_id
student_id
gpa
目标:找出每个学校里面的学生的gpa最高的10个学生
SELECT X1.college_id, X1.student_id, COUNT(DISTINCT x2.student_id) Index
FROM (
SELECT college_id, student_id, gpa
) X1 INNER JOIN
SELECT college_id, student_id, gpa
) X2 ON
X1.college_id = X2.college_id AND
X1.gpa <= X2.gpa
GROUP BY
X1.college_id, X1.student_id
HAVING COUNT(DISTINCT x2.student_id) <=10
;
k*******a
发帖数: 772
38
来自主题: Statistics版 - SAS help
这个看你怎么定义合并的方法了, 可以试试下面的看看
data test1;
merge test(keep=var1 where=(var1 ne .))
test(keep=var2 where=(var2 ne .))
test(keep=var3 where=(var3 ne .))
;
run;
P******d
发帖数: 137
39
I am trying to convert 19 digits decimal number into hexdecimal. Here is my
code. However, the last 2-3 digits of converted hex number are 0, which is
not correct.(The right hex number should be 40000104A027F1A6, however the
result given by the code is 40000104A027F000) Can anyone help on this?
Thanks a lot.
DATA test;
INPUT ID $19.;
CARDS;
4611687137805857190
;
run;
data test1;
set test;
length hex $16. hexx1-hexx16 ... 阅读全帖
k*******a
发帖数: 772
40
来自主题: Statistics版 - 请教flag问题
data test;
input var1 $ var2 $;
datalines;
A no
A no
B yes
B no
B missing
C yes
C yes
C no
C missing
;
proc sql;
create table test1 as
select a.*, sum(var2="yes")>0 as flag
from test a
group by var1;
quit;
k*******a
发帖数: 772
41
可以用 SAS 的dictionary来找出data有什么variable
data test;
input var1 $ var2 $;
datalines;
3.4 5
4.55 5.3
4 3.444
;
run;
proc sql noprint;
select strip(name)||"_n=input("||strip(name)||",best12.)" into :convert
separated by ";"
from sashelp.vcolumn
where libname="WORK" and upcase(memname)="TEST";
quit;
data test1;
set test;
&convert;
run;
k*******a
发帖数: 772
42
来自主题: Statistics版 - 一个简单的SAS 问题
不知道是不是这个意思? 我新建了个变量 var_new, 不过可以把 var_new覆盖掉原来
的var 就可以了
data test;
input id var;
datalines;
1 0
1 0
1 1
2 0
2 0
3 1
3 0
;run;
proc sql;
create table test1 as
select a.*,
case when (sum(var=1)>0) then 1 else var end as var_new
from test a
group by id;
quit;

records
w*******n
发帖数: 469
43
来自主题: Statistics版 - 笨蛋又来问题:怎么用SAS算这个
proc sort data=test; by site descending rate descending yield; run;
data test1;
set test; by site descending rate descending yield;
retain max;
if first.site then max=yield;
norm_yield=yield/max;
run;
proc sort; by site rate yield; run;
w*******n
发帖数: 469
44
来自主题: Statistics版 - 请教一个SAS问题
data test1;
set test;
a=max(x1,x2); if a=x1 then a=.;
b=max(x1,x3); if b=x1 then b=.;
c=max(x1,x4); if c=x1 then c=.;
x5=smallest(1, a, b, c);
drop a b c;
run;
t******o
发帖数: 70
45
Worked well. Thanks!
I also found a less efficient solution.
proc sort data = test;
by id yr;
run;
data test1;
set test;
asset_py = lag(asset);
netp_py = lag(netp);
if first.id then do;
asset_py = . ;
netp_py = .;
end;
run;
m**********r
发帖数: 122
46
我有一个数据文件,里边某些cell 包含字符“,”。我用如下的code
test1data<-data.frame(read.table("test1.csv",sep=",",header=FALSE,
stringsAsFactors=FALSE,quote=""),row.names=NULL)
但是读入的数据却从16列变成了18列,这是因为那个包含“,”的cell 被分开了。可
我已经用了quote=""的option.
z**o
发帖数: 149
47
因为test1里面没有k,processing vector处理完一行只是reset xyz,k不变,test2里
面有k,每读一行都要reset
l****0
发帖数: 11
48
来自主题: Statistics版 - 问个SAS 问题
data test;
input id id_sd treatment $1. detail $5.;
cards;
1 1 A
1 2 B 100
2 1 A
2 2 B 101
3 1 A
3 2 B 110
3 3 A
3 4 B 101
;
run;
data TEST1;
index=_n_+1;
set test end=last;
if not last
then set test (keep= detail rename=(detail= nextdetail)) point=
index;
else call missing(nextdetail);

if detail=" " then detail=nextdetail;
drop nextdetail;
run;
Z********6
发帖数: 10
49
来自主题: Statistics版 - 新手问个简单的sas问题
data test;
input day $ x @@;
datalines;
1 0 1 0 1 0
2 0 2 1 2 1 2 0 2 0
3 1 3 0
;
run;
data test1(drop=x);
set test;
by day;
if first.day then y=0;
if x=1 and y=0 then y+1;
else if y>0 then y+1;
if last.day;
run;
a***a
发帖数: 12425
50
来自主题: Animals版 - 请教阴天照鸟的问题
谢谢大家的提示。各位都说是欠曝,看来是欠曝了。有两个一直困惑我的问题加一个软
件问题。
(1)Matering(测光)
我用Matrix矩阵测光,是不是就是ellieo说得全局测光啊?
我在测光这个问题上一向糊里糊涂,所以就一直用这个设置。我相机上有三种设置,虽
然看了看说明,我还是不会用。你们在什么情况下用什么测光呢?
Matrix(矩阵测光)
Center-weighted(中央重点测光)
Spot(点测光)(对焦有啥区别)
(2)AF Area mode(AF区域模式)
我也是糊里糊涂所以就用单点测光。还是那个问题,大家在什么情况下用什么模式呢?
Closest subject(最近主体)
Dynamic area(动态区域)
Single point(单点)
(3)关于ViewNX
我这次的照片有raw文件,ViewNX中的Exposure Comp可以用来加/减曝光吧?所不同的
是,我机器上能到-/+5(每0.3一变),软件中只到-/+2。
===============================================
做一下对比。1_01和2_01是相机直出... 阅读全帖
首页 上页 1 2 3 4 (共4页)