Get DOE Factor Names = Function({table},{Default Local},
lstFactors = {};
dt = Open(table);
For (i=1,i<=NCols(dt),i++,
col = Column(dt,i);
colName = col << Get Name;
changes = col << Get Property("Factor Changes");
If (!IsEmpty(changes),
InsertInto(lstFactors,colName)
);
);
Close(dt,NoSave);
Return(lstFactors);
);
The "insert code" icon seems to do its job. There is also a link to a "jsl syntax highlighter" but I hot lost with that one. @stan_koprowski 맞아. JSL 코드 삽입 단추의 아이콘이 누락되었지만 기능은 계속 작동합니다.
삽입 코드와 삽입 링크 버튼 사이의 간격을 클릭하면 JSL 코드를 붙여 넣을 수있는 대화 상자가 나타납니다. 게시 할 때까지 서식이 지정되지 않은 상태로 표시되지만, 도로시가 오즈에 착륙하는 것처럼 모든 것이 색으로 표시됩니다.
다음은 그 예입니다.
/*
TIMING CHART CREATOR
jay holavarri 10-13-2016
Requires a table with the columns Component, Start, End.
*/
Names Default to Here(1);
dt=current datatable();
maxTime = ColMax(:End);
Summarize(dt, compList = By(:Component));
dt2 = New Table("Timing Chart");
New Column("Component_", Character);
colTime = New Column("Time (ms)");
New Column("Bit Status");
Current Data Table(dt);
catListAll = {};
timeIndexAll = [];
timeIndex0 = Index(0, maxTime, 10);
bitMatrix = [];
//Loop for ON time of each component
For(i=1, i<=N Rows(dt), i++,
timeIndex = Index(:Start[i],:End[i],10);
timeRows = N Cols(timeIndex);
catString = Repeat(:Component[i] || ",", timeRows);
catList = Words(catString, ",");
InsertInto(catListAll, catList);
timeIndexAll = Concat(timeIndexAll, timeIndex);
bitMatrix ||= J(1, timeRows, 1);
);
//Loop for OFF time of each component. Note that it puts a 0 for every available time,
//and the 1's appear in the chart by using the Max function in Graph Builder
For(i=1, i<= N Items(compList), i++,
timeRows0 = N Cols(timeIndex0);
catString0 = Repeat(compList[i] || ",", timeRows0);
catList0 = Words(catString0, ",");
InsertInto(catListAll, catList0);
timeIndexAll = Concat(timeIndexAll, timeIndex0);
bitMatrix ||= J(1, timeRows0, 0);
);
//Write to the datatable
dt2:Component_ << Set Values(catListAll);
colTime << Set Values(timeIndexAll);
dt2:bitStatus << Set Values(bitMatrix);
dt2 << Graph Builder(
Variables( X( :Name( "Time (ms)" ) ), Y( :Bit Status ), Group Y( :Component_ ) ),
Elements( Line( X, Y, Legend( 25 ), Summary Statistic( "Max" ) ) )
);그렇습니다. JSL 구문 형광펜은 현재 휴가 중입니다.
일반적으로 삽입 코드 아이콘과 삽입 링크 아이콘 사이에 나타납니다.
(답장 버튼 사용)
MS-Word를 통해 일반적인 잘라 내기 및 붙여 넣기 방법을 사용하지 않아도되기 때문에 기쁩니다.하지만 여전히 효과가 있으면 좋을 것입니다.
여기에 코드가 "평범한"방법으로 게시되었습니다 (MS-Word로 복사 한 후 여기로 복사). 모든 서식을 잃습니다.
// 이것은 주석이다.
a = 123 ;
...에 대한 ( k = 1 , k <= 99 , k ++,
m = k ^ 2 ;
) ;
이것은 코드 삽입 버튼으로 게시 된 코드입니다. 구문 색 상화를 잃습니다.
// This is a comment
a = 123;
for (k = 1, k <= 99, k++,
m = k^2;
);