我有一个17个平面文件的列表,我试图导入到不同的数据集.所有文件都有相同的数据步骤,所以我正在尝试编写一个do while循环来导入所有文件.
我一直试图从这里调整一些代码而没有成功:http: //www.sas.com/offices/europe/uk/support/sas-hints-tips/tips-enterprise-csv.html
http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a000543785.htm
我收到的错误是说的%do statement is not valid in open code.这是我的代码:
% let path1 = 'c:\path1'
% let path2 = 'c:\path2'
...
% let pathN = 'c:\pathN'
%let n=1;
%do %while (&n <= 17);
%let pathin = &path&n;
data retention&n;
infile &pathin;
<data step-->
run;
%let n=%eval(&n+1);
%end;
Run Code Online (Sandbox Code Playgroud)
我已经在do-while循环之外测试了数据步骤,并且使用%let pathin = &path&n代码一次可以正常处理1个文件.代码仍然为第一个数据集写入数据文件; 但是,我需要能够遍历所有文件,无法弄清楚如何.对不起,如果这是一个新手问题; 我只是在学习SAS.
谢谢,-Alex
这是一个非常基本的OO问题,但我很好奇我是否已经过火了.
让我们假设以下层次结构,这是我通常会创建的示例:
IVehicle
- IFlyable
- IPlane
- Plane
- IHelicopter
- Helicopter
- IDrivable
- ICar
- Car
- ITruck
- Truck
Run Code Online (Sandbox Code Playgroud)
是接口IPlane,IHelicopter,ICar,和ITruck必要,否则应的类直接实现IFlyable和IDriveable?我正在寻找"最佳oo做法"的答案.
我需要使用游标在delphi中绘制一条线,我已经创建了行代码,但我接下来无法做什么?怎么办,我按下鼠标,当线需要启动并拖动我的鼠标或简单我释放鼠标按钮,我画线.
procedure TForm1.Button1Click(Sender: TObject);
var
x0, y0, x1, y1: Integer;
begin
x0 := StrToInt(Edit1.Text);
y0 := StrToInt(Edit2.Text);
x1 := StrToInt(Edit3.Text);
y1 := StrToInt(Edit4.Text);
Brezenhems(x0 , Y0 , X1 , Y1);
end;
Run Code Online (Sandbox Code Playgroud)
我希望有人帮助我谢谢
当我的一个函数被称为"switchTurn"时,我正在尝试更改图像的来源但是,它不起作用并且firebug一直在说它是因为:
TypeError: document.getElementById("turns") is null
document.getElementById('turns').src = x;
Run Code Online (Sandbox Code Playgroud)
我不明白,除了带有"转弯"ID的图像之外,我能够更改所有图像的来源.任何人都可以帮我解决这个问题吗?
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<head>
<link rel="stylesheet" type="text/css" href="default.css" />
<script language="Javascript" src="default.js" ></script>
</head>
<body onload="DisplayPlayed()" onmousedown="return false">
<div id="wrapper" onmousedown="return false">
<div id="Bcards" onmousedown="return false">
<img src="turnedcard.png" id="Bcard01"/>
<img src="turnedcard.png" id="Bcard02"/>
<img src="turnedcard.png" id="Bcard03"/>
<img src="turnedcard.png" id="Bcard04"/>
<img src="invisiblecard.png" id="Bcard05"/>
<img src="invisiblecard.png" id="Bcard06"/>
<img src="invisiblecard.png" id="Bcard07"/>
</div>
<div id="Pcards">
<img src="turnedcard.png" id="Pcard01"/>
<img src="turnedcard.png" id="Pcard02"/>
<img src="turnedcard.png" id="Pcard03"/>
<img src="turnedcard.png" …Run Code Online (Sandbox Code Playgroud) 假设我有下一个建筑
<table id="mainTable">
<tr>
<td>
<div class="parentDiv">
<input class="childInput"/>
<table>
<tbody>
<tr>
<td>
<span>I am here!</span>
<td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
我如何从中获取input元素span?使用jQuery或standart方法.
mainTable有很多行所以我不能用于id输入.
我可以这样做:
$($(spanElement).parents(".parentDiv")[0]).children(".childInput")[0]
Run Code Online (Sandbox Code Playgroud)
你知道一种更简单的方法吗?