由买买提看人间百态

topics

全部话题 - 话题: context
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
t**********s
发帖数: 930
1
【 以下文字转载自 Programming 讨论区 】
发信人: tennisalways (tennisforever), 信区: Programming
标 题: Spring + Jersey 的 REST API, servlet context 能看到 Spring 的 root application context 里的bean吗?
发信站: BBS 未名空间站 (Fri Oct 9 17:57:56 2015, 美东)
比如这样的 web.xml

contextConfigLocation
/WEB-INF/root-context.xml



org.springframework.web.context.ContextLoaderListener
阅读全帖
t**********s
发帖数: 930
2
比如这样的 web.xml

contextConfigLocation
/WEB-INF/root-context.xml



org.springframework.web.context.ContextLoaderListener



REST-V1
com.sun.jersey.spi.spring.container.servlet.SpringServlet


contextConfigLocation... 阅读全帖
l****z
发帖数: 29846
3
Colorado County Officials: ABC Took Colorado Fires/Terrorism Comments Out of
Context
July 3, 2012 by Warner Todd Huston
On June 28, Under sheriff Paula Presley of El Paso County, Colorado was
interviewed by ABC News’ Alex Perez. After that interview aired, government
officials say ABC News took comments out of context and falsely made it
seem as if the Undersheriff was saying the massive Colorado forest fires
were a result of terrorist arsonists.
The segment that appeared on ABC World News wit... 阅读全帖
t**********s
发帖数: 930
4
估计红岩说的情况如果用Spring自己的 dispatcherservlet应该没问题。但混用Jersey
的 支持Spring的servlet(com.sun.jersey.spi.spring.container.servlet.
SpringServlet) 不行。
不过发现不import, 而是扫描root context 里的bean( -package="xxx.xxx"/>也work, 而且root context 里的bean,不会在servlet context
里再生成一遍。
a***y
发帖数: 19743
5
来自主题: Apple版 - 逻辑与context
经常看到有人讨论所谓逻辑
这些人做出的所谓没逻辑的判断,往往仅仅是类比和归谬。
可是这些人在使用这种方法的时候,仅仅是从字面上归谬,但是完全不考虑context。
比如,我说如果Mac OS X < 同期的Windows XP, Vista, 这个版早就不存在了。
“不存在”是修辞手法,当然不是一个绝对的判断,而是表示用户数和现在比会小很多
。这里context有三点,第一点是修辞手法,第二点是为什么有人用苹果。不懂不理解
苹果的人,当然认为用苹果是装B。但是他们的观点对这个推论没有影响,因为用苹果
人的多少,是靠真的用苹果的人决定的。这部分人大部分都是因为喜欢Mac OS X,觉得
Mac OS X更好。最后一个context就是苹果相对小的市场份额。
因此,光是反过来归谬,按照我上面的推论,反过来,如果Mac OS X如我所说>同期
Windows XP, Vista,那么Windows就应该不存在了。但是事实上Windows活得好好的,
比Mac OS X还光鲜,所以他们说,这是“荒谬的自相矛盾的逻辑”。
可是,他们没有考虑以上三个context,这种归谬是毫无意义的。因为我的判
b*****n
发帖数: 4976
6
来自主题: TrustInJesus版 - is CONTEXT needed here?

==============================
为甚么不要看 context?
不看 context....只会九不搭八
例如:
Q∶In which battle did Napoleon die?
A∶* his last battle
Q∶Where was the Declaration of Independence signed?
A∶* at the bottom of the page
Q∶How can a man go eight days without sleeping ?
A∶* No problem, he sleeps at night.
Q∶How can you drop a raw egg onto a concrete floor without cracking it?
A∶*Any way you want, concrete floors are very hard to crack.
基本上是无答错, but.... totally out of context.
这就是老七的读经法。 白痴程度,无可救药。
吃药都是在浪费资... 阅读全帖
F****n
发帖数: 3271
7
Spring beans are normally singletons so multiple instances of same contexts
should be OK. (If it is not OK, 99% of time it is because your beans have
some design problem)
There are ways to share runtime contexts, but it increases the complexity of
your apps and makes them more error-prone. Not worth the effort.

application context 里的bean吗?
Y**G
发帖数: 1089
8
这样的配置,在servlet的spring context中找不到,会自动fallback到全局的spring
context中去,不需要import
子容器可以引用父容器中的bean,反之不行。
c********t
发帖数: 5706
9
原题How can you measure the time spent in a context switch?
答案
If the total timeof execution of all the processes was T, then the context
switch time = T – (SUM for all processes (waiting time + execution time)).
怎么测出的T呢?多个processes可以同时运行啊。
h*****f
发帖数: 248
10
- Write 1 very simple program that has 2 threads.
- Thread A does an atomic write to a bool variable
- Thread B keeps spinning to do an atomic read on that bool variable
- Use cpuset w/cpu exclusive=1 for that process on 1 core (not 1 CPU)
The time from A writes to the time B picks up the change is approximately
the context switch time.
Of course, precisely, it is equal to context switch + 1 atomic write + 1
atomic read.
Anyone has an even accurate solution?
s********k
发帖数: 6180
11
看了看,context switch分两步:
1. Switching the Page Global Directory to install a new address space; .
2. Switching the Kernel Mode stack and the hardware context, which
provides all the information needed by the kernel to execute the new process
, including the CPU registers.
应该是整个PCB都被switch 进入kernel stack,
c**n
发帖数: 566
12
来自主题: TrustInJesus版 - is CONTEXT needed here?
"god in bible made people eat human flesh..."
zhaowendao made a conclusion: this god is evil.
most christians reply back: there are context...
is CONTEXT really needed here?
c******n
发帖数: 4965
13
for regular servlet, I guess you could declare context listener:
http://docs.oracle.com/javaee/5/api/javax/servlet/ServletContex
but for Spring MVC, would spring make this easier?
furthermore, if I define a context listener, let's say I would need to
access the beans defined before in my servlet.xml or applicationContext.xml,
how could I get access to them?
Thanks
c*********e
发帖数: 16335
14
lz说了,不import,调用root context 里的bean都会出现 NPE

spring
c*********e
发帖数: 774
15
靠,多新鲜,中国车字也有不同所指,买车,可以买自行车,摩托,轿车,手推车,三
轮车,有你在哪里买跟谁买context,也能猜到买什么车。
这也能唧唧歪歪半天。好像懂点英语多高深似的。cheese也好,fromage也好,听起来
高大上,其实就是丑杜甫一样玩意儿。臭豆腐
d*******2
发帖数: 3045
16
The electoral process where the popular vote has the "loser" actually
outscoring the "winner" is fundamentally antiquated (as are all state
borders). That's not going to change in our lifetime, most likely, so it's
just sour grapes for all of us who attempted to deny him his win. Regardless
America has voted in someone publicly supported by the Ku Klux Klan,
continues to be incriminated for numerous predatory sexual abuses, has a
history of racial discrimination, and has systematically conned pe... 阅读全帖
a*****1
发帖数: 314
17
http://www.mitbbs.com/article_t/JobHunting/32248935.html
context switch的时候保存什么,保存在哪里??
保存内核堆栈? 保存到内核里?
很模糊。
请高手指点。。
谢谢
t*******2
发帖数: 292
18
每个process有一个对应的kernel stack,
这个stack不同于virtual space的那个stack
这个stack好像就8K,
context switch就把当前的一些寄存器存在这里
s********k
发帖数: 6180
19
每个process的stack就是它的virtual space的stack,VM的原因每个process都认为自
己拥有所有的memory addr吧。
context switch保存应该是所有寄存器信息,尤其是PC,再加上stack pointer吧
s********k
发帖数: 6180
20
X86下是CR3 register吧,ARM不太清楚了。重新flush所有的TLB,还有一二级cache,
所以慢,context switch本身消耗并不大
t**o
发帖数: 6659
21
10:22 am
Alibaba's $80-$83 Opening Range in Context
by Maureen Farrell
We now know the opening range for Alibaba’s stock: $80 to $83 per share.
If Alibaba’s shares stayed in that range for the rest of the day, the pop
from its IPO price would be between 17% and 22%.
That’s below the average one-day pop for U.S. listed Tech or Internet IPOs
this year, which is 26%, according to Dealogic.
The average one-day pop for IPOs from all sectors this year is 13%.
i****t
发帖数: 25
22
Yale Institute of Sacred Music presents
The Christmas Oratorio symposium & concerts
December 5, 6, 7
The Christmas Oratorio in Context
December 5, 2008
1:30 - 6 PM
Yale University - New Haven, CT
Rosenfeld Hall, 109 Grove st.
Introduction
Johann Sebastian Bach's Christmas Oratorio is not only one of the greatest
compositions celebrating the birth of Jesus,
but it is also an integral part of Christmas as a cultural event. Preceding
a performance of the Oratorio in its entirety
on Dec. 6 and 7, th
b******n
发帖数: 4509
23
配合 context aware sopt removal,以后照片里面想删除啥删除啥,
再也不用担心啥杂乱的东西进入照片了
b********h
发帖数: 2451
24
来自主题: TrustInJesus版 - is CONTEXT needed here?
当然。
圣经此文的作者,把此书收入圣经的编辑者,必然是在一个更大的context下看待这个
问题的,否则为何要自打嘴巴,要证明这个神是evil?
D***a
发帖数: 939
25
来自主题: Linux版 - 版上有用context的么?
看着context做的presentation的PDF文件效果还不错,版上you用的么?有好的模板没
D***a
发帖数: 939
26
来自主题: Linux版 - 版上有用context的么?
谢谢推荐,beamer不错,简单方便,和latex结合不错,context好像是和tex结合
在 cocojumbo (Nick) 的大作中提到: 】
l*****k
发帖数: 587
27
来自主题: Programming版 - Design pattern reflecting context change
high hands:
I have a question on Object Oriented design patterns that reflect context
change. I want to know if there are design patterns available
for reflecting behavioral change in an Object, or in another words, the
object can assume several "states", each with distinct behavior depending
in internal or external input.
Is the calculation of a series of "state" change expensive computationally?
Thanks
y****t
发帖数: 17
28
来自主题: TeX版 - ConText menu
下面的问题是关于ConText
1 http://www.pragma-ade.com/general/manuals/ms-cb-en.pdf
A)这个文档出现在每个页面的menu用什么代码整出来的?怎样写代码好象在里面的30.
5 Menus有介绍,我写了一个,没有编译成功。
B)每个chapter或者section的标题都有个灰圈,有6个红点。注意任何两章的图形都不
同。
C) 第几chapter的几出现在正文页脚中间,而页码出现在menu的下面。注意页码是从
左往右移动的。都有不封闭的圈圈。
这些都是怎么整出来的?
2. http://www.math.zju.edu.cn/ligan ... onTeXt/mp-cb-en.pdf
3。 http://www.pragma-ade.com/general/manuals/cont-eni.pdf
这个文档的每页右边的menu也不知道怎么弄出来的?
y****t
发帖数: 17
29
来自主题: TeX版 - ConText forum
有没有专门的ConText论坛?
网址是什么?
谢谢!
Q***y
发帖数: 5
30
来自主题: XML版 - [转载] XML usage context.
【 以下文字转载自 Programming 讨论区,原文如下 】
发信人: query (bitter), 信区: Programming
标 题: XML usage context.
发信站: The unknown SPACE (Fri Jul 18 07:16:46 2003) WWW-POST
Would someone discuss the usage of XML. There is tons of info for webservice.
q 1:
If not for webservice, just as a config file or datasheet, what the great
benifit over db? XML API is better than database access API or something else?
q 2:
If for the purpose of config file, I thought the security flaw is too obvious.
At least other people can
N******e
发帖数: 81
31
写信给用过power distance 和 high/low context的measures的两个作者回信,
没有回音,因为比较急,来这里碰碰运气吧。
有没有做跨文化研究的同学用过这两个measures, 可否分享,或者指点哪里去找?
谢了。//bow
f**d
发帖数: 768
32
来自主题: Neuroscience版 - eBook: From computer to brain
这是一本计算神经科学的优秀著作,全文拷贝这里(图和公式缺),有兴趣的同学可以
阅读
如需要,我可以分享PDF文件(--仅供个人学习,无商业用途)
From Computer to Brain
William W. Lytton
From Computer to Brain
Foundations of Computational Neuroscience
Springer
William W. Lytton, M.D.
Associate Professor, State University of New York, Downstato, Brooklyn, NY
Visiting Associate Professor, University of Wisconsin, Madison
Visiting Associate Professor, Polytechnic University, Brooklyn, NY
Staff Neurologist., Kings County Hospital, Brooklyn, NY
In From Computer to Brain: ... 阅读全帖
t******n
发帖数: 2939
33
☆─────────────────────────────────────☆
l63 (l63) 于 (Thu May 23 00:34:22 2013, 美东) 提到:
假设素数只有有限个, 记为 p_1,p_2,...,p_k
考察 N = p_1*p_2*...*p_k + 1
可知: 对于任意i = 1,2,3,...,k, p_i 不能整除 N
由素数的定义:
a是素数 <=> a是大于1的自然数, 且a不被任何小于a的素数整除
可知: N是素数
这与素数只有p_1,p_2,...,p_k矛盾.
故假设不成立.
所以素数有无穷多个.
☆─────────────────────────────────────☆
l63 (l63) 于 (Thu May 23 00:37:03 2013, 美东) 提到:
在承认素数的这个等价定义 (即 a是素数 <=> a是大于1的自然数, 且a不被任何小于a
的素数整除) 的前提下, 居然有人会认为这个证明是错的, 或者是不完备的.
我实在不能理解.
求问一下大家, 是不是有的人的脑子天生有缺陷, 根本怎么教都不会明白... 阅读全帖
D*****r
发帖数: 6791
34
来自主题: TrustInJesus版 - THE NAME "LUCIFER" HAS NEVER BELONGED TO SATAN!
http://www.franknelte.net/Nelte_HTML/LUCIFER.htm
In the English version of the Bible the name "Lucifer" appears only one time
, in Isaiah 14:12. This verse reads:
"How are you fallen from heaven, O LUCIFER, son of the morning..." (Isaiah
14:12)
Now the word "Lucifer" is not an English word, but a LATIN word. And so the
question is:
WHO GAVE THE WORLD THIS LATIN NAME "LUCIFER"? AND WHY DID THEY GIVE US THIS
LATIN NAME?
HOW WE CAME TO HAVE THIS NAME "LUCIFER"
In 382 A.D. Pope Damasus commissioned ... 阅读全帖
G*******s
发帖数: 4956
35
Blinded By Tradition:
An Open Letter to Dave Hunt
Regarding His Newly Published Attack Upon the Reformation, What Love Is This
? Calvinism's Misrepresentation of God
James White
Updated 5/16/02, see bottom of file
Dear Dave,
In the period of time since I finally received my own copy of your book (you
may recall I scanned through it while standing at your table in St. Louis a
t the PFO Conference) I have gone through a number of different emotions. A
t first I was just going to do one Dividing ... 阅读全帖
r******r
发帖数: 700
36
来自主题: Java版 - 请教如何学习Java
Strategy Pattern一例,清晰易懂。如果非 OO 设计,就是弄三个 function 了。不过
,代码行数大大增加。
interface Strategy {
int execute(int a, int b);
}
/** Implements the algorithm using the strategy interface */
class Add implements Strategy {
public int execute(int a, int b) {
System.out.println("Called Add's execute()");
return a + b; // Do an addition with a and b
}
}
class Subtract implements Strategy {
public int execute(int a, int b) {
System.out.println("Called Subtract's execute()")... 阅读全帖
t***n
发帖数: 546
37
鉴于有人要求详细配置,现在把几个配置文件贴出来,欢迎大牛们指正
gtalk.conf***********************
[general]
context=google-in ; Context to dump call into
allowguest=yes
[guest] ; special account for options on guest account
disallow=all
allow=ulaw
context=google-in
[dummy-gtalk]
username=d***[email protected]
disallow=all
allow=ulaw
context=google-in
connection=dummy
[user3-gtalk]
username=u***[email protected]
disallow=all
allow=ulaw
context=google-in
connection=user3
[user1-gtalk]
username=u***[email protected]
disallow=all
... 阅读全帖
f********x
发帖数: 99
38
The world beyond batch: Streaming 101: A high-level tour of modern data-
processing concept
http://radar.oreilly.com/2015/08/the-world-beyond-batch-streami
by Tyler Akidau August 5, 2015
Editor’s note: This is the first post in a two-part series about the
evolution of data processing, with a focus on streaming systems, unbounded
data sets, and the future of big data.
Streaming data processing is a big deal in big data these days, and for good
reasons. Amongst them:
Businesses crave ever more tim... 阅读全帖

发帖数: 1
39
我可以看得到,copy paste将就看下吧
Image
CreditCreditPhoto illustration by Joan Wong. Photographs by Ronghui Chen for
The New York Times.
Skip to content
Skip to site index
Where Does Affirmative Action Leave Asian-Americans?
A high-profile lawsuit against Harvard is forcing students and their
families to choose sides.
CreditCreditPhoto illustration by Joan Wong. Photographs by Ronghui Chen for
The New York Times.
By Jay Caspian Kang
Photographs by Ronghui Chen
Published Aug. 28, 2019
Updated Sept. ... 阅读全帖
S**I
发帖数: 15689
40
来自主题: JobHunting版 - [合集] 面经+一点个人体会
☆─────────────────────────────────────☆
yuhanlin (Yuhan) 于 (Mon Aug 29 00:18:17 2011, 美东) 提到:
周五面完最后一个onsite, 累的惨兮兮的, 好容易爬回家. 不管结果如何, 这段时间找
工作算是告一段落了.
下面把这段时间面试中被问到的题目整理一下, 供大家参考. 我也就不说具体是那些公
司了, 都是很典型的面试题, 到哪里都有可能会被问到.
* implement memcpy? How to improve? how to determine if a system is
32bit or 64bit?
* how is static keyword used in Java?
* a list of intervals, no overlapping and sorted, write a function to
insert an interval into the list and still keep the list sorted and no
overlapping.... 阅读全帖
b*****9
发帖数: 8922
41
☆─────────────────────────────────────☆
ypockcalb (ypockcalb) 于 (Sun Aug 15 15:07:32 2010, 美东) 提到:
这家伙比较能吹!在bell lab 做了几年高级劳工,又在普林斯顿混了两年technical
staff就能千人,大家好好学学人家是怎么忽悠的!这家伙在bell lab的位置自己给出来
了,还算诚实,但是自己提高了在普林斯顿的位置。普林斯顿这个中红外材料实验室是
他老板Claire F. Gmachl离开bell lab后创建的,英文名称应该为MIRTHE(mid-
infrared technolies for health and evironments),相关链接为
http://www.mirthecenter.org/。Claire F. Gmachl的主页为http://www.ee.princeton.edu/people/Gmachl.php。这家伙号称在量子级联激光器领域作出的贡献都是一些挂名的工作,从WEb of science 的搜索看,一共可以找到大概13篇... 阅读全帖
t******n
发帖数: 2939
42
来自主题: WaterWorld版 - [合集] 素数的数学递归定义的问题
☆─────────────────────────────────────☆
xiongyp (dreamrain) 于 (Fri May 24 08:41:56 2013, 美东) 提到:
我们假设不知道什么叫素数,我们对正整数集合进行如下的定义来定义素数。(这是从
链接上取下来的,也是I63的定义)
(1) 1不是素数 (base case)
(2) a是素数当且仅当a不能被任何小于它的素数整除。
我曾经多次指出,这个定义在用素数定义素数,是不正确的。但看到很多的反驳如下。
1不是素数, 我们考察2,发现小于2的素数集合为空集,于是2为素数。以此再往下递归
,得出所有素数的定义。我想昨天深入讨论此内容的人,都不会反对我的总结吧。关于
"小于2的素数集合为空集"推出"2为素数",因我的不慎,还做出过郑重道歉。
好,我们仿造这种递归定义,来定义偶数。
我们假设不知道什么叫偶数,我们对非负整数集合进行如下的定义来定义偶数。
(1) 0不是偶数 (base case)
(2) a是偶数当且仅当a与任何小于它的偶数之差为2的倍数。
我从base case开始。0不是偶数。我们考察... 阅读全帖
w********h
发帖数: 12367
43
来自主题: Military版 - 习胖真是个吃货啊。。。
除了中文wiki上说Sauer是Merkel的博士导师,
你能提供英文来源么?
Merkel和Sauer就合作过一篇web of science能查到的文章,
你说话能有点证据么?
VIBRATIONAL PROPERTIES OF SURFACE HYDROXYLS - NONEMPIRICAL MODEL-
CALCULATIONS INCLUDING ANHARMONICITIES
By:MIX, H (MIX, H); SAUER, J (SAUER, J); SCHRODER, KP (SCHRODER, KP); MERKEL
, A (MERKEL, A)
COLLECTION OF CZECHOSLOVAK CHEMICAL COMMUNICATIONS
Volume: 53 Issue: 10 Pages: 2191-2202 Published: OCT 1988
按照Merkel A来检索,共有9篇,
即便她后来没成为一个成功的物理化学家,
但得到的博士学位,是货真价实的!
1
THE LOWEST BOUND-STATES OF TRIPLET (BH2)+
B... 阅读全帖
c******a
发帖数: 633
44
来自主题: Faculty版 - 史上最牛的论文ZT (转载)
10个!
Title: The unsuccessful group treatment of ''writer's block'': A ten-year
follow-up
Author(s): Skinner NF, Perlini AH
Source: PERCEPTUAL AND MOTOR SKILLS Volume: 82 Issue: 1 Pages: 138-138
Published: FEB 1996
Times Cited: 0
Context Sensitive Links
2. Title: WRITING BLOCKS AND TACIT KNOWLEDGE
Author(s): BOICE R
Source: JOURNAL OF HIGHER EDUCATION Volume: 64 Issue: 1 Pages: 19-54
Published: JAN-FEB 1993
Times Cited: 5
Context Sensitive Links View full text from the publish... 阅读全帖
t********5
发帖数: 274
45
来自主题: DotNet版 - 求救一个小问题
我也认为是button的事件里写的
可是我找不到那个button相关的任何代码
是flash,整个页面主要都是flash的,我以前没接触过flash方面的编程,不知道您有
没有什么猜想,我顺着路子去找一找
table.aspx页面,就是有聊天窗口,有send按钮的这个页面
<%@ Page Title="" Language="VB" MasterPageFile="~/Shared/xxxx.master"
AutoEventWireup="false"
CodeFile="table.aspx.vb" Inherits="VNT_table" %>
"Server">

阅读全帖
R*o
发帖数: 3781
46
来自主题: TrustInJesus版 - Calvinism & John 3:16
http://blog.guidedbytruth.com/johnthreesixteen.php
In order to believe in Calvinistic theology, a person must explain why the n
ormal text of a passage simply does not say what it appears to say. John 3:1
6 is probably the most popular Bible verse in all the world, and yes, by tha
t I mean the entire world. I could be wrong, but needless to say, many peopl
e, even non-Christians, know this verse by heart. However, according to Calv
inists, this verse does not really mean exactly what it says. To... 阅读全帖
h*********e
发帖数: 247
47
来自主题: Java版 - jetty疑问
是这样的,我本来在试<> by David Winterfeldt中的例子,
svn co http://svn.springbyexample.org/enterprise/simple-spring-web-services/tags/1.1.2/ simple-spring-web-services
在命令行mvn clean install successfully,
但是在eclipse中,我运行junit tests 得到如下error,所以我就想先熟悉熟悉jetty,
我找到http://wiki.eclipse.org/Jetty/Tutorial/Jetty_and_Maven_HelloWorld
试了试Developing a Standard WebApp with Jetty and Maven, 我自己没有做任何改
动,就是想先走一遍文中的步骤,结果发现这个contextroot问题。
总结一下就是:
1. follow http://wiki.eclipse.org/Jetty/Tutorial/Jetty_and_M... 阅读全帖
x******m
发帖数: 736
48
来自主题: Java版 - Spring菜鸟求救
跟着网上的tutorial学习,一模一样的code,总是出错。
第一个class
package com.springinaction.springidol;
public class SpellChecker {
public SpellChecker(){
System.out.println("Inside SpellChecker constructor." );
}
public void checkSpelling() {
System.out.println("Inside checkSpelling." );
}

}
第二个class
package com.springinaction.springidol;
public class TextEditor {
private SpellChecker spellChecker;
public TextEditor(SpellChecker spellChecker) {
... 阅读全帖
k**********g
发帖数: 989
49

..
Yes, sort of.
The essence of this problem is to answer the question: "when is it safe to
permanently delete something".
If you answer is: "it is safe to delete it if it is theoretically impossible
to cause a problem by deleting it", then your answer is essentially what is
known as "reachability". Something that is not reachable is like
Schrodinger's cat; nobody knows if it is dead or alive.
I can think of three approaches. The first two are practical; the third one
is too advanced to be impl... 阅读全帖
c******o
发帖数: 1277
50
The 通俗易懂地 explanation is:
Now see all these formal definition, still what is a Monad for us programmer
? and Why we need them?
def unit[A](a: => A): M[A]
def flatMap[A,B](ma: M[A])(f: A => M[B]): M[B]
A bit long explanation here:
Monad seems just like a wrapper, it wraps in a basic type (A here), and put
into a context M, generate
a richer type (M[A] here). unit function does this.
We care about the value of type A in context M, but we hate part of the
context that is troublesome.
The troublesom... 阅读全帖
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)