Questions tagged [local]

A tag for questions about accessing resources local to a given runtime environment or network.

Accessing data on a local network, or accessing files local to the computer can pose unexpected complications, especially when using languages that are not typically used for local resource access.

Additional exceptions, or hardware/firmware considerations, can come into play in these scenarios that are often abstracted away when accessing remote resources.

3393 questions
214
votes
4 answers

How to keep the local file or the remote file during merge using Git and the command line?

I know how to merge modification using vimdiff, but, assuming I just know that the entire file is good to keep or to throw away, how do I do that? I don't want to open vimdiff for each of them, I change want a command that says 'keep local' or…
e-satis
  • 515,820
  • 103
  • 283
  • 322
194
votes
5 answers

Load HTML file into WebView

I have a local html page along with several other resources pointed by it (css files and Javascript libraries) that I would like to load into a WebView . How could this be achieved ? Perhaps not the best way to procede but I'm still experimenting.
klaus johan
  • 4,170
  • 10
  • 34
  • 55
190
votes
13 answers

PHP server on local machine?

I'm trying to build a PHP site and I'm wanting to test my PHP files without uploading them to my host. Basically testing them on my own machine before I upload them. How do I do that?
Kozy
  • 2,111
  • 3
  • 15
  • 10
189
votes
8 answers

How can I parse a local JSON file from assets folder into a ListView?

I'm currently developing a physics app that is supposed to show a list of formulas and even solve some of them (the only problem is the ListView) This is my main layout
theWildSushii
  • 1,893
  • 2
  • 10
  • 6
116
votes
5 answers

How to securely save username/password (local)?

I'm making a Windows application, which you need to log into first. The account details consist of username and password, and they need to be saved locally. It's just a matter of security, so other people using the same computer can't see…
Robin
  • 1,307
  • 2
  • 10
  • 9
93
votes
6 answers

Can Chrome be made to perform an XSL transform on a local file?

I was looking into xslt and started testing with the examples on w3schools. However, when I save the xml and xsl in files and try opening them locally, chrome won't perform the xsl transform. It just shows a blank page. I have added…
Zaz
  • 2,758
  • 1
  • 19
  • 26
79
votes
16 answers

How to save svg canvas to local filesystem

Is there a way to allow a user, after he has created a vector graph on a javascript svg canvas using a browser, to download this file to their local filesystem? SVG is a total new field for me so please be patient if my wording is not accurate.
dr jerry
  • 8,982
  • 21
  • 70
  • 112
78
votes
5 answers

Unable to start/launch local mongo db

I'm new to MongoDB. I currently have a dump of a mongo db (i.e. directory of .bson files) and am trying to import that into mongo. I installed mongo as per the instructions on http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/. I'm…
mpuncel
  • 913
  • 1
  • 7
  • 9
75
votes
10 answers

Access to Image from origin 'null' has been blocked by CORS policy

I have JavaScript application in OpenLayers 3, and my base layer is created from local tiles. I work only in my computer so I do not know why I have CORS error. var newLayer = new ol.layer.Tile({ source: new ol.source.OSM({ url:…
Denis Stephanov
  • 2,777
  • 12
  • 48
  • 104
74
votes
2 answers

WebView load website when online, load local file when offline

I am actually new to programming in Java but I have been following several solutions to my problem here but didn't find one that suits my case and I can't seem to get the code down correctly. I would like to have a WebView that opens an online page…
mstation
  • 1,062
  • 1
  • 9
  • 15
62
votes
5 answers

python dictionary passed as an input to a function acts like a global in that function rather than a local

I am very confused by the behaviour below. Cases 1, 3, and 4 perform as I would expect, but case 2 does not. Why does case 2 allow the function to change the value of the dictionary entry globally, even though the dictionary is never returned by the…
user1748155
  • 1,036
  • 1
  • 7
  • 15
61
votes
2 answers

Why does "local" sweep the return code of a command?

This Bash snippet works as I would've expected: $ fun1() { x=$(false); echo "exit code: $?"; } $ fun1 exit code: 1 But this one, using local, does not: $ fun2() { local x=$(false); echo "exit code: $?"; } $ fun2 exit code: 0 Can anyone explain why…
tokland
  • 60,415
  • 12
  • 129
  • 162
59
votes
11 answers

Load local images in React.js

I have installed React using create-react-app. It installed fine, but I am trying to load an image in one of my components (Header.js, file path: src/components/common/Header.js) but it's not loading. Here is my code: import React from 'react';…
Atul
  • 1,043
  • 3
  • 13
  • 21
58
votes
6 answers

Mocking methods of local scope objects with Mockito

I need some help with this: Example: void method1{ MyObject obj1=new MyObject(); obj1.method1(); } I want to mock obj1.method1() in my test but to be transparent so I don't want make and change of code. Is there any way to do this in…
Xoke
  • 788
  • 2
  • 8
  • 17
56
votes
3 answers

Local Notifications in Android?

In iOS, a "Local Notification" is used by an app when it is in the background, to inform the user that something has happened, that they might want to pay attention to: Local notifications ... to inform users when new data becomes available for…
Arsalan Haider
  • 591
  • 1
  • 5
  • 7
1
2 3
99 100