@(日常笔记)
script_name
script_description
script_author
script_version
/** | |
* Ethereum Account Scanner | |
* | |
* To run this, you need your own geth node, accepting RPC | |
* connections on a port you can access. | |
* | |
* Install pre-requisites: | |
* sudo npm install -g web3 | |
* | |
* Usage: |
Place Theme: ~/.oh-my-zsh/themes/nanotech.zsh-theme | |
Start Script in your first terminal tab with your country name | |
bash script.sh Germany | |
Add to ~/.zshrc | |
ZSH_THEME="nanotech" |
# ==== Emojis ==== | |
# 🐛 :bug: バグ修正 | |
# 👍 :+1: 機能改善 | |
# ✨ :sparkles: 部分的な機能追加 | |
# 🎉 :tada: 盛大に祝うべき大きな機能追加 | |
# ♻️ :recycle: リファクタリング | |
# 🚿 :shower: 不要な機能・使われなくなった機能の削除 | |
# 💚 :green_heart: テストやCIの修正・改善 |
// 身份证号码验证 | |
jQuery.validator.addMethod("isIdCardNo", function(value, element) { | |
// var idCard = /^(\d{6})()?(\d{4})(\d{2})(\d{2})(\d{3})(\w)$/; | |
return this.optional(element) || isIdCardNo(value); | |
}, "请输入正确的身份证号码"); | |
// 手机号码验证 | |
jQuery.validator.addMethod("isMobile", function(value, element) { | |
var length = value.length; | |
var mobile = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/; |
template <class ForwardIterator> | |
void rotateSTL(ForwardIterator first, ForwardIterator middle, | |
ForwardIterator last) | |
{ | |
using std::swap; | |
ForwardIterator next = middle; | |
while(first != next) | |
{ | |
swap(*first++, *next++); | |
if(next == last){ next = middle;} |
require 'benchmark/ips' | |
Benchmark.ips do |bm| | |
list = (0..10_000).to_a | |
bm.report "flat_map" do | |
list.flat_map do |x| | |
[x, x * x] | |
end | |
end |
''' | |
This is significantly derived from StackContext, Apache 2.0 license | |
''' | |
from tornado.stack_context import StackContextInconsistentError, _state | |
class ContextLocal(object): | |
''' | |
Implements a threadlocal-like mechanism that can be used to track data | |
across tornado asynchronous calls. This is very similar to (and based |
import java.awt.datatransfer.FlavorListener | |
import java.awt.datatransfer.FlavorEvent | |
import java.awt.Toolkit | |
import java.awt.datatransfer.DataFlavor | |
import scala.annotation.tailrec | |
object ClipboardTest { | |
private var listener: Option[StrFlavorListener] = None | |
def clipboard = Toolkit.getDefaultToolkit.getSystemClipboard |
https://resourcepool.io/2014/08/21/java-quickies-hibernate-validator-reference-implementation-of-jsr-303/ |