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
23
votes
4 answers

In Perl, why does the `while() {...}` construct not localize `$_`?

What was the design (or technical) reason for Perl not automatically localizing $_ with the following syntax: while () {...} Which gets rewritten as: while (defined( $_ = )) {...} All of the other constructs that implicitly write…
Eric Strom
  • 39,821
  • 2
  • 80
  • 152
23
votes
1 answer

Run git server on local network

I have a small company, for managing project I want run a git server in my company (local). How can I install git server on our local windows server? I want my programmers can use git commands to connecting to this server.
MajAfy
  • 3,007
  • 10
  • 47
  • 83
23
votes
7 answers

Is there any use for local function declarations?

Most C++ programmers like me have made the following mistake at some point: class C { /*...*/ }; int main() { C c(); // declares a function c taking no arguments returning a C, // not, as intended by most, an object c of type C…
Tobias
  • 6,388
  • 4
  • 39
  • 64
22
votes
1 answer

How to create a local read-only variable in bash?

How do I create both local and declare -r (read-only) variable in bash? If I do: function x { declare -r var=val } Then I simply get a global var that is read-only If I do: function x { local var=val } If I do: function x { local…
bodacydo
  • 75,521
  • 93
  • 229
  • 319
21
votes
1 answer

local function inside PL/SQL script

I'm trying to execute this code in Oracle 10 SQL Developer: FUNCTION is_valid_date (p_val in VARCHAR2, p_format IN VARCHAR2 ) RETURN numeric IS l_date VARCHAR2(100); BEGIN l_date := TO_date( p_val, p_format ); RETURN 1; EXCEPTION …
user1630809
  • 522
  • 1
  • 3
  • 13
21
votes
1 answer

Proposal for local data declarations / instances

I'm curious, and have been unable to find a proposal for something like this in Haskell. Consider if sort had been written but not sortBy. sortBy :: forall a. (a -> a -> Ordering) -> [a] -> [a] sortBy f = map getX . sort . map X where …
luqui
  • 59,485
  • 12
  • 145
  • 204
21
votes
2 answers

npm won't install packages locally. What's wrong?

I want to install packages locally, but npm is always installing packages to the global location. I'm running the following command: npm install serialport I do not have a .npmrc command and I'm not using the -g flag, so I don't know why it's not…
user1449536
  • 301
  • 1
  • 3
  • 7
20
votes
5 answers

ruby: how to load .rb file in the local context

How this simple task can be done in Ruby? I have some simple config file === config.rb config = { 'var' => 'val' } I want to load config file from some method, defined in main.rb file so that the local variables from config.rb became local vars of…
disfated
  • 10,633
  • 12
  • 39
  • 50
20
votes
3 answers

Installing packages in a local directory

What is the best practice to install packages (those with go get...) in a local directory? Example: I'd like to try out the Revel web framework, but I don't want to clutter my go installation at /usr/local/go. Normally I'd say sudo go get…
topskip
  • 16,207
  • 15
  • 67
  • 99
19
votes
1 answer

indexedDB Creating a database and adding content Failed to execute 'transaction' on 'IDBDatabase'

This is the first time for me to use indexDB, I've created a database and now trying to add content to it. But I'm getting the following error. Uncaught NotFoundError: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object…
Ryan
  • 271
  • 2
  • 3
  • 7
19
votes
7 answers

Copying MongoDB Database into Local Machine

I have a MongoDB database that resides on a remote server machine whose IP address is 192.168.1.20 on a local network. For development and testing purposes, and since I am not allowed to modify or delete the database on the server for security…
Razor
  • 2,581
  • 6
  • 21
  • 27
19
votes
3 answers

Is there a gcc flag to initialise local variable storage?

The IBM AIX xlc compiler offers a flag that generates code to initialise local variable storage: initauto= Initialialize automatic storage to . is a hexadecimal value. This generates extra code…
Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
18
votes
6 answers

How to disable maven release plugin check local modifications?

I use maven release plugin. In my pom exists and Ant task that automatically fix some properties files with additional information. This fixes should not be in SCM. But maven don't finish with success for error: Cannot prepare the release because…
user710818
  • 23,228
  • 58
  • 149
  • 207
18
votes
5 answers

Why are my custom process.env not working within dotenv?

Learning that it is a bad practice to include API secret keys I've done some research and trying to learn how to create custom process.env. After reading: Node.js Everywhere with Environment Variables! How to set NODE_ENV to production/development…
DᴀʀᴛʜVᴀᴅᴇʀ
  • 7,681
  • 17
  • 73
  • 127
17
votes
2 answers

How does local() differ from other approaches to closure in R?

Yesterday I learned from Bill Venables how local() can help create static functions and variables, e.g., example <- local({ hidden.x <- "You can't see me!" hidden.fn <- function(){ cat("\"hidden.fn()\"") } function(){ cat("You can…
David Lovell
  • 852
  • 6
  • 17