This file contains hidden or 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
javascript | |
ES6ValidationInspection | |
JSAccessibilityCheckInspection | |
JSBitwiseOperatorUsageInspection | |
JSCheckFunctionSignaturesInspection | |
JSClosureCompilerSyntaxInspection | |
JSCommentMatchesSignatureInspection | |
JSComparisonWithNaNInspection | |
JSConsecutiveCommasInArrayLiteralInspection |
This file contains hidden or 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
/**k | |
* @inheritdoc | |
*/ | |
public function rules() | |
{ | |
return [ | |
[['name', 'subtitle'], 'string', 'max' => 100], | |
['productInfo', 'vaildateProductInfo'], // 自定义验证 | |
['skus', 'vaildateSkus'], // 自定义验证 | |
]; |
This file contains hidden or 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
public function actionSearch() | |
{ | |
$keyword = Yii::$app->request->get('keyword'); | |
if (empty($keyword)) $this->goHome(); | |
require_once(Yii::getAlias('@common/helpers') . '/sphinxapi.php'); | |
$cl = new \SphinxClient (); | |
$cl->SetServer('127.0.0.1', 9312); | |
//以下设置用于返回数组形式的结果 | |
$cl->SetArrayResult(true); |
This file contains hidden or 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 hidden or 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 <[email protected]> | |
* createTime : 2015/12/29 15:33 | |
* description: | |
*/ | |
namespace common\components; | |
use yii\base\InvalidParamException; |
This file contains hidden or 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
(function ($) { | |
$.fn.slideShow = function (options) { | |
// Supplying default options | |
options = $.extend({ | |
timeOut: 3000, | |
showNavigation: true, | |
pauseOnHover: true, | |
swipeNavigation: true |
This file contains hidden or 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
(function($) { | |
var o = $({}); | |
var calledEvents = {}; | |
$.subscribe = function() { | |
o.on.apply(o, arguments); | |
if (arguments[0] in calledEvents) |
This file contains hidden or 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
/* | |
* jQuery Autocomplete plugin 1.2.3 | |
* | |
* Copyright (c) 2009 Jörn Zaefferer | |
* | |
* Dual licensed under the MIT and GPL licenses: | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.gnu.org/licenses/gpl.html | |
* | |
* With small modifications by Alfonso Gómez-Arzola. |
This file contains hidden or 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
/* | |
* jQuery Plugin: Tokenizing Autocomplete Text Entry | |
* Version 1.6.2 | |
* | |
* Copyright (c) 2009 James Smith (http://loopj.com) | |
* Licensed jointly under the GPL and MIT licenses, | |
* choose which one suits your project best! | |
* | |
*/ | |
;(function ($) { |
This file contains hidden or 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
(function($) { | |
$.extend($.expr[':'], { | |
group: jQuery.expr.createPseudo(function(num) { | |
return function(elem) { | |
if (isNaN(num)) { | |
return false; | |
} | |
return ($(elem).index() - 1) % (num * 2) < num; | |
}; |
NewerOlder