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
17,280
questions
1
vote
2
answers
54
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(...
0
votes
0
answers
17
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 ...
-3
votes
0
answers
74
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 =...
0
votes
1
answer
20
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: ...
0
votes
0
answers
15
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 ...
0
votes
0
answers
11
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 ...
0
votes
1
answer
77
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 ...
3
votes
1
answer
94
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);
}
...
0
votes
0
answers
14
views
Suprema BioMini with C# - where should UFLicense.dat be put?
I'm developing a C# application using the BioMini SDK for fingerprint scanning. When running my application, I encountered the following error:
Exception thrown: 'System.DllNotFoundException' in ...
0
votes
0
answers
77
views
"Unable to Create App State Field 'saveforlater' with Document Reference Data Type in Flutter Flow"
Story
In my Flutter Flow project, I'm working on implementing an app with functionality similar to a shopping cart. I have successfully implemented the "Add to Cart" feature, but I am ...
0
votes
1
answer
72
views
Public static class and methods not found in NuGet package
I'm running into an odd issue where I've developed a NuGet package. Because of the architecture of the legacy software I'm trying to write new functionality for, this is in .NET Framework 4.6.1 (I ...
0
votes
0
answers
55
views
Why doesn't std::array<T,N>::operator[] return an rvalue reference for rvalue object? [duplicate]
std::array<T,N>::operator[] always returns an lvalue reference (const if needed), but what can possibly be the use of a line of code like this, which is valid C++?
std::array<int,1>{1}[0] =...
1
vote
1
answer
49
views
A question on Rust trait/struct lifetime bounds coercion
I have recently stumbled upon a lifetime coercion issue that I am unable to resolve. The minimal reproducible example which I think stems from the same problem is the following:
const MACGUFFIN: i32 = ...
0
votes
0
answers
44
views
creating a cell reference with a fixed column name and the line # from a value in a different cell
I have a workbook with data from multiple years in separate worksheets. On my summary worksheet I am using the following formula, plus multiple similar formulas, to analyze data: =AVERAGE('2024:2014'!...
6
votes
1
answer
91
views
Returning const reference from lambda stored as std::function segfaults [duplicate]
Here is the code:
#include <vector>
#include <functional>
class TestClass {
public:
const std::vector<int> &getStuff() const {
return callback();
}
protected:
...