Sets can be generalized as a function that takes an argument and returns
true
or false
.
For a specific set of numbers, you can write it as:
const mySetOfNumbers = num => [1,2,3,4,5].includes(num);
<# | |
.SYNOPSIS | |
Check internet connection by pinging a list of remote and local servers | |
#> | |
# Local gateway recommended | |
$localServers = @("192.168.1.1") | |
# Remote servers to ping | |
$remoteServers = @( |
// Presses F15 every 30 seconds to keep a computer awake | |
// Tested on an Arduino Micro | |
#include <Keyboard.h> | |
void setup() { | |
// Initialize digital pin LED_BUILTIN as an output. | |
pinMode(LED_BUILTIN, OUTPUT); | |
// Initialize keyboard library |
// Special control variable for the number of facets used to generate an arc | |
$fn = 100; | |
// Radius of the corner in mm | |
radius = 10; | |
// Thickness of the sander guide | |
frameThickness = 3; | |
// Length of the sander guide | |
frameExtension = 15; |
# Probably ~90% correct | |
# Be sure to update the line that sets MatchingAssets to whatever requirement you need | |
# Only downloads the first asset in MatchingAssets | |
jobname: | |
steps: | |
- name: Download latest | |
id: download | |
shell: pwsh | |
run: | |
PERCONA-TOOLKIT(1p) User Contributed Perl Documentation PERCONA-TOOLKIT(1p) | |
NAME | |
percona-toolkit - Advanced command-line tools for MySQL | |
DESCRIPTION | |
Percona Toolkit is a collection of advanced command-line tools used by Percona (<http://www.percona.com/>) | |
support staff to perform a variety of MySQL and system tasks that are too difficult or complex to perform | |
manually. |
#!/usr/bin/env stack | |
{- | |
stack | |
script | |
--resolver lts-11.0 | |
--ghc-options -Wall | |
-} | |
{-# LANGUAGE RankNTypes #-} |
#!/usr/bin/env stack | |
{- | |
stack | |
script | |
--resolver lts-11.0 | |
--ghc-options -Wall | |
-} | |
{-# LANGUAGE RankNTypes #-} |
module Order where | |
-- DBM is some Monad Transformer stack that allows us to talk to our DB (also a form of DI!) | |
placeOrder :: User -> OrderDetails -> DBM () | |
placeOrder user details = do | |
-- Some users will have discounts for | |
(discount :: Maybe Discount) <- findRelevantDiscount user details | |
-- Create the specific order for this user with any discount |
I hereby claim:
To claim this, I am signing this object: