<xml><appid><![CDATA[wxdedd85d835c1fd1b]]></appid> <bank_type><![CDATA[ICBC_DEBIT]]></bank_type> <cash_fee><![CDATA[50]]></cash_fee> <fee_type><![CDATA[CNY]]></fee_type> <is_subscribe><![CDATA[N]]></is_subscribe> <mch_id><![CDATA[1635643555]]></mch_id> <nonce_str><![CDATA[642fd024150da]]></nonce_str> <openid><![CDATA[oOZY75UZW8Qv-Jc1zXGm92Pg8HCo]]></o
package tools import ( "math" ) // WGS84坐标系:即地球坐标系,国际上通用的坐标系。 // GCJ02坐标系:即火星坐标系,WGS84坐标系经加密后的坐标系。Google Maps,高德在用。 // BD09坐标系:即百度坐标系,GCJ02坐标系经加密后的坐标系。 const ( X_PI = math.Pi * 3000.0 / 180.0 OFFSET = 0.00669342162296594323 AXIS = 6378245.0 ) //BD09toGCJ02 百度坐标系->火星坐标系 func BD09toGCJ02(lon, lat float64) (float64, float64) { x := lon - 0.0065 y := lat - 0.006 z := math.Sqrt(x*x+y*y) - 0.00002*math.Sin(y*X_PI) theta := math.Atan2(y, x) - 0.0000
编译set GOOS=linuxset GOARCH=amd64go build -o "packageName"发布上传到服务器相关目录chmod 777 main ------------修改权限nohup ./main >log.txt --------后台运行程序查看查看运行进程pid: ps aux |grep main (main为名称)服务器执行后台运行代码: nohup ./main &关闭运行代码:kill -2 7159pidps -ef 可以查看所有进程kill -pid 结束进程比方说我通过查看进程发现上面运行的jar包的pid是21550,就可以这样结束它:kill 21550
/** * 判断一个坐标是否在圆内 * 思路:判断此点的经纬度到圆心的距离 然后和半径做比较 * 如果此点刚好在圆上 则返回true * @param $point ['lng'=>'','lat'=>''] array指定点的坐标 * @param $circle array ['center'=>['lng'=>'','lat'=>''],'radius'=>''] 中心点和半径 */ function is_point_in_circle($point, $circle){ $distance = $this -> distance($point['lat'],$point['lng'],$circle['center']['lat'],$circle['center']['lng']); if($distance <= $circle['radius']){ return true;
/** * 检验手机号码 */ if (!function_exists('check_phone_number')) { function check_phone_number($phone_number) { //中国联通号码:130、131、132、145(无线上网卡)、155、156、185(iPhone5上市后开放)、186、176(4G号段)、175(2015年9月10日正式启用,暂只对北京、上海和广东投放办理),166,146 //中国移动号码:134、135、136、137、138、139、147(无线上网卡)、148、150、151、152、157、158、159、178、182、183、184、187、188、198 //中国电信号码:133、153、180、181、189、177、173、149、199 $g = "/^1[34578]\d{9}$/"; $g2 = "/^19[89]\d{8}$/"; $g3
柚子生活
一个很懒的人