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; | |
public class Example | |
{ | |
public static void Main() | |
{ | |
var x = Math.Round(11.1, MidpointRounding.AwayFromZero); | |
} | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Project> | |
<!-- Type providers currently can't run inside the .NET Core 2.0 hosted compiler, see https://github.com/Microsoft/visualfsharp/pull/3658#issuecomment-334773415 --> | |
<PropertyGroup> | |
<IsWindows Condition="'$(OS)' == 'Windows_NT'">true</IsWindows> | |
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX> | |
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\fsc.exe')"> | |
<FscToolPath>C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0</FscToolPath> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netstandard2.0</TargetFramework> | |
</PropertyGroup> | |
<Import Project="fsc.props" /> | |
<ItemGroup> | |
<Compile Include="SqlStorage\Sql.fs" /> | |
<Compile Include="SqlStorage\SqlRead.fs" /> | |
<Compile Include="SqlStorage\SqlWrite.fs" /> |
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
module Koinonia.Access.SqlStorage.Sql | |
open FSharp.Data.Sql | |
let [<Literal>] dbVendor = Common.DatabaseProviderTypes.POSTGRESQL | |
let [<Literal>] connString = @"Host=localhost;Database=Koinonia;Username=Koinonia;Password=Li4Hs*0*8@pqjUzyoP2i" | |
let [<Literal>] resPath = __SOURCE_DIRECTORY__ + "/../libraries/" | |
let [<Literal>] indivAmount = 1000 | |
let [<Literal>] useOptTypes = true | |
type KoinoniaStorage = |
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
module ResultFunctors = | |
let apply f x = | |
match f, x with | |
| Ok f', Ok x' -> Ok (f' x') | |
| Error fErr, Ok _ -> Error fErr | |
| Ok _, Error xErr -> Error xErr | |
| Error fErr, Error xErr -> List.concat [fErr; xErr] |> Error | |
module ArrayFunctors = | |
let traverseResultA f array = |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netstandard2.0</TargetFramework> | |
</PropertyGroup> | |
<Import Project="fsc.props" /> | |
<ItemGroup> | |
<Compile Include="Sql.fs" /> | |
<Compile Include="Persistance\Write.fs" /> | |
<Compile Include="Persistance\WriteModels.fs" /> |
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
import React from 'react'; | |
import white_house from '../img/white_house.jpg'; | |
export class PhotoDisplay extends React.Component { | |
render() { | |
return ( | |
<div className="orbit" role="region" data-orbit data-use-m-u-i="false"> | |
<div className="orbit-wrapper"> | |
<ul className="orbit-container"> | |
<li className="is-active orbit-slide"> |
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
import React from 'react'; | |
import { Switch, Route } from 'react-router-dom'; | |
import { Home } from "./Home"; | |
import { ContactUs } from "./ContactUs"; | |
export class Main extends React.Component { | |
render () { | |
return ( | |
<main> | |
<Switch> |
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
import React from 'react'; | |
import {PhotoDisplay} from "./PhotoDisplay"; | |
export class Home extends React.Component { | |
render() { | |
return ( | |
<div> | |
<PhotoDisplay/> | |
<div className="grid-x grid-padding-x"> | |
<div className="small-12 large-4 cell"> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage Title="Add Light Bulb" xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:LightSwitch;Assembly=LightSwitch" x:Class="LightSwitch.AddEditLightBulbPage"> | |
<ContentPage.Content> | |
<TableView Intent="Form"> | |
<TableView.Behaviors> | |
<local:DynamicListBehavior ItemsSource="{Binding TestCollection}" | |
TableSectionName="ContactsSection"> | |
<local:DynamicListBehavior.ItemTemplate> | |
<DataTemplate> | |
<TextCell Text="{Binding .}" /> |