This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use this as an example on how to start the virtual console without the need of Java Web Start or accessing it from the web interface. | |
You can use the user and password that you use for the web interface. | |
You need an old JRE... I used 1.7.0_80 from the Server JRE package, also I have tested successfully 1.7.0_79 with MacOS. | |
You don't need to install it, just extract it or copy the files in "jre" folder. | |
Open the viewer.jnlp file that you get by launching the virtual console from the web interface with a text editor. | |
Note the urls to the jar files. Download the main jar file avctKVM.jar and the libs for your operating system and architecture. | |
Extract the dlls (.so Linux, .jnilib MacOS) from the jar libs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Analogy | |
{ | |
/// <summary> | |
/// This example shows that a library that needs access to target .NET Standard 1.3 | |
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET | |
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library. | |
/// </summary>INetCoreApp10 | |
class Example1 | |
{ | |
public void Net45Application(INetFramework45 platform) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//invaluable for all those Choice<'a, exn> flows | |
let exnf f = Printf.ksprintf (fun s -> exn s) f | |
//combine paths | |
let (</>) x y = System.IO.Path.Combine(x, y) | |
//allows you to pattern match on values in the current scope rather than just literals | |
let (|Eq|_|) expected value = | |
if expected = value then Some () | |
else None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Create-NuPkgSha512File { | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$true,Position=1)] | |
[string]$Path, | |
[Parameter()] | |
[string]$Sha512Path="$Path.sha512" | |
) | |
$sha512 = [Security.Cryptography.SHA512]::Create() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r @"packages/Paket.Core/lib/net45/Paket.Core.dll" | |
open Paket | |
open Paket.Xml | |
open System.Xml | |
let setProjectAttribute attribute innerText (propertyGroup:Xml.XmlNode) = | |
let nodes = propertyGroup.ChildNodes |> Seq.cast<XmlNode> |> Seq.filter(fun node -> node.Name = attribute ) | |
nodes |> Seq.iter(propertyGroup.RemoveChild >> ignore) | |
let attribute = propertyGroup.OwnerDocument.CreateElement(attribute, Constants.ProjectDefaultNameSpace) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//========================================== | |
// Working fully self-contained getting-started example for Suave Web Server scripting | |
// | |
// Note you don't need to have _anything_ installed before starting with this script. Nothing | |
// but F# Interactive and this script. | |
// | |
// This script fetches the Paket.exe component which is referenced later in the script. | |
// Initially the #r "paket.exe" reference is shown as unresolved. Once it has been | |
// downloaded by the user (by executing the first part of the script) the reference | |
// shows as resolved and can be used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<AutoOpen>] | |
module Microsoft.FSharp.Reflection.FSharpReflectionExtensions | |
/// Creates an instance of a record type. | |
val MakeRecord : recordType:Type * values:obj [] * ?allowAccessToPrivateRepresentation:bool -> obj | |
/// Reads all the fields from a record value. | |
val GetRecordFields : record:obj * ?allowAccessToPrivateRepresentation:bool -> obj [] | |
/// Precompute a function for reading all the fields from a record. The fields are returned in the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original code: https://gist.github.com/taumuon/11302896 | |
// This implementation optimized by Jack Pappas (https://github.com/jack-pappas) | |
open MathNet.Numerics.Distributions | |
open MathNet.Numerics.Statistics | |
open MathNet.Numerics.Random | |
open LanguagePrimitives | |
let inline callPayoff strike price = | |
max (price - strike) GenericZero |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Tsunami.Server | |
open System | |
open System.IO | |
open System.Linq | |
open System.Net | |
open System.Net.Sockets | |
open System.Text | |
open System.Threading | |
open System.Runtime.Serialization |
NewerOlder