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 numpy as np | |
import scipy.stats as st | |
import random | |
apply_a = [] | |
apply_b = [] | |
## AB 两组人数各为 20000 人 | |
for times in range(20000): | |
# AB 每组的报名次数 |
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
set nu | |
set mouse=v | |
let g:NERDTreeWinPos="left" | |
let g:NERDTreeWinSize=26 | |
"""""""""""""""""""""""""""""""""" | |
" => PHP section | |
"""""""""""""""""""""""""""""""""" |
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
""""""""""""""""""""""""""""""""" | |
" https://github.com/amix/vimrc | |
""""""""""""""""""""""""""""""""" | |
set nu | |
set mouse=v | |
let g:NERDTreeWinPos = "left" | |
"""""""""""""""""""""""""""""""""" | |
" => PHP section |
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
server { | |
listen 80; | |
server_name foo.com; | |
root /path; | |
index index.html index.htm index.php; | |
location / { | |
try_files $uri $uri/ /index.php; | |
} |
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
server { | |
set $htdocs /home/libaochang/data/orange/public; | |
listen 80; | |
server_name xmprs.com; | |
location / { | |
root $htdocs; | |
autoindex on; | |
index index.php index.html; | |
if (!-e $request_filename){ |
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
Client | |
<?php | |
class HTTPClient { | |
function __construct($url, $port = 80) | |
{ | |
$this->url = $url; | |
$this->port = $port; | |
} |
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
$(document).ready(function(){ | |
$("#back-top").hide(); | |
$(function () { | |
$(window).scroll(function () { | |
if ($(this).scrollTop() > 100) { | |
$('#back-top').fadeIn(); | |
} else { | |
$('#back-top').fadeOut(); | |
} |
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
return array( | |
'controllers' => array( | |
'invokables' => array( | |
'Admin\Controller\Index' => 'Admin\Controller\IndexController', | |
'Admin\Controller\Dash' => 'Admin\Controller\DashController', | |
), | |
), | |
'router' => array( |
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
class Util { | |
static function domain($output = true) { | |
$protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https'); | |
$host = $_SERVER["HTTP_HOST"]; | |
$port = $_SERVER["SERVER_PORT"]; | |
$domain = (($protocol !== false) ? "https" : "http") . "://" . $host; | |
$domain .= ($port == "80") ? "" : (":" . $port); |
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
// get the content | |
@ob_start(); | |
$writer = PHPExcel_IOFactory::createWriter($excel, "Excel2007"); | |
$writer->save("php://output"); | |
$data = @ob_get_contents(); | |
@ob_end_clean(); | |
// set email attachment |
NewerOlder