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
7
votes
0 answers

How to open local pdf IOS React Native

I want to open a pdf file that was previous downloaded and storaged in phone. local url file: file:///var/mobile/Containers/Data/Application/ ... more url ... /example.pdf I am using Expo library to open in Android: if (Platform.OS !== 'ios') { …
7
votes
5 answers

Pointers and memory scope

I have been programming C for a while (but still pretty new to C) and I am sometimes getting confused of the way the C is handling the memory. Consider following valid C snippet: const char *string(void) { /* where is this pointer variable…
XrM
  • 73
  • 1
  • 3
7
votes
2 answers

Vue.js local template variables

I have a needed to create a local variable in my Vue template to shorten references to an otherwise long object $v.form.text, as shown in the example below:
Paul Bastowski
  • 1,166
  • 1
  • 8
  • 9
7
votes
2 answers

Configure Kafka to expose JMX only on 127.0.0.1

I'm struggling to configure Kafka's JMX to be exposed only on localhost. By default, when I start Kafka, it exposes three ports, whereas two of them are automatically bound to 0.0.0.0, meaning that they're accessible to everyone. I managed to bind…
Tobi
  • 31,405
  • 8
  • 58
  • 90
7
votes
4 answers

In Java, do methods that don't use static or class variables need to be synchronized?

Do methods that only use local variables inside suffer any threading issues ?. Somewhere it was mentioned that the method with local variables are copied to each thread stack frame to work with and do not need to synchronized for multithreaded…
Carbonizer
  • 1,915
  • 2
  • 19
  • 22
7
votes
3 answers

Open XML file from res/xml in Android

I created a Java application which opens an xml file that looks something like this: canine blue And I can open it using: File fXmlFile =…
jeremy
  • 145
  • 1
  • 2
  • 6
7
votes
4 answers

Declaring variables inside C switch/case

Well, this is not actually a question.. I have just occasionally found out that there's an interesting way to declare local variables inside a switch/case block. Instead of using braces inside every case block, you can write: switch (action) { int…
zserge
  • 2,212
  • 2
  • 31
  • 40
7
votes
1 answer

Joda Time: Convert UTC to local

I want to convert a Joda Time UTC DateTime object to local time. Here's a laborious way to do it which seems to work. But there must be a better way. Here's the code (in Scala) without surrounding declarations: val dtUTC = new…
Koala3
  • 2,203
  • 4
  • 20
  • 15
7
votes
5 answers

C structure pointer dereferencing speed

I have a question regarding the speed of pointer dereferencing. I have a structure like so: typedef struct _TD_RECT TD_RECT; struct _TD_RECT { double left; double top; double right; double bottom; }; My question is, which of these would be…
oldSkool
  • 1,212
  • 5
  • 14
  • 29
7
votes
1 answer

Why Does this DataFrame Modification within Function Change Global Outside Function?

Why does the function below change the global DataFrame named df? Shouldn't it just change a local df within the function, but not the global df? import pandas as pd df = pd.DataFrame() def adding_var_inside_function(df): df['value'] =…
Michael
  • 13,244
  • 23
  • 67
  • 115
7
votes
3 answers

Linking to a pdf file with html

LINK Here is my link I'm keeping my pdf file (path.pdf) in the resources folder and am trying to click this link to open the pdf. When I click it while running local the error is " Your file was not found It may…
WoodRobot
  • 71
  • 1
  • 1
  • 3
7
votes
1 answer

Getting VHosts working with EasyPHP

So I've been trying to setup vhosts on my new Windows 10 Installation with EasyPHP Devserver 16.1. I've modified etc/vhosts to include my new domain (mysite.local), which works, but still points to the default easyphp directory. So I modified…
Chris
  • 282
  • 5
  • 19
7
votes
2 answers

Extension method and local 'this' variable

To my knowledge this in a extension method is passed as a ref variable. I can verify this by doing public static void Method(this List list) { list.Add(default(T)); } List ints = new List(new int[] { 1, 2, 3, 4, 5…
Arthur Rey
  • 2,990
  • 3
  • 19
  • 42
7
votes
2 answers

Install Octave Package Manually

I want to install the package dataframe of Octave on one of my servers, which does not have internet access. I used my laptop to download dataframe-1.1.0.tar.gz. I wonder how I can install it on my server manually.
James
  • 98
  • 1
  • 1
  • 5
7
votes
3 answers

Git checkout -- recover lost files

I accidentaly deleted local file changes on git repository. They were NOT commited or even pushed. What I did: git status (then files not staged for commit showed and I accidentaly removed whole folder called "smdr" by this comand): git checkout --…
user4076384