var Person = Backbone.Model.extend();
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 | |
//获取域名或主机地址 | |
echo $_SERVER['HTTP_HOST']."<br />"; | |
//获取网页地址 | |
echo $_SERVER['PHP_SELF']."<br />"; | |
//获取网址参数 | |
echo $_SERVER["QUERY_STRING"]."<br />"; | |
//获取用户代理 | |
echo $_SERVER['HTTP_REFERER']."<br />"; | |
//获取完整的url |
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 { h32 as xxhash } from 'xxhashjs'; | |
import crypto from 'crypto'; | |
const LN2_SQUARED = Math.LN2 * Math.LN2; | |
export default class BloomFilter { | |
constructor(options = {}){ | |
this.init(options); | |
} |
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
%说明:本文件为计算两幅视频图象相对于高清晰图象的质量,其中: | |
%eyechart1.bmp为未处理前质量较差图象,核心区域的截图保存为area_eyechart1.bmp | |
%eyechart2.bmp为某种算法处理后质量较好图象,核心区域的截图保存为area_eyechart2.bmp | |
%eyechart3.bmp为高清晰参考图象,核心区域的截图保存为area_eyechart3.bmp | |
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
function do_sum(param1, param2, cfunction) { | |
// send ajax response to server | |
$.ajax({ | |
type: 'POST', | |
url: 'http://www.script-tutorials.com/demos/301/api.php', | |
crossDomain: true, | |
dataType: 'json', | |
data: 'action=sum¶m1=' + param1 + '¶m2=' + param2, | |
success: function(json) { |
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
from scrapy.spider import BaseSpider | |
class MindhacksSpider(BaseSpider): | |
domain_name = "mindhacks.cn" | |
start_urls = ["http://mindhacks.cn/"] | |
def parse(self, response): | |
return [] | |
SPIDER = MindhacksSpider() |