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
| /*obj 概率对象数组; | |
| luck 概率数组,即obj数组元素意义对应; | |
| 对于给定的概率对象,该函数运行相当于: | |
| var a = ['一等奖:宝马X6', '二等奖:苹果三件套', '三等奖:威戈背包', '继续努力!']; | |
| var b = [1, 10, 100, 500]; | |
| goodluck(a, b) { | |
| var random = (1 + 10 + 100 + 500) * Math.random(); | |
| random <= 500 || return a[3]; | |
| random <= 600 || return a[2]; |
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
| /* | |
| * To change this template, choose Tools | Templates | |
| * and open the template in the editor. | |
| */ | |
| package guess; | |
| import java.util.Random; | |
| import java.util.Scanner; | |
| /** |
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
| /** | |
| * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. | |
| * For licensing, see LICENSE.html or http://ckeditor.com/license | |
| */ | |
| (function() { | |
| var imageDialog = function( editor, dialogType ) { | |
| // Load image preview. | |
| var IMAGE = 1, | |
| LINK = 2, |
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 BrowseServer( startupPath, functionData ) | |
| { | |
| // You can use the "CKFinder" class to render CKFinder in a page: | |
| var finder = new CKFinder(); | |
| // The path for the installation of CKFinder (default = "/ckfinder/"). | |
| finder.basePath = '/manage/libarary/editor/ckfinder'; | |
| //Startup path in a form: "Type:/path/to/directory/" | |
| finder.startupPath = startupPath; |
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
| //Highlight current category | |
| $(function () { | |
| var url = window.location.pathname, | |
| re = /^\/\w*/; | |
| urlRegExp=url.match(re); | |
| urlRe = new RegExp(url.replace( /^\/\w*/)); | |
| $('ul.mainNav>li >a').each(function(){ | |
| if ($(this).attr('href').match(re).toString()==url.match(re).toString()) { | |
| $(this).parent("li").addClass('current'); | |
| } |
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
Show hidden characters
| { | |
| // Your GitHub API token | |
| // see: https://github.com/condemil/Gist#generating-access-token | |
| "token": "a92f9d7fa458dead2d0a54f7d6556151e4b1eeb0", | |
| // Show GitHub organizations | |
| // Example: "company1", "company2" | |
| "include_orgs": [], | |
| // Show GitHub users |
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 Pines Notify (pnotify) Plugin 1.2.2 | |
| * | |
| * http://pinesframework.org/pnotify/ | |
| * Copyright (c) 2009-2012 Hunter Perrin | |
| * | |
| * Triple license under the GPL, LGPL, and MPL: | |
| * http://www.gnu.org/licenses/gpl.html | |
| * http://www.gnu.org/licenses/lgpl.html | |
| * http://www.mozilla.org/MPL/MPL-1.1.html |
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
| The regex patterns in this gist are intended only to match web URLs -- http, | |
| https, and naked domains like "example.com". For a pattern that attempts to | |
| match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502 | |
| # Single-line version: | |
| (?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|s |
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
| Route::group(array('prefix' => 'api'), function() | |
| { | |
| Route::resource('cities', 'CitiesAPIController'); | |
| }); | |
| Route::filter('manage-city', function(){ | |
| if (! Entrust::can('edit-city') && $_SERVER['REQUEST_METHOD']!='GET') // Checks the current user | |
| { | |
| $API= new Twiddle\Http\Controllers\ApiController(); |
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
| echo "LC_ALL=en_US.UTF-8" >> /etc/environment | |
| echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen | |
| echo "LANG=en_US.UTF-8" > /etc/locale.conf | |
| locale-gen en_US.UTF-8 | |
| https://github.com/tianon/docker-brew-debian/issues/45 |
OlderNewer