Não use UUID como PK nas tabelas do seu banco de dados.
| import io.circe.* | |
| import literal.* | |
| import cats.implicits.* | |
| import NamedTuple.NamedTuple | |
| import language.experimental.namedTuples | |
| @main | |
| def greet = | |
| type Person = (name: String, age: Int) | |
| val greeting = json"""{"name": "Joe", "age": 42}""" |
https://writings.quilt.org/2014/05/12/distributed-systems-and-the-end-of-the-api/
"A distributed system is one where a machine I've never heard of can cause my program to fail" - Leslie Lamport
Cute, but "my program" is kind of quaint now, isn't it?
"...multiple processes that must communicate to perform work" - hmm, hmm, let me tell you about disk controllers. Oh wait, that's your point... almost, "an air-gapped computer" is considered nondistributed, but well whatever.
| Function ConvertTo-DataTable { # https://powersnippets.com/convertto-pson/ | |
| [CmdletBinding()]Param( # Version 01.00.01, by iRon | |
| [Parameter(Position=0, Mandatory=$true, ValueFromPipeline = $true)] [PSObject[]]$Object, [HashTable]$ColumnType = @{} | |
| ) | |
| $TypeCast = @{ | |
| Guid = 'Guid', 'String' | |
| DateTime = 'DateTime', 'String' | |
| DateTimeOffset = 'DateTimeOffset', 'String' | |
| Byte = 'Byte', 'Char', 'Int16', 'Int32', 'Int64', 'UInt16', 'UInt32', 'UInt64', 'Decimal', 'Single', 'Double', 'String', 'Boolean' | |
| SByte = 'SByte', 'Int16', 'Int32', 'Int64', 'Decimal', 'Single', 'Double', 'String', 'Boolean' |
| $userPath = $env:USERPROFILE | |
| $pathExclusions = New-Object System.Collections.ArrayList | |
| $processExclusions = New-Object System.Collections.ArrayList | |
| $pathExclusions.Add('C:\source\repos') > $null | |
| $pathExclusions.Add('C:\Windows\Microsoft.NET') > $null | |
| $pathExclusions.Add('C:\Windows\assembly') > $null | |
| $pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null | |
| $pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio Services') > $null | |
| $pathExclusions.Add($userPath + '\AppData\Local\GitCredentialManager') > $null |
| import 'package:flutter/material.dart'; | |
| import 'dart:async'; | |
| void main() => runApp(TimerApp()); | |
| class TimerApp extends StatefulWidget { | |
| @override | |
| State<StatefulWidget> createState() { | |
| return new TimerAppState(); | |
| } |
| package com.benjiweber.anontypes; | |
| import java.util.*; | |
| import java.util.function.Consumer; | |
| import java.util.function.Function; | |
| import java.util.function.Predicate; | |
| import java.util.function.UnaryOperator; | |
| import java.util.stream.Collectors; | |
| import java.util.stream.Stream; |
// default exports
export default 42;
export default {};
export default [];
export default (1 + 2);
export default foo;
export default function () {}
export default class {}
export default function foo () {}Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x| open System | |
| // helper function to set the console collor and automatically set it back when disposed | |
| let consoleColor (fc : ConsoleColor) = | |
| let current = Console.ForegroundColor | |
| Console.ForegroundColor <- fc | |
| { new IDisposable with | |
| member x.Dispose() = Console.ForegroundColor <- current } | |
| // printf statements that allow user to specify output color |