17,664 questions
0
votes
0
answers
35
views
How to keep an add on Python debugger function to stay in scope
After trying Lavi Kumar's example it seems the package import pdbext.debug in ~/.pdbrc goes out of scope when another source file is called.
~/.pdbrc:
!import pdbext.debug
alias pl !pdbext.debug....
7
votes
6
answers
2k
views
C program: Use an array outside the scope it was defined in
I have some code in which an array of strings is defined in a conditional statement. The array is out of scope where I need it. So I defined another pointer in the outer scope. In the conditional ...
1
vote
1
answer
85
views
In Ansible YAML, how do I pass different variables to an include_tasks to make it reusable?
I have a workflow where I download a file, do some stuff to it, upload it, and then download it again to verify that the changes took place. I want my download logic to be in a reusable YAML file that ...
3
votes
3
answers
119
views
Dynamically create .NET buttons, with button pressed return its name, or other unique identifier
I am trying to dynamically add buttons to a list, and have $Button (or another variable) be set to whatever is clicked (No OK/Cancel button needed).
The below code creates the buttons, and resizes the ...
-5
votes
1
answer
117
views
Python 3 changes variable even after if condition fails [closed]
I have a kaggle notebook(link here). The notebook iterates over a list of number(candidate_max_leaf_nodes) and then gets a mae for each number by massing it as a parameter(ignore the other parameters) ...
2
votes
1
answer
99
views
Pass borrowed ref cell value into function trait
I'm working on an ECS system, but in order to iterate across pairs of queries, I need to be able to fetch components only for a limited scope when executing a system. To do this, I'm trying to make a ...
0
votes
0
answers
52
views
Can Facebook Webhooks notify follower count changes on a Page?
Limite de débit de l’application
We would like to monitor in real time the changes in the number of followers (subscribers) of a Facebook Page.
Is there a Webhook field that allows receiving a ...
0
votes
1
answer
78
views
Avalonia UI style scope propagation
I'm having some issues in defining styles of my items. Or actually in the scope of the styles I set. My question is how do I make sure, that a style I'm setting is not propagated for the elements of ...
0
votes
1
answer
108
views
Having issues with function scoping and generally how the browser JavaScript engine executes JavaScript code [duplicate]
First I linked two JavaScript files to my HTML
<script src="script.js"></script>
<script src="main.js"></script>
On the first file ( the "script.js&...
1
vote
0
answers
53
views
plibsys data structures give incorrect results
I am trying to put together some code to find duplicated files between two or more directories, for this
I am using C libs like tinydir, and plibsys, the idea is traverse dirs get the hash of every ...
4
votes
2
answers
155
views
What is the difference between an enumeration constant and an enumerator?
In C17's final draft N2176,
in the 1st paragraph of 6.2.1 it says
member of an enumeration is called an enumeration constant.
in the 7th paragraph 6.2.1 it says
Each enumeration constant has scope ...
0
votes
0
answers
94
views
Trying to act on objects from a separate view SwiftUI SceneKit macOS 'cannot find ** in scope'
I have an app using SceneKit in a SwiftUI framework, and I am trying to properly organise my views by defining a separate view for the interface panel as an ZStack overlay.
I have moved the buttons (...
1
vote
1
answer
98
views
Why does Import-Module import into the calling module's scope, while New-PSDrive creates a drive in the scope which called the module?
Per Import-Module's -Scope parameter documentation:
By default, when Import-Module cmdlet is called from the command prompt, script file, or scriptblock, all the commands are imported into the global ...
2
votes
1
answer
83
views
How do I fix a Powershell problem with button selection?
I used ChatGPT to generate the code to understand how to do it myself, and it mostly works. The script is to check my TV & Movie folders for missing files to make Plex work better (folder.jpg, ...
1
vote
1
answer
57
views
Attaching inner functions that use the same random number to related button click events js
I'm working on a game that will take a random object, and use that same random object for a series of questions/functions. I'm having trouble getting the next piece of code to run after clicking the &...
-2
votes
1
answer
56
views
Is there a way to use a function which references an object that in turn references that function? [closed]
I'm working on a practice game that uses an array of objects (plants) that will be chosen randomly. Questions are asked about light and water requirements, winning or losing the plant and moving onto ...
0
votes
0
answers
63
views
Flutter web app requesting Google Calendar scope, and Google Cloud verified, but still shows unverified in web
I have a Flutter web and android app using google calendar api, create/edit/delete a calendar for the app's own use. I use googleapis package, and chose "calendarScope" to access google ...
-2
votes
1
answer
123
views
How to make script-level variables private to the script [duplicate]
Is it possible to declare a global variable that is invisible to the importing script?
For example, in script a.py I have a variable var_a that is accessible to any function in a.py. However, in ...
3
votes
2
answers
159
views
Shadowing an iterator inside a for loop has undefined (?) behaviour in C
When shadowing i inside the for loop, the following code
#include <stdio.h>
int main()
{
for (int i = 1; i < 5; i++) {
printf("%d", i);
int i = i;
...
2
votes
0
answers
62
views
Why does Rust scope include the else of an if conditional as well? [duplicate]
I have the below min repro application which is meant to build a graph (tree) from a vec (split string). (It is meant to be part of a larger loop that would modify the graph/tree multiple times.)
The ...
0
votes
0
answers
43
views
CMake variable CMAKE_C_COMPILER_VERSION set but later value lost
So I have a number of CMake files - and I am trying to refactor many common things across multiple projects.
One example is we turn on features due to the compiler version (GCC)
I am having problems ...
0
votes
1
answer
176
views
Problem with method visibility in a trait in Rust [closed]
I'm working on a Rust project and have a trait called Auth with an asynchronous method auth_login. The issue I'm facing is that when I try to make the method accessible from other modules using pub, I ...
0
votes
0
answers
23
views
Why can't I access the property of an object from a function located in an array of functions [duplicate]
shouldn't it be able to access the object "something"?
var problem = {
something: {thing:23},
somethingElse: [function(){return this.something.thing}]
};
console.log(...
0
votes
0
answers
27
views
Using won't work but direct reference will
A website I built 10+ years ago for a fishing club needs a few changes. I haven't changed the site for 5+ years and am immediately getting build errors when it compiled fine under VS 2017 - but won't ...
0
votes
0
answers
113
views
How to remove 'with' from this method
Here is the function in question:
/**
* @el [Element] Target HTML Element
* @attr [String] attribute to bind
* @match [Object] Result from regex.exec
*/
const bindValue = (el, attr, match) => {
...