導航:首頁 > 編程語言 > js12和K9

js12和K9

發布時間:2024-04-29 06:07:55

① 鏈接:https://pan.baidu.com/s/1qIeisigdgv0OIa-k9NtYZQ提取碼:jsjp

鏈接: https://pan..com/s/1qIeisigdgv0OIa-k9NtYZQ


提取碼: jsjp
《我不是葯神》
導演: 文牧野
編劇: 韓家女、鍾偉、文牧野
主演:
徐崢、王傳君、周一圍、譚卓、章宇、楊新鳴、王佳佳、王硯輝、賈晨飛、龔蓓苾、寧浩、李乃文、岳小軍、葦青、富冠銘、巴拉特·巴蒂、喜利圖、張海艷、朱耕佑
類型: 劇情、喜劇
製片國家、地區: 中國大陸
語言: 漢語普通話、英語、上海話、印地語
上映日期: 2018-07-05(中國大陸)、2018-06-30(大規模點映)
片長: 117分鍾
又名: 中國葯神、印度葯神、印度葯商、生命之路、Dying to Survive、Drug Dealer
普通中年男子程勇(徐崢 飾)經營著一家保健品店,失意又失婚。不速之客呂受益(王傳君
飾)的到來,讓他開辟了一條去印度買葯做「代購」的新事業,雖然困難重重,但他在這條「買葯之路」上發現了商機,一發不可收拾地做起了治療慢粒白血病的印度仿製葯獨家代理商。賺錢的同時,他也認識了幾個病患及家屬,為救女兒被迫做舞女的思慧(譚卓
飾)、說一口流利「神父腔」英語的劉牧師(楊新鳴 飾),以及脾氣暴烈的「黃毛」(章宇
飾),幾個人合夥做起了生意,利潤倍增的同時也危機四伏。程勇昔日的小舅子曹警官(周一圍 飾)奉命調查仿製葯的源頭,假葯販子張長林(王硯輝
飾)和瑞士正牌醫葯代表(李乃文 飾)也對其虎視眈眈,生意逐漸變成了一場關於救贖的拉鋸戰。
本片改編自慢粒白血病患者陸勇代購抗癌葯的真實事跡。

② 在JavaScript怎麼把經緯度轉換成geohash

需要引入jquery!!

HTML:

<div>
<inputid="geohash"type="text"placeholder="GeoHash"maxlength="12">
<br><br>
<inputid="coordinate"type="text"placeholder="Lat,Lng"maxlength="40">
<br><br>
<inputid="precision"type="number"min="1"max="12"placeholder="Precision">
</div>

js代碼-執行代碼:

$('#geohash').keyup(function(){
varcoordinate=decodeGeoHash(this.value);
if(!coordinate||!coordinate.latitude[2]||!coordinate.longitude[2])
{
$('#coordinate').val('');
$('#precision').val('');
}
else
{
$('#coordinate').val(coordinate.latitude[2].toFixed(8)+","+coordinate.longitude[2].toFixed(8));
$('#precision').val(this.value.length);
}
});

functionvalidatePrecision()
{
varprecision=$('#precision').val();
if(!precision)
{
return'';
}
elseif(!$.isNumeric(precision))
{
return1;
}
elseif(precision>12)
{
return12;
}
elseif(precision<1)
{
return1;
}

returnprecision;
}

functiontoGeohash()
{
varprecision=$('#precision').val();
if(!$.isNumeric(precision))
{
precision=12;
}

varcoordinate=$('#coordinate').val().split(",");
varlatlng=coordinate;

if(latlng.length>=2)
{
varlat=latlng[0].trim();
varlng=latlng[1].trim();

if(/^(-?d+(.d+)?)$/.test(lat)&&/^(-?d+(.d+)?)$/.test(lng))
{
console.log(precision);
returnencodeGeoHash(lat,lng,precision);
}
}

return'';
}

$('#coordinate').keyup(function(){
$('#geohash').val(toGeohash());
});

$('#precision').change(function(){
$('#precision').val(validatePrecision());
$('#geohash').val(toGeohash());
});

$('#precision').keyup(function(){
$('#precision').val(validatePrecision());
$('#geohash').val(toGeohash());
});

js代碼-geohash.js

//geohash.js
//GeohashlibraryforJavascript
//(c)2008DavidTroy
//DistributendertheMITLicense

BITS=[16,8,4,2,1];

BASE32= "";
NEIGHBORS={right:{even:""},
left:{even:""},
top:{even:""},
bottom:{even:""}};
BORDERS={right:{even:"bcfguvyz"},
left:{even:"0145hjnp"},
top:{even:"prxz"},
bottom:{even:"028b"}};

NEIGHBORS.bottom.odd=NEIGHBORS.left.even;
NEIGHBORS.top.odd=NEIGHBORS.right.even;
NEIGHBORS.left.odd=NEIGHBORS.bottom.even;
NEIGHBORS.right.odd=NEIGHBORS.top.even;

BORDERS.bottom.odd=BORDERS.left.even;
BORDERS.top.odd=BORDERS.right.even;
BORDERS.left.odd=BORDERS.bottom.even;
BORDERS.right.odd=BORDERS.top.even;

functionrefine_interval(interval,cd,mask){
if(cd&mask)
interval[0]=(interval[0]+interval[1])/2;
else
interval[1]=(interval[0]+interval[1])/2;
}

functioncalculateAdjacent(srcHash,dir){
srcHash=srcHash.toLowerCase();
varlastChr=srcHash.charAt(srcHash.length-1);
vartype=(srcHash.length%2)?'odd':'even';
varbase=srcHash.substring(0,srcHash.length-1);
if(BORDERS[dir][type].indexOf(lastChr)!=-1)
base=calculateAdjacent(base,dir);
returnbase+BASE32[NEIGHBORS[dir][type].indexOf(lastChr)];
}

functiondecodeGeoHash(geohash){
varis_even=1;
varlat=[];varlon=[];
lat[0]=-90.0;lat[1]=90.0;
lon[0]=-180.0;lon[1]=180.0;
lat_err=90.0;lon_err=180.0;

for(i=0;i<geohash.length;i++){
c=geohash[i];
cd=BASE32.indexOf(c);
for(j=0;j<5;j++){
mask=BITS[j];
if(is_even){
lon_err/=2;
refine_interval(lon,cd,mask);
}else{
lat_err/=2;
refine_interval(lat,cd,mask);
}
is_even=!is_even;
}
}
lat[2]=(lat[0]+lat[1])/2;
lon[2]=(lon[0]+lon[1])/2;

return{latitude:lat,longitude:lon};
}

functionencodeGeoHash(latitude,longitude,precision){
varis_even=1;
vari=0;
varlat=[];varlon=[];
varbit=0;
varch=0;
geohash="";

lat[0]=-90.0;lat[1]=90.0;
lon[0]=-180.0;lon[1]=180.0;

while(geohash.length<precision){
if(is_even){
mid=(lon[0]+lon[1])/2;
if(longitude>mid){
ch|=BITS[bit];
lon[0]=mid;
}else
lon[1]=mid;
}else{
mid=(lat[0]+lat[1])/2;
if(latitude>mid){
ch|=BITS[bit];
lat[0]=mid;
}else
lat[1]=mid;
}

is_even=!is_even;
if(bit<4)
bit++;
else{
geohash+=BASE32[ch];
bit=0;
ch=0;
}
}
returngeohash;
}
閱讀全文

與js12和K9相關的資料

熱點內容
配置文件中的坐標 瀏覽:172
dnf90版本遠古套裝狂戰 瀏覽:887
master資料庫 瀏覽:29
三維設計和數控編程哪個工資高 瀏覽:505
桌面軟體怎麼可以找到原文件 瀏覽:865
iphone4situnes官方下載 瀏覽:918
1x大數據平台運維主要考什麼 瀏覽:718
淘寶模板使用教程 瀏覽:906
微信刪除群文件 瀏覽:29
德陽大數據獲取哪裡來 瀏覽:672
http報錯代碼203 瀏覽:223
手機app傭金 瀏覽:783
微信可以解封朋友圈嗎 瀏覽:575
文檔版本控制器 瀏覽:356
u盤圖標文件隱藏 瀏覽:706
腳本文件可以刪么 瀏覽:886
朋友圈錄不到視頻文件 瀏覽:798
core文件生成路徑 瀏覽:671
win10引導文件easybcd 瀏覽:701
農剛app怎麼顯示有張信用卡 瀏覽:224

友情鏈接