由买买提看人间百态

topics

全部话题 - 话题: parameters
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
m******t
发帖数: 2416
1
来自主题: Java版 - A design for parameter passing

Why does Main have to find all the parameters for other classes?
If a parameter comes from command line, sure Main needs to process it,
but for everything else, such as configurations, each class/component
should deal with it itself.
If the API chain Main->A->B->C->... is so easy to be penetrated by
any parameter changes, I would first ask myself whether I have got
too many layers in the design, and maybe some of them are not doing
anything but passing through parameters.
parameters
what
be
aff
m******t
发帖数: 2416
2
来自主题: Java版 - A design for parameter passing

I don't see anything terribly wrong in this. If the parameters are constantly
changing, maybe consider a hierarchy of parameter bean classes (as somebody
else suggested earlier), so that you don't have to keep changing method
signatures.
Another alternative would be to make the Rule classes themselves parameter
beans. The Converter would inject parameters into a Rule bean prior to calling
its conversion method, instead of passing them as parameters. If most XML
files are large files, conversio
s*****r
发帖数: 59
3
来自主题: BuildingWeb版 - pass parameter to a link
In my php code, I need to pass a parameter once user clicked a link. The
parameter is link related. Since my php code is not in the style of class. It
is just a html files with a simple php function. How to pass the parameter?
the function need to receive the parameter dose some data processing. thanks.
v******n
发帖数: 421
4
来自主题: DotNet版 - Named Parameters
attribute的named argument和普通method不一样
http://msdn.microsoft.com/en-us/library/aa664614(v=vs.71).aspx
Attribute classes can have positional parameters and named parameters. Each
public instance constructor for an attribute class defines a valid sequence
of
positional parameters for that attribute class. Each non-static public
read-write field and property for an attribute class defines a named
parameter
for the attribute class.
s****h
发帖数: 3979
5
来自主题: Programming版 - question about using Hive parameter (转载)
【 以下文字转载自 DataSciences 讨论区 】
发信人: squash (南瓜之夭夭), 信区: DataSciences
标 题: question about using Hive parameter
发信站: BBS 未名空间站 (Fri Oct 17 15:20:07 2014, 美东)
question about Hive parameter
Support we have some parameters as:
set nyear = '2014';
set nmonth = '10';
set nday = '17';
We generate a new parameter as:
set newdatestring = concat('/foldername/', ${hiveconf:nyear}, '/', ${
hiveconf:nmonth}, '/', ${hiveconf:nday},'/');
Comparing 2 queries
q1:
select ${hiveconf:newdatestring};
q1 output:
/folde... 阅读全帖
r*******s
发帖数: 12
6
How can I do parameter data fitting?
Say I have three parameter Darcy Friction fator equation:
f = A[1]/Re + A[2]*Re^A[3]
The model parameter to be determine is A[1],A[2],A[3] and the +/- intervals
for confidence level.
Try to get the parameter based on experiment data.
What software can do this?
Thank you
S******1
发帖数: 42
7
http://www.nist.gov/manuscript-publication-search.cfm?pub_id=82
Comprehensive Study of Parameters for Characterizing 3-D Surface Topography
III: Parameters for Amplitude and Some Functional Properties
by W Dong; P Sullivan; K Stout;
w*l
发帖数: 43
8
I want to use "exec()" to execute a command "simon
parameters.wradmon.13.10.dat > result.dat". The command "simon
parameters.wradmon.13.10.dat > result.dat" can be executed under command line
of unix, and I can get a file named " result.dat". However, when I use a line
in my program, I can't get the "result.dat". Moreover, when I just use "p =
r.exec("simon parameters.wradmon.13.10.dat ");", I also can not see the result
displaying on the screen. I used the "ps -u huwang" to monitor the subproce
g**********y
发帖数: 14569
9
来自主题: Java版 - A design for parameter passing
Parameter passing between classes always bother me a lot. Noramlly, you take
parameters at Main class, then spread it to controls, then to different
modules/classes. A typical flow is like:
Main -> A -> B -> ... -> Z
Headache part is: At the beginning of design, you think B need param1 and
param2; then Main pass both to A, next B. Later, you find B actually needs
param1 and param3. Now you need to change all parameter passing sequence of
Main -> A, and A -> B. If the chain gets longer, it will b
c**o
发帖数: 186
10
不好意思,
事多,给忘了这茬.
我当时的意思是parameters.
如果parameters是object.
这个object有可能会被这个method修改.
所以有此疑问.
如果这个method是sychronized, 它的parameters是不是也默认为synchronized.
谢谢大家
s*******e
发帖数: 664
11
来自主题: Programming版 - [合集] c++ parameter reflection
☆─────────────────────────────────────☆
igah (igah) 于 (Mon Sep 21 21:38:57 2009, 美东) 提到:
here is the problem i am facing a lot when writing many applications in c++.
let's say you have a user class Foo and you need some parameters, e.g.
struct Foo {
int value1;
double value2;
};
and the parameters are read from some property file of name-value pairs:
value1=123
value2=23.4
the parameters can be changed at run time through some user interface (e.g.
jmx like controls) which sets the values al
p********0
发帖数: 186
12
来自主题: Quant版 - SV kalman filter parameter estimation
Ding,
I may not be clear about my question, let me rephrase it.
For time series data, state space model, if the parameter is not static,
change over time
X_t = F_t * X_t-1 + R.
Y_t = H_t * X_t
What's the best way for finding the online parameter?
I found resurve Least Sqaure Error/Gaussian Newton method/Kalman filter all
can be used to do the online parameter estimate, what's the best method?
Anyone has experience?

[x
a***m
发帖数: 74
13
In a multivariate linear regression model, if the observations are
correlated with a known pairwise correlation coefficient,
how would the parameter and standard error estimate deviate from the same
model with independent observations?
If the correlation is very small, are there ways to correct the parameter
and standard error obtained from the model with independent observations to
estimate the parameter and standard error for the model with correlated
observations?
Any help is appreciated!
p********0
发帖数: 186
14
Hi,
For time series data, state space model, if the parameter is not static,
change over time
X_t = F_t * X_t-1 + R.
Y_t = H_t * X_t
What's the way for finding the online parameter?
I found resurve Least Sqaure Error/Gaussian Newton method/Kalman filter all
can be used to do the online parameter estimate, what's the best method?
Anyone has experience?
s****h
发帖数: 3979
15
来自主题: DataSciences版 - question about using Hive parameter
question about Hive parameter
Support we have some parameters as:
set nyear = '2014';
set nmonth = '10';
set nday = '17';
We generate a new parameter as:
set newdatestring = concat('/foldername/', ${hiveconf:nyear}, '/', ${
hiveconf:nmonth}, '/', ${hiveconf:nday},'/');
Comparing 2 queries
q1:
select ${hiveconf:newdatestring};
q1 output:
/foldername/2014/10/17/
q2:
select "${hiveconf:newdatestring}";
q2 output:
concat('/foldername/', '2014', '/', '10', '/', '17','/')
The question: is there any se... 阅读全帖
n*******r
发帖数: 22
16
Not quite understand what you mean :)
Default parameter is still considered as part of the function signature,
correct? Thus in this case, B::Func1() actually is "hiding" A::Func1(),
instead of "overriding". So why A::Func1()'s default parameter will be
used? I'm really confused...
C***t
发帖数: 10731
17
【 以下文字转载自 Notice 讨论区 】
发信人: deliver (自动发信系统), 信区:
标 题: Comet 封 parameter 在 Chicago 版
发信站: BBS 未名空间站自动发信系统 (Fri Mar 18 11:34:16 2011)
【此篇文章是由自动发信系统所张贴】
由于 parameter 在 Chicago 版的 人身攻击 行为,
被暂时取消在本版的发文权力 3 天。
备注:
小黑屋冷静冷静哈
版主:Comet
Fri Mar 18 11:34:16 2011
t***q
发帖数: 418
18
【 以下文字转载自 Programming 讨论区 】
发信人: treeq (treeq), 信区: Programming
标 题: 如何用python web.py web service 做 multiple parameters 的
发信站: BBS 未名空间站 (Sun Mar 22 23:14:33 2015, 美东)
大家好。我的那个web service 做成了。用了python 的 web.py.
install web.py
cd webpy
编辑python web service.
#!/usr/bin/env python
urls = ('/title_matching2','title_matching2')
app = web.application(urls,globals())
class title_matching2:
def __init__(self):
self.hello = "hello world"
def GET(self):
getInput = web.input(name="W... 阅读全帖
t***q
发帖数: 418
19
大家好。
我后来又找到一个可以做query的package 叫flask.也是在python 里。
用它写了一个multiple parameters 的query,差不过如下:
http://stackoverflow.com/questions/15182696/multiple-parameters
还是用links 打开一个网页
links http://127.0.0.1:5000/api?name=XXX&prod=XXX
没有回应。只是出现一个随机数,在screen上。
但是用curl就能返回想要的东西:
curl -XGET 'http://127.0.0.1:5000/api?name=XXX&prod=XXX'
而且用curl -XGET作用在以前用web.py的东西上也能得到想要的。但是,只是在screen
上显示一堆东西。并不是打开网页。
请问这是为什么?就是说用curl,不管怎样都能返回想要的东西,用links 不管怎样都
不能返回想要的东西。这样一来只要curl能跑出来东西,是不是就成了?
多谢!
t***q
发帖数: 418
20
【 以下文字转载自 Programming 讨论区 】
发信人: treeq (treeq), 信区: Programming
标 题: 如何用python web.py web service 做 multiple parameters 的 call?
发信站: BBS 未名空间站 (Sun Mar 22 23:14:33 2015, 美东)
大家好。我的那个web service 做成了。用了python 的 web.py.
install web.py
cd webpy
编辑python web service.
#!/usr/bin/env python
import web
import csv
import difflib
import re
import operator
import Levenshtein
urls = ('/title_matching2','title_matching2')
app = web.application(urls,globals())
class title_matching2:
def __init__(self):
... 阅读全帖
t***q
发帖数: 418
21
【 以下文字转载自 Programming 讨论区 】
发信人: treeq (treeq), 信区: Programming
标 题: 如何用python web.py web service 做 multiple parameters 的
发信站: BBS 未名空间站 (Sun Mar 22 23:14:33 2015, 美东)
大家好。我的那个web service 做成了。用了python 的 web.py.
install web.py
cd webpy
编辑python web service.
#!/usr/bin/env python
urls = ('/title_matching2','title_matching2')
app = web.application(urls,globals())
class title_matching2:
def __init__(self):
self.hello = "hello world"
def GET(self):
getInput = web.input(name="W... 阅读全帖
t***q
发帖数: 418
22
大家好。
我后来又找到一个可以做query的package 叫flask.也是在python 里。
用它写了一个multiple parameters 的query,差不过如下:
http://stackoverflow.com/questions/15182696/multiple-parameters
还是用links 打开一个网页
links http://127.0.0.1:5000/api?name=XXX&prod=XXX
没有回应。只是出现一个随机数,在screen上。
但是用curl就能返回想要的东西:
curl -XGET 'http://127.0.0.1:5000/api?name=XXX&prod=XXX'
而且用curl -XGET作用在以前用web.py的东西上也能得到想要的。但是,只是在screen
上显示一堆东西。并不是打开网页。
请问这是为什么?就是说用curl,不管怎样都能返回想要的东西,用links 不管怎样都
不能返回想要的东西。这样一来只要curl能跑出来东西,是不是就成了?
多谢!
t***q
发帖数: 418
23
【 以下文字转载自 Programming 讨论区 】
发信人: treeq (treeq), 信区: Programming
标 题: 如何用python web.py web service 做 multiple parameters 的query
发信站: BBS 未名空间站 (Sun Mar 22 23:14:33 2015, 美东)
大家好。我的那个web service 做成了。用了python 的 web.py.
install web.py
cd webpy
编辑python web service.
#!/usr/bin/env python
urls = ('/title_matching2','title_matching2')
app = web.application(urls,globals())
class title_matching2:
def __init__(self):
self.hello = "hello world"
def GET(self):
getInput = web.input(na... 阅读全帖
t***q
发帖数: 418
24
大家好。
我后来又找到一个可以做query的package 叫flask.也是在python 里。
用它写了一个multiple parameters 的query,差不过如下:
http://stackoverflow.com/questions/15182696/multiple-parameters
还是用links 打开一个网页
links http://127.0.0.1:5000/api?name=XXX&prod=XXX
没有回应。只是出现一个随机数,在screen上。
但是用curl就能返回想要的东西:
curl -XGET 'http://127.0.0.1:5000/api?name=XXX&prod=XXX'
而且用curl -XGET作用在以前用web.py的东西上也能得到想要的。但是,只是在screen
上显示一堆东西。并不是打开网页。
请问这是为什么?就是说用curl,不管怎样都能返回想要的东西,用links 不管怎样都
不能返回想要的东西。这样一来只要curl能跑出来东西,是不是就成了?
多谢!
S**U
发帖数: 7025
25
Time: Sunday, 10/25/2015 3:00~4:00 PM Talk
4:00~4:30 PM Q&A
Venue: Cupertino Community Hall, 10350 Torre Avenue, Cupertino, CA 95014
Parameters of the True Dharma
In recent years, Buddhist ideas and practices have so fully permeated modern
American culture that traditional Buddhists are often left wondering
whether the Dharma will become just another phase of the ever-shifting
American pop scene. Have traditional Buddhists misunderstood the Dharma?
Have they wrongly turned a pragmatic, secular s... 阅读全帖
S**U
发帖数: 7025
26
Time: Sunday, 10/25/2015 3:00~4:00 PM Talk
4:00~4:30 PM Q&A
Venue: Cupertino Community Hall, 10350 Torre Avenue, Cupertino, CA 95014
Parameters of the True Dharma
In recent years, Buddhist ideas and practices have so fully permeated modern
American culture that traditional Buddhists are often left wondering
whether the Dharma will become just another phase of the ever-shifting
American pop scene. Have traditional Buddhists misunderstood the Dharma?
Have they wrongly turned a pragmatic, secular s... 阅读全帖
q****x
发帖数: 7404
27
来自主题: Apple版 - Obj C multi-parameter method
C++:
void foo(const char* fname, const char* mname, const char* lname);
Obj C
- (void)first:(NSString *)fname second:(NSString *)mname third:(NSString )
lname;
So the function name and the 1st parameter name are identical? This really
looks weird. What's the rationale behind this design? It's count-intuitive
that changing the 1st parameter name means changing the function name.
t***q
发帖数: 418
28
【 以下文字转载自 Programming 讨论区 】
发信人: treeq (treeq), 信区: Programming
标 题: 如何用python web.py web service 做 multiple parameters 的 call?
发信站: BBS 未名空间站 (Sun Mar 22 23:14:33 2015, 美东)
大家好。我的那个web service 做成了。用了python 的 web.py.
install web.py
cd webpy
编辑python web service.
#!/usr/bin/env python
import web
import csv
import difflib
import re
import operator
import Levenshtein
urls = ('/title_matching2','title_matching2')
app = web.application(urls,globals())
class title_matching2:
def __init__(self):
... 阅读全帖
W********n
发帖数: 254
29
来自主题: DotNet版 - Named Parameters
DataAnnotation - ValidationAttribute有一个可以使用named parameter的ctor,附
件图片那个样子的,这个不是C# 4中的那种named parameter?用ilspy看了一下也没看
出什么名堂。谁能讲解一下?
g*****g
发帖数: 34805
30
来自主题: Java版 - A design for parameter passing
It's like using a global hashtable to store all variables, I don't think
it's a good design.
Class A only needs parameters it needs to know, there's no point to
make parameter it doesn't need available in its scope.
g**********y
发帖数: 14569
31
来自主题: Java版 - A design for parameter passing
Then what's your way to address the parameter passing hassle? Assumption is
that you will change passing parameter(s) between classes in future.
c**g
发帖数: 274
32
来自主题: Java版 - A design for parameter passing
What are exactly these "parameters"? to me, it looks like you have
three separate parts:
1) a spider like class, which goes through a directory.
2) a convertor, which is in charge of reading/wrting xml file,
parse/syntactic analysis xml file.
3) rules.
As i can see, the only parameter necessary to be passed from 1) -> 2) -3)
is pathname/File reference.
Just curious, what are these 15-20M xml used for? I heard people
used xml to replace database, but have never had a chance to see
a real case. :-
b******y
发帖数: 1684
33
来自主题: Java版 - modify parameter, or return?
if parameter1 and parameter2 are both List type,
it would be a headache...
my concern on convert1 like methods is that you don't know which
parameter is in&out (mutable), and which one is immutable.
while with convert3, you can follow a convention that every parameter
is immutable
t***q
发帖数: 418
34
大家好。
我后来又找到一个可以做query的package 叫flask.也是在python 里。
用它写了一个multiple parameters 的query,差不过如下:
http://stackoverflow.com/questions/15182696/multiple-parameters
还是用links 打开一个网页
links http://127.0.0.1:5000/api?name=XXX&prod=XXX
没有回应。只是出现一个随机数,在screen上。
但是用curl就能返回想要的东西:
curl -XGET 'http://127.0.0.1:5000/api?name=XXX&prod=XXX'
而且用curl -XGET作用在以前用web.py的东西上也能得到想要的。但是,只是在screen
上显示一堆东西。并不是打开网页。
请问这是为什么?就是说用curl,不管怎样都能返回想要的东西,用links 不管怎样都
不能返回想要的东西。这样一来只要curl能跑出来东西,是不是就成了?
多谢!
r****y
发帖数: 26819
35
来自主题: Software版 - Windows File Explorer Parameters
Invoking Windows File Explorer
Windows Explorer can be invoked (called, started) with parameters to get a
specific view.
Syntax
explorer [/n] [/e,] [/root,object,][[/select],sub-object,]
Strangely enough a final comma is required (at least in some cases – not
known in which ones)!
Parameters
/n Opens a window in single-paned (My-computer) view for each selected item,
even if the new window duplicated a window that is already open. This is the
default view.
/e Uses Windows Explorer view, which is
F********E
发帖数: 1025
36
What does "bandwidth" mean in non-parameter fitting? Does a smaller "
bandwidth" imply a more "squeezed" shape as scale parameter mean in normal
distribution?
Any link to a easy-to-read tutorial link will also be appreciated!
b****e
发帖数: 9
37
Use "temp" as parameter to sweep. It is a build in parameter.
j******o
发帖数: 183
38
来自主题: EE版 - 求教S parameter
求教:
化学专业,因为要用来设计仪器,正在自己琢磨HFSS。有以下问题:
1。请问如何从hfss中export 可以用于ADS或者APLAC的s parameter packet?
2。在HFSS模拟中, 在sweep type我用的是fast, 这样和discrete有什么区别?
3。如何将从HFSS模拟获得的s parameter packet用于ADS或者APLAC?
恳请帮助,越详细越好。
本人是个门外汉,不胜感激!
l*********y
发帖数: 3447
39
如果 fitting function里的parameters 是highly redundant的,如何
analytically find out?好像记得是偏微分 parameter后求秩,又觉得
不大对。数值上判断的方法倒是知道,就不知有没有解析的方法。
谢谢
F********E
发帖数: 1025
40
What does "bandwidth" mean in non-parameter fitting? Does a smaller "
bandwidth" imply a more "squeezed" shape as scale parameter mean in normal
distribution?
Any link to a easy-to-read tutorial link will also be appreciated!
p********0
发帖数: 186
41
来自主题: Quant版 - GMARCH parameter estimation
Hi,
For GARCH model
\sigma_{t} = a + b * \sigma_{t-1} + c* \return_{t}, Can I run a linear
regression
to get the parameter? Can I use the regular linear regression since the \
sigma_[t-1} is
a response variable also a X variable? CAN I USE THE REGULAR regression?
Or to use a Maximum likelyhood function/get a derivative first, plug in the
\sigma_{t-1}
to \sigma_[t}. In this way I can get a parameter estimate?
F********E
发帖数: 1025
42
What does "bandwidth" mean in non-parameter fitting? Does a smaller "
bandwidth" imply a more "squeezed" shape as scale parameter mean in normal
distribution?
Any link to a easy-to-read tutorial link will also be appreciated!
r***r
发帖数: 123
43
Here is the example in the SAS manual.
http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#/documentation/cdl/en/statug/63033/HTML/default/statug_genmod_sect055.htm
Analysis Of Maximum Likelihood Parameter Estimates
Parameter DF Estimate Standard Error Wald 95% Confidence Limits Wald Chi-
Square Pr > ChiSq
Intercept 1 6.1302 0.1043 5.9257 6.3347 3451.61 <.0001
mfg A 1 0.0199 0.1559 -0.2857 0.3255 0.02 0.8985
mfg B 0 0.0000 0.0000 0.0000 0.0000 . .
Scale 1 0.827
s**********7
发帖数: 24
44
最近在做一个project,有一个数据,是一群人的考试数据,有 ID, binary
response 0/1, 0 是错误回答,1是正确回答, 以及age, gender, years of
education 这样的variable.
Psychology/measurement 里有IRT model, 所以要求用这一堆数据和Rasch
Model (one parameter logistic Model)来估计item difficulty parameter. 这个比
较简单,用HLM,item 是level1, 人的能力是 level 2.item nested within 每个人,
PROC GLIMMIX 就得出来了。
还有一个要求是用 SAS PROC GLIMMIX,用这个binary response 数据和age
, gender, yearsofeducation variable 来model 人的能力. 我有一点没想通,人的能
力是latent trait,在HLM (Multilevel mixed-m... 阅读全帖
s*********e
发帖数: 1051
45
risk parameters are important for economic models, stress testing, RAROC,
and basel accords.
Here is a little math ==> EL = PD * EAD * LGD
where PD ==> probability of default
EAD ==> exposure at default
LGD ==> loss given default
The measurements of PD and LGD are the same for both termed loan and line of
credit. However, there is big difference in EAD. For termed loan, EAD is as
simple as nominal amount of exposure. However, for line of credit, there
are 3 measures of EAD, each of ... 阅读全帖
w******8
发帖数: 59
46
I am using Lasso on analyzing gene data. I use 5-CV to find the tuning
parameter lamda but each time I am running it again, a different tuning
parameter will be selected and hence a different final model will be chose.
I know this is from randomness of partitioning the training set. What shall
I do? Shall I just run once and select whatever model produced? This seems
so random and not stable. Thanks for your input!
C***y
发帖数: 2546
47
default parameter is statically binded
n*******r
发帖数: 22
48
Thanks for the reply. I know what static binding means :)
What confuses the hell out of me is, a::Func1() is dynamically bound to
B::Func1(), but A::Func1()'s default parameter is passed into B::Func1().
Why?
Any insight?
z***e
发帖数: 5393
49
之前我发过个帖子讨论科班和非科班的问题,这就是个例子。
不要被什么vtbl之类的束缚了,想一下如果你写一个compiler会怎么处理。
compiler读到这个a.Fun1(),首先去看A是否有matching function signature(注意,
compiler不会在B的function table里面找,因为a是type A),找到了,然后看用什么
参数,生成大概如下代码:
push 10
call A::Func1
这里default parameter只是帮助source code少打几个字而已。
f*******b
发帖数: 520
50
最近刚开始练习用java做题,突然发现其没有pass parameters by reference,比如C#
里的 ref 功能
比如
Object o = "Hello";
mutate(o);
System.out.println(o);
private void mutate(Object o)
{
o = "Goodbye";
}
结果是显示"Hello",怎样让其显示"Goodbye"呀?
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)