--- layout: post title: Programming Methodology-Lecture01 date: 2011-08-17 17:07:36.000000000 +01:00 type: post published: true status: publish categories: - Web前端 - "计算机基础" tags: - Programming Methodology - SSE meta: views: '25' author: login: ig2net email<EMAIL_ADDRESS>display_name: "农夫一号" first_name: '' last_name: '' ---
NOTE:these series of lecture are from SEE http://see.stanford.edu/see/courses.aspx
Instructor (Mehran Sahami):Alrighty. If you could have a seat, please, we need to get
started.  Come on down and try to
find a seat somewhere. If you can't find a seat, sit in the aisle[(席位间的)通道] as long as you're not a fire
marshal[消防局长；防火处处长].  Good. We're fine. Come on in and sit in the aisles.
So welcome to CS106A. If you don't think you should be in CS106A, you think you
should be somewhere different, now is probably a good time to go, not that I would
discourage anyone from taking this class. I think we'll have a lovely time in here. But this
class is CS106A or E70A, so if you're, like, "Wait. I thought I was in E70A," you're fine.
They're the same class; it's the same thing. No worries, okay?
There's four handouts[讲义；宣传册子]. They're in the back.  You can pick them up on the way
out. They're the same handouts. They'll still be there.
So just a quick introduction. That's what the first four handouts actually give you. They
give you a little bit of an introduction to the class, what we're gonna cover, some logistics
for the class and some other stuff. I'm gonna go over all that today so we can sort of get a
good idea for where we're at, okay?
So just a quick show of hands before we get into a bunch of things in the class. This is
kind of an intro-programming course; well, it is. I shouldn't say it's kind of an introprogramming
course. It is an intro-programming course. And it's always good to get an
idea as to how much familiarity you may have beforehand, okay? So just quick show of
hands. How many people can recognize a computer that's on? Good, good. That's the
prerequisite[n. 先决条件] for this class.
So if you're worried about how much previous experience you've had or your friend who,
like, worked their way through high school by programming for Google or whatever,
don't worry about it because all you need to know in here is basically either how to turn a
computer on or to recognize a computer that's on if you were to walk up to it and it were
already to be on, all right?
So but a little bit more seriously, how many people have actually used a computer for
anything? All right. I would expect most of you.
So now, we begin to bump it up a notch[再加把劲, 原意是给压力计加压使它再上一个刻度]. How many people have used it for word
processing? Okay. Most folks.
How many people have done web browsing? Yeah, I won't ask you what you look at, all
right? It's just I don't wanna know.
How many people have actually created a web page? Okay. Fair number.
How many people have done any kind of programming before? Fair number. All right.
How about how many folks have done actually programmed in Java before? All right. A
few folks.
How about another language, C, C++, BASIC, anyone program in BASIC? Yeah, oh, I
love — that was the first language I learned, and it was kind of like the warm and fuzzy,
and I felt good.  But if that's the case,
we're all in the boat together because I'm probably brain damaged as well. The truth is I
probably am, but that's a whole different story.
All right. So one thing you should know kind of up front is actually this course is gonna
be provided eventually somewhere down the line as part of Stanford School of
Engineering Free Course Initiative, which means not only are we recording this course to
broadcast to a bunch of companies and industry who are watching this course, but we're
eventually gonna provide it free to the world.
So how does that impact your life? And on the average day, it doesn't at all. The only
way it does impact your life is just so you should know, the lawyers told me to tell you
that your voice, should you ask a question, may actually be recorded as part of the video.
As a result, your voice may end up going out to thousands of people or millions of people
in the world. If you have an issue with that, come talk to me. If you don't, everything is
just fine, all right?
Don't worry. We're not gonna put your picture up or anything like that. You might wanna
be on the video, like, "Hey, ma, I'm on TV." We decided that we're just gonna not show
anyone actually on the video, but your voice may actually get recorded, okay?
Now, along those lines, you may also notice there are some microphones in the room. So
when you wanna ask a question, please make sure to use the microphone because that's
not only good for people in here to be able to hear your question, it's also good for all the
folks that this is getting broadcast to because not only are we gonna broadcast to the
world, but there's actually some folks who are sort of watching this live now in various
companies in Silicon Valley.
So it's real important that you actually use the microphone, so just remember that. And
every once in a while, I might get on your case and be, like, "Please use the microphone."
I'm not trying to be argumentative[a. 爱争论的,好辩论的] or anything. I just wanna make sure we pick up all the
audio, all right?
So with that said, a little bit of an introduction. That's kind of a way of background. I
didn't give you any sort of introduction. So just to introduce myself, my name's Mehran
Sahami. I'm the professor for the class. Don't call my Professor Sahami, way too formal.
Don't call me Mr. Sahami. That, I think of my dad. And don't call me Mrs. Sahami, or
we're gonna have issues, all right? So just call me Mehran. We'll get along. It's just fine,
all right? It's to keep things a little bit more informal, but that way it's a little bit easier to
discuss stuff as you go along.
There is also a head TA[abbr. 助教（teaching assistant）] for the class, Ben Newman, who's standing up there. Get to know
Ben. He has all the real power in this class. I'm just kind of the monkey that gets up here
and gives the lectures. But Ben really is the one who's got all the power.
Along with the head TA for the class, we have a large section leading staff. So the section
leaders here, could you stand up if you're here? They're kind of all over the place, some
over here, some over there, and some over there. As you can see, there's a pretty large
number of folks. And this isn't even all of them. We sort of have more — we just can't
stuff them all into the room — who are section leaders for the class, and these folks are
all here to make sure that everyone in this class has as good an experience as possible
when we're sort of going through the class.
And the best way to reach all of us is email. So on Handout No. 1, you get my email and
Ben's email. We'll tell you how to sign up for section. That's how you'll meet your section
leader and get your section leader's email. That will all be coming soon. But email really
is kind of a happy form of communication to get a hold of us, okay?
So with that said, I wanna tell you a little bit about this class and kind of what we're
gonna do in here and what you should expect and make sure that you don't feel scared off
by this class, okay? Because it really is meant to sort of be an interesting time.
But one question that comes up is why is this class called Programming Methodology,
right? Why don't we just call this class, like, Programming with Java? And the real reason
for that is that programming methodology is about good software engineering principles.
It's about something that's much larger than just programming.
So some people, like, they'll go and get a book somewhere and they'll think they learned
how to program by just reading the book. And they're, like, "Oh, I know how to program.
Isn't that great?" And it's, like, yeah, you might know the mechanics of the language, but
the mechanics of the language are nothing compared to understanding the software
engineering principles that go into actually developing a software system.
And that's what you're gonna learn about in this class. You're gonna learn a lot of those
principles. But in order to be able to use those principles and apply them, you also need
to have the language to program in, and that language that we're gonna use in this class is
Java.
-----很幽默-----
So the way I like to think about it and the way I tell a lot of people is writing a good
program or learning how to program is like learning to be a good essay[散文] writer. And
you're, like, "Oh, but part of the reason I'm taking this class, Mehran, is that I don't like
writing essays." That's fine. It's okay. Trust me. I didn't like writing essays either.
But the whole point is that when you write an essay, it's not a formulated kind of thing.
You're, like, "Well, what about five-paragraph essays?" Yeah, just block that from your
mind. That was a bad time, right? That was just, like, '70s education at work. It's not a
formulated kind of thing.
There's an art to writing an essay, right? In order to write an essay, you need to know a
language. You need to know English or German or Hindi or whatever language you
wanna use, but then you use that language to write an essay. Just knowing the language
doesn't make you a good essay writer though. Being a good essay writer makes you a
good essay writer.
So that's the same difference in programming and software engineering. Knowing the
language, in order to be a good programmer, like a good essayist, you need to know a
language to write your programs in, whether that be Java or C or C++ or whatever. Here
we're gonna use Java.
But just knowing the language doesn't make you a good software engineer and doesn't
make you understand what the principles are of writing good software, which is what
you're also gonna get in this class in addition to the language, and that's kind of a key
thing to stress.
 and some folks raised their hands, and you got a little worried and you're
like, "Oh, am I gonna be in some sense at a disadvantage because I haven't done any
programming before?" The answer, plain and simple, is no, okay? You're gonna learn
everything you need to learn from the first principle because as a matter of fact, in some
cases you might be in slightly better shape. That's not necessarily to say that that's the
way it will be.
But how many people are Star Wars fans? Just wondering. Anyone? I'm talking about the
old-school, original, like, three movies. Those were so good, and we're not — no George
R. Binks here, all right? So if you remember — and sort of I'm a big Star Wars fan, and
that's just a whole separate point. But in the second movie, Yoda actually said something
which I thought was quite profound, which is he says sometimes you have to unlearn
what you have learned.
And one of the things we actually find is that some people who are self-taught
programmers, some of them are just fine, and some of them are very good. But some of
them have picked up some really bad habits along the way, and it's like being a bad essay
writer. And to go from being a bad essay writer to a good essay writer, in some cases, can
actually be harder than from not being an essay writer to being a good essay writer
because you have to unlearn the bad habits.
So if you're worried about, "Oh, I've had no previous experience," don't worry.  And now if you're thinking, "Oh, I have some previous
experience. Do I have bad habits?" Don't worry. You'll be fine, too, okay? So it's all
gonna work out.
So the next question that kind of comes up — hopefully that helps put some of your fears
aside. Another one of the things is that we really strive to make everyone successful in
this class, okay? At some other schools, people wanna do computer science or they
wanna do an engineering major or whatever. And you come into the first day of class,
and they say, "Oh, only one third of you are actually gonna make it through this program.
And look to the person to your left and look to the person to your right, and only one of
you will make it through." And you're, like, "Oh, man, that's real nice." It's not like that
here.
As a matter of fact, we want all of you to be extremely successful in this class, which is
why we have a huge course staff, which is why over years and years we've refined how
we do a lot of the teaching in this class to make sure you have the best possible
experience and to make sure that everyone gets through.
And the important thing about that is that you're not competing against anyone except
yourself in this class. It's not like we're gonna have a curve and we're gonna say, "Oh, we
have a certain number of "F"s and a certain number of "D"s and a certain number of
"C"s." All we really have going into it is an expectation that when you get out of here,
there's a set of stuff we want you to know. And if you know that stuff well, you get an
"A." And if everyone knows that stuff well, everyone gets an "A." And I got no problems
with that. Registrar might have a problem with that, but that's okay. You don't need to
worry about that.

And we'll talk about issues of collaboration in just a little bit. All you need to think about
is learning the stuff yourself as well as you possibly can, and you'll be just fine and you'll
get a good grade, okay? So that's really all we ask, which is not a trivial amount, right? It
requires you to really understand the material.
So another question that comes up is are you in the right place, right? This isn't the only
introductory programming class at Stanford. And so I wanna spend a little bit of time
making sure you actually are in the right place by going over some of the different
options.
----------------------
So right now, as you know, you're in CS106A. And CS106A, we're sort of happy over
here, right? As a matter of fact, we're not only happy, we're happy and we're also a little
bit loopy[adj. 多圈的；呆头呆脑的], right? There is no previous programming experience required, as I mentioned,
right? All you need to know is basically if you can get to a computer and know how to
figure out that it's on, you're in good shape.
But what 106A does is it's a real rigorous[严厉的,严酷的,严格的] class.  That's not to say you're all gonna be engineers. I would love for all of you to be
computer science majors, but statistics in the past show only about 6 percent of you will
be computer science majors. That's not because we turn anyone off to computer science;
it's because we make programming accessible to so many people that you don't have to be
a computer science or a Double E or even an engineering major to do extremely well in
the class.
And we actually have sort of a significant percentage of the entire campus undergraduate
student body at Stanford actually goes through this class and does well, okay? So don't
worry if you're, like, "Oh, but I'm not really a CS person." I hope we'll turn you into one
by the end of the class. No, it's okay. But you'll be prepared if that's what you wanna do.
So this leads into a whole engineering sequence that can go on to other engineering
majors or the computer science majors.
If you're, like, "Huh, I'm not sure if that's really what I wanna do. As a matter of fact, I'm
so sure that's not what I wanna do, I only wanna get the general educational requirement
out of the way, and I'm positive there is nothing else I wanna do. Really, no matter how
much I like it, like, there is no way you're gonna drag me into anything that would
involve anything remotely techie." They're the class CS105. And this is happy, yeah, this
is kind of, oh, we're happy in our little happy world. And I don't wanna say it's holding
hands and singing, "Kumbaya," because that's not what it is. It's a real class. But it's
meant to be a general educational requirement, right? It doesn't lead into the 106s. It's
meant to be its own self-contained class. You do some Java script in there. You do a little
bit of what computers are about.
Computers in society is a good time. We all hold hands. We're all happy. I don't teach the
class, so I don't actually hold hands. But it's a fun time, okay? It just doesn't lead to
anything else. So think of this as kind of a terminal class, right? So it's sort of like, well,
we'll hook you up to the IV drip.
And you're, like, "Well, 106A, you told me I don't need any previous background. Well,
hey, Mehran, I got lots of background. I got so much background, it hurts. I got AP
background, I got working through school doing software engineering background. I'm
not sure I should be here." That could be the case.
We have another class called CS106X, and as the "X" kind of implies, it's sort of the
extreme games version of the class. No, it stands for accelerated, right, because "A" was
already taken, so we had to come up with something else. So the way CS106X works is it
really is a very fast-paced class. It's meant for people who've got previous AP exam
credit, like, got a 4 or 5 on the AP, or have had significant and prior programming
experience before.
If you're not sure which one of these classes is for you, you can come talk to me
afterwards, or I'd also encourage you, you could go to pick up the syllabus for CS106X
and compare it to CS106A. This class is all in C++. And if you're thinking, "Hey,
Mehran, I'm doing 106A. I wanna learn Java and C++," don't worry. You'll eventually, if
you so choose, take a class called CS106B, which is where this class sort of leads to,
which is C++ and all of the other stuff you would have learned in this accelerated class,
okay? So you still certainly have that course path.
 And so everyone just wants
to, like, do the most hardcore thing they can, right? And what I'm here to tell you is that
you shouldn't necessarily think about it that way. You should think about it as where you
feel most comfortable.
Some number of years ago, let's just say greater than 10, maybe 15, I was sitting where
you're sitting right now, literally. I was in CS106A in Terman Auditorium as a freshman,
okay? It was perfectly fine. It worked out. I went to grad school, did the faculty thing. It's
just fine. It will open your doors to CS. You're not at any kind of disadvantage by starting
here. So know where you've been, literally. Like, that seat right there was where I was
most of the time. So just something to keep in mind in terms of the different options that
are actually available to you.
Now, with that said, let's just assume for the rest of this lecture that this is the right place
for you. And if it's not, well, afterwards we can kind of talk about it, or if you really are
convinced now that it's not the right place, you can feel free and try to scramble over 20
of your classmates and actually leave the room, which is probably impossible.
All right. So a few other things you should know, some mechanics. So Handout No. 1,
should you wanna follow along at home, is the class web page. And so all the stuff that
we think of as course materials, including online copies of the handouts, things that you'll
need to do for the assignments, announcements related to the class are all on the class
web page, which is www.stanford.edu/class/cs106a. And because that's just kind of a
whole bunch to remember, we make your life easy and so there is an equivalent form of
the URL, which is just cs106a.stanford.edu, which is the easy thing to remember. You
put that in, it'll take you to the class web page, okay?
And you should check that regularly because all the announcements and handouts —
we'll give out hard copies of all the handouts in class, but should you happen to miss
class for whatever reason, you wanna go print whatever copies of the handouts we're
actually giving out, you can find them all on the web page, okay?
Now, there's this funky thing about units. So you may have noticed that this class is for
three to five units, and that kind of brings up the natural question, "Should I take it for
three or five units?" If you're an undergrad, you take it for five units, end of story. That's
life in the city. Congratulations. Five units.
 It doesn't change the amount of work you
have to do. Welcome to graduate school. Same work, fewer units. So that's just the way
life is. If you have a unit cap and you're a grad student, in three units you can take it if
you want. You can take it for five if you want as well. If you're an undergrad, you take it
for five, all right?
So why is it five units? And you might think, "Hey, this class only meets three times a
week. How come it's five units?" Well, it actually has a fourth meeting every week,
which is your section, and that's something you should sign up for. So how you actually
sign up for your section is sections are at a bunch of different times. You don't sign up for
them in Axess, even though they're all kind of listed in the time schedule. That's not
where you sign up for them. In Axess, you just sign up for the class.
How you sign up for a section is you go to a website, cs198.stanford.edu/section and this
will give us a list of preferences for section times that you wanna sign up for, and there's
some matching process that goes on. It takes all your preferences into consideration with
the whole system, and eventually you get an email by sometime early next week that tells
you what section you're in. And section's 50 minutes, once a week. It's required to go to.
It's actually gonna be part of your class participation grade, which we'll talk about in just
a bit, okay?
---------------------------------------
When do these sign-ups happen?  So if you try to go there now, you can't sign up. Remember 5:00 p.m.
Thursday. So they're up, and then they're down at 5:00 p.m. on Sunday, okay? So make
sure you sign up probably this weekend. If you're planning on being out of town this
weekend, you wanna sign up before you go. Sign up early, but don't sign up often
because you only need one section, okay?
If you're an SCPD student — every once in a while you'll hear me refer to SCPD
students. That stands for Stanford Center for Professional Development. They are the
folks in industry who actually take this class via broadcast. If you're an SCPD student,
you're automatically enrolled for a section, so you don't actually need to do this, and your
section will meet at — so for SCPD — and if you're wondering what an SCPD student is,
you're not one, okay? So SCPD section meets Friday from 1:15 to 2:05. It meets live, if
you wanna go there live, in Skilling Auditorium. But if you're watching it remotely, it
meets on Channel E2. I know it seems weird to say it meets on channel — what does that
mean? It meets on Channel E2, okay? That is grammatically the correct way of saying it.
All right. So there's a little bit more administrative stuff. Now, textbooks, right?
Textbooks, there's nothing quite like the extortion that is textbooks. So there are two
textbooks that are required for this class. Well, one's a course reader and one's a textbook.
The course reader is called, Karel the Robot Learns Java. You can pick it up at the
bookstore. It's relatively cheap. It was actually written by Eric Roberts here. And
surprisingly enough, the textbook for the class was also written by Eric Roberts, The Art
and Science of Java, which is available now in your local bookstore, including the
bookstore on campus, so you can go and pick up a copy of this.
So both these things you actually wanna have because they're required for the class. We'll
go through all of them. We'll go through basically everything except the last chapter of
this book.  We're just gonna do it a little bit out of
order, but we'll go through the whole thing, okay?
So email, how many of you have email accounts? All right. I will ask the reverse question
because I think at this point, some people just don't wanna put up their hands. How many
people don't have email accounts? Odd how that is not the complement of the folks who
had their hands up previously. Email's required for this class. Chances are, by being at
Stanford, you've already gotten an email account through your SUNet ID, but if you don't
have an email account, get an email account and that's how you'll stay in contact with us.
That's how we'll stay in contact with you, except we'll also meet with you live in person,
but email is kind of the general method for communication.
As a matter of fact, for your first assignment, and part of your first assignment is to send
us an email, just because we love you and we don't get enough email as it is. So you need
to have an email account to be able to do that. So if you have not already, you can kind of
get ahead of the game and go set up your email account. Now, don't worry. You'll get the
first assignment next time. So you still get, like, two days of breathing space before your
assignment goes out, okay?
There is also gonna be lots of handouts in the class. They'll be either given out in class,
well, they will be given out in class, but we'll also post them online in case you miss
them.
And how much real work do you do in this class? That's always kind of an interesting
question. So let's talk a little bit about assignments and a little bit of other logistical
things. So assignments, we'll just call them the dreaded assigns. There are seven
programming assignments. And if you look at the syllabus Handout No. 2, it tells you
when all of them are due all the way through by day, so you can plan out your whole
quarter. It's just that much fun, okay?
And these seven programming assignments are weighted slightly more toward the last
assignments because the assignments will tend to get more complicated. That doesn't
necessarily mean there'll be more programming; it just means conceptually, they'll
become more complicated, so we tend to weigh them more toward the end of the class.
So the later assignments count more than the early assignments.
 And Eclipse thankfully is free, so you don't have to pay for it. As a matter of
fact, you can download it from the CS106A website. And if you're wondering how you
do that, don't worry. We'll give you a handout next class that explains to you the whole
grueling process of downloading and installing Eclipse.
And you can use this either on the Mac or the PC. So if you have your own computer,
you can certainly work on this yourself. You just download it to your own machine. We'll
explain the whole process in a handout. If you don't have your own computer, the public
computer clusters on campus will have Eclipse installed on them, and so you can use
Eclipse there. So you're sort of happy to go either way, okay?
Now, the important thing, remember I mentioned that whole notion of software
engineering in the class, and that's something we take really seriously, so seriously as a
matter of fact that when you turn in your assignments, one thing we could do is we could
take your assignments and we could just kind of look at it and go, "Yeah, interesting, 'B.'
Here you go. Thanks for playing." And you don't learn a whole lot from them. So in order
to actually learn a lot from your assignments, we could take your assignment and write a
whole bunch of comments on it and hand it back to you. Even that's kind of not enough.
What really is a little bit more that makes it more fun is every week after you turn in your
assignment and your section leader looks it over and grades it, you'll actually meet with
your section leader for about 10 to 15 minutes every week or every time an assignment is
due to actually go over in something referred to as interactive grading.
And it's a chance to sit there and talk with an actual human being about what's good in
your assignment, what are some of the things you need to work on, what are some of the
software engineering principles you need to develop. And that way, you can really sort of
get more detailed information and be able to ask questions to develop yourself as a
programmer as well as get help if you need help, okay?
And that's in addition to going to section, going to class and all that stuff. So it's another
15 minutes a week. You'll actually schedule that time with your section leader on a
regular basis when you're gonna have interactive grading or just affectionately referred to
as IGs because at Stanford, everything's just short and we just can't say, like, psychology;
we have to say psyche. So it's IG. Just remember that, all right?
And then how are these things graded? So the other thing we could do is I told you we
could just write "B" and hand it back to you. But we found that that's not really great
because people get all wrapped around the axle about the grade.
And so for a while, we did numbers and we're, like, huh, why don't we give a number
between 1 and 20? And so what happens there? People get all wrapped around the axle
about numbers.
So then we thought, huh, what was a happier time when we were in school? I remember
when we were in school, and we used to get back assignments and they had, like, smiley
faces on them. Well, we can't do that because then it doesn't appear to be a rigorous
Stanford class.
So instead of the smiley face, we come up with something else, which looks surprisingly
like this. It's kind of involved to actually draw, so I need to erase the board to do it.
Check. That's kind of the beginning of our grading scale, okay?
And the way our grading scale works is we start off with a check in the middle, which
says this is a pretty solid program. It meets all the requirements for the program. Maybe
it's got a little problem here or there, but it's a check. Then we have sort of two grades on
the two sides of it: check plus and check minus.
Check plus is, like, solid. You did a great job; you got everything right; things look good,
a nice style in your program, nice software engineering, and the program works
flawlessly. Good job. This is like total "A." Check is kind of like, yeah, you're sort of
there. It's kind of like "A" minus, "B" plus, maybe on some occasions "B." But it's kind
of like it's pretty good work; you're in pretty good shape here. And so a lot of grades in
this class ends up being check pluses and checks, and if that's the case, you're perfectly
fine grade-wise.
Check minus, as you can imagine, this is kind of thinking about "B," "B" minus. It's,
yeah, there are some slightly more significant problems with your program.
But that's not where it ends, right, because we wanna be able to even shoot for in some
sense bigger gustoes. There was a plus and a minus. So plus is like, oh, nice job, kind of a
hearty pat on the back. If you get pluses all the way through on all your assignments,
you're in a pretty good candidate to get an "A" plus.
And minus, like, just take good over here and replace it with bad, it's kind of like, oh, bad
times, right, or maybe, you know — but even there was, like, more significant problems
with this program or just the style on the program is just really bad. But even there, we
don't stop. And you're, like, "Come on, man. Like, I thought the whole reason was to
simplify this." Don't worry.
And it gets even better because we have a plus-plus and a minus-minus. And at this point,
we've run out of board space, so we can't go any further. But a plus-plus is just
outrageous, right? It's the kind of thing — so this is the kind of thing your section leader
can't actually give you without coming and talking to Ben and I first because they get a
program that just goes — it has to actually exceed the requirements for the assignment.
It's by a long shot. Like, you'll get all your assignment requirements, and what we
encourage you to do is you can do a grade assignment and get everything right and have
good style, and you'll be in this category. And for the later assignments, you may be in
this category if it's flawless.
But we'll actually — if you want to go for the plus-plus, go beyond the assignment
requirements. And the way we think about the plus-plus, it's a program that makes you
weep in a good way. It's just like your section leader sees it, and they're just, like, this is
so good, I've gotta show someone else. And they come and show Ben and I, and we're,
like, sitting there looking at this on a monitor, and, like, tears are just welling in our eyes,
and there was, like, soft violin music playing in the background and we get out the wine
and cheese.
So this is just, like, this is the kind of thing that gets you, like, remembered and the, oh, if
you want a letter of recommendation, just ask because you got a plus-plus. Like, oh, it's
awesome, right?
There are very few of these in a quarter. So just by sort of way of comparison, in a class
this size, probably throughout the span of the whole quarter, I'd expect there to be maybe
ten plus-pluses, I mean, ten assignment plus-pluses, not ten students who get plus-pluses
across the board. So it's really something to strive for, but if you strive for it, like, we're
giving you the credit for it. And this gets remembered and you get, like, extra credit and
everything.
So we're left with this, right? This assignment also makes you weep, but not in the good
way, right? It makes you kind of weep in the sense, like, I look at them and I'm, like, oh,
man, like, what did I teach? Like, where did I go wrong, right? I, like, blame myself. I
blame you a little bit, but I blame myself. And this is really just, like, the program is just,
like, it's a shell. Like, there really wasn't much effort that was put into it. Yeah, you
slapped something together or it doesn't really work, that whole deal.
And then if you don't turn anything in, we do kind of reserve the zero to distinguish from
the "made really bad effort" versus "didn't make any effort at all." And we just won't talk
about these, right? Let's just hope we can avoid those if possible. But that's kind of how
the grading scale works now.
Now, at the same time, I trust all of you to be responsible people. And every once in a
while, something bad happens to a good person, and there's an assignment that you'd like
to be able to turn in, but for whatever reason, you can't turn in on time. And I just wanna
treat you like adults. I don't want you to have to worry about coming in and asking for an
extension or, like, "Oh, I had this really hard thing in another class, and I couldn't do it at
the same time." Up front, everyone gets two free extensions, okay? So in terms of late
days — we refer to these as late days, strangely enough — you get two free ones.
What a late day is, is a class day. They're not 24-hour days, but class days. So if
something is due on a Wednesday, you turned in on a Friday, that's a late day. That's one.
You turn it in on the following Monday, that's two late days. You can split up your two
late days among two different assignments. You can use them both on one assignment.
But we encourage you to not use them at all because if you use your late days, you fall
behind in the class. The way you should think about these things are these are preapproved
extensions. They're not the kind of thing where you just think, "Oh, yeah, I'm
not gonna do the assignment because I wanna go and play Frisbee golf," right? Think of
it, well, you wouldn't come ask me for an extension — you might, but you probably
wouldn't ask me for an extension if you're, like, "Hey, hey, Mehran, can I turn in the
assignment, like, on Wednesday because I'm playing Frisbee golf this afternoon," right?
If you would feel embarrassed asking that question, you probably don't wanna use one of
your free late days.
But something happens like, oh, it's a tough week, you've got midterms in other classes
and you got this assignment due or whatever, that's a good time to use it. So we just trust
you. And most people, we actually encourage you not to use them because it just makes
you fall behind in the class.
Because we trust you and we give you these two up front, getting extensions beyond your
two free class days is virtually impossible because we sort of up front said, hey, it's your
responsibility. We're giving you two freebies. We're not gonna give you a third extension.
Imagine if you had to come ask us for three extensions. By the third one, we'd be, like,
okay, what's going on, which is why we don't necessarily give extensions beyond these
two.
The only time we might give an extension beyond the two free ones is for something
major, like death in the family or, like, serious medical problems that might require
surgery or something like that. Every once in a while, unfortunately, that happens. I hope
it doesn't happen in this class. But those are the only kinds of things that we give
extensions to beyond the two free late days.
Importantly, don't ask your section leader for extensions. They cannot grant you
extensions. Only Ben, who has all the power in this class, can give extensions, which is
why you should get to know Ben and then hopefully you won't need to talk to him about
extensions, okay?
So other thing to keep in mind is that three days late is the max. Beyond three days late,
which is basically one class week, if you think about late days being class days, we will
not accept an assignment. And the reason for that is at a certain point, you're so late,
you're better off just doing the next assignment, letting the old one go. So to sort of
enforce that policy, after three days, we don't accept that assignment late anymore. It's
just gonna be a zero if it's not turned in, okay? And that just kind of forces you to keep
up.
Couple other minor things, well, I shouldn't say they're minor things. They're actually
kind of important. Exams: There's two exams in this class. There's a midterm and a final.
Both of them are, well, I shouldn't say both. The midterm is out of class. It's from 7:00 to
8:30 p.m. on Tuesday, October 30. And it's on the syllabus. It's there. It's on the syllabus;
it's on Handout No. 1. We repeat it multiple times. The date will eventually be announced
when we get close to the midterm.
But if you have a conflict with this time, you need to send me email, okay? You can send
me email a little closer to the midterm because I'll announce it again for people who have
conflicts. But since it's an out-of-class exam, you need to send me email if you have a
conflict. I'll get all the constraints from people who have conflicts and try to schedule an
alternate time if there's enough people with conflicts. But 7:00 to 8:30 is when you need
to know about the midterm.
And to make up for the fact that we have an out-of-class midterm, I actually give you sort
of a belated free day, which is the Friday of the week of the midterm, we don't have class
to make up for the fact that we made you come to the midterm outside of class. But the
midterm's an hour and a half, and we can't compress time. If we could, we'd have
different issues. We can't compress time and fit it into a 50 minute class, which is why it's
out of class, but you get a free day for it, all right?
Last but not least, few things about grading. Grading, one of those things as you might be
able to tell from this little board over here or something, if I didn't have to do it, I
wouldn't do it because honestly, as corny as this sounds, I just believe in the love of
learning. Like, I think if you're passionate about something, you just go do it and you
learn it. But I'm naïve, and so that's not the way learning always works. So sometimes we
actually need grading to make sure that learning takes place.
And so this is how your grade breaks down: Forty-five percent of your grade is on the
programming assignments, okay? Fifteen percent is the midterm, which we'll just call the
mid because we like to abbreviate everything. Thirty percent is the final. It's a three-hour
final exam in the regular final time slot for this class.
If you think or are under the delusion that you should take two classes at the same time,
that's a bad idea because their final exams are at the same time, okay? So you should not
take two classes as the same time because our final exam is scheduled for — I believe it's
December 13, which is a Thursday, 12:15 to 3:15. That's the regular final exam slot for
this class. And any other class at the same time will conflict with that slot. Thirty percent
of your grade is the final.
And that, if you add it all up, it's not just that I'm bad with math. It's because 10 percent
of your grade is actually participation.  Did you regularly attend section? Did you participate in
section? Did you participate in class, right?
And so, in order to help you participate in class, there's a little incentive to participate in
class, which is sugar in the afternoon. So someone raise their hand. All right. Yeah,
sometimes I'm not a good shot.  Oh, yeah, sorry.
If you sit in the back of the room, the roof prevents me from actually being able to hit
you. So if you want the food, come up. But if you ask questions in class, hey, that's a
good time. It's just a little way to be able to reward you for actually participating in class
or to keep your blood sugar up if you need it, all right?
So that's participation. It's 10 percent of your grade, and as a matter of fact, at the end of
the quarter, I ask every one of your section leaders to actually tell me how much you
participated in class, and some of them just say, "Oh, this person was wonderful. They
came every time. They participated. It's just a great thing."
Now, the final thing, and as you can kind of tell, most of the time, I'm not the most
serious person in the world. I just like to have fun with things, and I think it's important
for you to have fun with things. There is just one place where I get real serious, and it's
one place where Stanford gets real serious. Anyone wanna guess what that is? Plagiarism
and the honor code. As a matter of fact, that's what we call a social. So we had someone
down here who got it and then a whole bunch of people who I don't know, so we just
spray. All right.
So the honor code, in terms of the honor code, the question comes up is what is the honor
code all about, and how does that affect working in groups and computer science, etc.?
Does that mean we shouldn't talk to each other? No. The answer to all those is no, okay?
If you look at Handout No. 4, which is all about the honor code, we encourage you to talk
to each other. We encourage you to talk about concepts in the class, talk about different
strategies to problems, to think about the ways that you could potentially approach some
problem or the way different control constructs when we eventually get to them work in
the class. And discussion is perfectly fine, especially among the course staff, but also
amongst yourselves. That's a great thing.
So where do we draw the line? And we try to make a bright line for where you've crossed
the line for the honor code, which is don't share code, plain and simple, in any respect,
okay? Don't give a file to someone else that's got your code in it. Don't get code from
someone else. Don't look at someone else's printout. Don't give them a printout.
If you have two people who are sitting looking at the same screen together, that code
can't belong to both of you. It belongs to one of you. I don't know which one, but it
becomes an honor code violation. So you shouldn't both — two people shouldn't be
staring at the monitor together. If it ever gets to the point where you're looking at
someone else's code, that's where you're gonna reach an issue, okay? Discuss as much as
you want. That's great. Write your own code. That's all we care about.
And you're, like, "Well, what is code, Mehran? What does that word mean?" Code is
geek speak for your program, so when you program, the program that you write is what
we affectionately refer to as code. And the idea of programming is what we refer to as
coding, strangely enough. Computer scientists need to make everything more
complicated than it really is so we can get people under the illusion that they should pay
us lots of money to do what we do.  And
they're, like, "Oh, yeah, I should pay you half." And you're, like, "No, no, no. I write
code." And they're, like, "Oh, yeah." Suddenly, it's much more impressive. So don't share
code.
The other thing is if you talk to other people, like if you have a study group to talk about
solution approaches or you go, let's say, talk to the TA or your section leader to how you
should approach a problem, and they give you a lot of hints as to how to do it, cite
collaboration. So cite and collaboration gets you out of trouble. Any collaboration that
you cite you cannot be held responsible for under the honor code.
You can actually copy someone else's program and say, "I copied this program from
Mary Smith." And I'll look at that and say, "They cited it," and it will warm the cockles
of my heart. And Mary Smith will get full credit, and you'll get a zero because you copied
your program from Mary Smith, but it's not an honor code violation because you cited the
work, okay? So the bottom line is keep yourself safe and cite your collaborations.
Now, you might wonder why do I make such a big deal about this. And the reason I make
a big deal about this is for a while, thankfully it's not true anymore, but for a while, the
computer science department actually had more honor code violations than the rest of the
university combined. Take everything else in the university, put them all together, they
were like over here. And we're, like, we're computer science, which is not a fun
distinction to have, let me tell you.
And you might wonder why is that? Is that because computer science people are just
mischievous and dishonest? No. It's because it's easier to catch honor code violations in
computer science. We have a whole bunch of tools that allow us — then we take all your
programs and we run them through this tool, and it compares them not only to everyone
else in here, but, like, to everyone from the last, like, X years where X is the large
number of people who've ever gone through the classes, right? And it's an extremely
good tool from finding where honor code violations happen, from where they don't. And
it doesn't find spurious violations.
To be honest, I've never lost an honor code case. When I find an honor code case, it is
blatant. And you take it to judicial affairs, and they look at it, and they're, like, yeah, this
is blatant. And I take it to the student, and every student I've ever confronted them with
never said, "No, no, no. I didn't cheat." They said, "You caught me," okay? So it's blatant.
It's not like, oh, there's some little line in it, "Oh, am I gonna need to worry about an
honor code violation?" Remember those rules, you have nothing to worry about in this
class. It's people who go and, like, fish out printouts from the recycle bins and copy other
people's code that are the people we catch, right? It's blatant cheating that we catch. But
we catch it. We catch it all the time. So I hope, I pray it doesn't happen in this class.
But the reason I make a big deal about it is historically if I look at the evidence, it
happens and we catch it. And when we catch it, we're required by the university to
prosecute. And I feel bad because usually it's someone who just made a bad call, like,
they were up way too late the night before working on something else, and they're not
thinking straight. And rather than just taking a late day or turning in their assignment late
and getting a slight penalty on it beyond their two free late days, they decide to cheat.
And that's just always the wrong call, okay? So you just don't wanna put yourself in that
situation. So I get real serious about it for a moment, and hopefully it won't be an issue
and we can just kind of go on, okay?
So with that said, that's a whole bunch of logistical stuff. Any questions about the
logistics of this class or anything I just talked about? Uh huh?
Student:You had briefly mentioned the late penalty.
Instructor (Mehran Sahami):Oh, the late penalty, good point. So remember our little
bucket scale. If you go beyond your two free late days, every day you turn in an
assignment late beyond those, it drops down one bucket. So let's say you already used
your two free late days on Assignment No. 1. And on Assignment No. 2, you turned in
something one day late and you would have gotten a check normally, it becomes a check
minus. So that's how it is. It's one bucket per late day beyond your two free ones. Uh
huh?
Student:Are the sections first come, first served?
Instructor (Mehran Sahami):Yeah, the sign-ups, well, they take into consideration your
preference, but part of your preference is to do the match is first come, first served. So
you wanna sign up early. Oh, thanks for your honesty. As a matter of fact, I dig honesty,
all right? Any other questions? It's just honesty's cool. Uh huh?
Student:How much time should we plan on studying [inaudible]?
Instructor (Mehran Sahami):Oh, good question. How much time should you plan? And
this is something that I say for classes in general at Stanford, which is not always true,
which is take the number of units that a class is, multiply it by three. That's how many
hours you'll spend per week in that class, total, on average. So what that means is in
106A, a 5 unit class, you multiply by 3, you get 15. Five of those hours are roughly spent
between class, section, interactive grading, other stuff. That means on average about ten
hours a week will be spent on your assignments in this class. Again, that's an average.
Sometimes when I go to computer science conferences, I sit there and joke around with
plans. And we're, like, "Oh, how long did your assignments take?" And I say, "Oh, on
average, ten hours." And what I really mean when I say on average 10 hours is they take
between 3 and 45, okay? It's a large variance event, right? Ten is the average. Some
people take a really long time. Some people get through it really quickly, but that's about
the average you can plan for. Uh huh? Another question?
Student:[Inaudible] late days [inaudible] class days?
Instructor (Mehran Sahami):Yeah, all late days are class days, so the free ones — the
halfway mark's really my reach. That's about it. All right.
So I do wanna give you your very beginning of an introduction to programming before
we sort of break for the day. How are we doing on time? And so in order to kind of see
this, there's a few things that we wanna keep in mind.
Actually, let me show you a little picture, okay? Sometimes when we talk about writing
programs, we talk about debugging programs, right? How many people ever heard the
term debugging or bugs in programs? A bug in a program is an error in a program, so
sometimes when you hear us say, "Oh, come see," like, your section leader to help debug
or see the helpers in LaIR.
That's another thing. In the Tresidder computer cluster is the LaIR. It's a computer cluster
that we have helpers there to help you get through this class. What is it? Sunday through
Thursday, every week, from around 2:00 in the afternoon 'til midnight every day, okay, to
help you get through the class. So that's a good place if, you know, you can work in your
dorm room certainly, but if you also want help, go to the Tresidder computer cluster, and
there will be helpers there. There's a little queue you sign up for to get help, and that's a
great place, and it's all explained in Handout No. 1, but that's just something to keep in
mind.
Where the term debugging comes from, it turns out this is an apocryphal story, but I'll tell
you anyway. Back in the days of yore, in 1945 actually, there was a computer called the
Mark II at Harvard. And there was a woman named Grace Murray Hopper. Anyone ever
heard of Grace Murray Hopper? A few folks. She was actually the first woman who was
an admiral in the navy. And she was also one of the very early pioneers of computer
programming. She did a lot of computer programming when she was actually a captain,
and she was stationed at Harvard as part of some sort of navy thing. I don't know why,
but that's what happened.
And they had this huge computer there, and they were noticing the computer was on the
fritz, and they couldn't understand what was wrong. And this is one of these big old
machines in the days of yore that has vacuum tubes and stuff inside it. So they walked
inside the computer, right, because then you could actually open it up and walk inside
your computer.
And they saw this, and I don't know if you can see that, but that's a moth. It was a moth
that had sort of given its life to be immortalized because it had actually shorted out across
two relays in the computer and was causing these sort of errors to happen on the fritz.
And so they took the bug out, and once they actually plucked this little charred bug out of
there, the computer started working fine again, and she taped it in her log book.
And this log book's actually preserved in the Smithsonian Institution now, which is where
all this comes from. Here's all the standard disclaimer information: "Image used under
fair use for education purposes. Use of this image is exempt from Creative Commons and
other licenses," just so you know. Now the lawyers are happy. But this is where we think
of sort of the modern term debugging actually came from.
Now, it turns out the actual story is that the term debugging came from the 1800s, in the
late 1800s from mechanical devices. People actually referred to debugging as fixing
mechanical devices. But this is kind of the apocryphal story for how it comes up in
computer science.
Now, with that said, what is the platform in which you're gonna sort of do your first
debugging or your first work on? We talked about Java, but in fact in this class, we're not
gonna start with Java. We're gonna start with something even sort of simpler than Java
because as I mentioned, sometimes what happens in computer science is people learn all
the features of some language. And they think just knowing the language makes them a
good software engineer. And they get so worried about all the features of the language
that they don't kind of think about the big picture.
And so there was a guy named Rich Pattis, who oddly enough was actually a grad student
at the time at Stanford, and he said, "You know what? If we're gonna teach computer
science, when we first start out, why don't we have people not worry about all of the
different commands of the language and all the different things they can do? Let's start
with something really simple so you can learn all the commands real quick. And then
you've mastered everything there is to master about that language, and you can focus on
the software engineering concepts."
And so Rich, who's a wonderfully friendly guy — sometime if we get him to come to
Stanford, I'll introduce you; he's just very nice — came up with this thing called Karel the
Robot. And the term, "Karel" actually comes from Karel Capek. Anyone know who he
is? Oh, free candy. Uh huh?
Student:He coined the term, "robot."
Instructor (Mehran Sahami):He coined the term, "robot."  And the word robot
actually comes from a Czech word, the Czech word for work. And so the robot is named
after Karel. And some people say Karl, which is kind of actually closer to I believe if — I
don't know if there's anyone who speaks Czech in the room — but closer to the actual
pronunciation. But we say Karel these days because it's kind of like gender neutral, okay?
And so Karel the Robot is basically this robot that lives in a really simple world. And so
I'll show you all that you can meet Karel the Robot. He's friendly; he's fun. I'll show you
Karel the Robot. So we gotta get Karel running. He's at the factory. He's getting souped
up. We're energizing Karel. You gotta add some color to it. Otherwise — all right. We're
begging for him. Come on, Karel. There he is. Oh, yeah. That's Karel the Robot. He looks
like one of the old Macintoshes if you remember the original Macintoshes that look like a
lunch pail, except he's got legs. One sticks out his back. That's just the way it is.
And the way Karel works is he lives in a grid. To you, it may not be exciting, but to
Karel, it's way exciting. So Karel lives in this little grid, and the way the grid works is
there are streets and avenues in the grid. Streets run horizontally, so this is First Street,
Second Street, Third Street. And then over here, we have avenues, First Avenue, Second
Avenue, Third Avenue, Fourth Avenue, Fifth Avenue. It's kind of like Karel lives in
Manhattan if you wanna think about it that way, okay? So Karel always is on one of these
corners. So right now, he's at the corner of First Street and First Avenue, or we just refer
to it as 1 1 if you wanna think about sort of Cartesian coordinates, right? But just think of
them as streets and avenues. That's where Karel lives.
And Karel can move around in this world. There's a bunch of things that Karel can do. He
can take steps forward. He can turn around to face different directions, and he can sense
certain things about his world. So there's some things that exist in Karel's world, okay?
Things like walls that Karel cannot move through, right, so his world has walls all around
it that he can't go through, so he can't fall off the end of the world. And there's other walls
like this one if Karel were over here, he can't step through that wall.
There's also something referred to as beepers in Karel's world. And what a beeper is, is
it's like a big diamond, okay? But what a beeper really is, is basically just some marker
that he puts in the world. You can think of a beeper like a piece of candy. And Karel just
goes around, like, putting pieces of candy in the world. As a matter of fact, not only does
he put pieces of candy in the world, he carries around a whole bag of candy.
So he has a beeper bag with him, and sometimes that bag has a whole bunch of beepers in
it; sometimes it only has one beeper; sometimes, it's sad Karel, and he has no beepers.
But he's still got the bag. There just don't happen to be any beepers in it. So he can
potentially, if he come across a beeper in his world, he can pick it up and put it in his bag,
or he can take, if he's got beepers in his bag, he can take them out of his bag and put them
places in the world. And corners in the world can have either zero — if they have no
beepers, they just appear like a little dot — or one or more beepers on them that Karel
can potentially pick up, okay?
So any questions about beepers or Karel having a little bag of beepers? And that's it.
That's Karel. That's his world. His world, we can make it larger if we want. We can put in
walls in different places. We can put beepers in different places. We can have Karel be in
a different place.
But starting next time, what you're gonna realize is with this extremely simple world,
there's actually some complicated things you can do. And after about a week — so this
first week, we're gonna focus on Karel — you'll notice that Karel is actually a very nice,
gentle introduction into Java. And a lot of the concepts that we learn, sort of software
engineering concepts using Karel, will translate over to the Java world, okay? So any
questions about Karel or any of the other logistics that you've actually heard about in the
class?
Alrighty then. Welcome to 106A. I'll see you on Wednesday.
[End of Audio]
Duration: 50 minutes


#include <PathDependentDifference.h>
§ PathDependentDifference()
§ ~PathDependentDifference()
| virtual PathDependentDifference::~PathDependentDifference |
( |
| ) |
|
|
inlinevirtual |
§ CashFlows()
| virtual unsigned long PathDependentDifference::CashFlows |
( |
const MJArray & |
SpotValues, |
|
|
std::vector< CashFlow > & |
GeneratedFlows, |
|
|
method |
method_ = logscale |
|
) |
| const |
|
virtual |
§ clone()
§ MaxNumberOfCashFlows()
| virtual unsigned long PathDependentDifference::MaxNumberOfCashFlows |
( |
| ) |
const |
|
virtual |
§ PossibleCashFlowTimes()
| virtual MJArray PathDependentDifference::PossibleCashFlowTimes |
( |
| ) |
const |
|
virtual |
The documentation for this class was generated from the following file:


{% extends "base.html" %} {% block content %}
This is a hobbie project.
All the images and content belongs to Royal Films.


Post edited 2 x times, last by
Topicstarter
This plugin allows you to set the distance of the BBLog button from the top of the page.
Based on this request:
http://getbblog.com/board/topic/116010/1/General-Question
Changelog
1.1 - fixed the TS button to move with the BBLog button
1.0 - initial version
You can install this plugin from the plugin gallery:
http://getbblog.com/plugin/137542/Move-BBLog-Button
Github repository:
https://github.com/dpeukert/bblog


Plotkai Interactive aims at making life easier by providing digital solutions to our clients.
Find Out MoreA group of visionary entrepreneurs who have all the fire power to tackle any problem statement.
Get Started!Our Android and web applications provide you with the best solutions.
We provide the firms services to build and manage their technical infrastructure.
We help you get popular through the power of internet, powerful advertisement and realtime analytics
Your dreams are ours too. Lets make them true
For any queries or feedback write to us


The Arrow widget draws an arrowhead, facing in a number of possible
directions and having a number of possible styles. It can be very
useful when placed on a button in many applications. Like the Label
widget, it emits no signals.
GMisc.arrrow is the function
for creating an Arrow widget:
val GMisc.arrow :
?kind:Gtk.Tags.arrow_type ->
?shadow:Gtk.Tags.shadow_type ->
?xalign:float ->
?yalign:float ->
?xpad:int ->
?ypad:int ->
?width:int ->
?height:int ->
?packing:(GObj.widget -> unit) ->
?show:bool -> unit -> arrow
kind : default value is `RIGHT
shadow : default value is `OUT |
This creates a new arrow widget with the indicated type and
appearance. The second allows these values to be altered
retrospectively. The ?kind argument may take one of the
following values:
These values obviously indicate the direction in which the arrow will
point. The ?shadow argument may take one of these values:
`IN
`OUT (the default)
`ETCHED_IN
`ETCHED_OUT
`NONE |
Here's a brief example to illustrate their use.
(* file: arrow.ml *)
(* Create an Arrow widget with the specified parameters
* and pack in into a button *)
let create_arrow_button ~kind ~shadow ~packing () =
let button = GButton.button ~packing () in
let arrow = GMisc.arrow ~kind ~shadow ~packing:button#add () in
button
let main () =
(* Create a new window; set title and border width *)
let window = GWindow.window ~title:"Arrow Buttons" ~border_width:10 () in
(* Set a handler for destroy event that immediately exits GTK. *)
window#connect#destroy ~callback:GMain.Main.quit;
(* Create a box to hold the arrow/buttons *)
let box = GPack.hbox ~border_width:2 ~packing:window#add () in
let f (kind, shadow) =
create_arrow_button ~kind ~shadow ~packing:box#add ();
()
in
List.iter f [(`UP, `IN); (`DOWN, `OUT); (`LEFT, `ETCHED_IN);
(`RIGHT, `ETCHED_OUT) ];
window#show ();
(* Rest in main and wait for the fun to begin! *)
GMain.Main.main ()
let _ = Printexc.print main () |


PSA Crypto library
API version
PSA_CRYPTO_API_VERSION_MAJOR
(macro)
The major version of this implementation of the PSA Crypto API.
#define PSA_CRYPTO_API_VERSION_MAJOR 1
PSA_CRYPTO_API_VERSION_MINOR
(macro)
The minor version of this implementation of the PSA Crypto API.
#define PSA_CRYPTO_API_VERSION_MINOR 0
Library initialization
psa_crypto_init
(function)
Library initialization.
psa_status_t psa_crypto_init(void);
Returns: psa_status_t
-
PSA_SUCCESS
-
PSA_ERROR_INSUFFICIENT_MEMORY
-
PSA_ERROR_COMMUNICATION_FAILURE
-
PSA_ERROR_HARDWARE_FAILURE
-
PSA_ERROR_CORRUPTION_DETECTED
-
PSA_ERROR_INSUFFICIENT_ENTROPY
Description
Applications must call this function before calling any other function in this module.
Applications are permitted to call this function more than once. Once a call succeeds, subsequent calls are guaranteed to succeed.
If the application calls other functions before calling psa_crypto_init()
, the behavior is undefined. In this situation:
- Implementations are encouraged to either perform the operation as if the library had been initialized or to return
PSA_ERROR_BAD_STATE
or some other applicable error. - Implementations must not return a success status if the lack of initialization might have security implications, for example due to improper seeding of the random number generator.


Fans Weigh in on the Lorch Vs Billiat Debate
by SL Social“It is understandable to side step the issue. With another encounter on the cards, there is no need to dwell on the matter but we saw it and Billiat knows it was unnecessary and uncalled for. Lorch complained of Billiat simulation and took his frustration out on him.”
SL Supporter @Quaddy1994 has given his opinion on the seemingly deliberate stamp on Khama Billiat by Thembinkosi Lorch in last week’s derby.
While the Zimbabwean clarified the situation with a rather diplomatic response, SL Supporter @mothogaafele feels that although Lorch’s actions were not deliberate, it could have inflicted damage on the Amakhosi star.
“It was not deliberate, however he stepped on your Achilles knowing that it may take you out of the game to minimize the threat you were posing - we know these ugly tactics. We were not born yesterday - Mr Billiat is trying to be diplomatic here, saying its fine even if there is a problem on hand...”
Download The Soccer Laduma Social Media App & Earn Airtime for Selfies!
SL Supprter @LikeitorNot feels that there was an ulterior motive for ‘Nyoso’s’ actions.
“Lorch thought he wouldn’t get a yellow card for his challenge on Khama, and he deliberately stepped on him to get his 4th booking, so he could be available on Saturday.”
With the two sides squaring off for the second time in seven days SL Supporter @ Ofentse Kakapa Mahatlhe feels that Billiat can settle the score on the field of play.
“This coming Saturday, you must sort him out, on the field of play! Am I clear?”
Do you think Lorch’s step on Billiat was a deliberate one?


Email
Password
Sign up
Home
Successful Stories
Privacy
Company
Contact Us
Latest Members
keza Nisha
Age: 19
Am a rwandese and i love reading.
Details »
Mwiza Megan
Age: 24
Am divorce and beautiful.
Details »
Uwase Josiane
Age: 22
Am single and searching.
Details »
Ganza Eddy
Age: 20
Am a gentleman.
Details »


Quantity of rows in the table of Badges:
Quantity types of badges:
Average number of badges from user:
The most used Badges
@(title: String, countBadges: String, countTypeBadges: String, avgCountBadgesFromUsers: String, mostUsedBadges: collection.mutable.ArrayBuffer[(String, String)])


Judge orders Trump to pay $2m for charity foundation misuse
A lawsuit alleged Trump used his charitable foundation to further his business and political interests.
A New York judge has ordered US President Donald Trump to pay two million dollars to several charities to resolve a lawsuit alleging he misused his own charitable foundation to further his political and business interests.
Judge Saliann Scarpulla said Trump "breached his fiduciary duty" to the Trump Foundation, the relationship with the organisation's trustees, by allowing his campaign staff to plan a fundraiser for veterans' charities in the run-up to the Iowa caucuses before the 2016 presidential election.
More:
That event, which passed money through Trump's non-profit, was designed "to further Mr Trump's political campaign", Scarpulla said.
The judge also signed off on agreements reached last month between Trump's lawyers and the New York attorney general's office to close the Trump Foundation and distribute about $1.7m in remaining funds to other nonprofits.
In the agreements, Trump admitted to personally misusing Trump Foundation funds and agreed to pay back $11,525 in the organisation's funds he spent on sports memorabilia and champagne at a charity gala. He also agreed to restrictions on his involvement in other charitable organisations.
New York Attorney General Letitia James heralded the resolution of the case as a "major victory in our efforts to protect charitable assets and hold accountable those who would abuse charities for personal gain".
"No one is above the law - not a businessman, not a candidate for office, and not even the president of the United States," said James, a Democrat.


| This inspection reports increment (++) or decrement (--) expressions where the result of the assignment is used in a containing expression. Such assignments can result in confusion due to order of operations, as evaluation of the assignment may effect the outer expression in unexpected ways. |
| Powered by InspectionJS |


NOTE: I’m not a financial or legal advisor. I just have a passion for software technologies and believe in Blockchain’s future. However, I definitely don’t recommend you putting all your life savings in Bitcoin or any other cryptocurrencies.
In this post I will introduce the top 10 Crytpocurrenices by market capatlaization.
Bitcoin
Not only Bicoin holds the first place in market capitalization but is the first cryptocurrency. Created by Satoshi Nakamoto, Bitcoin came to life in 2008. It is simply as indicated in Satoshi’s paper a “peer to peer cash system that would allow online payments to be sent directly from one party to another without going through a financial institution.” Bitcoin was built using “blockchain”, which is a technology that helps prevent double spending. This is all powered by a distributed peer-to-peer network and crytpography. Instead of using a trusted central authority to validate all transactions, Bitcoin validates the transactions through its peer to peer network.
- Price: $19,280.60 USD
- Market Cap: $322,904,007,927 USD
- Circuilating Supply: 16,747,612 BTC
- Max Supply: 21,000,000 BTC
Ethereum
The biggest value add of Ethereum is that it’s a Turing-complete “programmable blockchain” that allows developers to build all sorts of distributed apps (DApps) and technologies.
The Ethereum platform enabled many projects to raise capital for their own Ethereum-based projects through Initial Coin Offerings (ICOs). ICO is used by startups to bypass the rigorous and regulated capital-raising process required by venture capitalists or banks. This use case increased Ethereum’s value, reaching around half of Bitcoin’s market cap in 2017.
- Price: $716.38 USD
- Market Cap: $69,058,973,730 USD
- Circuilating Supply: 96,399,650 ETH
Bitcoin Cash
Bitcoin Cash is actually a fork of Bitcoin. A fork happens when a group of developers decide they don’t like the direction of the current software roadmap and then take the existing code and add their own improvements to it. This creates a separate version of the previous software with its own roadmap. In the case of Bitcoin Cash it was adding SegWit to allow cheaper transactions to address Bitcoin’s scalability problem.
- Price: $1,855.33
- Market Cap: $30,942,588,033 USD
- Circuilating Supply: 16,860,700 BCH
- Max Supply: 21,000,000 BCH
Ripple
Ripple is a payment network that enables “secure, instant and nearly free global financial transactions of any size with no chargebacks.” Unlike most cryptocurrencies, it uses an iterative consensus process that makes it faster than the Bitcoin network, but may also leave it more exposed to attacks. Ripple has seen some success in convincing large financial institutions, including Japan’s largest banks, to test its blockchain and perhaps even implement it in the future.
- Price: $0.729055
- Market Cap: $28,083,400,709 USD
- Circuilating Supply: 38,739,144,847 XRP
- Max Supply: 100,000,000,000 XRP
Litecoin
Litecoin (a fork of Bitcoin) was one of the very first “altcoins” to be created with the goal of being the “digital silver” to Bitcoin’s digital gold. It’s value add is faster transactions becasue it could generate blocks four times faster and have four times the maximum number of coins (84 million) than Bitcoin. It also one of the early coins that showed off the implemtation of SegWit and a different mining algorithm, called scrypt, compared to Bitcoin, which uses SHA256. This gives Litecoin a mining decentralization advantage because people only need GPUs to mine Litecoin, as opposed to Bitcoin, where ASICs are required these days for any sort of mining reward.
- Price: $321.56
- Market Cap: $17,290,034,012 USD
- Circuilating Supply: 54,351,008 LTC
- Max Supply: 84,000,000 LTC
Cardano
Cardano is built by technology-focused developers and academics from multiple universities. On top of that, Cardano’s developers have formally verified some core components of the network, including its Proof of Stake(PoS), which should also drastically increase its security. The Ouroboros algorithm for PoS systems was also peer-reviewed by multiple cryptographers. Cardano’s developers have said that the protocol’s multi-layer architecture should allow for Bitcoin levels of privacy for users while also allowing regulator oversight on a per-app basis. Cardano also comes with its own “treasury” system, which the developers have said will ensure the sustainability of the protocol.
- Price: $0.500997
- Market Cap: $13,032,267,933 USD
- Circuilating Supply: 25,927,070,538 ADA
- Max Supply: 45,000,000,000 ADA
IOTA
IOTA is a cryptocurrency technology that targets the Internet of Things (IoT) and doesn’t use a blockchain in order to reduce the computational needs of the network and eliminate transaction fees. It also removes dedicated miners who are needed to verify transactions on most other cryptocurrencies. IOTA’s breakthrough ledger technology is called Tangle, wherein the Sender in a transaction is required to do a proof of work that approves two transactions. It also makes the system more decentralized because every user essentially becomes a “node” in the network.
- Price: $3.62
- Market Cap: $10,059,175,685 USD
- Circuilating Supply: 2,779,530,283 MIOTA
- Max Supply: 2,779,530,283 MIOTA
Dash
Dash is a more private version of Bitcoin that offers faster transactions leveraging the InstantSend technology, as well as anonymous transactions PrivateSend technology. It also has decentralized governance, which makes it the first decentralized autonomous organization.
- Price: $1,113.38
- Market Cap: $8,544,070,341 USD
- Circuilating Supply: 7,758,872 DASH
- Max Supply: 18,900,000 DASH
NEM
One of the things that sets the New Economy Movement (NEM) apart is its Proof of Importance algorithm(PoI). Unlike PoW, which requires miners to use significant processing power to get new coins, or PoS, which requires users to already own a certain amount of coins in order to get new ones, PoI actually encourages users to spend their coins. The PoI algorithm tracks a user’s transactions to determine how important that user is to the overall NEM economy.
- Price: $0.676310
- Circuilating Supply: $6,120,719,999 USD
- Max Supply: 21,000,000 BTC
Monero
Monero is one of the private transactions-capable cryptocurrencies with the most active communities because of its open and privacy-focused ideals. Monero’s privacy is guaranteed by a ring signature algorithm, which means that the coins are “mixed” at the protocol level, which according to Monero developers, makes transactions “untraceable.” Monero’s coins are also fungible, which means there won’t be any way for an exchange or for vendors to block certain Monero coins. All Monero coins will be interchangeable with others.
- Price: $342.73
- Market Cap: $5,290,213,794 USD
- Circuilating Supply: 15,481,770 XMR


Google Stadia will only have 12 games at launch (Update: 22 games)
by Corbin DavenportMost recent game platforms have shipped with a decent amount of games available on day one. The PlayStation 4 and Xbox One both had 23 titles at release, but if you were hoping for as much variety from Stadia, you'll have to wait a few months.
In a blog post today, Google revealed the list of games that will be available on Stadia's release date of November 19th. Only 12 titles have made the cut, though some of them (like Red Dead Redemption II) are long enough games that most players probably won't mind.
- Assassin's Creed Odyssey
- Destiny 2: The Collection
- GYLT
- Just Dance 2020
- Kine
- Mortal Kombat 11
- Red Dead Redemption 2
- Thumper
- Tomb Raider: Definitive Edition
- Rise of the Tomb Raider
- Shadow of the Tomb Raider: Definitive Edition
- Samurai Shodown
The good news is that Stadia subscribers won't have to wait long for the catalog to expand. There are only two months left in 2019, but Borderlands 3, Farming Simulator 19, Final Fantasy XV, Football Manager 2020, GRID, Metro Exodus, RAGE 2, and others will arrive on Stadia before the year's end.
Update 1: 2019/11/17 9:45pm PST by Corbin Davenport
On the eve of Stadia's launch, Google has nearly doubled the amount of games that will be available on day one. Here are the new entries:
- Attack on Titan: Final Battle 2
- Farming Simulator 2019
- Final Fantasy XV
- Football Manager 2020
- Grid 2019
- Metro Exodus
- NBA 2K20
- Rage 2
- Trials Rising
- Wolfenstein: Youngblood
Also, Tom Clancy’s Ghost Recon Breakpoint will now arrive on Stadia before the end of the year, instead of next year as previously planned. Doom: Eternal, Watch Dogs: Legion, Gods & Monsters, and Cyberpunk 2077 have all been confirmed for a 2020 release on Stadia.
End of Update
Source:
Google


Application Package Version 1.0.
Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. For example:
Import-Package: org.osgi.service.application; version=1.0


My name is Adeyemi Esther, a student of University, currently 4th year in the department of Chemical Engineering
In year 2018, I volunteered to usher at Engineering Career Expo 1.0, in year 2019, I was part of the competitors
during the cash in trash symposium which is also referred to as the Cash Simulation program by NSChE Unilag Chapter.
At the end of the program my team emerged the winner, with the best problem solving idea, In that same here, I also participated in the
ART (Academic Resource Team) program where my team also emerged the winner of the quiz competition. During the 2019 break, I learnt graphics design
which I am still working on and I am presently using as a volunteer for the Engineering Career Expo Graphics Team.
During this COVID-19 break, I took up learning programming and on a journey to become a Front-End Developer. I am presently skilled with graphics design, programming
using Python and Javascript. I look forward to learning more skills and working as a Web Developer.


BSBL: Block Sparse Bayesian Learning
I developed fast implementations of the Block Sparse Bayesian Learning (BSBL, see Zhilin Zhang's Website) Framework, using the Fast Marginalized Likelihood Maximization method (see Fast marginal likelihood maximisation for sparse Beysian models).
BSBL-FM: A Fast Marginalized Implementation
see the github repository for more details : bsbl-fm @ github
Basic
The BSBL-FM is a fast implementation of the BSBL framework. It is based on BCS (Ji2008) and fastRVM (Tipping2003). The major contributions are the block extension and the exploiting of intra-block correlation. The BSBL-FM algorithm is extremely fast when the signal has block structure and low block sparsity level.
Demos
Papers
Benyuan Liu, Zhilin Zhang, Gary Xu, Hongqi Fan, Qiang Fu, Energy Efficient Telemonitoring of Physiological Signals via Compressed Sensing: A Fast Algorithm and Power Consumption Evaluation. Biomedical Signal Processing and Control (BSPC), 2014 Vol 11, pp 80–88. Arxiv Preprint, 1309.7843.
DOI:10.1016/j.bspc.2014.02.010Benyuan Liu, Zhilin Zhang, Hongqi Fan, Qiang Fu, Compression via Compressive Sensing: A Low-Power Framework for the Telemonitoring of Multi-Channel Physiological Signals. International Workshop on Biomedical and Health Informatics (BHI2013, in conjunction with IEEE International Conference on Bioinformatics and Biomedicine BIBM), Shanghai, China, Dec. 2013, pp 9-12. Arxiv Preprint, 1309.4136.
DOI:10.1109/BIBM.2013.6732592Benyuan Liu, Zhilin Zhang, Hongqi Fan, Fast Marginalized Block Sparse Bayesian Learning Algorithm. Arxiv Preprint, 1211.4909.
Implementations
Matlab Version : The Matlab Implementation can be downloaded at: bsbl-fm @ github.
C Version : The C version as well as the GPU Cuda Implementation will be available soon.
Python Version : The Python implementations are available at: pyBSBL @ github.


| Role | Name |
|---|---|
| Genius | Rick |
| Sidekick | Morty |
Here 1.5GB has data-sort="1610612736"
and 900MB has data-sort="943718400"
The same with the dates. 03/18/2021 is turned into data-sort="20210318"
and 12/09/1965 into
data-sort="19651209"
Otherwise the sorting would be wrong.
| Movie Name | Size | Release date |
|---|---|---|
| The Sound of Music | 1.5GB | 12/09/1965 |
| Zack Snyder's Justice League | 900MB | 03/18/2021 |
"Ram" has class="no-sort", which has the css property "pointer-events: none;"
"Screen width" has the "css only" way of disabling sorting.
| personal | hardware | software | |||||||||
| job title | name | company | processor | ram(not sortable) | graphics card | screen width | screen height | platform | browser | browser version | language |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Boss | Stan the Man | Monsters Inc | AMD | 2 | Nvidia | 1510 | 981 | Win32 | IE | 11 | en-us |
| Stevedore | Bridget Jones | The Hand | i7 | 8gb | - | 1530 | 1080 | Linux x86_64 | Firefox | 54 | sv-se |
| HR | Bruce Wayne | League of Shadows | i5 | - | GeForce | 1520 | 1080 | Linux x86_64 | Opera | 46 | dk |
| Programmer | Bilbo Baggins | Brotherhood of Evil Mutants | i3 | 4 gigabyte | - | 130 | 1080 | Linux x86_64 | Opera | 46 | en |
| personal | hardware | software | |||||||||
| job title | name | company | processor | ram | graphics card | screen width | screen height | platform | browser | browser version | language |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Boss | Stan the Man | Monsters Inc | AMD | 2 | Nvidia | 1510 | 981 | Win32 | IE | 11 | en-us |
| Slave | Bridget Jones | The Hand | i7 | 8gb | - | 1530 | 1080 | Linux x86_64 | Firefox | 54 | sv-se |
| HR | Bruce Wayne | League of Shadows | i5 | - | GeForce | 1520 | 1080 | Linux x86_64 | Opera | 46 | dk |
| Programmer | Bilbo Baggins | Brotherhood of Evil Mutants | i3 | 4 gigabyte | - | 130 | 1080 | Linux x86_64 | Opera | 46 | en |


[gecode-users] Posting branching later...
Sébastien Mouthuy
smouthuy at gmail.com
Mon May 28 10:58:08 CEST 2007
Hello,
usually we post branchings in the constructor of our Space, in the
beginning.
However I would be interested in posting a branching later (once we have
already begun the search). is it possible to post a branching inside a
commit function of another branching ? If the answer is positive, the
new branching will be posted only for the children of the current space
or also for all ancestors and brothers (ie all other future spaces).
Thank you for your answers.
Bye bye,
sebastien
UCL
More information about the gecode-users
mailing list


{% extends 'base.html' %} {% load bootstrap4 %} {% block content %}
{{projects.details}}
{{comments|length}} comments
Comments
{{comment.comment}}
Follow
{{comment.comment}}
There are no comments