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
[ | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "address", | |
"name": "owner", | |
"type": "address" | |
}, |
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
/* jshint esversion: 6 */ | |
// ==UserScript== | |
// @name WSJ and Barrons Paywall Hack | |
// @include https://*.wsj.com/* | |
// @include https://*.barrons.com/* | |
// @run-at document-end | |
// @grant none | |
// @version 2 | |
// ==/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
name: PHP Composer | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: |
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 | |
/** | |
* author : forecho <caizhenghai@gmail.com> | |
* createTime : 2016/3/30 16:47 | |
* description: | |
*/ | |
namespace common\helpers; | |
class StringHelper |
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
namespace common\helpers; | |
class TimeHelper | |
{ | |
/** | |
* 离现在时间几个月 | |
* @param integer|string $time 时间戳或者时间 | |
* @return int | |
*/ | |
public static function dieMonth($time) |
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 | |
/** | |
* author : forecho <caizhenghai@gmail.com> | |
* createTime : 2015/12/29 15:33 | |
* description: | |
*/ | |
namespace common\components; | |
use yii\base\InvalidParamException; |
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 | |
$code = "12243324324234234 | |
23123123123123123 | |
37489347589347895"; | |
$newCode = explode("\r\n", $code); | |
print_r($newCode); | |
// Array ( [0] => 12243324324234234 [1] => 23123123123123123 [2] => 37489347589347895 ) |
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 | |
/** | |
* @link http://ideone.com/gAsKlI | |
*/ | |
$items = array( | |
array('id' => 1, 'pid' => 0, 'name' => '一级11'), | |
array('id' => 11, 'pid' => 0, 'name' => 'www.111cn.net 一级12'), | |
array('id' => 2, 'pid' => 1, 'name' => '二级21'), | |
array('id' => 10, 'pid' => 11, 'name' => '二级22'), | |
array('id' => 3, 'pid' => 1, 'name' => '二级23'), |
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 | |
static $OUR_EPOCH = 1444647842959; | |
static $DEFAULT_SHARD_ID = 1; | |
/** | |
* 生成 bigint64 位主键 | |
* @return int | |
*/ | |
public static function generatePk() | |
{ |
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
// TFuncProduct::getInterval(array( | |
// 10 => array('title' => 'a', 'size' => 1), | |
// 20 => array('title' => 'b', 'size' => 2), | |
// 30 => array('title' => 'c', 'size' => 3), | |
// ), | |
// 'size' | |
// ); | |
// 输出 array(1, 3) |
NewerOlder