I hereby claim:
- I am ademar on github.
- I am ademar (https://keybase.io/ademar) on keybase.
- I have a public key whose fingerprint is E397 C714 13D6 781E 5E83 629D 1A3B 3917 6D43 2321
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<? | |
# PHP example : Sending email and performing SMTP authentication with Pearl Mail package | |
include_once("Mail.php"); | |
$recipients = '[email protected]'; | |
$headers["From"] = '[email protected]'; | |
$headers["To"] = '[email protected]'; |
DECLARE @User varchar(50) | |
SELECT @User = 'myuser' | |
SELECT | |
'GRANT EXEC ON ' + name + ' TO ' + @User | |
FROM | |
sysobjects | |
WHERE | |
type = 'P' | |
AND category = 0 |
I hereby claim:
To claim this, I am signing this object:
// original found : https://bitcointalk.org/index.php?topic=38246.0 | |
CREATE TABLE blocks ( | |
hash char(32) binary primary key, | |
version integer, | |
hashPrev char(32) binary not null, | |
hashMerkleRoot char(32) binary not null, | |
nTime integer unsigned not null, | |
nBits integer unsigned not null, |
set cdoMessage = Server.CreateObject("CDO.Message") | |
set cdoConfig = Server.CreateObject("CDO.Configuration") | |
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1 | |
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 | |
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer | |
if needToAuth then | |
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 |
//RSK algorithm (Robinson–Schensted–Knuth correspondence) | |
//Implements a bijective mapping between permutations and pairs of standard Young tableaux, both having the same shape. | |
//http://en.wikipedia.org/wiki/Robinson%E2%80%93Schensted_correspondence | |
let snoc p ls = ls @ [p] | |
let bump q L = | |
let rec loop P i = function | |
| [] -> (None, snoc q P,i) |
// Based on the article 'Combinators for logic programming' by Michael Spivey and Silvija Seres. | |
let rec inf_seq n = seq { yield n; yield! inf_seq (n+1) } | |
let rec lzw f l1 l2 = | |
LazyList.delayed ( fun () -> | |
match l1,l2 with | |
|LazyList.Nil, _ -> l2 | |
|_, LazyList.Nil -> l1 | |
|LazyList.Cons(p1,tail1),LazyList.Cons(p2,tail2) |
//Implements the theory from 'How to write a financial contract' by S.L Peyton Jones and J-M Eber | |
type RandomVariable<'a> = seq<'a> | |
type Process<'a> = Process of (seq<RandomVariable<'a>>) | |
let liftP f (Process(p)) = Process(Seq.map (Seq.map f) p) | |
let liftP2 f (Process(p1)) (Process(p2)) = | |
Process(Seq.map2 (Seq.map2 f) p1 p2) |
// Learn more about F# at http://fsharp.net | |
open Microsoft.FSharp.Control | |
open System.Collections.Generic | |
open System.Threading | |
open System.IO | |
type RequestGate(n:int) = | |
let semaphore = new Semaphore(initialCount=n,maximumCount=n); | |
member x.AcquireAsync(?timeout) = | |
async { |