z********0 发帖数: 9013 | 1 【 以下文字转载自 Military 讨论区 】
发信人: THR (???), 信区: Military
标 题: Re: WSN们不要怕垃圾食品
发信站: BBS 未名空间站 (Wed Jun 15 23:45:55 2011, 美东)
STUDY: Skinny Women And Overweight Men Earn The Most
Journal of Applied Psychology
Women have another reason to hit the gym, while men may have another reason
not to.
The Journal of Applied Psychology found that women who are 25 lbs. below
average weight take home an additional $15,572 each year.
On the other hand, men who are 25 lbs. below average weight take home $8,437
les... 阅读全帖 |
|
d*******d 发帖数: 3382 | 2 The 'Tiger Mom' Superiority Complex
A new book from Amy Chua and Jed Rubenfeld seeks to explain why some groups
succeed in America, and some fail. But when does cultural pride cross over
into racism?
By Suketu Mehta Monday, Feb. 03, 2014
From time to time, every Indian American finds an email in his or her inbox,
wearing a font of many colors, like the one my grandfather once sent me: "
Take a Pride--Being an Indian. 38% of Doctors in U.S.A. are Indians. 36% of
NASA employees are Indians. 34% of... 阅读全帖 |
|
p***o 发帖数: 1252 | 3
搞个traits,就是说把上面那个typedef T datatype换成
typedef typename traits::datatype datatype,然后full/partial
specialization traits这个类:
template class traits{typedef T datatype;}; |
|
c******o 发帖数: 1277 | 4 你没看懂我的,我的就是这样,只不过没有把trait 拿出来。。。
再给你贴一个我的练习。
trait Functor[F[_]] {
def map[A,B](t: F[A])(f: A => B): F[B]
}
trait Applicative[F[_]] extends Functor[F]{
def unit[A](a: => A): F[A]
def ap[A,B](fa: F[A])(fab: F[A => B]): F[B]
override def map[A,B](t: F[A])(f: A => B): F[B] = ap(t)(unit(f))
}
trait Monad[F[_]] extends Applicative[F] {
def unit[A](a: => A): F[A]
def flatMap[A,B](ma: F[A])(f: A => F[B]): F[B]
override def ap[A,B](la: F[A])(f: F[A => B]): F[B] =
flatMap(f)(t1 => flatM... 阅读全帖 |
|
g*********d 发帖数: 233 | 5 发表在基因图谱年会的一项跨文化研究指出,东方人的发丝比西方人粗50%的现象
和一段EDAR
基因有关.
SAN DIEGO, CALIFORNIA--Whether you have a poker-straight black mane
or frizzy blond locks, your hair depends on your ancestry. Now
researchers have come closer to figuring out just how hair traits are
passed down. According to a talk presented here last week at the annual
meeting of the American Society of Human Genetics, a single genetic
variant may explain why East Asians have thicker hair fibers than other
populations. The discovery ... 阅读全帖 |
|
b****r 发帖数: 17995 | 6 你这就转移话题了,楼主的问题是月经是“在物质匮乏的古代是难以承受的能量消耗”
我的观点是 月经根本不是难以承受的能量消耗,因为没吃的时候也没有这个能量消耗
换句话说,因为有这个调控机制存在,月经多少 面对的 selection presure是很小的
。如果你对遗传有所了解,就会知道,其实人和其他物种携带者极多的junk traits
以DNA里99%的“junk region”为代表,起码目前无数的实验证明,很多序列确实对于
生物的生存繁衍根本无关紧要,所以这些序列可以说是自由变异的,虽然看起来每个细
胞都要造这么多无用的DNA看起来很浪费,但是事实就是如此。现在之所以全球的人类
大家序列如此相似,一般都认为这是因为人类曾经在近期经历了一个瓶颈,只有可能几
百人生存下来,这个小群落的很多特征,很可能包括月经量,月经周期,以及很多很多
独特的遗传序列,在随后的人口大爆炸过程中遗传下来并且播散到全世界。如果人类继
续像这样大量地生存下去而且继续面临很小的selection,这些Junk DNA序列和月经长
短之类的trait应该就会逐渐变得各异。实际上如果你去看临床书籍,本来就有不少正
... 阅读全帖 |
|
o******n 发帖数: 511 | 7 我们想把kinship matrix加到我们的model里,分析一些植物的genotype和它们的trait
的关系。
采样的时候,我们每个植物的genotype取了三个样,有27种植物的genotype,所以有81
个样品。
在把kinship放到模型里的R packages里,要求trait data matrix和kinship matrix要
有一样的size,请问我们这种81*n trait的trait data matrix和27*27的kinship
matrix怎么才能对应起来呢?取平均值肯定不是最优的办法。
谢谢! |
|
m*******s 发帖数: 469 | 8 Statistical Geneticist - St. Louis, MO-002C5
Description
Monsanto is currently seeking a highly motivated Statistical Geneticist
to join the Corn Breeding team to support the development of new corn
breeding lines. The successful candidate will be involved in: the mining
of data from corn breeding organization (pedigree, phenotypes, markers,
and sequences), the development of new methodologies for validation and
deployment of QTL(s), and the evaluation of native traits in
agricultural field tr... 阅读全帖 |
|
o******n 发帖数: 511 | 9 【 以下文字转载自 Biology 讨论区 】
发信人: ostrakon (ostrakon), 信区: Biology
标 题: 请问有做quantitative genetics的人吗?问个kinship和mixed model的问题。
关键字: quantitative genetics,mixed model
发信站: BBS 未名空间站 (Mon May 5 12:50:52 2014, 美东)
我们想把kinship matrix加到我们的model里,分析一些植物的genotype和它们的trait
的关系。
采样的时候,我们每个植物的genotype取了三个样,有27种植物的genotype,所以有81
个样品。
在把kinship放到模型里的R packages里,要求trait data matrix和kinship matrix要
有一样的size,请问我们这种81*n trait的trait data matrix和27*27的kinship
matrix怎么才能对应起来呢?取平均值肯定不是最优的办法。
谢谢! |
|
t******9 发帖数: 270 | 10 最好做一下genetic counseling,a型做血蛋白电泳electrophoresis查不出来。
http://www.aafp.org/afp/2009/0815/p339.html
http://www.aafp.org/afp/2009/0815/afp20090815p339-s1.pdf
Preconception genetic counseling is strongly advised for all persons with
thalassemia. Two parents, each with beta thalassemia trait, have a one in
four chance of conceiving a child with beta thalassemia major and a three in
four chance the child will have thalassemia trait or be normal (Online
Figure A). Persons with alpha thalassemia trait ha... 阅读全帖 |
|
T*******x 发帖数: 8565 | 11 【 以下文字转载自 Biology 讨论区 】
发信人: verdelite (石头), 信区: Biology
标 题: 混血鸟在学习和记忆上有显著缺陷(要转军版吗?)
发信站: BBS 未名空间站 (Thu Dec 14 11:56:14 2017, 美东)
"Hybrid Songbirds are Deficient in Learning and Memory"
https://www.biorxiv.org/content/early/2017/11/30/227298
Abstract
Identifying the phenotypes underlying postzygotic reproductive isolation is
crucial for fully understanding the evolution and maintenance of species.
One potential postzygotic isolating barrier that has not yet been examined
is learning and memor... 阅读全帖 |
|
s******n 发帖数: 518 | 12 https://www.nytimes.com/2015/10/25/opinion/sunday/with-gmo-policies-europe-
turns-against-science.html
With G.M.O. Policies, Europe Turns Against Science
By MARK LYNASOCT. 24, 2015
A cornfield near Roquettes, France, after hundreds of activists uprooted
genetically modified plants to replace them with organic ones in May 2014.
Credit Pascal Pavani/Agence France-Presse — Getty Images
CALL it the “Coalition of the Ignorant.” By the first week of October, 17
European countries — including Austria, ... 阅读全帖 |
|
i*****y 发帖数: 3449 | 13 男与男、女与女,为甚么会有同性恋,科学上迄今仍是谜。但有美国科学家最新以「表
观遗传学」(epigenetics)解释同性恋原因。表观遗传学主要研究环境如何改变基因
表现(gene expression),据指出,当胚胎在母体发育初期,能影响基因表现的「外
延标记」(epi-marks),会向与性别相关的基因发出指令,保护胎儿免受环境影响,
像避免胎儿免受过多睾丸素影响,这足以影响胎儿生殖器官发展、性取向和性别认同。
一般而言,外延标记不会遗传下一代,否则会以父传女、母传子的方式遗传下来,
令女儿较男性化、儿子较女性化,特别强势的外延标记就会导致同性恋倾向。但这理论
仍须研究确定。
http://www.sciencedaily.com/releases/2012/12/121211083212.htm
Epigenetics May Be a Critical Factor Contributing to Homosexuality, Study
Suggests
Dec. 11, 2012 — Epigenetics -- how gene expression is regula... 阅读全帖 |
|
w*********g 发帖数: 30882 | 14 机器翻译的,凑合着看。补充一点:我认为男女结婚和生育宝宝之前,应该都测一测智
商,其中一方低于85的,不应该鼓励结婚和要孩子。不符合规定的,应该不给予结婚证
书和准生证。这样基本上大大降低黑人在中国繁衍低智商后代的可能。
====================
中国工程天才宝宝
在亚历克斯误差
4733
用2645点在Tumblr共享
这不是什么新闻,中国将自己打扮成一个新的全球超级大国,是吗?而西方文明的扼流
圈对自己的暴食类似近代马龙白兰度,中国继续购买美国国债和锁定了世界的自然资源
。但是现在,不满足于只是笑,混蛋的迹象,他们通过我们的地缘政治上公路,他们还
开发了一个国家通过遗传工程。
在深圳华大基因,科学家们已经收集DNA样本从2000世界上最聪明的人,在试图确定确
定人类智力的等位基因的全基因组测序。显然他们不远处找到他们,当他们这样做时,
胚胎筛检会让父母来接他们聪明的受精卵和潜在的提高每一代人的智力的五到15点。在
几代人在智力水平上,与中国的竞争会喜欢具有挑战性的莱娜邓纳姆一得到赤裸裸的在
电视大赛。
杰弗里米勒,进化心理学家和纽约大学的老师,是一个2000 bra... 阅读全帖 |
|
w**2 发帖数: 724 | 15 (此举报文件中纪委、监察部有关部门已签收)
中纪委:监察部:
来自彭博社和中国粮油信息网的消息,美国农业部长Tom Vilsack在美国芝加哥举
行的一次美中贸易论坛上对记者表示,中国农业部已经批准进口Viptera玉米,也称为
MIR162玉米。
而MIR162正是2013年以来被我国口岸检疫部门退运达300万吨的那种污染的转基因
玉米。
美国食品药物管理署(FDA)与美国环境保护署(EPA)对于先正达转基因玉米MIR162“
食用安全性”进行的毒理学动物试验来看,存在4个致命问题:
1)毒理学动物试验用的样品是“假样品”:不是用先正达转基因玉米MIR162玉米粒
做喂养试验,而是用与转基因玉米MIR162毫无关系的天然细菌培养的Vip3Aa蛋白做“样
品”进行试验,然后主管武断,而不是通过客观的科学试验,断言效果相同;
2)故意不做任何长期喂养毒理学动物实验;
3)故意不做致癌性毒理学动物实验;
4)故意不做多代繁殖毒性动物实验。
另据(德国)《测试生物技术》科学家揭露:先正达转基因玉米MIR162的评估存在18
个造假欺骗问题(附件一《德国科学家揭露先正达转基因玉米MIR162评... 阅读全帖 |
|
W******i 发帖数: 2001 | 16 Does leadership run in your family? According to a recent study from Kansas
State University, that might just be the case. The team found that a certain
dopamine transporter gene can have both positive and negative effects on
leadership in the workplace. So depending on whether or not you inherited it
may give insight into if you’re likely to rise high in business, Medical
Daily reports.
The allele is known as DAT1, and according to the study, now published The
Leadership Quaterly, inheriting it... 阅读全帖 |
|
|
d**********i 发帖数: 524 | 18 We did find a significant association between political conservatism and
rs10952668 (Table 5). This SNP lies in LOC642355, a pseudogene on chromosome
7. Not surprisingly, the SNP also showed an association with the highly
correlated trait of Democrat versus Republican (b=0.260, P<
.02).
An interesting finding was that the SNP associated with political
conservatism, rs10952668, also showed marginal evidence for association with
the personality traits openness (b=0.142, P<.06) and
ag... 阅读全帖 |
|
m******1 发帖数: 19713 | 19 When Tim Pawlenty said the science was "in dispute” about whether being gay
is genetic, that sure came as surprise to molecular biologist Dean Hamer.
By Dr. Dean Hamer, op-ed contributor
In a recent interview, Tim Pawlenty was asked “Is being gay a choice?” The
presidential hopeful replied that “the science in that regard is in
dispute.”
As a working molecular biologist, that was certainly a surprise to me.
In fact, the scientific community has long regarded sexual orientation –
whether gay, str... 阅读全帖 |
|
l****z 发帖数: 29846 | 20 How college students think they are more special than EVER: Study reveals
rocketing sense of entitlement on U.S. campuses
By Daily Mail Reporter
PUBLISHED: 15:30 EST, 5 January 2013 | UPDATED: 14:29 EST, 7 January 2013
Books aside, if you asked a college freshman today who the Greatest
Generation is, they might respond by pointing in a mirror.
Young people's unprecedented level of self-infatuation was revealed in a new
analysis of the American Freshman Survey, which has been asking students to
r... 阅读全帖 |
|
u****n 发帖数: 7521 | 21 How America Can Rise Again
Is America going to hell? After a year of economic calamity that many fear has sent us into irreversible decline, the author finds reassurance in the peculiarly American cycle of crisis and renewal, and in the continuing strength of the forces that have made the country great: our university system, our receptiveness to immigration, our culture of innovation. In most significant ways, the U.S. remains the envy of the world. But here’s the alarming problem: our governin... 阅读全帖 |
|
g*k 发帖数: 1797 | 22 马云如果没有把上层(富二代,红二代)说动的能力,是不会有现在的成就的。情商 =
/= 能泡妞。
身边的好多old boys' club的人物都不是会讨女人欢喜之人,但是他们之间能有共同语
言,能相互接纳和容忍,把事情决策好,这种协调合作的能力,也属于情商的一种吧。
我最近一直在观察这些old boy's club的人物,想学习一下他们之间的合作模式,或许
对我们打入敌人内部是有帮助的。
-----------------------
wiki抄来的:
情商(Emotional Quotient)通常是指情绪商数,简称EQ,主要是指人在情绪、情感、
意志、耐受挫折等方面的品质,其包括导商(LQ)。总的来讲,人与人之间的情商并无
明显的先天差别,更多与后天的培养息息相关。它是近年来心理学家们提出的与智力和
智商相对应的概念,提高情商是把不能控制情绪的部分变为可以控制情绪。
从最简单的层次上下定义,情商是理解他人及与他人相处的能力。戈尔曼和其他研究者
认为,这种智力是由五种特征构成的:自我意识、控制情绪、自我激励、认知他人情绪
和处理相互关系。情商越来越多的被应用在企业管理学上。对于组织管理... 阅读全帖 |
|
c***z 发帖数: 6348 | 23 节选,关于culture
Workplace cultures
I mentioned rank and tough cultures above, so let me get into more detail of
what those are. In general, an organization is going to evaluate its
individuals based on three core traits:
subordinacy: does this person put the goals of the organization (or, at
least, his immediate team and supervisor) above her own?
dedication: will she do unpleasant work, or large amounts of work, in order
to succeed?
strategy: does she know what is worth working on, and direct her ... 阅读全帖 |
|
c***z 发帖数: 6348 | 24 节选,关于culture
Workplace cultures
I mentioned rank and tough cultures above, so let me get into more detail of
what those are. In general, an organization is going to evaluate its
individuals based on three core traits:
subordinacy: does this person put the goals of the organization (or, at
least, his immediate team and supervisor) above her own?
dedication: will she do unpleasant work, or large amounts of work, in order
to succeed?
strategy: does she know what is worth working on, and direct her ... 阅读全帖 |
|
c**i 发帖数: 6973 | 25 I simply can not understand why Chinese parents from PRC whine.
Somehow I grt the feelings that Chinese parents often regret that they did
not abort their babies who have minor problems.
Can't they just say, "He Ain't Heavy, He's My Brother"?
http://en.wikipedia.org/wiki/He_Ain't_Heavy,_He's_My_
Can't they say I will accept my child no matter what, whether he or she is
gay or something else?
(1) 蒙古斑 Mongolian spot is very common among colored people including
Chinese. Perhaps you yourself, your ... 阅读全帖 |
|
L********r 发帖数: 758 | 26 But if you read the bill, the proposal is actually quite laughable. In
essence, the law requires that in the books that mention the contribution of
one human being, if he/she is colored/female/homosexual/bisexual/
transgendered/handicaped, these personal traits need to be specially
emphasized. Well, I personally only respect their contributions or maybe
their personalities, why should I even care about their personal traits. If
we really want to do education this way, how about put all the known... 阅读全帖 |
|
t*******r 发帖数: 22634 | 27 没看过这个,有空去看看,谢谢信息。
我前面说的 traits 的意思,不一定就是 gifted intelligence 那么
高尚、也不一定 special needs education 那么悲催,我觉得大多数
娃的 traits 就是娃个性/个体特点而已。
但是总有那么一股思潮,认为除了 gifted intelligence 和 special
needs education,其他所有的娃都是一个模子里出来的,想推啥就能
推啥,也不思考一下是不是符合具体娃的 traits,以达到事半功倍的效果。
对于上面这种思潮,俺只能说两个字:“尼玛”。。。说完这两个字之后,
俺只能再说四个字 “南辕北辙”。。。说完这四个字之后,俺很想再说五个
字,但俺坚持不说,因为小命更要紧。。。。 |
|
t*******r 发帖数: 22634 | 28 behavior 跟 traits 是有差别的。一个是懒惰不为,一个是天生不能。
这个 traits 还分扰民式和非扰民式,还分雪中送炭型和锦上添花型。
长得好看难看,完全是非扰民式锦上添花型 traits 。。。 |
|
t*******r 发帖数: 22634 | 29 俺今天带娃去图书馆,俺瞥见一本书上面两个字 “multiple intelligence”,
Guess what?俺立马想到了你的这些帖子。。。
我觉得其实大伙儿讨论里的那些差别,以及那些互相不理解,
最主要的原因,是你娃有 “multiple intelligence” 的 traits,
而俺娃没有那种 traits。。。That explain every difference,
and everything。。。
其实你的多方向培养,和俺的单方向培养,都是正确的因材施教。
其差别,就是因材施教/因娃施教的正常差别。
“multiple intelligence” 这种 traits,我觉得从小就能看出来,
从而事实上在潜移默化地反作用于父母“推”的方向和策略。。。 |
|
t*******r 发帖数: 22634 | 30 我现在开始同意你的看法。从这个角度看:
唱歌/工程数学(不是陶天才那种)/工程物理学/信息学,更趋向于 acquired skill。
因为那些 traits in-line with common tasks of human(人人都会唱歌,
人人都会数数),所以会被自然选择所选择和淘汰。因为大多数人都 carry 那些
trait。。。所以,基本的智力,以及后天开发的差别,是更重要因子。
而钢琴/纯理论抽象数学/纯理论抽象物理(都指研究生院之后的钻牛角尖程度),
更趋向于 genetic coded trait。。。因为这玩意儿无法被自然选择所选择和淘汰,
更多的是作为隐性基因啥的对抗自然选择的机制所保留下来。。。如果先天不 carry
那些基因,后天 acquire 那些 skill 基本很难。
(比如,钢琴的拇指运动,违背所有自然生存对拇指的需求 —— 相对四指 vs 平行四
指)。
这个可以解释为啥钢琴和纯理论数学/奥数啥的,很多 child prodigy 的存在,其他
学科就没那么多。。。 |
|
z***e 发帖数: 1757 | 31 are you saying Asian students in general or a subset of Asian students have
less of certain trait/characteristics than other racial groups?
How would a college take into such trait/characteristics into its admission
process? Do they have records on their evaluation of each student on such
trait/characteristics? If we have the records, would we be able to find out
to my question?
it
theory. |
|
d****g 发帖数: 7460 | 32 摘要
1.
"He selected approximately 1500 children from California between the ages of
8 and 12 who had an IQ of at least 140, the minimum required to be
considered a genius. The average IQ score of the group of participants was
150, and 80 of these children had scores above 170."
矮吗,140不够,还要170。。。太牛了。
2.What Terman discovered was that these kids tended to be both socially and
physically well-adjusted
有社交问题的超常娃是超常娃里的少数
3.
When they were assessed in 1955 when the average yearly income was $5,000,
the... 阅读全帖 |
|
j**n 发帖数: 13789 | 33 No.1 Virgo
A recently published study of more than 60,000 unnatural deaths across the
USA, Canada, the UK and Europe showed that Virgos were the astrological sign
most likely to die an unnatural death, as well as being the sign most
likely to be murdered. In fact, a Virgo is 25% more likely to die an
unnatural death than a Scorpio, the lowest ranking sign (but also the most
likely sign to commit violence against others).
Looking at the personality traits and characteristics most often defining... 阅读全帖 |
|
P*******i 发帖数: 10965 | 34 poor Virgo
No.1 Virgo
A recently published study of more than 60,000 unnatural deaths across the
USA, Canada, the UK and Europe showed that Virgos were the astrological sign
most likely to die an unnatural death, as well as being the sign most
likely to be murdered. In fact, a Virgo is 25% more likely to die an
unnatural death than a Scorpio, the lowest ranking sign (but also the most
likely sign to commit violence against others).
Looking at the personality traits and characteristics most of... 阅读全帖 |
|
P*******i 发帖数: 10965 | 35 mm, 俺好喜欢英文版,你多转点过来哈
No.1 Virgo
A recently published study of more than 60,000 unnatural deaths across the
USA, Canada, the UK and Europe showed that Virgos were the astrological sign
most likely to die an unnatural death, as well as being the sign most
likely to be murdered. In fact, a Virgo is 25% more likely to die an
unnatural death than a Scorpio, the lowest ranking sign (but also the most
likely sign to commit violence against others).
Looking at the personality traits and characteristic... 阅读全帖 |
|
b*******n 发帖数: 1267 | 36 10 curses of the analytical thinker
By Alan Norton
May 5, 2011, 6:56 AM PDT
Takeaway: Being a left-brain thinker can be an asset in the IT field. But as
Alan Norton observes, it’s not without its shortcomings.
The average person may envision IT as the home of the geek. I prefer to
think of IT as the kingdom of the analytical thinker. Analytical thinkers,
or left-brain thinkers, are straight-line thinkers. Logic, not emotion,
rules in the land of the analytical. The very traits that make an analy... 阅读全帖 |
|
d**********i 发帖数: 524 | 37 【 以下文字转载自 Military 讨论区 】
发信人: dayuguanshui (大禹灌水), 信区: Military
标 题: 基因认为我是自由派 不是保守派
发信站: BBS 未名空间站 (Sat Feb 3 09:53:44 2018, 美东)
We did find a significant association between political conservatism and
rs10952668 (Table 5). This SNP lies in LOC642355, a pseudogene on chromosome
7. Not surprisingly, the SNP also showed an association with the highly
correlated trait of Democrat versus Republican (b=0.260, P<
.02).
An interesting finding was that the SNP associated with political
cons... 阅读全帖 |
|
z*****e 发帖数: 14786 | 38 According to wiki: The optic chiasm has abnormal uncrossed wiring; many
early Siamese were cross-eyed to compensate, but like the kinked tails, the
crossed eyes have been seen as a fault and due to selective breeding the
trait is far less common today. Still this lack of a tapetum lucidum even in
uncross-eyed cats causes reduced vision for the cat at night. This trait
has led to their dependence and interest in humans, as it affects their
hunting ability, a desirable trait for many owners. Howev... 阅读全帖 |
|
w****k 发帖数: 6244 | 39 摘抄一点wikipedia给这里的文盲看看。
http://en.wikipedia.org/wiki/Narcissism
Narcissism is a generalized personality trait characterized by egotism,
vanity, pride, or selfishness.
Traits and signs
Thomas suggests that narcissists typically display most, and sometimes all,
of the following traits:
1. An obvious self-focus in interpersonal exchanges
2. Problems in sustaining satisfying relationships
3. A lack of psychological awareness (see insight in psychology and
psychiatry, egosyntonic)
3. Difficulty with e... 阅读全帖 |
|
b*******s 发帖数: 5216 | 40 traits是干什么的?你没做过就少乱说,parser不用traits?
加一个parser功能,所有shapes都用,比你重复写哪个更合理
就一嘴硬的傻b
traits |
|
b*******s 发帖数: 5216 | 41 traits是干什么的?你没做过就少乱说,parser不用traits?
加一个parser功能,所有shapes都用,比你重复写哪个更合理
就一嘴硬的傻b
traits |
|
w***g 发帖数: 5958 | 42 GC: immediate solution,表面上看似解决了问题,实际上只是部分
解决了问题,而且同时创造了不止一个新的问题。
RAII: 本质的解决方案,不止解决了内存分配一类问题(这个也是部分
解决),而且同时也解决了所有其他资源分配的问题。
从技术的角度上来说,我觉得这两者高下立判。看似都没有显式的
资源回收,前者是纵容用户,后者则是培养一种思维方式,写出来
的东西都是防患与未然的。就是代码写出来,也是C++的更简洁:
// C++
{
fstream out("xxx");
out << "foo" << endl;
}
//java
OutputStream out = new FileOutputStream("xxx");
out.write("foo\n");
out.close();
可以看到,C++写法里既没有new,也没有close。一对花括号限死了
fstream中所有相关资源的生存期。
而java里,从C++借鉴来一个完全没有必要的new,却没有对应的delete,
而后面的close又没有对应的open。代码没有一点对称性。现在看来,
用来分配内存... 阅读全帖 |
|
c******o 发帖数: 1277 | 43 从下面的code可以看出,flatMap 可以实现map,所以flatMap更强大(比map能干的事多
), 但是map更常见 (有map不一定能实现flatMap)
// id function:
// def id[A](a: A): A = a
// compose function:
// def compose[A,B,C](f: B => C, g: A => B): A => C =
// a => f(g(a))
trait Functor[F[_]] {
def map[A,B](fa: F[A])(f: A => B): F[B]
}
// Functor Law
// identity: map(x)(id) == x
// composition: map(a)(compose(f, g)) == map(map(a,g), f)
trait Applictive[F[_]] extends Functor[F] {
def unit[A](a: => A): F[A]
def ap[A,B](la: F[A])(f: F[A => B]): F... 阅读全帖 |
|
y****e 发帖数: 71 | 44 I do not know if I made it clear. Let me give an example. You might know the
alternative theory to evelution, one of them is "Acquired trait can be
inherited". I remember someone did one experiment, he will chop off the tail
of mouse before they mate, and he did it for something like 20 generations.
He found out that the new-born from short-tailed mouse have the same length of
tail on average compared with long-tailed mouse. Conclusion: At least for
tail-length this trait, acquired trait (s |
|
m******g 发帖数: 467 | 45 Science 14.03.07
推荐:
1. The Secret Garden—Epigenetic Alleles Underlie Complex Traits
inherited across generations in plant genomes
QTL mapping for traits
future: environmentally induced transgenerationally stable epialleles
Actual paper: Mapping the Epigenetic Basis of Complex Traits
稍微了解一下:
1. A Genomic Road Map for Complex Human Disease
小知识:
1. Combating Evolution to Fight Disease
2. Review - Developments in X-ray Crystallographic Structure Determination
of Biological Macromolecules
3. A Sing... 阅读全帖 |
|
F*******I 发帖数: 200 | 46 如果你有时间,请你读一读下面的文章,你就知道你是怎么样的一个人了!
我把最重要的两段摘在前面供你参考.
这两段里面最重要的一句话,我再摘出来放在最前面:
“Don’t forget that the liar lacks empathy: As hard as it is to believe, it
is true.”
empathy[`emp[Wi]
移情:对他人思想、感情和行为(甚至那些悲痛和纷乱的感情和行为)的理智性和感情上
的认识和理解。移情(empathy)强调理解而同情(sympathy)强调分担他人的感情和体验。
翻译: 一个说谎者(这里指病态的)缺乏同情心。虽然难以置信,但这是一个事实。
Don’t forget that the liar lacks empathy: As hard as it is to believe, it
is true. The liar does not have any moral consciousness of how the lying
behavior may make you feel. The liar does not ... 阅读全帖 |
|
F*******I 发帖数: 200 | 47
如果你有时间,请你读一读下面的文章,你就知道你是怎么样的一个人了!
我把最重要的两段摘在前面供你参考.
这两段里面最重要的一句话,我再摘出来放在最前面:
“Don’t forget that the liar lacks empathy: As hard as it is to believe, it
is true.”
empathy[`emp[Wi]
移情:对他人思想、感情和行为(甚至那些悲痛和纷乱的感情和行为)的理智性和感情上
的认识和理解。移情(empathy)强调理解而同情(sympathy)强调分担他人的感情和体验。
翻译: 一个说谎者缺乏同情心。虽然难以置信,但这是一个事实。
Don’t forget that the liar lacks empathy: As hard as it is to believe, it
is true. The liar does not have any moral consciousness of how the lying
behavior may make you feel. The liar does not think b... 阅读全帖 |
|