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 simplejson | |
file_object = open('./export.json') | |
try: | |
all_the_text = file_object.read() | |
finally: | |
file_object.close() | |
emails=simplejson.loads(all_the_text) | |
old_emails = emails.values()[1] | |
mails = [] | |
for dict in old_emails: |
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
ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
def base62_encode(num, alphabet=ALPHABET): | |
"""Encode a number in Base X | |
`num`: The number to encode | |
`alphabet`: The alphabet to use for encoding | |
""" | |
if (num == 0): | |
return alphabet[0] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/> | |
<title>街景地图</title> | |
<style type="text/css"> | |
*{ | |
margin:0px; | |
padding:0px; |
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 wp_iframe_handler_xiami( $matches, $attr, $url, $rawattr ) { | |
$iframe = '<iframe width="430" height="200" src="http://miantiao.jd-app.com/xiamiplayer/'. esc_attr($matches[1]) . '" allowtransparency scrolling="0" frameborder="0" ></iframe>'; | |
return apply_filters( 'iframe_xiami', $iframe, $matches, $attr, $url, $rawattr ); | |
} | |
wp_embed_register_handler( 'xiami_iframe', '#http://www.xiami.com/song/([\d]+)(.*?)#i', 'wp_iframe_handler_xiami' ); |
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
SongUrl = (function (sLocation) { | |
var num = Number(sLocation.charAt(0)), | |
inp = sLocation.substr(1), | |
iLe = inp.length % num, | |
a = 0, | |
ret = '', | |
arr = []; | |
for (var i = 0; i < num; i++) { | |
arr[i] = (iLe > i ? 1 : 0) + (inp.length - iLe) / num; | |
} |
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
var defaultEncoding = 1; // 預設語言:1-繁體中文 | 2-简体中文 | |
var translateDelay = 0; | |
var cookieDomain = window.location.protocol + "//" + window.location.host; | |
var msgToTraditionalChinese = "轉換爲繁體"; | |
var msgToSimplifiedChinese = "转换为简体"; | |
var translateButtonId = "translateLink"; | |
var currentEncoding = defaultEncoding; | |
var targetEncodingCookie = "targetEncoding" + cookieDomain.replace(/\./g,""); | |
var targetEncoding = ( getCookie(targetEncodingCookie) == null ? defaultEncoding : getCookie(targetEncodingCookie) ); |
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 getMatchingBra(code) { | |
var stack = []; | |
var bra = []; | |
for(var i = 0; i < code.length; i++) bra.push(-1); | |
for(var i = 0; i < code.length; i++) { | |
if(code[i] === '[') { | |
stack.push(i); | |
} else if(code[i] === ']') { | |
bra[i] = stack.pop(); | |
bra[bra[i]] = i; |
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 wp_iframe_handler_m163( $matches, $attr, $url, $rawattr ) { | |
$iframe = '<iframe width="430" height="200" src="http://miantiao.jd-app.com/m163player/'. esc_attr($matches[1]) . '" allowtransparency scrolling="0" frameborder="0" ></iframe>'; | |
return apply_filters( 'iframe_m163', $iframe, $matches, $attr, $url, $rawattr ); | |
} | |
wp_embed_register_handler( 'm163_iframe', '#http://music.163.com/\#/song\?id=([\d]+)(.*?)#i', 'wp_iframe_handler_m163' ); |
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 ($) { | |
var layers = [], | |
docWidth = $(window).width(), | |
docHeight = $(window).height(), | |
urlString = ' | ', | |
plaxObjects = { | |
'layerA': { | |
'start':3, | |
'range':50, |
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
/*! Backstretch - v2.0.3 - 2012-11-30 | |
* http://srobbin.com/jquery-plugins/backstretch/ | |
* Copyright (c) 2012 Scott Robbin; Licensed MIT */ | |
(function(e,t,n){"use strict";e.fn.backstretch=function(r,s){return(r===n||r.length===0)&&e.error("No images were supplied for Backstretch"),e(t).scrollTop()===0&&t.scrollTo(0,0),this.each(function(){var t=e(this),n=t.data("backstretch");n&&(s=e.extend(n.options,s),n.destroy(!0)),n=new i(this,r,s),t.data("backstretch",n)})},e.backstretch=function(t,n){return e("body").backstretch(t,n).data("backstretch")},e.expr[":"].backstretch=function(t){return e(t).data("backstretch")!==n},e.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5e3,fade:0};var r={wrap:{left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},img:{position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxWidth:"none",zIndex:-999999}},i=function(n,i,o){this.options=e.extend({},e.fn.backstretch.defaults,o||{}),this.images=e.i |
OlderNewer