This file contains hidden or 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
{-# LANGUAGE OverloadedRecordDot #-} | |
import System.Random | |
import System.Environment | |
import qualified Data.Set as S | |
import Text.Read | |
import Control.Category ((>>>)) | |
main = |
This file contains hidden or 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 FindByAgeCmd.* | |
type Age = Int | |
case class Person(name: String, age: Age) | |
val people = List( | |
Person("alice", 65), | |
Person("bob", 25), | |
Person("chien", 15), |
This file contains hidden or 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
fac n = fac' n 1 | |
fac' n acc = | |
guard | |
| n == 0 -> acc | |
| n < 3 -> n * acc | |
| else -> fac' (n - 1) (acc * n) |
This file contains hidden or 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
https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/1863080 | |
https://youtrack.jetbrains.com/issue/IDEA-59679/Cannot-type-dead-keys-in-Linux | |
worked: | |
XMODIFIERS='' idea.sh | |
on | |
OS: Debian 11 bullseye |
This file contains hidden or 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 Data.Bits | |
import Data.Char | |
bin 0 n acc = (Prelude.take n (repeat 0)) ++ acc | |
bin x n acc = bin (div x 2) (n-1) $ (mod x 2):acc | |
bs n = Prelude.concat $ fmap show $ bin n 8 [] | |
ibs ls = ibs' ls 0 | |
where |
This file contains hidden or 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
"" Source your .vimrc | |
"source ~/.vimrc | |
let mapleader=" " | |
"" -- Suggested options -- | |
" Show a few lines of context around the cursor. Note that this makes the | |
" text scroll if you mouse-click near the start or end of the window. | |
set scrolloff=5 | |
" Do incremental searching. | |
set incsearch |
This file contains hidden or 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
[{ | |
"name": "kotlin.reflect.jvm.internal.ReflectionFactoryImpl", | |
"allDeclaredConstructors": true | |
}, | |
{ | |
"name": "kotlin.KotlinVersion", | |
"allPublicMethods": true, | |
"allDeclaredFields": true, | |
"allDeclaredMethods": true, | |
"allDeclaredConstructors": true |
This file contains hidden or 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
# .local/share/applications/idea.desktop | |
[Desktop Entry] | |
Name=Intellij IDEA | |
Comment=Intellij IDEA Community | |
Exec=/opt/idea/bin/idea.sh | |
Terminal=false | |
Type=Application | |
StartupNotify=true | |
MimeType=text/plain; |
This file contains hidden or 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
version: '3' | |
services: | |
zookeeper: | |
image: wurstmeister/zookeeper | |
container_name: zookeeper | |
ports: | |
- "2181:2181" | |
kafka: | |
image: wurstmeister/kafka:2.13-2.8.1 |
This file contains hidden or 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
{-# LANGUAGE Rank2Types #-} | |
mapPair :: (forall x. x -> x) -> (a,b) -> (a,b) | |
mapPair f (a, b) = (f a, f b) | |
id' :: forall x. x -> x | |
id' x = x | |
main = print $ mapPair id' (1, 'a') |
NewerOlder