Skip to main content

Questions tagged [reference]

A reference is a value that enables a program to indirectly access a particular datum, such as a variable or a record, in the computer's memory or in some other storage device.

reference
0 votes
1 answer
15 views

Modify the values in a (global) list of dictionary without reference

I'm new to python - being an educator trying to write to python script to score student's performance downloaded from an online polling platform. I've solved most problems until something like this: I'...
Chris H's user avatar
0 votes
0 answers
60 views

Confusion regarding addresses and references in C++. What are the data types of addresses and references respectively? [duplicate]

I understood that the & operator is context dependent, int var = 5; int* ptr = &var; In the above code, &var returns the address of var, then gives it to the pointer. On the other hand ...
Anjonimus's user avatar
0 votes
0 answers
9 views

Visual Studio Code - code reference break if I use path.join to specify imports (nodejs) [duplicate]

I am trying a more centralized way of specifying the import paths in nodejs, by using core path module. Problem is that when changing from code A to code B specified below, Visual Studio Code stops ...
Linton's user avatar
  • 7
0 votes
1 answer
34 views

The type or namespace name 'iOSBackgroundService' could not be found

Error Message : The type or namespace name 'iOSBackgroundService' could not be found I have created new class named iOSBackgroundService in Platform -> iOS. But I cannot inject it in the maui ...
Galaxylokka's user avatar
-2 votes
0 answers
20 views

How to fix errors that suddenly appeared without any changes occurring? [closed]

I am writing a web application in vsc, using .net and react. Everything works well, but suddenly while I was looking through files I got few errors: The type or namespace name 'DbSet<>' could ...
Dorm's user avatar
  • 1
1 vote
1 answer
123 views

Is it possible to initialize a struct reference with an array?

Is it possible to do something like this?: struct S { int length; char data[100]; }; class C { uint8_t buffer[10]; S& s = buffer[0]; }; If I use pointer it compiles, but working with ...
Maple's user avatar
  • 251
5 votes
2 answers
146 views

Python object creation behavior

Coming from Java, I have trouble understanding how objects are allocated in Python. Consider this Python script: x = ("a", "b") y = ("a", "b") print(x is y) # ...
Mohammad Javad's user avatar
0 votes
2 answers
97 views

Why this constant struct can be modified in this way?

Recently I encounter the following code, it is an excerpt from tutorial of open-source package AMReX text Array4<Real> const& a = fab1.array(); Dim3 lo = lbound(a); Dim3 hi = ubound(...
Xeh Deng's user avatar
0 votes
0 answers
74 views

JavaFX: setting list for comboBox does not work

I am working in a JavaFX project. There I have fxml included in other fxml files. Now I need to send data from the outer controller to the inner controller. I've tried it, but the combobox looses its ...
PalBeron's user avatar
-3 votes
0 answers
106 views

Are pointer variables sometimes faster to initialize than reference variables?

Let's say just for acquiring the MEMORY-ADDRESS and VALUE of some variable. If the variable is "nested" in pointers like so: int val = 10; int *ptr1 = &val; int *ptr2 = ptr1; int *ptr3 =...
ZenPyro's user avatar
  • 95
0 votes
1 answer
27 views

How to tweak font size and position of reference in quarto revealjs slide

This is my example code: --- title: "test" format: revealjs: footer: Institute of | Tarjae --- <!-- Style and format of footer --> <style> .reveal .footer { display: ...
TarJae's user avatar
  • 78.1k
0 votes
0 answers
34 views

Cannot find package 'aws-sdk' imported from /var/task/index.mjs

i am getting this error even after having the correct configuration using nodejs 18 { "errorType": "ReferenceError", "errorMessage": "require is not defined ...
software's user avatar
0 votes
0 answers
13 views

Error to find references in Visual Studio 2019

I noticed that every time I open a cloned project in a new environment (with Visual Studio 2019), the project cannot find the references it uses. I know that I can add the references again to solve ...
Thiago Moura's user avatar
0 votes
1 answer
81 views

How can I pass a reference to a closure in Rust?

I am using wry to spawn a few web views. Each view has a on_page_load_handler. Inside the handler I need to access the web view to e.g. navigate to another website. Sadly I fail to pass the web view ...
user3563584's user avatar
3 votes
1 answer
101 views

Why does `Option::map` work with immutable data, but not with mutable data

Why does the immutable version in the following example work, but the mutable version does not compile with error error: lifetime may not live long enough? trait Car { fn honk(&self); } ...
puaaaal's user avatar
  • 330

15 30 50 per page
1
2 3 4 5
1152