由买买提看人间百态

topics

全部话题 - 话题: macro
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
l**********8
发帖数: 305
1
来自主题: Statistics版 - SAS macro Debug

************************************************************
上个完整的LOG, 谢谢大家了
****************************************************************
NOTE: PROCEDURE PRINTTO used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

25
26 *-----------------------------------------------------;
27 %macro process(year,yr,file,first,numobs);
28
29 data cartemp;
30 set loc.carl&year.
31 (firsto... 阅读全帖
D******n
发帖数: 2836
2
来自主题: Statistics版 - macro里面能还用macro吗?
" Avoid Nested Macro Definitions
Nesting macro definitions inside other macros is usually unnecessary and
inefficient. When you call a macro that contains a nested macro
definition,
the macro processor generates the nested macro definition as text and
places
it on the input stack. The word scanner then scans the definition and
the
macro processor compiles it. If you nest the definition of a macro that
does
not change, you cause the macro processor to compile the same macro
each
time that section... 阅读全帖
f*****k
发帖数: 110
3
来自主题: Statistics版 - SAS Macro 莫名现象
I studied dido2009's explanation and Actuaries' link. Now I am kind of
understand aquar's issue, where he macro rv i exists only in the local table
of the out-layer macro, so that the macro rv i appears in the inner-layer
macro still can affect the value of i in the out-layer macro.
Before the 1st run of execution of the inner-layer macro, the value of i in
the local table of the out-layer macro is 1 so that the DO loop can work and
the inner-layer macro is executed for 1st time. After the 1st r... 阅读全帖
l**********8
发帖数: 305
4
来自主题: Statistics版 - SAS macro Debug
就是debug不出来,大神们救我啊
******************* 完整的 CODE ***************
%let dataloc = /disk/agedisk1/medicare/data/20pct/car;
libname bworkhos "/disk/agebulk5/medicare.work/lbaker-DUA23466/ausmita/temp"
;
*libname temp "/disk/agebulk5/medicare.work/lbaker-DUA23466/lbaker/data/xw";
ods listing file = "/disk/agebulk5/medicare.work/lbaker-DUA23466/ausmita/
temp/carrier_12222015.lst";
proc printto
log="/disk/agebulk5/medicare.work/lbaker-DUA23466/ausmita/temp/carrier_
12222015.log";
run;
*--------------... 阅读全帖
l**********8
发帖数: 305
5
来自主题: Statistics版 - SAS macro Debug
就是debug不出来,大神们救我啊
******************* 完整的 CODE ***************
%let dataloc = /disk/agedisk1/medicare/data/20pct/car;
libname bworkhos "/disk/agebulk5/medicare.work/lbaker-DUA23466/ausmita/temp"
;
*libname temp "/disk/agebulk5/medicare.work/lbaker-DUA23466/lbaker/data/xw";
ods listing file = "/disk/agebulk5/medicare.work/lbaker-DUA23466/ausmita/
temp/carrier_12222015.lst";
proc printto
log="/disk/agebulk5/medicare.work/lbaker-DUA23466/ausmita/temp/carrier_
12222015.log";
run;
*--------------... 阅读全帖
X****i
发帖数: 1877
6
Amid Billions of Losses, Macro Hedge Funds Search for ‘Which Way Is Up’
By
Rob Copeland
and
Juliet Chung
June 13, 2014
In today’s Wall Street Journal, we noted how many famous hedge-fund
managers who seek to profit by correctly forecasting broad economic trends
have turned in billions of dollars in paper losses, in a year that has
otherwise been relatively placid for investors the world over.
Investors flocked to these so-called macro funds after 2008, when they on
average ga... 阅读全帖
b*****e
发帖数: 223
7
来自主题: Statistics版 - 问你们个 sas macro 的问题
遇到过几次,就是 macro run 好几次的话,前面一次产生的数据会对下一次 run 造成
错误。比如我在 macro 里说如果 variable A 没值(.)的话,就给它赋 variable B
的值。可是第二次 run macro 的时候,因为这些数据在第一次 run 的时候已经造过了
,导致所有的 variable A 都已经有值了(第一次 run 遗留的么),所以就出现了错
误。
如果这种情况你们一般怎么弄啊?我一般在第二次 run macro 之前清一下所有 macro
内部产生的数据。昨天我这样弄了以后,第二次 run 的时候,居然 macro 里的第一个
ods output 出错,死活告诉我找不到 OneWay.......如果我不清数据就不会有这个错
误,为什么呀为什么
%macro MYTEST (var1=, var2=);
ods output OneWay=MYFREQ;
proc freq data=MYDATA;
tables SEX;
run;
ods output close;
.....
%mend MYTEST;
%... 阅读全帖
d******9
发帖数: 404
8
来自主题: Statistics版 - SAS Macro 莫名现象
呵呵,这叫做保险起见 !!!以确保 I 是 local .
"如果%let出现在macro里面时,其所定义的macro variable 仍然是在local symbol
table里。"
Usually, this is correct. However, in special case, it is not.
If you already have a same named macro variable I outside the macro
definition, then this "%let I=10" will only overwrite the global macro
variable, rather than creating a new local macro variable.
So, that is why we use %local I. It will ensure SAS to create a local macro
variable I in the local symbol table, even we already have a global ... 阅读全帖
s*******2
发帖数: 499
9
来自主题: Statistics版 - 请教SAS adv 题库一道macro题
The following SAS program is submitted: %macro one(input);
%two;
%put the value is &date; %mend;
%macro two; data _null_;
call symput('date','12SEP2008'); run;
%mend;
%let date=31DEC2006;
%one(&date)
What is the result when the %PUT statement executes.?
A. A macro variable DATE with the value 12SEP2008 is retrieved from the
local symbol table for the ONE macro
B. A macro variable DATE with the value 12SEP2008 is retrieved from the
local symbol table for the TWO macro
C. A macro variable... 阅读全帖
m****r
发帖数: 202
10
来自主题: Statistics版 - 请问SAS advanced macro global 和local
Online Tutor
You can create a global macro variable with
* a %LET statement (used outside a macro definition)
* a DATA step that contains a SYMPUT routine
* a SELECT statement that contains an INTO clause in PROC SQL
* a %GLOBAL statement.
http://www.target-touch.com/admin/Ke8s3laOdN/60477/m52/m52_27.htm
You can create local macro variables with
* parameters in a macro definition
* a %LET statement within a macro definition
* a DATA step that contains a SYMPUT routine... 阅读全帖
A*******s
发帖数: 3942
11
来自主题: Statistics版 - SAS Macro 莫名现象
我猜那个macro里面有类似于 %let i=n+1; 之类的语句,然后执行完这个macro之后,&
i的值改变了就跳出循环了。
试着运行下面的code
%macro layer2();
%local i;
%let i=10;
%put i = &i in the nested macro;
%mend;
%macro layer1();
%do i=1 %to 5;
%put i = &i before calling macro;
%layer2;
%put i = &i after calling macro;
%end;
%mend;
%layer1;
然后把layer2里面的%local去掉就知道了。
D******n
发帖数: 2836
12
来自主题: Statistics版 - 用尽心思做好了一个macro
Well, a good function/subroutine/macro in general programming philosophy
must be well encapsulated and structured.
I was not talking about complexity in my original post. The function/
subroutine/macro should never be too complicated. A simple indicator is the
length of the code. I am for writing simple and small macros(although your
problem may require you to write a lot of sub-macros which will be called by
one main macro).
However i was talking about encapsulation. Its a bad idea that your co... 阅读全帖
a****r
发帖数: 71
13
请教一个《Carpenter's Complete Guide to the SAS Macro》上SAS macro的例子。
Chapter 6, Page 111 有一个根据data A1 里两个变量 station 和 depth 生成 一系
列ACSII文件的macro的例子;
**********************;
***6.2.1d
***%DOIT
**********************;
* 1993 Water quality data.
*************************************************;
data a1
(keep=datetime station depth temp ph do cond salinity);
input datetime datetime13. @15 station $3.
depth temp ph do cond salinity;
label datetime = 'date and time of sample collection'
st... 阅读全帖
t****t
发帖数: 6806
14
first of all, the value of macro is dependent on the place that macro is
expanded. for example:
#define A A1
#define A1 1
/* here A expands to 1 */
#undef A1
#define A1 2
/* here A expands to 2 */
therefore your requirement is not very strict.
second, assume that you want only the final value of every macro. you may
use gcc to do that:
gcc -dM -E xxxxxxxx.c > xxxxxx_processed.c
/* it outputs all the (final) macro definitions */
then you use a perl to process it: for every macro name in $_, (each... 阅读全帖
h*i
发帖数: 3446
15
来自主题: Programming版 - macro is evil
别的Lisp不熟。Clojure社区里面,不鼓励用macro. Macro一般只用于作为library的用
户界面,提供DSL。应用程序一般不用macro。
因为macro不如函数composable, 比如a, b, c, d是macro的话,你不能((comp a b c
d) input), 而如果他们是函数,就可以随便往上垒高阶函数。
当然,要论composability, 函数还不如数据。所以在Clojure里面,优先级是Data >
Function > Macro
r*****z
发帖数: 906
16
来自主题: Programming版 - macro is evil
C的macro和lisp的macro完全不同。C的macro是实现了一门和宿主语言实在没啥关系的
迷你语言,而且非常受限,所以才会那么危险。lisp的macro是lisp编程的核心。在
lisp中编程就是在不停地使用macro,并且在必要的时候设计新的macro。
p********a
发帖数: 5352
17
It takes a lot of time and effort to create macros especially complicated
macros.
I was asked to share most my macros/programs and I did. However, I didnt'
share one of my macros which can solve all the problems at once. That macro
has 10 pages and includes over 20 sub-macros. It took me almost 1 month to
create it and it reduced my work by 80%.
Why would I share it with co-workers so they can do things as fast as I?
Come on, don't be so stupid.
P**********i
发帖数: 65
18
我写一个macro,其中包含两个macro variables。一般情况下,如果我调用这个macro,我首先要
给这两个macro variables赋确定的值。现在的case是:这两个macro variables对应已有的一张
dataset的两个variables。我想要对这张已有dataset的每个obs都run一次macro,应该如何实现
呢?
非常非常感谢!
p***r
发帖数: 920
19
来自主题: Statistics版 - SAS help : The scope of macro variables
Recently, aware many problems when programming macros. The scope of macro
variables (global/local) are sometimes in in-explicit to me. It there any
articles systematically covering this topic.
1. In a macro, if you use SYMPUT in data step, the macro variable you
created is global.
2. If you want to use SYMGET to input the value to the data set, then the
macro variable must be global. Then here is the problem, locally produced
macro variable will disappear, and will not be an valid argument durin... 阅读全帖
p*******r
发帖数: 1951
20
来自主题: Statistics版 - 请教SAS adv 题库一道macro题
对于这一题我的理解是:首先,%let 定义 date 为一个 global macro variable。 然
后用一个 call symput 语句重新给date 赋值。这时候date 作为一个global macro
variable的值变为call symput赋予的值。
我觉得出这个题的目的只是考察全局宏变量定义,以及在macro内改变全局宏变量的值
对于全局宏变量的影响。而对于call symput定义macro variable的scope,需要更深一
步的解释。参见这个链接。
http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML
在这道题里面,就像上面的兄弟说的,因为macro two没有parameter,call symput定
义的date是全局宏变量。但就算macro two有parameter,call symput运行后全局宏变
量date 的值依然会被改变。
这个题目出的很好。
c**********e
发帖数: 2007
21
Suppose one of the inputs is a macro variable. The macro variable is a list
of variable name separated by space.
For example, in the macro, the list of predictors is the input:
%macro regression(ind_var);
proc reg data=mydata;
model y = &ind_var.;
run;
%mend;
A call of the macro takes the following form:
%regression(x1 x2 x3 w1 w2);
My question is how to get the number of predictors. In the above macro call,
I want to get the number 5, which is the number of independent variables.
How to do... 阅读全帖
l*********i
发帖数: 483
22
来自主题: Postdoc版 - Job Openning: Macro Economist (转载)
【 以下文字转载自 Physics 讨论区 】
发信人: lamborghini (隐形汽车Reventon), 信区: Physics
标 题: Job Openning: Macro Economist (转载)
发信站: BBS 未名空间站 (Tue Oct 12 03:35:02 2010, 美东)
发信人: lamborghini (隐形汽车Reventon), 信区: JobHunting
标 题: Job Openning: Macro Economist
发信站: BBS 未名空间站 (Tue Oct 12 03:34:27 2010, 美东)
发信人: lamborghini (隐形汽车Reventon), 信区: Quant
标 题: Job Openning: Macro Economist
发信站: BBS 未名空间站 (Tue Oct 12 03:33:59 2010, 美东)
Applications should be sent to c****[email protected].
An excellent opportunity to join a lea... 阅读全帖
n*****r
发帖数: 1087
23
来自主题: WashingtonDC版 - 求教macro (转载)
【 以下文字转载自 Database 讨论区 】
发信人: niuyuer (扭腰课), 信区: Database
标 题: 求教macro
发信站: BBS 未名空间站 (Wed Jul 10 17:29:45 2013, 美东)
******麻烦帮我看看红色框中的code哪里写错了*********
初学macro,码点code真折磨非IT背景的人,一直都弄不对。
我想写的macro是把一个很大的excel file(几千row,几十column)的某些column的数据
copy到word里面作为report的appendix。这个excel file是由某个特定软件export出来
的,第一row都一样,也就是说,# of column是一样的,不同的是# of rows,这个视
具体的project而定。
附件:只是一个练习,离最终要写的macro还差很遥远,只能一步一步接近目标。这个
macro能run,但有太多毛病,比如run之后,excel file可以看到正确的row height,但
word里面的row height还是不能控制好。但最主要的一个问题是红框中的c... 阅读全帖
a*******e
发帖数: 3021
24
来自主题: PhotoGear版 - 问个macro镜头的问题
前天发贴问一组照片咋出来的,大牛们说是canon 60mm macro出来的
俺看了一下macro的镜头,有点糊涂,macro镜头不是一般用来排小东西的吗,比如虫子
啥的
能用它来拍人像吗?那还有macro的功效吗。
或者说用60mm macro拍人像和50-200中的60mm焦距拍人像有啥区别?(除了光圈和镜头
质量外)
macor镜头是不是就是能对焦得距离比普通镜头短,其他没啥优势了?
y*b
发帖数: 3190
25
"Anhui China, Jun 12, 2015 – Venus Optics, the Chinese camera lenses
manufacturer who had launched the world’s first 2:1 Macro Lens in last Sept
, has just released the world’s widest Macro lens for full frame cameras,
Laowa 15mm f/4 Wide-Angled 1:1 Macro Lens.
Read more: http://www.canonrumors.com/2015/06/venus-optics-announces-the-laowa-15mm-f4-wide-angle-11-macro-lens-the-worlds-widest-11-macro-lens/#ixzz3dv8u92Z8"
n*****r
发帖数: 1087
26
来自主题: CS版 - 求教macro (转载)
【 以下文字转载自 Database 讨论区 】
发信人: niuyuer (扭腰课), 信区: Database
标 题: 求教macro
发信站: BBS 未名空间站 (Wed Jul 10 17:29:45 2013, 美东)
******麻烦帮我看看红色框中的code哪里写错了*********
初学macro,码点code真折磨非IT背景的人,一直都弄不对。
我想写的macro是把一个很大的excel file(几千row,几十column)的某些column的数据
copy到word里面作为report的appendix。这个excel file是由某个特定软件export出来
的,第一row都一样,也就是说,# of column是一样的,不同的是# of rows,这个视
具体的project而定。
附件:只是一个练习,离最终要写的macro还差很遥远,只能一步一步接近目标。这个
macro能run,但有太多毛病,比如run之后,excel file可以看到正确的row height,但
word里面的row height还是不能控制好。但最主要的一个问题是红框中的c... 阅读全帖
p****r
发帖数: 165
27
来自主题: Programming版 - excel macro running slow
thanks.
but why it only slow after I ran it once. If I open the excel the first
time and run it, it is very fast. then if I ran it 2nd time, it is extremely
slow. so I close all my excel workbook and reopen the one with macro, and
run the macro again, it is fast again. I thought it was something wrong with
my macro.
in normal speed, my macro run within 3 min. when it is slow, it ran 3 hours.

macro
h*i
发帖数: 3446
28
来自主题: Programming版 - macro is evil
Clojure就是Lisp。Clojure语言核心很多都是macro,最基本的比如fn, loop, for,
and,or这些都是macro。所以用macro不是什么问题,只要是大家通用的macro。不鼓励
应用程序员自己写macro主要是为了提高代码可读性和composibility。
所有Lisp的一个共同点就是REPL driven, keep evolving a live image of running
code,这都是为了支持不停的refactor代码。这种编程模式与Java这类语言是完全不同
的,很多人一开始不习惯。因为refactor可能太根本了,所以Lisp programmers don't
think it should have a name?
还有我觉得用Clojure的一个好处就是改代码的胆子更大了。主要有两个原因,一个大
多数代码都是纯函数,所以改动只是影响局部,不影响全局;二是immutable data by
default,随便改,别的地方不会受影响。
o******6
发帖数: 538
29
☆─────────────────────────────────────☆
qqzj (小车车) 于 (Fri Mar 6 13:30:00 2009) 提到:
比如:prog1.sas:
data mydata;
x = 1;
run;
%macro1;
结束了。
在macro1里面:
%macro macro1;
data mydata;
x=2;
run;
%mend;
运行结束, mydata里面x=2。
这样就是说 macro里面的的数据会干扰别的数据。因为sas macro仅仅是文字替换,所
以这个是正常的。但是这样很不方便,尤其程序长了非常危险。请问这种情况下如何把
macro里面的数据给隐蔽起来,保护macro以外的数据?
☆─────────────────────────────────────☆
libra (秤子) 于 (Fri Mar 6 13:33:23 2009) 提到:
no need to panic. an easy way is to set your own data naming policy. e.g.
all t
A*******s
发帖数: 3942
30
在一个macro里创建了一堆dataset和local macro variable,为了不占用空间,有什么
方法在macro结尾处可以方便地删除它们?有啥方便点的方法么?谢谢
还有,multiple-layer nested macro里面有啥原则可以避免创建重名的datasets呢?
A*******s
发帖数: 3942
31
谢谢。还有一个问题想请教一下大牛,如果我要写一个自我嵌套的self-referential/
self-nested macro,不同层次的macro里面创建的temporal datasets重名了怎么办?
sas有没有local datasets这种概念,就像local macro variable一样,不同层次macro
创建的datasets不互相影响?
A*******s
发帖数: 3942
32
想了一下,我能想出来的解决方法就是用一个global macro variable &layer, 每次调
用一个macro program,&layer就+1,然后把macro里面创建的temporary datasets都以
_&layer为前缀命名,macro结尾再删去_&layer: 的所有datasets。
不知道有没有更简单的方法。
s******y
发帖数: 352
33
来自主题: Statistics版 - 【大包子】问个macro的问题
for this example, you are correct.
for good practice, we should always consider to delay the time of macro
resolution to avoid wrong code was generated.
for example, in your macro, you assign a macro var in a data step. in later
step, the macro var will be used in macro %if statement to control the
program flow or determine what code should be generated. if the resolution
time was not delayed. the evaluation of %if will be false all the time as
data step was not executed at all.
BAOZI please!
s******y
发帖数: 352
34
来自主题: Statistics版 - 【大包子】问个macro的问题
the purpose of using %nrstr is to delay the macro resolution. if there is no
%nrstr, the marco will be resolved within the datastep. the statements in
the macro will be generated and put into the statement stack. after
finishing the data step, the statement will be popped up for execution.
the statements in the stack without using %nrstr:
proc univariate data=a1 ;
var resid;
qqplot;
histogram / normal;
run;
But with the %nrstr, the % sign would be quoted and invisible to the macro
com... 阅读全帖
d******9
发帖数: 404
35
来自主题: Statistics版 - sas macro 问题,
1.If you want to use keyword macro parameters, you need declare them in the
macro definition first.
However, the definition here:
%macro printdsn(dsn,vars);
is not correct, it define the positional parameters.
If you want to use b, then you should define macro like this:
%macro printdsn(dsn=,vars=);
2. data _null_;
set sasuser.courses;
call symput('class', course_title);
run;
variable class是local 还是global ne ?
it is global, because it is defined in open code.
A*******s
发帖数: 3942
36
来自主题: Statistics版 - SAS Macro 莫名现象
那几乎可以肯定是因为这个
%macro layer2();
%let i=1;
%put i = &i in the nested macro;
%mend;
%macro layer1();
%do i=1 %to 5;
%put i = &i before calling macro;
%layer2;
%put i = &i after calling macro;
%end;
%mend;
%layer1;
f*****k
发帖数: 110
37
来自主题: Statistics版 - SAS Macro 莫名现象
Actuaries的意思是外层macro中的i和内层macro中i被放到了一个symbol table里,所
以内层i的值影响了外层i的值?但外层macro和内层macro应该有不同的symbol table啊
(即使都是local的),那怎么还会有干扰呢?
我正在学习macro,但很多概念和细节都不清楚,所以想借此机会打破沙锅问到底。多
谢!

,&
d******9
发帖数: 404
38
来自主题: Statistics版 - SAS Macro 问题请教 。。。
使用 call symput to create macro variables, the created macro variables can
NOT be referenced in the same data step, for example:
Data B;
Set A;
Call symput(X, Name);
Run;
We can only refer to use X in the following data step or Proc, but not in the same step.
However, what about Proc SQL INTO clause?
I run the below codes on SAS 9.1:
Proc sql;
select count(*) into: N
from aaa;
%let Y=&N;
%put ***************;
%put N=*&N*;
%put Y=*&Y*;
quit;
It turned out that both N and Y are resolved without an... 阅读全帖
l*********s
发帖数: 5409
39
来自主题: Statistics版 - Weird SAS macro bugs, 包子重谢!
I am having some very weird bug while trying to write a macro that can
expend the short hand notion like var1--var11 used in SAS.
The "shorthand" macro works fine on its own, but fails to work when called
by the "formula" macro. The error message seems to say that "the set
statement in the data step is not valid or not in proper order", what's
going on?
Many thanks!
////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////... 阅读全帖
A*******s
发帖数: 3942
40
来自主题: Statistics版 - 问一个SAS macro的问题
很多语言的macro都是一样的吧,
macro肯定没有function这么方便啊
而且你这个最后还是赋值给一个global macro variable了
你把这个赋值语句放进你的macro里面再设为global也是一样的吧。

macro
s*******2
发帖数: 499
41
来自主题: Statistics版 - 请教SAS adv 题库一道macro题
可是SAS材料是这么写的;
You can create local macro variables with parameters in a macro definition
%LET statement within a macro definition
DATA step that contains a SYMPUT routine within a macro definition
SELECT statement that contains an INTO clause in PROC SQL within a
macro definition
%LOCAL statement.
是不是说marco内用call symput定义的是local marco variable呢?
w*****r
发帖数: 92
42
来自主题: Statistics版 - SAS MACRO里的循环不work是怎么回事
macro code应该循环执行两次%step1 %step2,最后将结果输出到z_a
和z_b里, Step1 & 2是调用的比较复杂的code,单独运行没有问题。可是code怎么改也
不执行循环,最后只出来一个z_a.哪位前辈指点一二啊,谢谢了!
%let job=z;
%let name=a b;
%let count = %sysfunc(countw(&method));
%macro x;
%do i=1 %to &count;
%let m = %scan(&name, &i);
%let jobname = &job._&m;
%step1(jobname=&job, ...);
%step2(Jobname=&jobname, label=&m, ...);
%end;
%mend x;
用下面的code试了下就可以,难道是step1 2内部的问题?
%macro part1(jobname=, cov=);
data &job;
set eco;
keep &cov;
run;
%mend;
%macro part2(jobname=... 阅读全帖
P*****i
发帖数: 63
43
来自主题: Statistics版 - 与Macro相关的字符函数
嗯,是哒,我就是在机器上跑过了还是不懂。
SAS运行结果如下:
199 options symbolgen;
200 %let a=begin;
201 %let b=%nrstr(&a);
202 %put UPCASE produces: %upcase(&b);
SYMBOLGEN: Macro variable B resolves to &a
SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been
unquoted for printing.
SYMBOLGEN: Macro variable A resolves to begin
UPCASE produces: begin
~~~~~~~~~~~~~~~~~~~~~~~
这里为什么UPCASE不进一步执行替换大写的操作?
203 %put QUPCASE produces: %qupcase(&b);
SYMBOLGEN: Macro variable ... 阅读全帖
H********a
发帖数: 317
44
来自主题: PhotoGear版 - Macro Lens
想买个macro lens玩玩, 培养下自己的观察力. 听说macro也是个不错的拍娃镜头.
目前看到Canon EF 100mm f/2.8L IS USM Macro Lens 和Canon EF 100mm f/2.8 Macro
USM Lens. 两个区别在哪里呢? L镜头有必要吗? 价钱贵一倍的说.
请高人指点! 谢谢!
T*******I
发帖数: 5138
45
说说我在eBay上看到的两个例子。
一个是Viviyar 135mm f/2.8 Macro,27个bids,最后价格147刀;外加11.99刀邮寄;
另一个也是Vivitar 135mm f/2.8但没有Macro,1个bid,最后价格是9.99刀,free邮寄。
我想,这对cases可以作为参照来评价微距镜头和同级别的普通镜头之间的差别。其它
常见的有50mm或55mm的微距或非微距镜头。成对的比较的话,它们的价格差别都很大。
一般都是macro镜头比非macro镜头高出很多。
n*****r
发帖数: 1087
46
来自主题: Database版 - 求教macro
******麻烦帮我看看红色框中的code哪里写错了*********
初学macro,码点code真折磨非IT背景的人,一直都弄不对。
我想写的macro是把一个很大的excel file(几千row,几十column)的某些column的数据
copy到word里面作为report的appendix。这个excel file是由某个特定软件export出来
的,第一row都一样,也就是说,# of column是一样的,不同的是# of rows,这个视
具体的project而定。
附件:只是一个练习,离最终要写的macro还差很遥远,只能一步一步接近目标。这个
macro能run,但有太多毛病,比如run之后,excel file可以看到正确的row height,但
word里面的row height还是不能控制好。但最主要的一个问题是红框中的code,这样写
,column D的数据最终也被copy到word里面,我只想copy column C 和 E,要怎么改这
部分code呢?
我最终想得到的word大概是附件那样的:比如我只copy column B D F H的数据... 阅读全帖
a****a
发帖数: 5763
47
来自主题: Programming版 - macro is evil

macro 的确是极大的错误
实际上在我看来,任何基于机械式的文本替换都是问题
lisp里的macro问题太大了,基本上稍微大的lisp程序, macro多了就没法读
编程语言,不管哪个,我最讨厌的几个特性, macro一个, 排版决定语义算一个,纯
OO算一个
python基本算是我最厌恶的语言格式了
我一直觉得pascal的程序是最漂亮的
s*******p
发帖数: 2
48
I found macros named AutoExec.Main, AutoExit.Auto_Close and AutoExit.Main when
I start a doc file. I tried Norton, KV3000 plus and KAV2003. And none of them
detected this macro virus. The Macros still there. Anybody recommend me a
killer to this macros?
l*********i
发帖数: 483
49
来自主题: Physics版 - Job Openning: Macro Economist (转载)
【 以下文字转载自 JobHunting 讨论区 】
发信人: lamborghini (隐形汽车Reventon), 信区: JobHunting
标 题: Job Openning: Macro Economist
发信站: BBS 未名空间站 (Tue Oct 12 03:34:27 2010, 美东)
发信人: lamborghini (隐形汽车Reventon), 信区: Quant
标 题: Job Openning: Macro Economist
发信站: BBS 未名空间站 (Tue Oct 12 03:33:59 2010, 美东)
Applications should be sent to c****[email protected].
An excellent opportunity to join a leading Chinese investment advisory and
research firm as Macro Economist.
The Economist will conduct China economic research on such... 阅读全帖
p********a
发帖数: 5352
50
来自主题: Statistics版 - 还是那个MACRO的问题
修改了一下。你的CODE主要有几个问题
1. Data step and proc step 不能nested. Data step can't be nested in another
data step either.
2. %IF %THEN %END should be in open mode instead of data step
3. When you compare values in open mode, it has to be macro variables. (see
proc sql)
I still don't understand your last 4 data steps. There is no macro variables
at all. Why put them inside the macro.
OPTIONS MACROGEN;
%MACRO TWO_SAMPLE (IN=, Y=, A=, ALPHA=);
PROC UNIVARIATE DATA=&IN NORMAL NOPRINT;
BY &A; VAR &Y;
O
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)