JavaScript で下記4点を連想配列として用いる場合の使い分け方を解説します。
- オブジェクト初期化子
Object.create(null)
- Map
- WeakMap
// ==UserScript== | |
// @name [Mastodon] This is not ⭐, but 🍮! | |
// @namespace hen.acho.co | |
// @include https://*/web/* | |
// @version 1.180415 | |
// @description replace misskey's star button with pudding | |
// @downloadURL https://gist.github.com/pacochi/7a529cc0a344ba90e7b764f944e037e0/raw/mastodon_misskey_pudding.user.js | |
// @run-at document-idle | |
// @grant none | |
// ==/UserScript== |
// ==UserScript== | |
// @name DisableCat | |
// @namespace https://rinsuki.net | |
// @version 0.1 | |
// @description 設定→Web→詳細設定→ストリームを経由したAPIリクエストをOFFにしたあとリロード | |
// @author rinsuki | |
// @match https://misskey.xyz/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>麻雀</title> | |
<style> | |
* { | |
box-sizing: border-box; | |
transform-style: preserve-3d } |
title |
---|
Misskey タイムライン機能比較 |
ホーム | ローカル | ハイブリッド | グローバル | ||
---|---|---|---|---|---|
ユーザー | フォロー | ✔ | ✔ | ✔ | |
ローカル | ✔ | ✔ | ✔ | ||
リモート | ✔ | ||||
公開範囲 | 公開 |
const Xev = require('xev').default; | |
const { EventEmitter } = require('events'); | |
class XevPubSub extends EventEmitter { | |
constructor(namespace) { | |
super(); | |
this.parentEmitter = new Xev(namespace); | |
this.list = {}; | |
this.handler = (channel) => (message) => this.emit('message', channel, message); | |
} |
// Requirement: node-fetch | |
// How it works: | |
// $ node misskey_reaction.js xxxxxxxxxxxxxxxxx(noteId) | |
// $ node misskey_reaction.js https://${host}/notes/xxxxxxxxxxxx(noteId) | |
// You need to put your token here to get it working. | |
const i = '!YOUPUTYOURTOKENHERETOGETTHISPROGRAMTOWORK' | |
// | |
const fetch = require('node-fetch') |
Copyright 2018 YuzuRyo61 | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER D |
One of the key parts of the save/load process in Factorio is that it must be deterministic. This means that for a given save file (when no external factors change) saving, exiting, and loading the save shouldn't change any observable behavior.
There are a few reasons and benefits for this strict requirement: