location

Using Elastic Search Geo Functionality To Find Most Common Locations?

♀尐吖头ヾ 提交于 2019-12-06 19:36:30
I have a geojson file containing a list of locations each with a longitude, latitude and timestamp. Note the longitudes and latitudes are multiplied by 10000000. { "locations" : [ { "timestampMs" : "1461820561530", "latitudeE7" : -378107308, "longitudeE7" : 1449654070, "accuracy" : 35, "junk_i_want_to_save_but_ignore" : [ { .. } ] }, { "timestampMs" : "1461820455813", "latitudeE7" : -378107279, "longitudeE7" : 1449673809, "accuracy" : 33 }, { "timestampMs" : "1461820281089", "latitudeE7" : -378105184, "longitudeE7" : 1449254023, "accuracy" : 35 }, { "timestampMs" : "1461820155814", "latitudeE7

How can I position the window's position on startup to the right side of the user's screen?

送分小仙女□ 提交于 2019-12-06 19:01:22
问题 I am currently creating a sidebar-like WPF application in C#. When a user starts the application, I would like the window to automatically position it's self to the side of the user's screen. I have tried a few methods and google searches, but have not found any help. Here's an example of what I'm trying to do: http://prntscr.com/5tfkz How can I efficiently go about achieving something like this? @dknaack I tried this code: private void Window_Loaded(object sender, RoutedEventArgs e) { this

nginx deny 封IP

半世苍凉 提交于 2019-12-06 19:00:29
官方文档地址:http://nginx.org/en/docs/http/ngx_http_access_module.html#deny Syntax: deny address | CIDR | unix: | all; Default: — Context: http, server, location, limit_except 1 2 3 配置在server上下文 Context: server server { server_name test.example.com; ... deny 1.1.1.1; deny 2.0.0.0/8; } 1 2 3 4 5 6 7 8 9 10 11 配置在location上下文 Context: location location ^~ /test/ { deny 1.1.1.1; deny 2.2.2.2; deny 3.3.3.3; deny 8.0.0.0/8; ... } 来源: https://www.cnblogs.com/ExMan/p/11997073.html

安卓开发笔记①:利用高德地图API进行定位、开发电子围栏、天气预报、轨迹记录、搜索周边(位置)

…衆ロ難τιáo~ 提交于 2019-12-06 18:20:50
本文只是开发小笔记(关键步骤详见其它略讲),有任何不懂的问题可以留言,我必为大家解答以及分享更有用的经验。 △ 高德地图开发时需要导入的包在下面的网盘链接中:(由于高德地图api更新得太快,官网上最新的包使用起来没有之前的方便,所以以下提供最全面的原始包) 链接:http://pan.baidu.com/s/1eR8Nchc 密码:be1v 其中armeabi这个文件夹和其他4个jar是必要导入的,另外两个文件夹确保兼容性。 ①首先登陆高德lbs开放平台获取Key,下面是官方详细教程: http://lbs.amap.com/dev/ticket#/faqcat/1 (本人使用的是eclipse,所以获取安全码SHA1的方法为Windows->preferences->android->build,如下图所示的SHA1 fingerprint) 然后你要设置你所开发的app的包,即在下面的Package中输入你的app包名(这点不能输错) ②申请到key之后,修改安卓项目的AndroidManifest.xml文件,即获取相关的权限和导入key(才能正常启动高德地图) 11个<uses-permission....>就是相关权限的设置,把代码写进去 还有加一个<meta-data....>把你的key导入进去,需要记住android:name="com.amap.api.v2

How to disable location service programmatically?

心不动则不痛 提交于 2019-12-06 16:32:18
Is there any way to disable google location service programmatically? I want to write an app to turn it off with a widget. Thanks for your help! Is there any way to disable google location service programmatically? No, sorry, you cannot disable GPS, etc. programmatically, except via an app installed on the system partition or signed by the firmware's signing key. IOW, you need a rooted phone. As far as i know, the LocationManager is a system service that can not be turned off. Though, you can disable all the location providers that the service uses, such as Wireless location, GPS, etc. Short

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

 ̄綄美尐妖づ 提交于 2019-12-06 16:14:56
问题描述: 已经安装了android-sdk 和gradle环境,并配置了环境变量,如下所示: android环境 root@wangju-HP-348-G4:/home/wangju/Desktop/5i5j_android/AppFrameWork# adb version Android Debug Bridge version 1.0.41 Version 29.0.5-5949299 Installed as /usr/local/android-home/android-sdk-linux/platform-tools/adb gradle环境: root@wangju-HP-348-G4:/home/wangju/Desktop/5i5j_android/AppFrameWork# gradle -version ------------------------------------------------------------ Gradle 4.6 ------------------------------------------------------------ Build time: 2018-02-28 13:36:36 UTC Revision: 8fa6ce7945b640e6168488e4417f9bb96e4ab46c Groovy: 2.4

MapView with local search

ぃ、小莉子 提交于 2019-12-06 15:51:33
I've a question about doing a local search in Apple maps which I have already implemented into my app. The app should show the user where are "supermarkets" around him. My mapView also shows the user's current location but I don't really know how I should do this with the results of the market-locations. Maybe Apple provides a solution/advice for this. Thanks in advance. The results (supermarkets) should be displayed as in this picture. UPDATE: The function works perfectly but is it also possible to make these pins clickable to show an info-sheet about this location as in the pictures below?

服务器部署之nginx的配置

亡梦爱人 提交于 2019-12-06 14:59:09
nginx可作为Web和 反向代理 服务器,在高连接并发的情况下,Nginx是Apache服务器不错的替代品。下面记录一下自己对nginx的配置和使用。 nginx的安装 环境:oracle-linux7 安装依赖 yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel pcre 安装nginx yum -y install nginx # 可能找不到安装包,需要源码安装 # 源码安装,在合适的目录下 wget http://nginx.org/download/nginx-1.10.2.tar.gz tar zxvf nginx-1.10.2.tar.gz cd nginx-1.10.2 mkdir /usr/local/nginx # 生成配置文件 ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module make && make install # 设置软连接 ln -s /usr/local/nginx/sbin/nginx /usr/bin/ 启动测试 cd /usr/local/nginx/sbin/ nginx # 启动,默认是在后台运行

PHP Latitude Longitude to Address

久未见 提交于 2019-12-06 14:58:42
问题 I have a form on my website where a user enters an address of a place. When they submit the form, I convert this location into latitude/longitude and store this in a MySQL Database. I am using Google's Geocode service for this conversion. The problem is that I can't find either a class or a service to convert that latitude/longitude back to an address and as far as I know, Google's Geocode service is a unidirectional conversion. I realize I could store the physical address in the database,

使用jQuery获取当前URL?

≯℡__Kan透↙ 提交于 2019-12-06 14:58:20
我正在使用jQuery。 如何获取当前URL的路径并将其分配给变量? 范例网址: http://localhost/menuname.de?foo=bar&amp;number=0 #1楼 如果要获取根站点的路径,请使用以下命令: $(location).attr('href').replace($(location).attr('pathname'),''); #2楼 这也将起作用: var currentURL = window.location.href; #3楼 我有这个去掉GET变量。 var loc = window.location; var currentURL = loc.protocol + '//' + loc.host + loc.pathname; #4楼 var path = location.pathname 返回当前URL的路径(不需要jQuery)。 window.location 的使用是可选的。 #5楼 var currenturl = jQuery(location).attr('href'); 来源: https://my.oschina.net/stackoom/blog/3137970