terça-feira, 30 de agosto de 2016

Procedural programming

From Wikipedia, the free encyclopedia


Procedural programming is a programming paradigm, derived from structured programming, based upon the concept of the procedure call. Procedures, also known as routines, subroutines, or functions (not to be confused with mathematical functions, but similar to those used in functional programming), simply contain a series of computational steps to be carried out. Any given procedure might be called at any point during a program's execution, including by other procedures or itself. Procedural programming languages include CGoFortranPascal, and BASIC.[1]
Computer processors provide hardware support for procedural programming through a stack register and instructions for calling procedures and returning from them. Hardware support for other types of programming is possible, but no attempt was commercially successful (for example Lisp machines or Java processors).


( wiki )

Programming paradigm

From Wikipedia, the free encyclopedia

Programming paradigms are a way to classify programming languages according to the style of computer programming. Features of various programming languages determine which programming paradigms they belong to; as a result, some languages fall into only one paradigm, while others fall into multiple paradigms. Some paradigms are concerned primarily with implications for the execution model of the language, such as allowing side effects, or whether the sequence of operations is defined by the execution model. Other paradigms are concerned primarily with the way that code is organized, such as grouping code into units along with the state that is modified by the code. Yet others are concerned primarily with the style of syntax and grammar.
Common programming paradigms include imperative which allows side effects, functional which does not allow side effects, declarative which does not state the order in which operations execute, object-oriented which groups code together with the state the code modifies, procedural which groups code into functions, logic which has a particular style of execution model coupled to a particular style of syntax and grammar, and symbolic programming which has a particular style of syntax and grammar.[1][2][3]
For example, languages that fall into the imperative paradigm have two main features: they state the order in which operations take place, with constructs that explicitly control that order, and they allow side effects, in which state can be modified at one point in time, within one unit of code, and then later read at a different point in time inside a different unit of code. The communication between the units of code is not explicit. Meanwhile, in object-oriented programming, code is organized into objects that contain state that is only modified by the code that is part of the object. Most object oriented languages are also imperative languages. In contrast, languages that fit the declarative paradigm do not state the order in which to execute operations. Instead, they supply a number of operations that are available in the system, along with the conditions under which each is allowed to execute. The implementation of the language's execution model tracks which operations are free to execute and chooses the order on its own.

( site )

Object-oriented programming

From Wikipedia, the free encyclopedia
"Object-oriented" redirects here. For other meanings of object-oriented, see Object-orientation.
"Object-oriented programming language" redirects here. For a list of object-oriented programming languages, see List of object-oriented programming languages.

Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which may contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known asmethods. A feature of objects is that an object's procedures can access and often modify the data fields of the object with which they are associated (objects have a notion of "this" or "self"). In OOP, computer programs are designed by making them out of objects that interact with one another.[1][2] There is significant diversity of OOP languages, but the most popular ones are class-based, meaning that objects are instances of classes, which typically also determine theirtype.
Many of the most widely used programming languages are multi-paradigm programming languages that support object-oriented programming to a greater or lesser degree, typically in combination with imperativeprocedural programming. Significant object-oriented languages include JavaC++C#PythonPHPRubyPerlDelphiObjective-CSwiftCommon Lisp, and Smalltalk.

( site )


Inglês

2016-08-29 
ESL Podcast 1238 – Making Accusations 
Listen
     Learning Guide
Download Podcast
Tags: Daily Life

Audio Index:
Slow dialog: 1:13
Explanations: 3:49
Fast dialog: 17:40
Pierre: What happened here?!

Marie: It looks like somebody trashed your experiment.

Pierre: It’s ruined, completely ruined.

Marie: Who could have done this? Why are you looking at me like that?

Pierre: Very few people have access to this lab and even fewer know which of these experiments is mine. Whoever did this knew how to do maximum damage.

Marie: And you’re accusing me? I helped you with that experiment. I’d sooner ruin my own work than intentionally damage someone else’s, much less yours. What would be mymotive?

Pierre: Maybe you gave me a little too much help and now my work is outshining yours.

Marie: Your suspicions are completely unfounded. I’ve never been jealous of any attention you’ve received. You’re totally off base.

Pierre: Maybe you’re right. I’m sorry. I just can’t believe what’s happened.

Marie: I’d be upset, too, but let’s not do any more finger-pointing. We need more information before we accuse or exonerate anyone. Let’s try to stay calm.

Pierre: Yes, of course, you’re right. Hey, what happened to your workspace? It looks like it’s been tampered with.

Marie: What?! I’ll kill whoever did this! I’ll kill them!
Script by Dr. Lucy Tse

(daqui)

domingo, 28 de agosto de 2016

Método de Newton-Raphson

Origem: Wikipédia, a enciclopédia livre.
Em análise numérica, o método de Newton (ou Método de Newton-Raphson), desenvolvido por Isaac Newton e Joseph Raphson, tem o objetivo de estimar as raízes de uma função. Para isso, escolhe-se uma aproximação inicial para esta. Após isso, calcula-se a equação da reta tangente (derivada) da função nesse ponto e a interseção dela com o eixo das abcissas, a fim de encontrar uma melhor aproximação para a raiz. Repetindo-se o processo, cria-se um método iterativopara encontramos a raiz da função. Em notação matemática, o método de Newton é representado da seguinte forma:
onde n indica a n-ésima iteração do algoritmo e f'(xn) é a derivada da função f em xn.
Para que se obtenha sucesso na iteração, devemos respeitar a seguinte condição:
  • A função f deve ser diferenciável em xn e seu valor deve ser não nulo.

Interpretação geométrica do método de Newton[editar | editar código-fonte]

Consideremos o problema de calcular a raiz de uma função f, conforme a figura ao lado.[1][2][3][4]
As três primeiras iterações do método de Newton.[5]
Queremos calcular x1 em função de x0, sabendo que x1 será a cota no eixo das abcissas interceptado pela reta tangente à curva, originada por x0.
A equação da reta que passa por (x0,f(x0)) e é tangente à curva em (x0,f(x0)) tem inclinação m=f'(x0), é dada por:

Sabendo que essa reta passa por (x1,0), temos que:

Portanto,

De modo geral, teremos:

quinta-feira, 25 de agosto de 2016

cc101 - aula 7 - Resolução numérica de equações



cc101 - aula 6 - Números pseudo-aleatórios


cc101 - aula 5 - Ciclos e condicionais



cc101 - aula 4 - definição de funções



cc101 - aula 3



CC101 - aula 2


CC101 - aula 1


cap 12 - Isothermal and adiabatic processes [ Blundell ]

segunda-feira, 22 de agosto de 2016

MIT8_044S13_L1

MIT 8_044 Statistical Physics I 2003

cap 7 - Molecular effusion [ Blundell ]

cap 6 - Pressure [Blundell ]

cap 5 - The Maxwell-Boltzmann distribution [ Blundell ]

cap 4 - Temperature and the Boltzmann factor [ Blundell ]

cap 3 - Probability [ Blundell ]

cap 2 - Heat [ Blundell ]

Cap 1 - Introduction [ Blundell ]