>>> '233' == '233 '
=> false
>>> '233' == ' 233'
=> true
>>> '233' === ' 233'
=> false
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace Scripts; | |
use PhpParser\Builder\Use_; | |
use PhpParser\Node\Stmt\Class_; | |
require __DIR__ . '/../vendor/autoload.php'; | |
/** | |
* @param Use_[] $uses | |
* @param Class_ $class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; author: zhwei | |
; url: https://gist.github.com/zhwei/1603ff8acd68d97e72cd84d54f2e2839 | |
Func StopProcessByName($process) | |
If ProcessExists($process) Then | |
ProcessClose($process) | |
$result = ProcessWaitClose($process, 30) | |
If $result < 1 Then | |
MsgBox(16, "退出失败", $process) | |
Exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{"label": "Bei Jing", "value": "bj"}, | |
{"label": "Shang Hai", "value": "sh"}, | |
{"label": "Guang Zhou", "value": "gz"}, | |
{"label": "Shen Zhen", "value": "sz"}, | |
{"label": "Hang Zhou", "value": "hz"} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example | |
# | |
# $ git show `(git tag | tail -n 1)` | head -n 1 | awk -F ' ' '{print $2}' | \ | |
# xargs -IX git log --format='- [%s](https://github.com/wutongwan/Laputa/commit/%h) @%an' X... | |
# | |
# - [increment version](https://github.com/wutongwan/Laputa/commit/7e56021) @Zhang Wei | |
# - [修正 Mode Operator 中 mode 的继承关系 && 使用 HTMLFacade 替换简单 view](https://github.com/wutongwan/Laputa/commit/4e09b9c) @zhwei | |
# - [修改数据源函数的可见性 && add model() to form](https://github.com/wutongwan/Laputa/commit/2ed41ce) @zhwei | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Supplement to [barryvdh/laravel-ide-helper](https://github.com/barryvdh/laravel-ide-helper) | |
* | |
* Usage: | |
* > cd /your/project/ | |
* > curl https://gist.githubusercontent.com/zhwei/f13ea35b157d4b8687118e6b40ff30b7/raw > _ide_helper_laravel.php | |
* | |
* Project Link: https://gist.github.com/zhwei/f13ea35b157d4b8687118e6b40ff30b7 | |
* |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"000998800006": "电子联行转换中心", | |
"001100001509": "中国人民银行营业管理部营业室", | |
"001110002715": "中国人民银行天津分行营业管理部", | |
"001110002774": "中国人民银行天津分行塘沽中心支行营业部", | |
"001121004527": "中国人民银行石家庄中心支行营业部", | |
"001121004535": "中国人民银行赞皇县支行", | |
"001121004543": "中国人民银行元氏县支行", | |
"001121004551": "中国人民银行赵县支行", | |
"001121004560": "中国人民银行栾城县支行", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Baidu Ad Cleaner | |
// @version 0.2 | |
// @description Baidu Result Set Ad Cleaner | |
// @author zhwei | |
// @match ://www.baidu.com/* | |
// @updateURL https://gist.github.com/zhwei/3c4c595f072d049d416d5b26f5e044f9/raw/4aadcb34dc44c3abb786b89bf535a3fa96355ac7/BaiduAdCleaner.js | |
// @downloadURL https://gist.github.com/zhwei/3c4c595f072d049d416d5b26f5e044f9/raw/4aadcb34dc44c3abb786b89bf535a3fa96355ac7/BaiduAdCleaner.js | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# | |
# Export Result Set As Excel Xlsx File | |
# | |
# Installation: | |
# 1. Install Python(2.7) Module "XlsxWriter", See http://xlsxwriter.readthedocs.org/getting_started.html | |
# 2. In MySQL Workbench | |
# Scripting => Install Plugin/Module... => <select this script> => <restart mysql workbench> | |
# | |
# Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tornadoredis | |
class AsyncRedis(Redis): | |
CONNECTION_POOLS = {} | |
@classmethod | |
def get_conn(cls, name='DEFAULT'): | |
host, port, db = cls._get_config(name) |
NewerOlder