Questions tagged [scope]

In computer programming, the scope of an identifier is the part of a computer program where the identifier, a name that refers to some entity in the program, can be used to find the referred entity.

9 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
533 views

See the Progress of the Powershell Jobs you are running

This code allows you monitor the progress of the Powershell Jobs you just started. One of the key features is the ability to stop the other Jobs when 1 is failed. For example, if you are running some ...
4
votes
0answers
91 views

Angular controller scope inheritance vs service

On my site I have a navbar component that I want to customize for each and every ng-view I end up loading. Currently I'm doing ...
2
votes
0answers
139 views

Create an isolated dependency scope with “overrides” in Asp.Net Core

Some of the classes in my multi-tenant Asp.Net Core application depend on database repositories which in turn depend on a delegate called GetCurrentTenantKey. In ...
2
votes
0answers
445 views

Memory release after joblib.Parallel [python]

Stuck with the issue with memory consumption - after running joblib's Parallel, deleting results and gc.collect() -ing I still have increased memory (checking by htop for process line). Found no way ...
2
votes
0answers
135 views

“Multi” scope guard using template argument deducing feature

Using modern C++ feature template argument deduction for class templates and folding expressions it is possible to implement "multi" scope guard utility, which have right order of functor calls: <...
1
vote
0answers
86 views

Polling an SFTP server to list files in a directory

When is it better to instantiate the sftp client globally vs inside a function as shown below? What considerations favor one method over the other? For a long ...
1
vote
0answers
45 views

Fake closure to provide variable scoping in SASS

For some time I've wanted a way to provide private scope to variables, functions, etc. that needed to be used across multiple separate selections. As far as I'm aware there is no official solution for ...
1
vote
0answers
54 views

Eloquent Scope and Normal Way

I read the documentation part of Eloquent, especially scopes: Scopes allow you to easily re-use query logic in your models. To define a scope, simply prefix a model method with scope: And so, with ...
0
votes
0answers
24 views

Reuse of a gRPC server connection object in Go

Friends, I'm attempting to use a single grpc.ClientConn variable with multiple HTTP handlers in a main go package. Is it okay to have a package scoped connection variable? I'm not mutating the value ...