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.

3710 questions
255
votes
5 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…
Bite code
  • 578,959
  • 113
  • 301
  • 329
248
votes
16 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,691
  • 3
  • 18
  • 11
223
votes
9 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
  • 2,233
  • 2
  • 12
  • 6
206
votes
6 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,370
  • 10
  • 39
  • 56
196
votes
7 answers

How can I see local history changes in Visual Studio Code?

I'm looking for a way to see my local history changes. Kind of the equivalent way in WebStorm:
Idan Dagan
  • 10,273
  • 5
  • 34
  • 41
136
votes
6 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,507
  • 2
  • 11
  • 9
106
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,585
  • 5
  • 16
  • 24
103
votes
11 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
  • 4,563
  • 24
  • 78
  • 174
101
votes
8 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
  • 3,017
  • 2
  • 21
  • 28
92
votes
14 answers

ERROR: Loading local data is disabled - this must be enabled on both the client and server sides

I don't understand the responses that others have provided to similar questions except for the most obvious ones, such as the one below: mysql> SET GLOBAL local_infile=1; Query OK, 0 rows affected (0.00 sec) mysql> SHOW GLOBAL VARIABLES LIKE…
sofrustrated
  • 1,051
  • 1
  • 6
  • 4
80
votes
15 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
  • 9,768
  • 24
  • 79
  • 122
79
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
  • 923
  • 1
  • 7
  • 9
78
votes
7 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
  • 984
  • 2
  • 11
  • 17
78
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,077
  • 2
  • 9
  • 15
73
votes
2 answers

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

This Bash snippet works as expected: $ fun1() { x=$(false); echo "exit code: $?"; } $ fun1 exit code: 1 But this one, using local, does not as I would have expected: $ fun2() { local x=$(false); echo "exit code: $?"; } $ fun2 exit code: 0 Can…
tokland
  • 66,169
  • 13
  • 144
  • 170
1
2 3
99 100