由买买提看人间百态

topics

全部话题 - 话题: funcitons
1 2 下页 末页 (共2页)
m****o
发帖数: 114
1
来自主题: Programming版 - c++ 两个库接口冲突
create a new header file to be included by your own code, where you can make
different names or namespaces for the funcitons or symbols from two library
, and create two seperate source files (one for each library) to implement those functions, which just are wrappers of those conflict funcitons.
h********y
发帖数: 2
2
来自主题: Engineering版 - 紧急求救:writing S-function in matlab
I have a multi input coupled 2nd order non-linear system and want to generate
a
S-funciton generic simulink block. The forward numerical method run well in m-
file formate if given a very small step size: deltaT=.00005, but it will blow
up when implemented by using s-function block.
I don't have much experience using m-file to write s-function. I am wondering
if the m-file s-funciton itself have some bugs when impelmenting this kind of
highly non-linear system.
Help help. and Thanks a lot.
h********y
发帖数: 2
3
来自主题: Engineering版 - 紧急求救:writing S-function in matlab
I have a multi input coupled 2nd order non-linear system and want to generate
a
S-funciton generic simulink block. The forward numerical method run well in m-
file formate if given a very small step size: deltaT=.00005, but it will blow
up when implemented by using s-function block.
I don't have much experience using m-file to write s-function. I am wondering
if the m-file s-funciton itself have some bugs when impelmenting this kind of
highly non-linear system.
Help help. and Thanks a lot.
h****9
发帖数: 37
4
i had that problem, it was making noise. power steering fluid is about $5
a bottle. if this is indeed the problem with your car. get the ones with
sealing funciton. it can seal small leak. it the car doesnt worth much,
no need to spend a whole lot to fix it. do it yourself. back to the old
days, there was no power steering. you can drive without it.
if this is not the problem, could be your front axles are leaking. if not,
get it checked out. i doubt it is the power train problem.
N*****d
发帖数: 310
H*M
发帖数: 1268
6
来自主题: JobHunting版 - 我想了想
比如说吧,你就很强
但是你不太红黑树,那我就叫你写红黑树的insert/delete funciton
B*M
发帖数: 1340
7
来自主题: JobHunting版 - epic这个题该怎么答
glassdoor上看到的,
这题好像不大清楚,设定不同,难易差别也挺大,
哪位大侠见过这题,给说说,多谢!
Write a code to indent a block of code (something which is done by IDEs such
as visual studio) .I was given a few programming constructs such as if else
, for construct and a funciton block. Special cases to handle : nested if
w******1
发帖数: 520
8
来自主题: JobHunting版 - 指针函数, 函数指针, 头大。。
下面的这几个是错的么? 都是什么意思啊? 我觉得三个答案都是错的
about pointer to funciton :
how will a pointer to a pointer to a function will be declared
void (*(*ptr[]));
void *ptr[];
void (**ptr[])
b*******y
发帖数: 32
9
来自主题: JobHunting版 - 报一个offer
onsite两次,
第一次问了两个简单问题,
C++ Virtual Funciton之类,
答得不好,
Lead说你可能没准备好。
第二次问了三个简单问题,
答的也不好,
我说我SQL语法有点忘了。
这几个月挺烦的,
确实没好好准备。
回来给我offer,
稀里糊涂的我就接了。
感觉他们找不到人硬要塞给我offer一样。
太惭愧了。
Layoff四个月了,
总算可以工作了。
觉得要我的唯一原因是他们做的东西,
我十年前在华为工作的时候,
做过类似的东西。
h*********3
发帖数: 111
10
来自主题: JobHunting版 - universial hashing 一问
我看了看书,说是每来个key,随即的选一个hash function 来计算hash的位置,是这
样吗?
如果是这样,那么插入时用了一个function f1, 读出时用了另外一个funciton f2,
怎么可能找到需要找的item呢?
r*******y
发帖数: 1081
11
来自主题: JobHunting版 - 问个google面试题
how about using two recursive funciton ?
int maxpath(node * root) retun the max sum of the nodes along the path from
root to a leaf.
int maxpath2(node * root) return max F(x, y).
Below is the implementation
int maxpath(node *root){
if (root == NULL) return 0;
if (root->left == NULL) return root.value + maxpath(root->right);
if (root->right == NULL) return root.value + maxpath(root->left);
return root.value + max(maxpath(root->left), maxpath(root->right));
}
int maxpath2(node * ro... 阅读全帖
e********r
发帖数: 2352
12
请问能把partition funciton也贴出来吗,谢谢哈.
S**I
发帖数: 15689
13
来自主题: JobHunting版 - [合集] 问个google面试题
☆─────────────────────────────────────☆
Bayesian1 (Jason) 于 (Tue Jun 21 01:52:31 2011, 美东) 提到:
Given a binary tree, find 2 leaf nodes say X and Y such that F(X,Y) is
maximum where F(X,Y) = sum of nodes in the path from root to X + sum of
nodes in the path from root to Y - sum of nodes in the common path from root
to first common ancestor of the Nodes X and Y
☆─────────────────────────────────────☆
SecretVest (Secret Vest) 于 (Tue Jun 21 04:01:30 2011, 美东) 提到:
not hard if someone is used... 阅读全帖
g****y
发帖数: 240
14
来自主题: JobHunting版 - 出两道题目大家做做
你那个process_dictionary funciton里面,只需要考虑两个相邻的word就可以了。没
必要挨个考虑。例如:ab ac ad 只需要考虑ab ac和ac ad就好了,没必要考虑ab ad。
c**********t
发帖数: 8
15
来自主题: JobHunting版 - 一道面试改错题,求答案
纠结它只让改三行code, 毫无头绪,求解
Consider N coins aligned in a row. Each coin is showing either heads or
tails. The adjacency of these coins is the number of adjacent pairs of coins
with the same side of face.

You are giving an implementation of a function:
int solution(int A[], int N);
that, given a non-empty zero-idexed array A consisting of N integers
representing the coins, returns the maximum possible adjacency that can be
obtained by reversing exactly one coin (that is, one of... 阅读全帖
t*****a
发帖数: 106
16
来自主题: JobHunting版 - FB面经(挂了)
题目非常长,我把大概意思和你说一下。就是一般的BST一个node只有一个value, 现在
一个node有两个value,v1,v2.按v1建BST v2就不是BST了,问你咋弄。我给了两个解,
一个是先定义cost funciton, 按一个value建BST,第二个算cost, recursive遍历,然
后找cost最小的。因为recursive是exp的复杂度,所以中间加memory. 第二个我就说了
一下,说可能可以改splay tree, 把一个value当frequency, 然后修改splay tree 算
法,建BST.
c******e
发帖数: 40
17
我也是这么说的,说明hash funciton有问题

发帖数: 1
18
来自主题: JobHunting版 - Pinterest跪经
新鲜面筋,自我感觉非常好以为稳稳的,but。。
HR踩着我其他offer的死亡线发的拒信,难不成也是纠结了好久才决定拒的?
此轮onsite唯二的fail,第一家fail也是个P - Palantir, 大家都懂的
没有怨恨,只有些许不解,而且不给feedback我以后怎么学习一个,怎么查漏补缺
板上规则我懂,发个面筋再说话。让各位老司机帮着掂量,更欢迎Pin内部人士留言or
发信 if lucky
没签NDA
电面: general tree序列化/反序列化,如何thread safe。面试官是Pin的大牛lead
onsite:
1. 有一个function A,会被callback访问到,让实现一个funciton,可以统计过去N秒
这个A被call了几次。 经典题,circular array统计每秒call的次数
顺利写出来,不过提醒了一个bug
2. 经历丰富的国人大哥,一看就是大牛。给一个蹦了的jobID,让找出所有depend on
这个ID 的其他job。 实质就是图的遍历, BFS
3. data structure, add(), delete(), getRan... 阅读全帖
g*****a
发帖数: 8
19
来自主题: JobHunting版 - Pinterest跪经
1. 有一个function A,会被callback访问到,让实现一个funciton,可以统计过去N秒
这个A被call了几次。 经典题,circular array统计每秒call的次数
请问这个能详细说一下吗 好难的样子 没见过 多谢 !
x*******u
发帖数: 194
20
what you said is exactly the same as what my wife comment :)
actually this is just to think about how to make the backyard more
attractive and efficiently used. A badminton/multi-funciton play court is to
my consideration a good option, I am doing study now but,seems like it's
not economic/function rated to the ultimate purpose of future sell-out.
Anyway, not that many ppl here like badminton as a household activity, an
easy one is just leveling a corner and erect a basketball rack, and design
s... 阅读全帖
a****g
发帖数: 3027
21
"不和同龄孩子交往,和大人交往主要表达其需要,缺乏用语言表达的情感交流"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
这个当然属于交流方面有问题/困难"。但是这个不一定等于就是high-function ASD。
自闭症的小孩子有这个。不是自闭症的小孩子,spirited,sensitive, 性格内向,受过
刺激打压的小孩子,也会这样。最简单容易的诊断就是 ASD (尤其是high function
ASD)一统江湖。个人的经历,觉得不少心理学家在这方面看法很不一样。 其实同样的
症状,positive psychologists and permissive psychologists能够得出不同的结论
。这个时候,非常需要父母自己动脑筋去思考小孩子自身的性格,先提高自己的交流方
式。而不是指望,弄了个帽子,专业机构就能帮助的更好。 真正的high-funciton ASD
有些治疗方法, 比如ABA,可能很不match "spirited,sensitive, 性格内向"的小孩
子... 阅读全帖
i*******e
发帖数: 1904
22
来自主题: Stock版 - 搞JCP还不如搞NUS
NUS的sentiment parameter怎么等跟JCP比呢?JCP的sentiment已经差到极点了。
好比一个估值的funciton,V(F,S),V是股票的现值,F是fundamental,S是sentiment。
JCP的S variable的现值是-∞。你不捞它捞谁呢?
M*******c
发帖数: 4371
23
来自主题: SanFrancisco版 - 现在costco也不好退东西了
没开封 does not mean it is still funcitoning well.
I just give an example.
They might use chemical or radiated material inside for detection.
After such a long time, the substance might just lost their effectiveness.
Why do not go and purchase meat and return them 4 years later?
s**********e
发帖数: 112
24
Of course this post attracts people like you (with same dirty mind).
otherwise you won't be here. This post has another funciton: expose people
like you who only cared about if people Fxxked each other (you mentioned
that in your previous comment).
be careful with your F words. at least brush your teeth before you open
your stinky mouth.
B*M
发帖数: 1340
25
来自主题: Wisconsin版 - epic这个题该怎么答 (转载)
Write a code to indent a block of code (something which is done by IDEs such as visual studio) .I was given a few programming constructs such as if else , for construct and a funciton block. Special cases to handle : nested if
glassdoor上看到的,
这题好像不大清楚,设定不同,难易差别也挺大,
哪位大侠见过这题,给说说,多谢!
m********l
发帖数: 4394
26
来自主题: Wisconsin版 - epic这个题该怎么答 (转载)
Epic asks that?
It's a basic compiler problem, solved by using a stack.
When a token matches a keyword, you push the keyword to the stack and
indent the following codes. Same thing with ending keyword, you pop the
stack and move the code back.
I don't think you can write a complete program within limited time. (e.g.
the parser, etc.)

such as visual studio) .I was given a few programming constructs such as
if else , for construct and a funciton block. Special cases to handle :
nested if
y****t
发帖数: 9189
27
来自主题: Soccer版 - Fed Chair你是不是真搞econ的?
什么是utiltiy funciton?
T****r
发帖数: 22092
28
http://dzh.mop.com/whbm/20120102/0/5zl7FlI288d48dFz.shtml
万字遗书轻生女肖艳琴“死而复生” 浏览量:0 回复数:0 ★山东联盟 复制链接
分享到: qq 人人 新浪 小米 推客
2011年的最后一天晚上11点,微博上@BTV生活2012 发布了一条爆炸性消息:
小三逼死原配事件,有了新变化:@BTV高燕原配艳琴还活着!艳琴想通过《生
活2012》告诉网友们,千万别激动,她遗书里所写的事是真的,她自杀也是真的。
但是生命是美好的,死了一回的艳琴想通了,她将接受《生活2012》主持人高燕的
专访,详细讲述事件的来龙去脉。
而在被质疑为什么不带蓝V认证之后,带V的@BTV生活在回复中表示@BTV生活201
2 正在申请新浪认证。而此前@BTV高燕和@BTV生活2012 的互动也足以说明@BTV生活
2012 身份确凿。
随即,在凌晨1点左右,之前一夜增加了数千名粉丝,删得手痛的女主朋友“接
近神的小猪”(下称小猪)证实了女主还活着的这个消息:
“有朋友问葬礼的事情,我说一下。杭州的朋友们收到用小琴号码发的短信... 阅读全帖
l*****8
发帖数: 16949
29
来自主题: WaterWorld版 - pi*e当然是有理数,因为等于零!
你们这些人怎么基本的数学概念都搞得乱七八糟的。还什么多值函数,如果一个映射是
多值的,就不能再称为函数了。也就是说,f(x) 一定有一个定值。如果f(x)既可以等
于a,也可以等于b,f就不是函数。
指数函数在复空间也是函数,也就是说,a^x对任何a,x都是唯一的,不存在什么1^e还
可能有不同的值。
这里的问题是函数是不是1-1函数(即不清中文是怎么表述了,英文叫injective
funciton).也就是说如果 f(a) = f(b),那么a必然等于b.回到指数函数,它在实数空间
里是injective,也就说如果e^a=e^b,那么a=b,但这个在复空间不成立,因为e^0 = e^{i
2\pi}.
楼主变得魔术是从e^{2\pi e i} = e^0 推出 2\pi e i = 0,这里用的假设是指数函数
是injective,但这个在复空间里已经不成立了。
t******n
发帖数: 2939
30
☆─────────────────────────────────────☆
btphy (btphy) 于 (Sat May 25 03:19:10 2013, 美东) 提到:
版上弱智真多,这么简单的问题都搞不清楚。证明如下。
exp(2i pi e)=(exp(2i pi) )^e=1^e=1
==> 2i pi e=ln(1)=0
==> pi e=0
证毕。
★ 发自iPhone App: ChineseWeb 7.7
☆─────────────────────────────────────☆
feverpitch (狂热) 于 (Sat May 25 05:42:46 2013, 美东) 提到:
这个问题很难啊

☆─────────────────────────────────────☆
heathen (The real folk blues) 于 (Sat May 25 05:57:11 2013, 美东) 提到:
不难。刚才搞错了,LZ的公式“正确”。不过还可以更简单。
exp(2*i*pi)=1 ==> 2*i*pi=ln(1... 阅读全帖
a*********7
发帖数: 30080
31
嗯,对于多哈的问题(2),我想这个程序不记录上一次结果、不回头做对比,一个原
因可能是:有的funciton参数可能相当多(比如说参数可以是每个点的weight,而一个
dataset可以有数以万计甚至百万计的点
),不光对比费时间,记忆这些参数也可能很费空间。
所以象河马说的,只要差得不多,就无所谓了。
我不了解这个程序,纯属猜测。
s*****c
发帖数: 36
32
来自主题: Database版 - Re: question about CAST and Multiset
Hi,composite:
As for user defined data type support of Cast, I think it
depends on the specified DBMS.
"Multiset" is unrelated with "Cast". It's not a function,
but a concept. It is the definition of multiset: An
unordered collection of objects that are not necessarily
distinct. The collection may be empty.
Because SQL allows duplicate rows in a table, or applied
aggregate funcitons may result in duplicate rows, by
default,
SQL treats a table generated by select or group by as a
mutliset rather
L*******r
发帖数: 1011
33
来自主题: DotNet版 - .net前途如何?
refactoring tools, integration with Ant, Outstanding CVS support.
You can use third-party addin to have all these functionalities in JBuilder.
free. And all these funcitonalities are in Eclipse.
Anything special in IntelliJ?
d******i
发帖数: 5
34
I am a Java beginner, doing homework to make a parser. I want to know how to
find the number of funciton pointers in Java file?
thanks, gao shou!
d******i
发帖数: 5
35
sorry, it is "funciton point" and "object point"

to
g***y
发帖数: 764
36
C/C++都需要头文件,class or funciton declaration什么的
为什么java就不需要了,而只要class definition就成了?
谢谢
g**********y
发帖数: 14569
37
That's true. But I'd really like to associate that funciton to HTML element,
just to satisfy my purity on OO style :)
A**o
发帖数: 1550
38
i must have used intellij's plugin coz i don't have any memory of this
problem.
oh well, it could be i never used history funciton at all. :)
g*****g
发帖数: 34805
39
来自主题: Java版 - spring 和 jsf 的整合
Do you do that in Swing? You want to show a panel, what do you do?
You new the panel, and you call show funciton of it, plain and simple.
You don't declare the panel inside an XML, declare a state, then
associate that state with show function of the panel. Not that you
can't achieve XML navigation with Swing, but nobody does it for
a reason.
Once you put logic in XML that's beyond configuration, you lose the
benefits of what a strong type language can bring you in compilation
stage. A centric vi
c*****t
发帖数: 421
40
来自主题: Programming版 - help understanding code (random number)
Hi, this is copy&paste from a piece of code I am reading, but
can't understand:
int nc[5], extObt = 0;
set freeNumbers;
......
set::iterator si;
for (si = freeNumbers.begin(); si != freeNumbers.end() && extObt < 5;
++si)
{
if ((*si) % 200 == (rand() % 82))
{
nc[extObt] = (*si);
extObt++;
}
}
The funciton of the code is to randomly pick up 5 numbers from the set
of freeNumbers, but I can't understand how it i
q*****g
发帖数: 72
41
来自主题: Programming版 - 一个c++问题 (转载)
如果有virtual funciton,“通常”会在头上加个RTTS和vptr
y*****d
发帖数: 415
42
来自主题: Programming版 - 菜鸟问一个C++的问题
菜鸟问一个C++的问题
请看code:
PreporBox p; //preporcessor for box-shaped domains
p.geometryBox().scan(geometry) //initialize the geometry
我的问题是,那个p是个PreporBox class 的object,对吧?p.geometryBox()这个
funcition怎么后面还可以跟一个funciton scan(geometry)呢?这种格式用到的是C++
哪部分知识啊?
多谢各位赐教!
d****n
发帖数: 130
43
来自主题: Programming版 - 关于C++中const的问题
1. 一般如果函数的参数是引用或指针类型,而且在函数中不会改变,一般都应该声明
成const,对不对?
2. 那么member function什么时候应该声明成const呢?如果函数不修改类的成员,是
不是也尽量应该声明成const,我的理由是,如果第一条成立,那么类就会经常有const
的object,如果member function不声明成const,就没法调用这个member funciton.
关于const有什么使用的guideline吗?
b***y
发帖数: 2799
44
来自主题: Programming版 - 关于inline function里的static variable
如果定义了一个inline function, 并在多个程序文件里调用, 这个function里有stati
c variable, 如果这个funciton确实被inline了, 是不是会有多个static variable的c
opy?
P********e
发帖数: 2610
45
来自主题: Programming版 - c++ 两个库接口冲突
一个可能不够
每个libary一个wrapper

make
library
those functions, which just are wrappers of those conflict funcitons.
N***m
发帖数: 4460
46
this is sth I do not understand,
but c++ does not allow functions only differnt in return types.
so the compiler should treat them as same virtual funcitons?
m*****e
发帖数: 4193
47
来自主题: Programming版 - 如何建立比较好的文档系统?
Funcitonal/Design spec, test plan, etc etc
r*******n
发帖数: 3020
48
来自主题: Programming版 - 关于FP
我觉得data immutable是FP特性的基础,没有它,Higher Order funciton就实现不了
p**r
发帖数: 5853
49
来自主题: Programming版 - 这个应该咋做好?
db trigger能做得有限,
你这情况肯定需要通知用户,搞不好还要整些图片,啥的。
我建议你写个本地或远程funciton,定期检查比较方便。
biz用户可以各种定events,然后添加到list里
比如这是events list
#1 call zhaoce, 1/1/2015
#2 send gift to goodbug, 2/1/2015
#3 fuck someone, 3/1/2015
你写个功能定期检查这个list,
要是不频繁,用个time range把前后时间覆盖了
不久搞定了。
1 2 下页 末页 (共2页)