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 WebSharper.Owin | |
// FIXUP NOTICE: CONTAINS CRITICAL BUGFIX FIXUP ON LINE 230. MORE INFO IS THERE. | |
open System | |
open System.Collections.Generic | |
open System.Collections.Concurrent | |
open System.IO | |
open System.Configuration | |
open System.Security.Principal |
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
// Fixes broken ListView header heights on iOS | |
public sealed class ListViewRendererHackfix_AutomaticHeaderHeights_20190418 : ListViewRenderer { | |
private static readonly FieldInfo fieldInfo_ListViewRenderer_dataSource = typeof(ListViewRenderer).GetField("_dataSource", BindingFlags.Instance | BindingFlags.NonPublic); | |
private static readonly Type type_ListViewRenderer_ListViewDataSource = typeof(ListViewRenderer).GetNestedType("ListViewDataSource", BindingFlags.NonPublic); | |
private static readonly Type type_ListViewRenderer_UnevenListViewDataSource = typeof(ListViewRenderer).GetNestedType("UnevenListViewDataSource", BindingFlags.NonPublic); | |
private static readonly ConstructorInfo ctorInfo_ListViewRenderer_ListViewDataSource = type_ListViewRenderer_ListViewDataSource.GetConstructor(new[] { fieldInfo_ListViewRenderer_dataSource.FieldType }); | |
private static readonly ConstructorInfo ctorInfo_ListViewRenderer_UnevenListViewDataSource = type_ListViewRenderer_UnevenListView |
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
pushd $(ProjectDir) | |
fsi kill-locked-handles.fsx | |
popd |
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
/// Provides a simple scheduler service for time and calendar oriented events. | |
module Singapore.Scheduler | |
open System | |
open Quartz | |
open Quartz.Impl | |
let private schedulerFactory = StdSchedulerFactory() | |
let private scheduler = schedulerFactory.GetScheduler() | |
/// Initializes the scheduler agent. |
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
/* This file is part of SevenZipSharp. | |
SevenZipSharp is free software: you can redistribute it and/or modify | |
it under the terms of the GNU Lesser General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
SevenZipSharp is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 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
// Author: Nathan B. Evans | |
// Twitter: @nbevans | |
// Blog: http://nbevans.wordpress.com/2014/03/13/pbkdf2-hash-function-for-fsharp/ | |
// License: MIT | |
module Crypto.Pbkdf2 | |
open System | |
open System.Security.Cryptography | |
let private subkeyLength = 32 |
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
// Author: Nathan B. Evans | |
// Twitter: @nbevans | |
// Blog: https://nbevans.wordpress.com/2014/03/13/really-simple-way-to-split-a-f-sequence-into-chunks-partitions/ | |
// License: MIT | |
/// Returns a sequence that yields chunks of length n. | |
/// Each chunk is returned as an array. | |
let toChunks n (s:seq<'t>) = seq { | |
let pos = ref 0 | |
let buffer = Array.zeroCreate<'t> n |
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
using System; | |
using System.Security.Cryptography; | |
namespace Nbevans.Cryptography { | |
public static class Pbkdf2 { | |
private const int Pbkdf2SubkeyLength = 32; | |
private const int SaltSize = 16; | |
private static bool ByteArraysEqual(byte[] a, byte[] b) { | |
if (ReferenceEquals(a, b)) return true; |
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
internal static class RiakObjectExtensions { | |
/// <summary> | |
/// Creates (or updates) a link to point to the designated object. | |
/// </summary> | |
/// <param name="ro">The Riak object whose link will be created or updated.</param> | |
/// <param name="riakObjectId">The Riak object identifier to be linked to.</param> | |
/// <param name="tag">The tag (or name) of the link.</param> | |
public static void SingleLinkTo(this RiakObject ro, RiakObjectId riakObjectId, string tag) { | |
SingleLinkTo(ro, riakObjectId.Bucket, riakObjectId.Key, tag); |