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
12
votes
2 answers

How to load data into ViewController from local JSON file

I'm developing an iPhone app and I need to show stored data in a TableView. After some research I decided that JSON would be best fit for storing the data. However, I couldn't find any tutorials explaining how to read JSON as a local file rather…
es1
  • 1,231
  • 3
  • 14
  • 27
11
votes
1 answer

Mac /usr/local and homebrew

Anyone know what a "virgin" /usr/local folder would look like on a brand new Mac? I should know, as I just got one, but I used Apple's Migration Assistant (which doesn't give you any details about what it's about to do) to migrate my Mail, Apps &…
Meltemi
  • 37,979
  • 50
  • 195
  • 293
11
votes
1 answer

using gradle plugin from flatDir source

How to amend Gradle plugins {} management repository for custom plugins? is not duplicated in this post, because it does not cover use of flatDir. Question How do I use a Gradle plugin defined in a local JAR, using the new plugin {} semantics,…
brainchild
  • 754
  • 1
  • 7
  • 21
11
votes
1 answer

How to load large local files using JavaScript?

Is there a way to handle very large files(like 2GB and over) locally in JavaScript without crashing the browser? *I am aware of the input tag and the FileReader API, but it seems there is nothing like Node.js streams.
Damien Golding
  • 1,003
  • 4
  • 15
  • 28
11
votes
2 answers

React Native with Expo: how to use a .env.local config file?

I have a react-native app running with expo (expo 27.1.1 and react-native 0.55.4). I'd like to use a .env.local file, the only thing I found is using babel-plugin-inline-dotenv, but it loads the content of .env file instead of .env.local file (and I…
Simon
  • 6,025
  • 7
  • 46
  • 98
11
votes
3 answers

Open/Save local (JSON) file from JavaScript >> IE/Firefox

I'm very new to JS and I'm doing a small html page that -for now- will be ran locally. I have a string in JSON format which I need to be able to store/load as a file on the hard drive. To be able to store the string, I've got this to work on…
Endo
  • 363
  • 1
  • 6
  • 20
11
votes
1 answer

DateFormatter date from string returns nil

For some reason some devices fail to convert a string to a date. This is my date converting code: func dateFromString(string: String) -> Date? { let f = DateFormatter.init() f.dateFormat = "yyyy-MM-dd HH:mm:ss" return f.date(from:…
David Ben Ari
  • 2,259
  • 3
  • 21
  • 40
11
votes
2 answers

I schedule a local Notification at specific time, using switch but its not triggering at set time

I'm using a switch which, when turned on will trigger alarm and start the notifications. Initially It worked fine and triggered the alarm at set time. After changing time manually, it started working weird notification is triggering instantly when…
Praneeth
  • 1,260
  • 18
  • 37
11
votes
5 answers

How to get self into a Python method without explicitly accepting it

I'm developing a documentation testing framework -- basically unit tests for PDFs. Tests are (decorated) methods of instances of classes defined by the framework, and these are located and instantiated at runtime and the methods are invoked to…
kindall
  • 178,883
  • 35
  • 278
  • 309
11
votes
1 answer

How to install and run npm jasmine locally

Installing some npm packages globally is evil sometimes. I don't want to install jasmine like that: npm install -g jasmine How can I install and use jasmine without -g attribute?
Sergiy Seletskyy
  • 16,236
  • 7
  • 69
  • 80
11
votes
4 answers

Java & Local Databases

TL DR; Want some Java help with connecting to a truly local database ( no access to server tech ), or if you can whip up code, that will work. All it has to do is query the DB ( MS Access, although can be changed ), and output a JSON string. See…
Akidi
  • 915
  • 2
  • 11
  • 18
11
votes
1 answer

C++ accessing global variables/objects in a namespace with a variable/object with the same name

#include #include using namespace std; string a; namespace myNamespace { string a; void output() { cout << a << endl; } } int main() { a = "Namespaces, meh."; myNamespace::a = "Namespaces are…
Whovian
  • 365
  • 2
  • 4
  • 12
10
votes
4 answers

Sapper/Svelte: how to fetch a local json file to retrieve data

In my sapper app, I have some data stored in a json file at src/data/videoslist.json, an array of objects in json format. I need to retrive the data in my index page to pass it to the component. Here's my code at the top of…
Kris
  • 143
  • 1
  • 6
10
votes
2 answers

testing local subdomain with nginx and docker

I'm trying to set up a simple web stack locally on my Mac. nginx to serve as a reverse proxy react web app #1 to be served on localhost react web app #2 to be served on demo.localhost I'm using docker-compose to spin all the services at once,…
Davide Jones
  • 131
  • 1
  • 7
10
votes
2 answers

Local variables in bash: local vs subshell

As far as I know there are two ways to create local variables in a bash function: create a subshell or declare every variable as local. For example: # using local function foo { local count for count in $(seq 10) do echo $count …
Ignitor
  • 2,907
  • 33
  • 50