Skip to content

Instantly share code, notes, and snippets.

set clipboard=unnamed
set hlsearch
noremap ; :
noremap : ;
noremap n nzz
noremap N Nzz
noremap j jzz
noremap k kzz
noremap gd gdzz
open System
open FParsec
type Json =
| JInteger of int
| JFloat of float
| JString of string
| JBool of bool
| JArray of Json list
| JObject of Map<string, Json>
@bpk-t
bpk-t / index.html
Last active November 20, 2019 23:44
web worker2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>WebWorker</title>
</head>
<body>
<h1>WebWorker</h1>
@bpk-t
bpk-t / index.html
Created November 20, 2019 12:56
web worker test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h1>WebWorker</h1>

pacman

リポジトリ同期

sudo pacman -Syy

全部アップグレード

{
"editor.detectIndentation": false,
"editor.insertSpaces": false,
"window.zoomLevel": 0,
"editor.renderLineHighlight": "all", // 選択中の行を強調する
"workbench.colorCustomizations": { // カラーテーマに上書きする個別の設定
"editor.background": "#121817", // エディタ背景色
"editor.lineHighlightBackground": "#740ca0", // 選択している行の強調色
},

ファイル関係

  • 新しいファイルを作成
    • :new
    • :tabnew
  • 新しいタブでファイルを開く
    • :tabe filepath

タブ関係

object Main extends App {
val list = (1 to 10000).toVector
val start = System.currentTimeMillis()
val a = mapA(list)(_ * 2)
println(s"a elap = ${System.currentTimeMillis() - start}ms")
val start2 = System.currentTimeMillis()
val b = mapB(list)(_ * 2)
println(s"b elap = ${System.currentTimeMillis() - start2}ms")
trait Monoid[A] {
def op(a1: A, a2 : A): A
def zero: A
}
trait Foldable[F[_]] {
def foldRight[A, B](as: F[A])(z: B)(f: (A, B) => B):B
def foldLeft[A, B](as: F[A])(z: B)(f: (B, A) => B): B
def foldMap[A, B](as: F[A])(f: A => B)(mb: Monoid[B]):B
@bpk-t
bpk-t / TFWH_2.8.md
Last active March 18, 2017 03:19
TFWH_2.8

練習問題A

Prelude> 2 + 2 / 2
3.0
Prelude> (2 + 2) / 2
2.0
Prelude> (/) ((+) 2 2) 2
2.0