Skip to content

Instantly share code, notes, and snippets.

View rodrigovidal's full-sized avatar

Rodrigo Vidal rodrigovidal

View GitHub Profile
@rodrigovidal
rodrigovidal / euler1.fs
Created May 9, 2012 01:59
Euler1 (revisado)
let euler1 (limit : int64) =
let limit = bigint (limit-1L)
let sn a1 =
let a1 = bigint (int a1)
let an = (limit / a1 * a1)
let n = an / a1
(an + a1) * n / 2I
sn 3 + sn 5 - sn 15
@rodrigovidal
rodrigovidal / gist:2913207
Created June 11, 2012 22:46
Steepest Descent Method
function steepest
% Exemplo 6.2-2 do livro Optimal Control Theory de D.E.Kirk
% Steepest Descent Method
eps = 1e-3;
options = odeset('RelTol', 1e-4, 'AbsTol',[1e-4 1e-4]); %permite ajustar os parametros de integracao para os solvers de EDOs
t0 = 0;
tf = 0.78;
R = 0.1;
step = 0.4;
module Ast =
type Node =
| Int of int option
| Float of float option
| BooleanNode of bool option
| StringNode of string option
| QuotedVariable of string
| Variable of string
| Addition of Node * Node
@rodrigovidal
rodrigovidal / gist:3893973
Created October 15, 2012 17:53
Oracle manda lembranças
////Isso funciona..
var parametros = new[]
{
new OracleParameter("P_CD_CLIENTE", OracleDbType.Int32)
{ Direction = ParameterDirection.Input, Value = null },
new OracleParameter("C_CURSOR", OracleDbType.RefCursor)
{ Direction = ParameterDirection.Output }
};
////Isso não funciona..
http://sist.sysu.edu.cn/~isslxm/DSA/textbook/Skiena.-.TheAlgorithmDesignManual.pdf
https://github.com/felipecruz/cdats
http://www.amazon.com/Algorithms-Unlocked-Thomas-H-Cormen/dp/0262518805/ref=sr_1_2?ie=UTF8&qid=1372518782&sr=8-2&keywords=cormen
http://www.amazon.com/Introduction-Algorithms-Thomas-H-Cormen/dp/0262033844/ref=sr_1_1?ie=UTF8&qid=1372518782&sr=8-1&keywords=cormen
https://sites.google.com/site/stevenhalim/