duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
| q.Enqueue(4); |
| (* Accessing AD through LDAP | |
| Inspired by http://stackoverflow.com/a/14814508/695964 | |
| Need nuget package System.DirectoryServices | |
| *) | |
| #r @"./packages/System.DirectoryServices/lib/System.DirectoryServices.dll" | |
| open System |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using MathNet.Numerics.Statistics; | |
| namespace HashVsBinarySearch |
| [cmdletbinding()] | |
| param($assembly, [switch]$DisplaySigningOnly) | |
| $fullpath = [System.IO.Path]::GetFullPath($assembly) | |
| $dir = [System.IO.Path]::GetDirectoryName($fullpath) | |
| $ext = [System.IO.Path]::GetExtension($fullpath) | |
| $filename = [System.IO.Path]::GetFileNameWithoutExtension($fullpath) | |
| $assemblyBackupPath = [System.IO.Path]::Combine($dir, $filename + ".signed" + $ext) | |
| $assemblyBackupDir = [System.IO.Path]::Combine($dir, "original") |
| # this is from https://blogs.msdn.microsoft.com/virtual_pc_guy/2010/09/23/a-self-elevating-powershell-script/ | |
| # Get the ID and security principal of the current user account | |
| $myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent() | |
| $myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID) | |
| # Get the security principal for the Administrator role | |
| $adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator | |
| # Check to see if we are currently running "as Administrator" |
| (* It's a drop in replacement for the core Fake functionality - dependency resolution and run tasks | |
| *) | |
| open System | |
| open System.Text | |
| open System.Collections.Generic | |
| open System.IO | |
| let private args = Environment.GetCommandLineArgs() |> List.ofArray |> List.skip 2 | |
| printfn "All args: %A" args |
| (* Run process on a schedule | |
| Given a process (and arguments) and a schedule, it ensures that the process is run on the schedule: | |
| If the process is not run when it should, it's started | |
| If the process is running when it shouldn't, it's killed | |
| *) | |
| module Schedule = | |
| open System |
| clc; | |
| close all; | |
| mm = [] | |
| E1 = [] | |
| E2 = [] | |
| for m = 10:50:1000 | |
| e1 = 0.0; |
| #lang racket | |
| (define (factorial x) | |
| (cond | |
| [(< x 0) (raise "Value can't be less than zero")] | |
| [(= x 0) 1] | |
| [(= x 1) 1] | |
| [else (* x (factorial (- x 1)))])) | |
| (factorial 99) | |
| (factorial -1) |