proc

Storing a proc inside an array inside a hash

拟墨画扇 提交于 2021-01-29 18:19:39
问题 I am still working on my text adventure. I am having trouble with the use/with function. It is meant to call a Hash in which the key is the used object and the content includes an array; the first element in the array is the target object, and the second a Proc that will be executed if that relation turns to match the arguments for the use/with function. Please, may you clarify me how I can store a code block inside an array inside a hash so I can recall it later depending on the objects that

sas proc export errors

主宰稳场 提交于 2021-01-27 17:04:32
问题 I am trying to to use the proc export in SAS, and keep getting the same error: ERROR: Export unsuccessful. See SAS Log for details. NOTE: The SAS System stopped processing this step because of errors. Error creating XLSX file -> It is either not an Excel spreadsheet or it is damaged. Error code=8000101D Requested Output File is Invalid sadly, I can't understand the meaning of the error PROC EXPORT DATA=work.PANEL_SOFI OUTFILE= "c:\\user\eyal\work.new_panel.xlsx" DBMS=xlsx REPLACE ; SHEET=

Calling proc within a tcl thread

血红的双手。 提交于 2020-05-28 07:55:40
问题 When I try to call a proc within a tcl thread, I get an error stating invalid command name. Following is my tcl code. Pls help in identifying why the proc is not recognized within the thread. Thanks. package require Thread proc CPUload { Start Stop } { for {set i $Start} {$i <= $Stop} {incr i} { set j [expr {sqrt($i)*sqrt($i)}] set k [expr {$i % 123}] } } set id1 [thread::create] catch {thread::send $id1 "CPUload 1 50000000"} ret puts $ret puts $errorInfo while {[llength [thread::names]] > 1}

Calling proc within a tcl thread

做~自己de王妃 提交于 2020-05-28 07:55:20
问题 When I try to call a proc within a tcl thread, I get an error stating invalid command name. Following is my tcl code. Pls help in identifying why the proc is not recognized within the thread. Thanks. package require Thread proc CPUload { Start Stop } { for {set i $Start} {$i <= $Stop} {incr i} { set j [expr {sqrt($i)*sqrt($i)}] set k [expr {$i % 123}] } } set id1 [thread::create] catch {thread::send $id1 "CPUload 1 50000000"} ret puts $ret puts $errorInfo while {[llength [thread::names]] > 1}

Calling proc within a tcl thread

99封情书 提交于 2020-05-28 07:54:20
问题 When I try to call a proc within a tcl thread, I get an error stating invalid command name. Following is my tcl code. Pls help in identifying why the proc is not recognized within the thread. Thanks. package require Thread proc CPUload { Start Stop } { for {set i $Start} {$i <= $Stop} {incr i} { set j [expr {sqrt($i)*sqrt($i)}] set k [expr {$i % 123}] } } set id1 [thread::create] catch {thread::send $id1 "CPUload 1 50000000"} ret puts $ret puts $errorInfo while {[llength [thread::names]] > 1}

alternative for sscanf string with spaces in c?

瘦欲@ 提交于 2020-04-17 19:10:12
问题 I am trying to retrieve information from /proc/cpuinfo file. I have retrieved number of cpu core using sscanf. Now I am trying to retrieve model name similarly but I sscanf is not working this time because model name is a string including spaces. Is there any alternative to retrieve it? char *get_cpu_model() { int fp; int r; char* match; char *cpu_model; /* Read the entire contents of /proc/cpuinfo into the buffer. */ fp = open("/proc/cpuinfo",O_RDONLY); if (fp == -1) { printf("Error! Could

SAS学习笔记6

本秂侑毒 提交于 2020-03-07 21:38:51
SAS过程步(proc step)是SAS系统的另一个核心步,对数据步(DATA STEP)生成的数据集进行分析和处理,挖掘数据信息。 SAS过程步用来对生成的数据集进行处理和分析,是SAS内部已经编译好的过程,用户可根据业务需求,直接调用SAS内部过程并对所调用过程选项设置进行分析处理、作图和报表,然后根据调用过程输出的信息写出分析报告做总结性评价。 过程步以“PROC”关键字为开始标志,通过“PROC”语句调用过程名和数据集,输出分析报告或图形或对数据集变换处理的动态执行过程。 过程步的语法格式:PROC 过程名 <DATA=数据集名> <选项>;过程语句 <参数选项>; RUN; 注意:1.对于调用SQL过程,结束标志是QUIT,后边还会有详细讲解的blog。 2.过程步中的过程语句与数据步中的语句不同,数据步中的语句不能用到过程步中,过程步中的过程语句以某一个关键字开始,如BY,VAR,CLASS,WEIGHT,FREQ,MODEL等。 下面是几个常用的语句。 1)VAR语句 过程步中用VAR语句指定分析变量,告诉SAS系统过程步对所要分析数据集的哪些变量进行分析,多个分析变量之间用空格分隔。省略该语句时默认对数据集的所有变量进行统计分析。 语法格式:VAR 变量名1 变量名2 变量名3 ... 变量名N; 功能:指定要分析的变量。 注意:此处的变量名为过程步指定的

two level splatter TCL

半世苍凉 提交于 2020-01-25 19:01:05
问题 If I have a procedure or a command in TCL, with variable number of arguments, one can use, if a list's elements are as an input, the "splatter" operator, for example: set a [list "ko" ] set m [ list "ok" "bang" ] lappend a {*}$m But, what if I want to "twice splatter"? I.e., flatten 2 levels? Using it twice, in sequence, does not work: set a [list "ko" ] set m [ list [ list "ok" ] [ list "bang" ] ] lappend a {*}{*}$m Will error out on extra character. 回答1: You've noticed that {*}

Running shell commands in background, in a tcl proc

丶灬走出姿态 提交于 2020-01-25 02:03:38
问题 I'm trying to create a tcl proc, which is passed a shell command as argument and then opens a temporary file and writes a formatted string to the temporary file, followed by running the shell command in background and storing the output to the temp file as well. Running the command in background, is so that the proc can be called immediately afterwards with another arg passed to it, writing to another file. So running a hundred such commands should not take as long as running them serially