由买买提看人间百态

topics

全部话题 - 话题: funtional
首页 上页 1 2 3 (共3页)
c********x
发帖数: 84
1
来自主题: Programming版 - 烤树题。
The question is to test you to write a recursive funtion.
c********x
发帖数: 84
2
来自主题: Programming版 - interview questions

example.
1. use static funtion.
2. an algorithm is a function in a predefined template.
3, T is unknow, if T is an array, you need to use delete[]
n**d
发帖数: 9764
3
来自主题: Programming版 - Default function template arguments
"You can provide default arguments for template parameters in class
templates, but not function templates."
the words are from "Thinking in C++" V2. The first part is easy understood,
which is something like this
template class Stack {...}
But how to understand the 2nd part, "not funtion templates". Is it something
like this, which should be illegal according to this rule?
template T sum(T* a) {...}
s*****p
发帖数: 5342
4
来自主题: Programming版 - question on CSS
我从网上找了一个tool.it displays a table with paging and sorting funtion. 可
是it 带着自己的CSS.如果我include it in my header, it changes all my style
like table etc. 我能不能用
把it圈起来.只让its style sheet works inside <
div>?
i am new to CSS. 问题可能很傻.Please help!
3x!
b***y
发帖数: 2799
5
来自主题: Programming版 - [合集] Inline member function in C++
☆─────────────────────────────────────☆
isup (No) 于 (Fri Feb 8 19:50:44 2008) 提到:
I want to put the class definition in one .h file, and all inline member
fuction in one .cpp file. By this way, I can hide the souce code from the
class client. It seems not work when I put main() in another .cpp file and
compile the both .cpp files. The error messages say the inline member
funtions are Undefined.
Is it possible to hide the inline member functions' code?
☆─────────────────────────────────────
b***e
发帖数: 1419
6
* 我没说ruby/python不好。我本人是ruby的fans。我只是说它们不能作为严格意义上
的函数式语言。在学术界,大家认为Haskell/Lisp/ML/Ocaml/Erlang是函数式语言,但
没有人认为ruby/python是。不是有lambda就是funtional language。
* Ruby on Rails并没有颠覆任何东西,它只不过是把复杂的java based web
framework搬到scripting language上的一个先驱。python/php/perl/any script
language can do the same thing. It's not a language specific thing at all.
* Google only uses Python because they suck, not because python is
particularly better than other languages in any sense.
* map/reduce is just a term. It roots
b***e
发帖数: 1419
7
* 我没说ruby/python不好。我本人是ruby的fans。我只是说它们不能作为严格意义上
的函数式语言。在学术界,大家认为Haskell/Lisp/ML/Ocaml/Erlang是函数式语言,但
没有人认为ruby/python是。不是有lambda就是funtional language。
* Ruby on Rails并没有颠覆任何东西,它只不过是把复杂的java based web
framework搬到scripting language上的一个先驱。python/php/perl/any script
language can do the same thing. It's not a language specific thing at all.
* Google only uses Python because they suck, not because python is
particularly better than other languages in any sense.
* map/reduce is just a term. It roots ... 阅读全帖
s******d
发帖数: 901
8
来自主题: Programming版 - new to python,问个stupid的问题
如果run下面这段code,得到这个error,怎么回事啊?funtion难道必须define再module
里吗?我知道有点急功近利,这个语言的基本概念还没搞清楚,不过比较急着用,来不
及慢慢学了。
startAndShutdown(client1)
NameError: name 'startAndShutdown' is not defined
from systemtest import *
try:
do stuff here.....
client1 = createClient();#defined in the import module
client2 = createClient();
startAndShutdown(client1)#call the function
startAndShutdown(client2)#call the function
finally:
teardown()

def startAndShutdown(client):
do stuff here....
k**0
发帖数: 19737
9
UAC设置的问题吧? 可能程序里有些FUNTION用到了某些需要UAC许可的东西, 而你又不是电脑上的ADMIN.
j*******e
发帖数: 674
10
来自主题: Programming版 - 专业c++程序员都用什么ide (转载)
个人觉得,framework和library是相比较的。
API是个interface, framework可以提供API,library也提供API.
framwork和library的指导思想差别还是比较大的。
当然也可以说,main() funtion就是framework的入口。这样,世界就大一统了。
t****t
发帖数: 6806
11
来自主题: Programming版 - C++ template function type
你这个写得错误百出的, 看得太费劲了
如果你问的是调用histo的pf应该怎么构造, 应该是
std::bind1st(std::mem_fun(&Hist::count_mapper), this)
因为bind/bind1st做的是bind1st(A, B)(C) --> A(B, C)这样的转换, 但是你如果直接
给A=&T::M, B=this的话, 编译器期待B->*A(C)这样的调用. mem_fun(准确的说是mem_
fun返回的functor)进行的转换是mem_fun(A)(B, ...) -> B->*A(...), which is
exactly what you need.
另外, 你histo的参数和C没有直接的关联, 不能直接推断. 如果你准备在函数调用时显
示给出模板参数的话, 最好把C放第一个.
还有你的mapper返回的都是void, 难道不是返回int或size_t吗?
至于这个设计, 也就这么回事了. C++的funtional大概就是做到这个程度.
c****e
发帖数: 1453
12
来自主题: Programming版 - C# is light-years ahead of Java now
You are arguing different subjects here. People are talking about the
language rather than its market share. C# gradullay integrated many features
, some are borrowed from funtional lauguage, in a nice way such as
everything is well laied out. I wouldn't just call them "syntax suger".
Otherwise, you can name anything beyond loop/variable/branch syntax suger.
I understand people get their stands based on their own experience. But I
feel you just blindly redirect anything regarding Java to the num... 阅读全帖
g*****g
发帖数: 34805
13
来自主题: Programming版 - Linq不是syntactic sugar
我要说几遍你才明白。语言是用来写东西的,不是用来装逼的。
C#有的类库和产品,java都有,java有的,C#很多没有。不就说明linq这东西就是个糖
水。
糖水的意思,就是没有增加功能,可以简化语法。如果linq增加了功能,好歹也得写个
java写不出来的类库吧?你来回循环论证Linq有first class funtion有屁用。倒是用
first class function写个java实现不了的类库/产品不就得了?简单的举例你没有,
成天拿点语法绕来绕去的你不烦?本末倒置,还执迷不悟了。

troll
thesis
a****a
发帖数: 67
14
原文:http://ladder.azurewebsites.net/forum.php?mod=viewthread&tid=121&extra=page%3D1
第一集:Mr.Method
Hi,大家好~~我是Mr.Method,和Mr. Okay是好哥们儿。
在所有面向对象的语言里你都能见到我的身影。不信?你们学编程的时候第一个程序
都是Hello World吧?那就是依靠对我的调用实现的——无论是哪个平台、哪种语言,
你一定调用了在命令行里输出字符串的某个Method。
铁三角
在正式介绍我自己之前,还是先说说我的哥哥和妹妹吧,我们的家庭背景有助于大家
对我有一个更好的了解。我的哥哥(Mr. Class)和小妹(Mr. Field)加上我,我们仨
可是面向对象家庭里绝对的主角、“铁三角”。我们三个之所以称为“铁三角”是因为
我们各司其职、配合的非常默契。Mr.Class,他是个很好的组织者,他能把从现实世界
抽象出来的结果良好地组织在一起(这个叫“封装”)——我(Mr.Method)和我小妹
(Ms. Field)被我哥管着(注:被封装在类里)。小妹负责表示我们这个小组织当前
... 阅读全帖
p*****g
发帖数: 7
15
来自主题: Programming版 - scala和monad
那些倾向Pure Funtional的与比较考虑企业应用的渐行渐远:
http://typelevel.org/blog/2014/09/02/typelevel-scala.html
s******y
发帖数: 613
16
来自主题: Programming版 - 问个 enum{}的问题 谢谢 (转载)
【 以下文字转载自 biojailbreak 俱乐部 】
发信人: szbiophy (szbiophy), 信区: biojailbreak
标 题: 问个 enum{}的问题 谢谢
发信站: BBS 未名空间站 (Fri Sep 12 15:32:09 2014, 美东)
目标 写个.c 的文件(e.g. playgame.c)
这个.c 文件只有一个funtion, 没有main fn
这个是个掷色子的游戏,掷到6就赢,1就输,其他就 recursive 掷 直到输活赢
(掷色子还有另一个 function)
我的问题是 如果用 enum status { continue, won, lost }; 定义了 3个status
可以用 status 作为返回值吗? 如
status playgame()
{
}
d*******r
发帖数: 3299
17
来自主题: Programming版 - Exception
大牛说的是,
那还是可以像我在 11 楼说的,可以用强制处理 (恢复或者往上层return)的方式,用
unexpected_return_value 就实现 expectation 了吧. 就是说,不用新造一个叫
expectation 的新概念,就用现有的 funtion return value 就可以实现一样的功能了.
l******t
发帖数: 55733
18
来自主题: Programming版 - C++的牛B之处你们都还没体会到
no。 用了lambda自然就会是funtional抽象而不是OO抽象。就会用map maybe stream。
都是fp的第二梯队
l******t
发帖数: 55733
19
来自主题: Programming版 - C++的牛B之处你们都还没体会到
no。 用了lambda自然就会是funtional抽象而不是OO抽象。就会用map maybe stream。
都是fp的第二梯队
a*c
发帖数: 6
20
来自主题: Unix版 - why?
我碰到了一个很奇怪的问题:
platform: SUN Enterprise 420
OS: solaris 2.7 server
reboot之后, 我用netstat看socket的状况, 这时候
是htserver.4100....(htserver是这台机器的hostname. 4100
是一个server的端口). 这时候ping htserver
it will say:htserver is alive
但是, 大约55分钟后, 我用netstat看, 就变成了
cl188-33.invision.com.4100, 这是什么问题呢? DNS?
这时候ping htserver, it will say: htserver.xxx.com is alive
我今天一天就一直在试这台机器, 每次都是55分钟就会这样?
是我的solaris没配好? invision.com是公司的isp.
这个问题直接导致了我的一个database server 不能funtion,
因为它需要机器的hostname进行联接.
谢谢各位的回答.
对了,reboot后, 我要用
route
h**h
发帖数: 132
21
btw, did you try expect lib in C?
there is a chapter in Exporing Expect, introducing
how to embedded expect funtion into C
b******r
发帖数: 8
22
I reassign the value of t
in while loop of client funtion
by t=int(*argv) every loop,
then it works.
seem t becomes 0 after each loop
why?
I use recv for "read"
Thank
c******n
发帖数: 90
23
来自主题: Accounting版 - 兑现承诺-今天下午REG考后感
NFP的non-related business income/taxable income具体在BECKer哪里,我真的还不
知道。我就是最后在Wiley的fast track里过了一遍才看到这个topic。当时就记住了跟
这个organizatino本身funtion没有关系的就是non-related business income,其他
的看了也忘了。找找becker的目录,还是看原文的比较好。
n*******8
发帖数: 893
24
In becker, simulation does not like MC, which can save/print both the
question and answer. Simulation only can be prited out the answer. Maybe my
computer skill is poor, but simulation did not have the same funtion as MC
in becker.

simulation应该也能做成pdf吧?呼唤科技牛人。
h**********d
发帖数: 30
25
来自主题: Biology版 - 请教一下膜蛋白表达问题
funtional,但是当然是比WT还原氧气的活性要低,每次得到蛋白,我会从光谱看SORET+
ALPHA
BAND,用PAGE看4个亚基,用HPLC测醌和HEME的比例,最后ICP-OES表征一遍蛋白的铜和
铁含量,
应该都是正常FOLDING的蛋白,CW-EPR,RAMAN光谱的数据也都会告诉我蛋白是否正常。
烦请前辈能告知一下PET质粒的浓度在MINI PREP后多少为宜呢?比如5ML的OVERNITE
CULTURE,按
照我的经历,这个双质粒体系两个在一起如果用50微升洗脱,质粒总浓度在50到100ng/
uL之间,
而且每次PET都比PAC的条带看起来更亮一些。
多谢了

luck
i***l
发帖数: 1656
26
agree this, partially, and zan the upstairs suggestion on frog oocytes
1. localization
2. in vitro function, and mutagenesis
xenopus oocyte is my #1 suggestion, HEK293 , ,,,,,
radio activity labeled substrate uptake should be easier if it's neutral
transporter
NOTE electrophysiology requires special training, but it works well ,as long
as target transports ionic stuffs or is ph dependent
3. in vivo funtion
btw it could be channel instead of transporter, who knows
btw, you'd better determine t... 阅读全帖
l******o
发帖数: 3764
27
有一个paper里面提到了几个SNPs有funtional change,
没有给rs#,只给了相对位置
其中有两个SNP在dbSNP里面根本找不到
分别是 UGT1A4 -36G>A, UGT1A4 -217T>G
dbSNP里面UGT1A4 5' near gene region倒数4个分别是
rs3732219 -219C>T
rs45454101 -204G>A
rs3732218 -163G>A
rs199517966 -39C>T
请问为什么会这样?我有什么地方理解错了吗?
dbSNP link:
http://www.ncbi.nlm.nih.gov/projects/SNP/snp_ref.cgi?chooseRs=a
f******g
发帖数: 382
28
解不出结构的没办法.现在大药厂的基本操作确实是只要有可能,都会去尽力去解.
比如IDH, 发现它有个gain of funtion, 可以作靶点,Agios立刻就找contract
company了结构方面的研究。
象fragment-based drug development,结构就是必须的,而且是不断解药物-蛋白化合
物结构来优化药物。一个例子是abbot的BCL2 inhibitor ABT-XXX 系列。因为是target
蛋白蛋白作用,没筛出什么好药来, 是通过fragment-based drug development找出
来的。
其实大部分的生物研究从长远看还是有用的。只是生物太复杂,产业化在现阶段很难。
学生物做研究确实不挣钱, 下定决心,花点功夫,转行并不难。没有必要把自己辛辛
苦苦做的东西说得那么没用不堪。
l*****a
发帖数: 119
29
Cost function shouble a subset of objective/goal function. Generally,
object/goal function can be minimize or maximize. However, we only want to
minimize the cost funtion, because it's our cost.
s****e
发帖数: 36
30
来自主题: Computation版 - colored noise 问题
需要用matlab产生一组colored noise。
办法是先产生white noise,然后用filter产生需要的noise。
哪位大拿知道怎么设计filter,funtion如下
L*****e
发帖数: 169
31
来自主题: EE版 - 请教随机信号频谱的问题
Power spectral density and four transform are different.
The autocorrelation of white noise is actually delta funtion.
Power spectral density is the fourier transform of the autocorrelation
function.
Get it?
not because of phase. you are comparing apples to oranges.
K**********n
发帖数: 1197
32
来自主题: EE版 - 版上有人懂这个技术没?
学术界珍稀有限的原版外文资料,
Remote Mind Control Technology

Reprinted from SECRET AND SUPPRESSED: BANNED IDEAS AND HIDDEN
HISTORY, edited by Jim Keith, $12.95, available from
1-800-680-INET.
There had been an ongoing controversy over health effects of electromagnetic
fields (EMF) for years (e.g., extremely low frequency radiation and the
Navy's Project Seafarer; emissions of high power lines and video display
terminals; radar and other military and industrial sources of radio
frequencies and micr... 阅读全帖
w*****3
发帖数: 2301
33
来自主题: Environmental版 - 有没有做EHS或HSE的?
其实归根到底,
实践是检验真理的唯一标准.
张三说我做EHS
里斯说我EHS
王五说EHS很好找工作
.....
实际情况是什么呢?有几个中国人在茫茫EHS大海中呢?
举例, TCEQ had a meeting in AUSTIN last week and approx 160 EHS from oil and
gas companies in tx,maybe a few from other industries like manufacturer, I
only saw 3 Chinese on the list. so you can see the chance for finding an EHS
is extremely low for us. this case might not be a good sample but it can
still show some trends.
also, as discussed above, the EHS title is generally EHS COORDINATOR or
specialist and neve... 阅读全帖
h***d
发帖数: 53
34
来自主题: Law版 - Help - A question about IP
Thank you so much. Great questions.
This is only about patent disclosures.
1. If a diagnostic tool and method used to detect A is well known, Mike
integrates this tool into a specific/physical part in B, creating a physical
design and feature C for B (disruptive?) and then he conceives some funtion
D similar to detecting A based on C. Can C and/or D be patentable?
2. Mike has Non-compete and works on new methods (software or algorithms in
stead of hardware) to detect A in CA, and Mike switch
a***n
发帖数: 578
35
来自主题: Macromolecules版 - Who is doing polymer-lithium
Thanks for your hint. I found several papers of Mayes AM.
In his research, polymer funtionalizes as a composite (something like a
support) but not as lithium polymer. In the battery, Li is still storaged in
the carbon block.
There was some paper talking about Li doped polymer itself.

this
this.
industry
the
If you consider Mayes' work, the mobility of Lithium ion intercalate into
graphite is more important.
c*s
发帖数: 2145
36
来自主题: Macromolecules版 - how to make some "patches"
on an individual polymer particles? suppose the size of the particle is ~ 200
nm. the patches stand out of surrounding area with different funtional groups
or hydrophobicity.
Furthermore, how to get these patches symetrically distributed on the
particle?
I do know from a workshop that somebody can do this , but the speaker was
reluctant to give more details.
x******g
发帖数: 318
37
来自主题: Mathematics版 - "分段"函数是不是初等函数
什么叫an indicator funtion?
f(x)=[x]不是初等函数
b******n
发帖数: 147
38
来自主题: Mathematics版 - Help, please...DCT error analysis
I meet a big problem about the DCT error analysis in my research.
For a discrete funtion f(i), i=0,1,...,n-1, I use the discrete cosine
transform to approximate it, which means calculate m coefficients and
approximate f(i) as f_m(x) where x=0,1,...,n-1. We know that only infinite
coefficients can approximate the original discrete function f(i) without any
error.But now since we only used m coefficients, some errors are introduced.
My problem is, how to calculate such error without any priori kno
C********n
发帖数: 6682
39
来自主题: Mathematics版 - 请教高人一个困扰我很久的问题
he is asking the general numerical method to solve the root of certain
funtion
should check some numerical method books
B********e
发帖数: 10014
40
来自主题: Mathematics版 - 能问个基本的1st order PDE问题不?
hehe,
keep in mind one thing:in general the initial data will be a curve,
(for example: x=1,y=u when s=0)
which means when you try to get c2,you'll not get a number,you
will instead get c2(u)---a relation connects y and u,
in the meantime, from x=as+c1,you get s as funtion of x,plug into
3rd equation,you get everything in the final equation.
the key is:c1,c2 might not be exact constants/numbers.
find a book and practise a couple easier exercise ,you will find the
subtle point;)
q********e
发帖数: 1255
41
来自主题: Mathematics版 - H^1_{0,\Gamma_0}的dual space是什么?
简单点,distritution扩展了函数的定义,通过研究函数作用在test function上的效
果而非研究函数本身使得更多的操作可以meaningfully defined。比如在distribution
意义下的多项式也可以定义fourier变换,比如在研究pde时经典意义下没法直接证明的
东西可以退一步研究distribution意义下的特性,然后考虑更高的regularity等等。
但distribution也要满足一定的性质,比如连续性等,才有意义。
distribution理论里的test function具有紧支集,它们在H_0^1中稠密,所以H_0^1上
的线性泛函都是distribution。而test function 一般而言在H^1_{0,\Omega}里不稠密
,所以后者上的线性泛函不全是distribution。比如一维情况下,假设你的H^1_{0,(0
,1)}包含所有在0点不必等零的函数\psi,那么(u,\psi)=\psi(0)定义一个非零线性
泛函u。 如果u是distribution,u作用在任何test funtion \phi\in D(
m******t
发帖数: 273
42
【 以下文字转载自 Quant 讨论区 】
发信人: myregmit (myregmit), 信区: Quant
标 题: how to do data fitting to find distribution
发信站: BBS 未名空间站 (Sat Mar 15 11:02:05 2014, 美东)
Hi,
I need to do data fitting to find the distribution of a given data.
I need to find the pdf funtion of the distribution.
I can use data fitting functions in matlab and python.
It looks like a truncated gamma.
But, how to find the paramters of the distribution ?
What if the data cannot fit the truncated gamma well ?
The QQ-plot (qunatile-qua... 阅读全帖
h********g
发帖数: 145
43
来自主题: MedicalCareer版 - 讨论:new intern如何管理时间和资料
昨天有史以来第一次上夜班,并收了3个病人。30hr, didn't sleep at all. Feel so
tired and chaotic. First time realized how important it is to organize your
time and pt info in a efficient way. In the morning, you have to present
your new pt info to the team. Imagining after 24hr non-stop, no nap, you
have to stay intact, basic funtioning not even thinking about being sharp.
Now concise, clear-cut organization your info will help you a lot.
大家都是怎么管理你的时间和病人资料的呢?
t********o
发帖数: 228
44
来自主题: MedicalCareer版 - 急问胆脂瘤中耳炎
I have not quite got what the problem could be.
For cholesteatoma, it is sometimes hard to say if the disease has been
removed completely. It depends on the exam, CT, what we see
intraoperatively et al
. Some advocate a staged strategy. If no recurrence in one year or so,
consider reconstruct the middle ear to improve hearing. This is probably a
safer solution.
If the tube between the nose and middle ear is not funtioning, a ear drum
tube insertion is reasonable. How is the hearing on the other... 阅读全帖
l*******8
发帖数: 1745
45
when I took anatomy class, I almost did not use dictionary at all, just
remember their english names, all the muscles, bones, and nerves.
even four layers of muscles in the palm. we have to remember all of that,
and superficial arch, deep arch, and those joints(DIP,PIP) and which part of
this bone will have which muscle to attach to, and those muscles funtion
not try to scare u, I did not use english-chinese dictionary at all, but u
still need a good english-english dictionary for medical field
s********d
发帖数: 103
46
来自主题: Pharmacy版 - Re. RNAi 抗癌药
In cancer patients especially liver cancer, the patients would have abnormal
levels of liver funtion reflected as varying levels of ALT/AST etc. which
is also likely to be accompanied by some inflammatory markers. Under anti-
inflamation drugs, the side effect especailly in the initial response of
drug in such patients might not reach a statistical level due to the large
variance of individuls. As such, the drug toxical effect can be masked, and
that is why it might be a smart/sneeky trial.
I ha... 阅读全帖
j******a
发帖数: 1599
47
nnd,
还是不知道怎么从Characteristic funtion 搞出 E[X1X2X3X4]
这个题以前明明做过,就是不会了。
y******g
发帖数: 41
48
来自主题: Quant版 - Can garch model be a white noise?
thanks for the reply.
my understanding is that garch talks aboutthe conditional variance of the
prediction error, which means that the conditional variance is a linear
funtion of past random shocks and past volatility.
My question is: if a time series shows a white noise feature in its ACF, is
it possible that its volatility having a GARCH model?
because even though the ACF shows a white noise feature (close to 0 at all
lags), but the time series plot still shows somewhat clustered volatility.
y******g
发帖数: 41
49
来自主题: Quant版 - Can garch model be a white noise?
actually how would you interpret "uncorrelated"?
means tat the two is not a funtion of the other?
首页 上页 1 2 3 (共3页)