by shigemk2

当面は技術的なことしか書かない

sort alist by key

alistをキーでソートする関数は自前では用意されていないので、独自定義する必要がありまして。

(defalias 'asoc-copy 'copy-sequence "Return a shallow copy of ALIST.")

(defun asoc-sort-keys (alist comparator)
  "Return a copy of ALIST sorted by keys.
The keys are sorted stably using COMPARATOR.
Example:
    (let ((a '((b . 2) (a . 1) (e . 5) (d . 4) (c . 3))))
      (asoc-sort-keys a #'string<))
    ;; ((a . 1) (b . 2) (c . 3) (d . 4) (e . 5))"
  (sort (copy-sequence alist)
        (lambda (pair1 pair2)
          (funcall comparator (car pair1) (car pair2)))))

asoc.el/asoc.el at master · troyp/asoc.el · GitHub

string conversion

  • 149 a a
  • 95 in に
  • 40 string 文字列
  • 34 is は
  • 27 at に
  • 26 function 関数
  • 26 to に
  • 25 the その
  • 20 an 〜
  • 20 or または
  • 19 be 〜する
  • 15 as として
  • 15 this この
  • 13 see 見る
  • 12 convert 変換する
  • 11 and そして
  • 11 character キャラクター
  • 11 of の
  • 10 for ために
  • 9 it それ
  • 8 base ベース
  • 8 number 数
  • 7 functions 機能
  • 7 if if
  • 7 into に
  • 7 returns 返品
  • 7 strings 文字列
  • 5 0 0
  • 5 byte バイト
  • 5 can できる
  • 5 integer 整数
  • 5 not ない
  • 5 representation 表現
  • 5 that それ
  • 4 (see (見る
  • 4 are 〜
  • 4 characters 文字
  • 4 converts 変換する
  • 4 format フォーマット
  • 4 function: 関数:
  • 4 text テキスト
  • 4 value 値
  • 4 — -
  • 3 also また
  • 3 converting 変換する
  • 3 floating-point 浮動小数点
  • 3 lisp リスプ
  • 3 list リスト
  • 3 object オブジェクト
  • 3 obsolete 時代遅れの
  • 3 other その他
  • 3 ten 十
  • 3 vector ベクター
  • 3 we 我々
  • 2 alias エイリアス
  • 2 because なぜなら
  • 2 beginning 始まり
  • 2 between の間に
  • 2 concat コンカット
  • 2 conversion 変換
  • 2 creating 作成
  • 2 does する
  • 2 first 最初
  • 2 formatting 書式設定
  • 2 from から
  • 2 functions) 機能)
  • 2 general 一般
  • 2 input 入力
  • 2 integers 整数
  • 2 interpret 解釈する
  • 2 more もっと
  • 2 much たくさん
  • 2 nil なし
  • 2 representations 表現
  • 2 seem 思われる
  • 2 semi-obsolete 半古くなった
  • 2 some 一部
  • 2 spaces スペース
  • 2 string-to-number 文字列と数値
  • 2 tabs タブ
  • 2 then 次に
  • 2 unibyte ユニヴァイト
  • 2 used 中古
  • 2 useful 有用
  • 2 work 作業
  • 1 &optional &任意
  • 1 (aref (aref
  • 1 (inclusive) (包括的)
  • 1 (on (に
  • 1 (single-key-description (単一キー記述
  • 1 (the (
  • 1 0) 0)
  • 1 16 16
  • 1 2 2
  • 1 append 追加する
  • 1 argument 引数
  • 1 ascii アスキー
  • 1 base-ten ベーステン
  • 1 building 建物
  • 1 but だけど
  • 1 byte-to-string バイトごとの文字列
  • 1 cannot できない
  • 1 char-to-string char-to-string
  • 1 code コード
  • 1 consisting 〜する
  • 1 containing 含有
  • 1 converted 変換された
  • 1 data データ
  • 1 describes 説明する
  • 1 descriptions 説明
  • 1 documentation ドキュメンテーション
  • 1 eliminated 除去された
  • 1 empty 空の
  • 1 enough 十分な
  • 1 events イベント
  • 1 except を除いて
  • 1 fit フィット
  • 1 future 未来
  • 1 given 与えられた
  • 1 have 持ってる
  • 1 help 助けて
  • 1 here ここに
  • 1 identical 同一
  • 1 ignores 無視する
  • 1 implemented 実装された
  • 1 int-to-string int-to-string
  • 1 interpreted 解釈された
  • 1 its その
  • 1 just ちょうど
  • 1 large 大
  • 1 like 好きな
  • 1 lists リスト
  • 1 looks 外見
  • 1 making 作る
  • 1 may かもしれない
  • 1 messages メッセージ
  • 1 minus マイナス
  • 1 mostly 主に
  • 1 must 〜しなければならない
  • 1 negative 負
  • 1 new 新しい
  • 1 non-nil 非ゼロ
  • 1 null ヌル
  • 1 number-to-string ナンバーツーストリング
  • 1 numbers 数字
  • 1 numeric 数値
  • 1 objects オブジェクト
  • 1 one 1
  • 1 only のみ
  • 1 output 出力
  • 1 parsing 解析する
  • 1 primarily 主に
  • 1 prin1-to-string prin1-to-string
  • 1 printed 印刷された
  • 1 produce 作物
  • 1 radices ラジエス
  • 1 read-from-string 文字列読み込み
  • 1 reads 読み込み
  • 1 representations) 表現)
  • 1 result 結果
  • 1 retain 保持する
  • 1 returned 戻ってきた
  • 1 section セクション
  • 1 sign 符号
  • 1 skips スキップする
  • 1 starts 開始する
  • 1 string-to-char 文字列から文字へ
  • 1 string-to-int 文字列からintへ
  • 1 string-to-multibyte 文字列とマルチバイト
  • 1 string-to-unibyte 文字列 - ユニバイト
  • 1 string: 文字列:
  • 1 strings) 文字列)
  • 1 systems システム
  • 1 ten; 十;
  • 1 text-char-description) text-char-description)
  • 1 textual テキスト
  • 1 these これら
  • 1 too あまりにも
  • 1 vconcat vconcat
  • 1 when いつ
  • 1 whitespace 空白
  • 1 with 〜と
  • 1 works 作品
  • 1 would 〜する
  • 0 46 46
  • 0 tabs) タブ)

https://www.gnu.org/software/emacs/manual/html_node/elisp/String-Conversion.html

Fully automatic derivation circe

Fully automatic derivation

import io.circe.generic.auto._ を忘れると、could not find implicit value for parameter encoder って怒られる

  • scala 2.12.2
  • circe 0.7.0
import io.circe.generic.auto._
// import io.circe.generic.auto._

case class Person(name: String)
// defined class Person

case class Greeting(salutation: String, person: Person, exclamationMarks: Int)
// defined class Greeting

Greeting("Hey", Person("Chris"), 3).asJson
// res6: io.circe.Json =
// {
//   "salutation" : "Hey",
//   "person" : {
//     "name" : "Chris"
//   },
//   "exclamationMarks" : 3
// }

rspec doc

70 a a

18 in に

14 on に

14 or または

13 an 〜

12 to に

11 the その

10 api API

10 spec 仕様

8 is は

8 rspec rspec

6 of の

6 you 君は

5 and そして

5 apis アピス

5 as として

5 test テスト

4 public パブリック

4 versions バージョン

3 be 〜する

3 by 〜によって

3 rails レール

3 use つかいます

3 versions: バージョン:

3 we 我々

3 work 作業

2 all すべて

2 are 〜

2 code コード

2 example 例

2 existing 既存の

2 framework フレームワーク

2 multiple 複数

2 private プライベート

2 providing 提供する

2 run 走る

2 supported サポートされている

2 these これら

2 which どの

2 with 〜と

2 your きみの

1 about 約

1 according に従って

1 add 追加する

1 allow 許す

1 any どれか

1 applications アプリケーション

1 are: 次のとおりです。

1 ask 尋ねる

1 built-in ビルトイン

1 can できる

1 case 場合

1 change 変化する

1 command コマンド

1 composed 構成された

1 consider 検討する

1 contains 含まれる

1 control コントロール

1 cucumber きゅうり

1 customizable カスタマイズ可能な

1 designed 設計

1 details 詳細

1 docs ドキュメント

1 documentation ドキュメンテーション

1 double ダブル

1 encourage 奨励します

1 environment 環境

1 examples 例

1 expected 期待

1 express 表現する

1 fake 偽

1 flexible フレキシブル

1 for ために

1 glad うれしい

1 have 持ってる

1 if if

1 independently 独立して

1 libraries 図書館

1 like 好きな

1 line ライン

1 make 作る

1 may かもしれない

1 minitest 最小限

1 not ない

1 objects オブジェクト

1 only のみ

1 organize 整理する

1 other その他

1 outcomes 結果

1 parts 部品

1 place 場所

1 please お願いします

1 policies ポリシー

1 primary 一次

1 program プログラム

1 provides 提供する

1 rails' レール '

1 readable 読める

1 release 解放

1 reporting 報告

1 rich リッチ

1 rspec-core: rspec-core:

1 rspec-expectations: rspec-expectations:

1 rspec-mocks: rspec-mocks:

1 rspec-rails: rspec-rails:

1 ruby ルビー

1 runner ランナー

1 semantic セマンティック

1 specs スペック

1 supports サポート

1 testing テスト

1 tightly しっかりと

1 together 一緒に

1 tools ツール

1 treat 治療する

1 types タイプ

1 used 中古

1 using を使用して

1 versioning バージョン管理

1 warning 警告

1 we’ll 私たちは

1 will 意志

1 without 〜のない

0 36 36

http://rspec.info/documentation/

bbc words

216 a a

63 he 彼

51 in に

49 the その

41 on に

39 an 〜

33 at に

24 to に

23 and そして

23 is は

19 as として

18 it それ

17 be 〜する

17 of の

16 we 我々

14 or または

13 no いいえ

10 they 彼ら

9 are 〜

8 do 行う

8 fire 火災

8 said 前記

7 so そう

6 all すべて

6 for ために

6 her 彼女

6 with 〜と

5 - -

5 from から

5 has 持っている

5 may かもしれない

5 not ない

5 share シェア

5 this この

4 caption キャプション

4 community コミュニティ

4 have 持ってる

4 image 画像

4 met 会った

4 minister 大臣

4 over 以上

4 police 警察

4 prime プライム

4 resumed 再開

4 tower タワー

4 up アップ

4 will 意志

3 able できる

3 bbc bbc

3 being であること

3 commander 指揮官

3 cundy クンディー

3 dead デッド

3 grenfell グレンフェル

3 kensington ケンシングトン

3 know 知っている

3 london ロンドン

3 missing 行方不明

3 number 数

3 one 1

3 people 人

3 residents 住民

3 saying 言って

3 state 状態

3 total 合計

3 update 更新

3 victims 犠牲者

3 what 何

2 58 58

2 7 7

2 about 約

2 afternoon 午後

2 any どれか

2 been されている

2 bewildered 困惑

2 block ブロック

2 briefly 簡単に

2 come 来る

2 could できた

2 distraught びっくりする

2 downing 落ちる

2 following 以下

2 had 持っていました

2 hours 時間

2 latest 最新

2 listened 聞いた

2 long 長いです

2 media メディア

2 official 公式

2 presumed 推定される

2 protesters 抗議者

2 recover 回復します

2 response 応答

2 safe 安全

2 saturday 土曜日

2 she 彼女

2 spoke スポーク

2 street 通り

2 stuart スチュアート

2 theresa あります

2 volunteers ボランティア

2 was あった

2 weeks 週

2 were あった

2 whitehall ホワイトホール

1 ‘bewildered '困惑

1 ‘distraught’ ‘散漫な’

1 10 10

1 4’s 4

1 48 48

1 70 70

1 absolute 絶対の

1 added: 追加:

1 ago 前

1 allen アレン

1 anger 怒り

1 angry 怒っている

1 anyone 誰でも

1 appealed 上訴された

1 around 周り

1 association 協会

1 authorities 当局

1 available 利用可能な

1 barrage 弾幕

1 bbc’s BBBの

1 believe 信じる

1 birthday お誕生日

1 building 建物

1 burnt-out 燃え尽きる

1 call コール

1 can できる

1 capable 有能な

1 captioncommander captioncommander

1 captiontheresa キャプションtheresa

1 caught 捕らえられた

1 cause 原因

1 chaos 混沌

1 chaotic 混沌としました

1 chelsea チェルシー

1 church 教会

1 comes 来る

1 condemned 非難した

1 confused' 混乱した '

1 copyrightafp copyrightafp

1 copyrightreuters 著作権者

1 council 評議会

1 counselling カウンセリング

1 criticism 批判

1 damian ダミアン

1 death 死

1 defended 守られた

1 demands 要求

1 described 記載された

1 devastating 壊滅的な

1 disaster 災害

1 don’t しない

1 due 支払う

1 effort 努力

1 email Eメール

1 escape エスケープ

1 estate エステート

1 expect 期待する

1 express 表現する

1 external 外部

1 facebook フェイスブック

1 far 遠い

1 feel 感じる

1 fire: 火災:

1 firefighters 消防士

1 first 最初

1 flats 平屋

1 friday 金曜日

1 full 満員

1 gathered 集まった

1 gives 与える

1 green 緑

1 hill 丘

1 how どうやって

1 hundreds 数百

1 including を含む

1 increase 増加する

1 investigation 調査

1 involved 関係する

1 jeered ジー

1 lack 欠如

1 last 最終

1 leaders 指導者

1 left 左

1 let 〜する

1 lily ユリ

1 links リンク

1 locate 見つけ出す

1 longer より長いです

1 looked 見た

1 looks 外見

1 lots ロット

1 loved 愛された

1 make 作る

1 making 作る

1 managed 管理された

1 managing 管理します

1 manchester マンチェスター

1 marched 行進した

1 matthew マシュー

1 meanwhile その間に

1 members メンバー

1 message メッセージ

1 messenger メッセンジャー

1 methodist メソジスト

1 metropolitan メトロポリタン

1 mike マイク

1 minutes 分

1 missingimage 行方不明の画像

1 moment 瞬間

1 mood 気分

1 mounting 取り付け

1 mrs 夫人

1 named 名前のついた

1 national 全国

1 new 新しい

1 north 北

1 notting ノッティング

1 officials 関係者

1 ones もの

1 open 開いた

1 operation 操作

1 organisation 組織

1 outside 外側

1 posters ポスター

1 price 価格

1 protestors 抗議者

1 queen 女王

1 questions 質問

1 radio 無線

1 reasons 理由

1 recent 最近

1 recovery 回復

1 reflected 反射した

1 relatives 親族

1 relief 救済

1 reporters 記者

1 representative 代表

1 residents' 住民'

1 resignation 辞任

1 reverend 牧師

1 row 行

1 safety 安全性

1 said: 前記:

1 says は言う

1 search サーチ

1 secretary 秘書

1 section セクション

1 senior 上級

1 sombre 暗い

1 some 一部

1 soon すぐに

1 stalled 失速した

1 statement ステートメント

1 such そのような

1 survivors 生存者

1 take 取る

1 tenimage テンマイージ

1 that それ

1 they’re 彼らは

1 things もの

1 those それらの

1 today 今日

1 told 言った

1 toll 通行料金

1 tragedies 悲劇

1 trauma トラウマ

1 trust 信頼

1 twitter ツイッター

1 two-and-a-half 2分半

1 uk these これらをuk

1 understands 理解する

1 updates: アップデート:

1 utter 発声する

1 visited 訪問した

1 want 欲しいです

1 way 方法

1 west 西

1 when いつ

1 which どの

1 who 誰

1 window 窓

1 woman 女性

1 would 〜する

1 yet まだ

1 £5m 5百万ポンド

google-transrate output option

google-translateの出力について。output-destination なるオプションがあるので、それを任意の文字列に変更する。

(custom-set-variables
  '(google-translate-default-source-language "en")
  '(google-translate-default-target-language "ja")
  '(google-translate-output-destination 'echo-area))

その条件は、google-translate-core-ui.el のところに書いてある。

(cond
    ((null output-destination)
    (google-translate-buffer-output-translation gtos))
    ((equal output-destination 'echo-area)
    (google-translate-echo-area-output-translation gtos))
    ((equal output-destination 'popup)
    (google-translate-popup-output-translation gtos))
    ((equal output-destination 'kill-ring)
    (google-translate-kill-ring-output-translation gtos))
    ((equal output-destination 'help)
    (let ((describe-func
    (function
    (lambda (gtos)
    (google-translate-help-buffer-output-translation gtos)))))
    (help-setup-xref (list 'google-translate-translate source-language target-language text) nil)
    (with-help-window (help-buffer)
(funcall describe-func gtos)))))