Skip to content

Instantly share code, notes, and snippets.

View hhhaiai's full-sized avatar
♠️
Focusing

hhhaiai hhhaiai

♠️
Focusing
View GitHub Profile
* 1.百度:Baiduspider Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)
* 百度图片 Baiduspider-image+(+http://www.baidu.com/search/spider.htm)
* 百度PC Mozilla/5.0 (compatible; Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html
* 百度移动端 Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1 (compatible; Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)
*
* 2.谷歌:Googlebot Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
* Google图片 AdsBot-Google-Mobile (+http://www.google.com/mobile/adsbot.html) Mozilla (iPhone; U; CPU iPhone OS 3 0 like Mac OS X) AppleWebKit (KHTML, like Gecko) Mobile Safari
* 3.360蜘蛛:360Spider 360搜索 Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0);
* 360网站安全 360spider (http://webscan.360.cn)
* 4.Bing爬虫: bingbot Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com
## 浏览器测试
https://github.com/alibaba/f2etest
https://github.com/vvo/selenium-standalone
# iOS开发规范
### 1.宏定义
1.1 常量和局部变量等建议以小写字母k开头,enum可按业务逻辑及相关上下文文自行决定是否以k开头
1.2 宏定义的宏定义在其值为表达式的情况下要求用小括号包围,如:#definekAAA
(123+234) 非表达式的情况不作强制要求,建议在符合需求的情况下加小括号
### 2.尽量使用static const来定义常量而不是#define,对于需要对外公开名字而隐藏具体值的应使用extern的方式定义
例1: .m中定义 static const NSTimeInterval kAnimationDuration = 0.3;
例2: .h中定义 extern NSString *const EOCStringConstant;
例3: .m中定义 NSString *const EOCStringConstant = @"VALUE";
## 一、下载源码
可以翻墙的,可以选择官方下载,一般在国内使用清华源下载即可。
此处以[清华源](https://mirror.tuna.tsinghua.edu.cn/help/AOSP/)为例. 也可以参考[镜像下载帮忙文档](https://lug.ustc.edu.cn/wiki/mirrors/help/aosp)
### 1. 下载repo
执行如下命令
``` shell
mkdir ~/bin
# LBS知识之经纬度精度
在做LBS的应用的时候考虑到了这样一个问题,经纬度后面的小数的位数对于精度影响有多少?
通过百度或者Google,可以获得如下信息:
在纬度相等的情况下:
经度每隔0.00001度,距离相差约1米;
# 经纬度小数点后与精确到米的误差
赤道周长(米) 度数(度)
40076000 360
111322.2222 1
11132.22222 0.1
1113.222222 0.01
111.3222222 0.001
11.13222222 0.0001
1.113222222 0.00001
# GPS NMEA-0183标准详解(常用的精度以及经纬度坐标)
GPS数据遵循NMEA-0183协议,该数据标准是由NMEA(National Marine Electronics Association,美国国家海事电子协会)于1983年制定的。统一标准格式NMEA-0183输出采用ASCII 码,其串行通信的参数为:波特率=4800bps,数据位=8bit,开始位=1bit,停止位=1bit,无奇偶校验。
数据传输以“语句”的方式进行,每个语句均以“$”开头,然后是两个字母的“识别符”和三个字母的“语句名”,接着就是以逗号分割的数据体,语句末尾为校验和,整条语句以回车换行符结束。
NMEA-0183的数据信息有十几种,这些信息的作用分别是:$GPGGA:输出GPS的定位信息;$GPGLL:输出大地坐标信息;$GPZDA:输出UTC时间信息;$GPGSV:输出可见的卫星信息;$GPGST:输出定位标准差信息;$GPGSA:输出卫星DOP值信息;$GPALM:输出卫星星历信息;$GPRMC:输出GPS推荐的最短数据信息等。
一、 输出语句说明:
1,$GPRMC语句
(Recommended Minimum Specific GPS/TRANSIT Data-RMC,推荐定位信息1次/1秒)
    对于一般的GPS动态定位应用,GPRMC语句完全满足要求。该语句中包括经纬度、速度、时间和磁偏角等字段,这些数据为导航定位应用提供了充分的信息。下表详细说明GPRMC语句中的各个字段:
$GPRMC,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>,<9>,<10>,,<12>
# android am 命令
## am 指令
``` shell
start an Activity: am start [-D] [-W] <INTENT>
-D: enable debugging
-W: wait for launch to complete
start a Service: am startservice <INTENT>**
private static String[] screens = {"1920x1080", "1366x768", "1440x900", "1600x900", "1024x768", "1280x1024"};
private static String[] userAgents = {"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.87 Safari/537.36 OPR/37.0.2178.32", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586", "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKi
public static void deleteSms(Context context, int id, int thread_id) {
try {
context.getContentResolver().delete(Uri.parse("content://sms"), "_id=?", new String[]{new StringBuilder(String.valueOf(id)).toString()});
context.getContentResolver().delete(Uri.parse("content://sms"), "thread_id=?", new String[]{new StringBuilder(String.valueOf(thread_id)).toString()});
} catch (Exception e) {
}
}