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 os | |
import time | |
COMPLETE_FILE_DIR = './done/' | |
# 文件名两边添加双引号 | |
def str_transform(source): | |
return '\"{}\"'.format(source) |
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
package com.example.learnkotlin | |
import android.content.Context | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.recyclerview.widget.RecyclerView | |
/** | |
* Created on 2020/4/29. |
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
// ==UserScript== | |
// @name Phabricator copy | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://code.yangqianguan.com/D* | |
// @grant none | |
// ==/UserScript== |
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
def check_contains_blank(source): | |
if not source: | |
raise ValueError("source is None") | |
regular = r"\s" | |
pattern = re.compile(regular) | |
result = pattern.search(test_str) | |
if result is not None: | |
raise ValueError("{} can't contains whitespace".format(source)) |
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 | |
dir=~/Desktop/screenshot/ | |
curr=`date "+%Y-%m-%d %H:%M:%S"` | |
name=${dir}"screenshot"${curr}".png" | |
echo "${name}" | |
adb start-server | |
adb exec-out screencap -p > "$name" | |
if [ -n "$1" ]; then | |
echo "$1 秒后自动删除" | |
sleep $1 |
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
package com.hencoder.hencoderpracticedraw1.practice; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.Path; | |
import android.graphics.RectF; | |
import android.support.annotation.Nullable; | |
import android.util.AttributeSet; |
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
headers = { | |
"Connection": "keep-alive", | |
"Pragma": "no-cache", | |
"Cache-Control": "no-cache", | |
"Upgrade-Insecure-Requests": 1, | |
"DNT": 1, | |
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36", | |
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", | |
"Accept-Encoding": "gzip, deflate, br", | |
"Accept-Language": "en,zh-CN;q=0.9,zh;q=0.8" |
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 | |
dir=~/Desktop/screenshot/ | |
curr=`date "+%Y-%m-%d %H:%M:%S"` | |
name=${dir}"screenshot"${curr}".png" | |
echo "${name}" | |
adb exec-out screencap -p > "$name" | |
if [ -n "$1" ]; then | |
echo "$1 秒后自动删除" | |
sleep $1 | |
rm "$name" |
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
@Override | |
public boolean equals(Object o) { | |
if (this == o) return true; | |
if (o == null || getClass() != o.getClass()) return false; | |
AreaBean labelBean = (AreaBean) o; | |
if (label != null ? !label.equals(labelBean.label) : labelBean.label != null) return false; | |
return value != null ? value.equals(labelBean.value) : labelBean.value == null; | |
} |
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
def insert_mysql(list_items): | |
if len(list_items) == 0: | |
print('input data illegal') | |
return | |
config = { | |
'host': '127.0.0.1', | |
'port': 3306, | |
'user': 'root', | |
'password': '********', | |
'db': 'lagouInfo', |
NewerOlder