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
var expenseItem = new ListItem | |
{ | |
Fields = new FieldValueSet | |
{ | |
AdditionalData = new Dictionary<string, object> | |
{ | |
{"Title", expense.Title}, | |
{"Zeitpunkt", expense.Date}, | |
{"Betrag", expense.Amount}, | |
{"MitarbeiterLookupId", await GetUserLookupId(expense.User)} |
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
type Project = { Number : int; Cost : float } | |
let projects1 = | |
[ | |
{ Number = 1; Cost = 22.50 }; | |
{ Number = 2; Cost = 10.50 } | |
] | |
let projects2 = | |
[ |
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
type CheckNumber = CheckNumber of int | |
type CardNumber = CardNumber of int | |
type CardType = | |
| Visa | |
| Mastercard | |
type CreditCard = { | |
CardType : CardType |
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
let tryLoadCustomerWithOption customerId = | |
// customerId // does not work as function is expecting an option type | |
Some customerId // unwrap value first | |
|> Option.filter(fun x -> x >= 2 && x <= 7) | |
|> Option.map(fun x -> sprintf "Customer %i" x) | |
let tryLoadCustomer customerId = | |
if customerId >= 2 && customerId <= 7 then Some(sprintf "Customer %i" customerId) | |
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
open System.IO | |
type FolderStatistic = { Name : string | |
Size : int64 } | |
let calculateFolderSize (folder : string) = | |
Directory.GetFiles folder | |
|> List.ofSeq | |
|> List.sumBy (fun f -> FileInfo(f).Length) | |
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
Wednesday: | |
* 10:20 - 11:20: The Web That Never Was (https://ndcoslo.com/talk/the-web-that-never-was/) | |
* 11:40 - 12:40: Tabs, spaces and salaries: a data science detective story (https://ndcoslo.com/talk/functional-programming/) | |
* 13:40 - 14:40: What We’ve Learned From Billions of Security Reports (https://ndcoslo.com/talk/what-weve-learned-from-billions-of-security-reports/) | |
* 15:00 - 16:00: Why you should use F# (https://ndcoslo.com/talk/why-you-should-use-f/) | |
* 16:20 - 17:20: Reinventing MVC pattern for web programming with F# (https://ndcoslo.com/talk/reinventing-mvc-pattern-for-web-programming-with-f/) | |
* 17:40 - 18:40: An Opinionated Approach to ASP.NET Core (https://ndcoslo.com/talk/an-opinionated-approach-to-asp-net-core/) | |
Thursday: | |
* 09:00 - 10:00: Rise of the Tech Influencer - Small steps you can take to increase your reach (https://ndcoslo.com/talk/rise-of-the-tech-influencer-small-steps-you-can-take-to-increase-your-reach/) |