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
<!doctype html> | |
<html lang="en" ng-app="demoApp"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Rank Star</title> | |
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
<style> | |
.glyphicon-star.orange{margin-right:3px;padding:2px;border-radius:3px;text-align:center;font-size:10px;color:#FFF;background-color:#f63;} | |
.glyphicon-star.gray{margin-right:3px;padding:2px;border-radius:3px;text-align:center;font-size:10px;background-color:#CCC;color:#FFF;} | |
.big .glyphicon-star{font-size:18px;margin:-2px 8px 0 0;} |
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
var MyModules = (function() { | |
var modules = {}; | |
return { | |
defineModule(name, deps, impl) { | |
for (var i = 0; i < deps.length; i++) { | |
deps[i] = modules[deps[i]]; | |
} | |
modules[name] = impl.apply(impl, deps); | |
}, getModule(name) { | |
return modules[name]; |
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
for(var i = 1; i <= 5; i++){ | |
setTimeout(function(){ | |
console.log(i); | |
}, 10); | |
} | |
// 5, 5, 5, 5, 5 | |
for(let i = 1; i <= 5; i++){ | |
setTimeout(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
var parentObj = {a:2}; | |
var sunObj = Object.create( parentObj ); | |
parentObj.a; // 2 | |
sunObj.a; // 2 | |
parentObj.hasOwnProperty( "a" ); // true | |
sunObj.hasOwnProperty( "a" ); // false | |
sunObj.a++; // block mode | |
parentObj.a; // 2 | |
sunObj.a; // 3 | |
sunObj.hasOwnProperty("a"); // 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CSS ellipsis</title> | |
</head> | |
<style> | |
div { | |
margin: 20px auto; | |
border: 1px solid #CCC; |
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 | |
$host = 'test.kvstore.aliyuncs.com'; | |
$port = 6379; | |
$user = 'username'; | |
$pwd = 'password1234'; | |
$key = 'the_stored_key'; | |
$redis = new Redis(); | |
if ($redis->connect($host, $port) == false) { | |
die($redis->getLastError()); |
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
ALTER TABLE `wp_commentmeta` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci; | |
ALTER TABLE `wp_comments` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci; | |
ALTER TABLE `wp_layerslider` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci; | |
ALTER TABLE `wp_links` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci; | |
ALTER TABLE `wp_options` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci; | |
ALTER TABLE `wp_post2tag` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci; | |
ALTER TABLE `wp_postmeta` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci; | |
ALTER TABLE `wp_posts` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci; | |
ALTER TABLE `wp_revslider_css` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci; | |
ALTER TABLE `wp_revslider_layer_animations` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci; |
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
# Apache httpd config | |
# defined: Include conf/extra/local-www-httpd.conf; | |
# location: conf/extra/local-www-httpd.conf; | |
<VirtualHost www.test-local.com:80> | |
DocumentRoot D:/test-local | |
ServerName www.test-local.com | |
ServerAlias test-local.com | |
RewriteEngine on |
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 | |
/** | |
* VideoUrlparser | |
* | |
* @package | |
* @version 1.4 | |
* @Author https://github.com/jShi-git/VideoUrlparser/blob/master/VideoUrlparser.php | |
* | |
* Usage | |
* require_once "VideoUrlParser.class.php"; |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |