Please add a link here to the task/user story in Trello
Please include a list of changes included in the PR here.
// refaktoroitu versio | |
// muutoksia: | |
// * siirretty jakson valintojen hakulogiikka useRecommendations.ts -> Recommendations.tsx | |
// * siirretty jakson valintojen formatointilogiikka pois useEffect:istä suoraan komponentin rendaukseen (options={recommendations.map...) | |
// | |
// tällä mallilla koodia on vähemmän ja juttuja ei turhaan tehdä useEffecteissä tai muissa kansioissa "piilossa" | |
// voimme myös heittää tarpeettomaksi jääneet "Option"-importin ja useRecommendations.ts filut pois | |
import { CircularProgress, Divider } from "@material-ui/core"; | |
import React, { useEffect, useState } from "react"; |
<?php | |
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
?> | |
<html> | |
<head> | |
<title>V2 tokenize credit card</title> | |
</head> | |
<body> | |
<h1>Request card form from v2 api</h1> | |
<hr /> |
/* | |
* Used to reduce boilerplate when creating simple redux-loop side-effects. | |
* runLoopFetch() can be directly provided with the success & fail action-types, | |
* which removes necessity to create actionCreator functions for each one. | |
*/ | |
import { Cmd } from 'redux-loop' | |
type FetchFn = (...args: any[]) => Promise<any> |
const mapAndFilter = (f) => R.compose(R.filter((x) => x !== undefined), R.map(f)) | |
mapAndFilter((x) => x % 2 === 0 ? x+100 : undefined)([1, 2, 3, 4, 5]) | |
> Array [ 102, 104 ] |
aws cloudformation describe-stacks --stack-name stackname-stagename | jq -r '.Stacks[0].Outputs[] | select(.OutputKey == "ServiceEndpoint") | .OutputValue' |
def tulosta(tahdit): | |
lista = ["vasen", "kaks", "kol", "nel", "viis", "kuus", "sei", "oikea"]; | |
# apuri jota käytetään ton listan tulostamiseen | |
listaIterator = 0 | |
for i in range(tahdit): | |
print(lista[listaIterator]) | |
# jos listaIterator apuri kasvais yli listan pituuden, resetoidaan se |
https://github.com/koodiklinikka/koodiklinikka.fi
https://open.spotify.com/user/1110653944/playlist/0ZjRD2iAsKKbOlEpk3HUPj?si=weoPRO8O |