location

How to set FromFile location in Powershell?

谁说胖子不能爱 提交于 2019-12-02 10:45:07
I am preparing a script, which needs to use some images from same folder as the script. The images are to be shown on WinForms GUI. $imgred = [System.Drawing.Image]::FromFile("red.png") When I run the ps1 script manually from the folder just by clicking, it loads images and shows them. Unfortuantely I do not remember exactly how I set up this, but as far as I can, it was just the default program to use for ps1 files. When I run the script from a cmd file (to hide the cmd window), it also loads them. But when I open with Powershell IDE and run it, I get errors and no icons are shown on my GUI.

Prompt user to save file to a specific location

早过忘川 提交于 2019-12-02 09:09:52
问题 I'm creating a website that generates a text file. I would like for the user to save the file to a specific folder (it's a backup file for a video game). Is it possible to change the default folder the file is saved to via PHP or HTML? C#, while not my first pick, would also be acceptable. 回答1: If I understand correctly, NO you cannot default to a location on the users computer. This is just a security piece that you cannot get around. Try educating the user before they download. That's the

iOS 7 Simulator on Mac doesn't work with custom location (Also doesn't ask permission)

你离开我真会死。 提交于 2019-12-02 08:58:49
I'm trying to make an iOS7 app that uses the current location of the device. I'm using the iPhone simulator on my Mac, but I'm having some problems. Every time my view that the location manager is in appears, it prints out 0.000000 for both latitude and longitude, even after I've set a custom location (from simulator>debug>location). Also, it seemed strange that the simulator didn't ask for permission to use current location when it opened the app. Anybody know what's going on here? - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a

How to get user's country information

女生的网名这么多〃 提交于 2019-12-02 08:53:28
问题 Basically I need to identify the user's country at application startup and enable or disable a location based feature in my app based on his/her country. I need to do this as quickly as possible in the application delegate prior to the RootViewController's loading. Is there anyway of doing this in the iPhone SDK?? 回答1: Do you need the name of the country that the device is physically located in while the app is running? Or could you make do with the system locale the device is using such as

nginx的root与alias

China☆狼群 提交于 2019-12-02 08:39:33
root和alias都可以定义在location模块中,都是用来指定请求资源的真实路径,比如: location /i/ { root /data/w3; } 请求 http://XXX/i/top.gif 这个地址时,那么在服务器里面对应的真正的资源是 /data/w3/i/top.gif文件 注意:真实的路径是root指定的值加上location指定的值 。 而 alias 正如其名,alias指定的路径是location的别名,不管location的值怎么写,资源的 真实路径都是 alias 指定的路径 ,比如: location /i/ { alias /data/w3/; } 同样请求 http://XXX/i/top.gif 时,在服务器查找的资源路径是: /data/w3/top.gif 其他区别: 1、 alias 只能作用在location中,而root可以存在server、http和location中。 2、alias 后面必须要用 “/” 结束,否则会找不到文件,而 root 则对 ”/” 可有可无。 来源: https://blog.csdn.net/lyl0724/article/details/92984129

Is it possible to retrieve the GPRMC from device GPS?

五迷三道 提交于 2019-12-02 08:04:39
问题 I 'm looking for a way to obtain the GPRMC info from device GPS. Is it even possible in any way? 回答1: No, it is not possible. First GPRMC is a message from the text based NMEA protocoll, which is a not well defined protocoll, each chip manufacturer interprets it differently. Therfore most professional devices, use the binary protocoll from the Chip manufacturer. And even when Apple woud internally use the NMEA Protokoll to communicate with the chip, you would not have any access to that

how to convert gps north and gps west to lat/long in objective c

萝らか妹 提交于 2019-12-02 07:40:39
I got these values from server: <gps_n>34.22.123</gps_n> <gps_w>81.59.345</gps_w> I would like to convert these values to latitude/longitude in Objective C. Would you please give me a guide to do this? Thanks The formula for both lat/long (n/w) is: Degrees+(minutes/60)+(seconds/3600) From this page: http://webmaster10.com/ldr/lat-long-conversion.html The example you have given, already are latitude/longitude coordinates. There are many such lat,lon formats, what you want are lat/long coordinates in decimal degrees , probably with a sign to denote N/S or E/W. Use the formula above: ( Degrees+

Location returns NULL

拟墨画扇 提交于 2019-12-02 07:08:03
问题 I am writing an Android app that returns longitude and latitude, however location holds a Null value. Please see if you can see why, Its been bugging me all day. Code below: public class example extends Activity { public static double latitude; public static double longitude; LocationManager lm; LocationListener ll; Location location; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView

error: package PermissionUtils does not exist

扶醉桌前 提交于 2019-12-02 06:52:52
问题 I want to find the current location of the user through my app and I copied the source code from Github and I don't know it does not give me any error but this one. Here's my code with all the libraries in case you think I have missed a library. import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.GoogleMap.OnMyLocationButtonClickListener; import com.google.android.gms.maps.OnMapReadyCallback; import com.google.android.gms.maps.SupportMapFragment; import android

How do I use MaxMind's GeoIP database to determine location?

独自空忆成欢 提交于 2019-12-02 06:50:23
So, I was told in my previous question that I can use the databases provided by MaxMind to determine locations. So, I got their databases downloaded from their site. They are csv files and open up in Excel. InetAddress ip = InetAddress.getLocalHost() is how I get the IP of my computer. From there I do String justIP = ip.getHostAddress() My question is: How do I resolve justIP to a city location using the DB I just downloaded ??? I am new to this so a little help will be appreciated. One of the files has three columns. startIPNum , endIPNum and locID I do not know what these do but I guess