Consider a list of strings you need to permanently assign a random color.
First you should turn the string into a hash.
var string = "string"
var hash = 0
/** | |
* ISBN13をISBN10に変換する関数。 | |
* | |
* Usage | |
* console.log(isbn13to10("9784063842760")); | |
* > "4063842762" | |
* | |
* # 変換ロジックの解説(例:"9784063842760") | |
* 1. ISBN13の先頭3文字と末尾1文字を捨てる => "4063842760" | |
* 2. 4*10 + 0*9 + 6*8 + 3*7 + 8*6 + 4*5 + 2*4 +7*3 + 6*2 = 218 |
import java.io.FileDescriptor; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
public class HelloWorld{ | |
private static HelloWorld instance; | |
public static void main(String[] args){ | |
instantiateHelloWorldMainClassAndRun(); |
|| ∨ 記号 (代替表記) | |
&& ∧ 記号 (代替表記) | |
! ¬ 記号 (代替表記) | |
|ー ├ 記号 (略記) | |
|= ⊨ 記号 (略記) | |
<: ⊂ 記号 (一般的でない代替表記) | |
<:= ⊆ 記号 (一般的でない代替表記) | |
:> ⊃ 記号 (一般的でない代替表記) | |
:>= ⊇ 記号 (一般的でない代替表記) | |
:: ∈ 記号 (一般的でない代替表記) |
/* jshint node:true */ | |
/* eslint-env node */ | |
/* | |
* This will look at the current version of all of your dependencies and update your package.json | |
* with the specific version that you currently have in node_modules. This will save you from the | |
* sadness that is: DEPENDENCY MANAGEMENT | |
* | |
* Place this file in a folder that's a a sibling to your package.json and node_modules | |
* Then simply run: node scripts/package-strict |
(1..1000000).reduce { |a, e| a = "#{a * e}".sub(/\d*?(\d{0,9})0*$/, '\1').to_i } |
def __delitem__(self, key): | |
self.db.delete(self.table, where="session_id=$key", vars= # 見切れている | |
def cleanup(self, timeout): | |
timeout = datetime.# 入力中により以後不明 |
The exchange of new line & br HTML tag could refer to PHP - nl2br() function, which uses to inserts HTML line breaks before all newlines in a string.
These JavaScript functions consider whether to use insert or replace to handle the swap.
list = [0, 'a', false] | |
p list[0] # 括弧で取得 | |
# ========================== | |
# シンボルリテラルだとシンボルリテラルで、アロー表記だとstringで取得できる | |
hash = { | |
a: 'data-a', |