Skip to main content
The 2024 Developer Survey results are live! See the results

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
46 views

How to return a reference with lifetime from RefCell? [duplicate]

For example, I have the next structure: struct MyStruct { items: RefCell<HashMap<i32, SomeStruct>>, } impl MyStruct { fn new() -> Self { Self { items: ...
Denis Steinman's user avatar
0 votes
0 answers
79 views

Is it possible to merge a referenced query to it's source query in Power Query (Power Bi)?

Power Query doesn't let me merge a query to it's source query. I tried merging both tables but the reference table doesn't show up as an option of tables to be joined. The referenced query is a ...
Filipe Oliveira's user avatar
1 vote
1 answer
51 views

Error returning a reference of an std::unordered_map with an std::unique_ptr

I'm wondering why do I have this error compiling the following example code: #include <unordered_map> #include <memory> class OneClass { }; using TestUnorderedMap = std::unordered_map&...
rbarreiros's user avatar
0 votes
1 answer
48 views

Google Sheets Cell Reference Shifts When Deleting Column

I have a simple sheet where each column references the column before it. It is meant for a progressive budget to predict interest patterns. Essentially, it follows this pattern: Cell C2 has a ...
Chris Moretti's user avatar
0 votes
0 answers
9 views

PYGTK: Referencing an existing object instance from another object?

I am trying to return an instance of an object to another object something like this: `class object1(): attrib = '??' def obj_instance(self): return self class object2(): obj1 = ...
user1650586's user avatar
2 votes
1 answer
65 views

Rust why does operator applied to a reference coerce, but let with an explicit type does not?

Consider the following code: fn main() { let foo = 1; let bar: i32 = -&foo; //ok, -1 let baz: i32 = &foo; //error, expected `i32`, found `&{integer}` let bad: i32 = !&...
Some Name's user avatar
  • 9,347
0 votes
1 answer
71 views

Bad design for Rust program with lifetime and multiple references

I am implementing a graph data structure in Rust. For each node (and also edges - omitted from this snippet) in the graph I have a struct Algorithm (perhaps poorly named) that performs some node and ...
RedPen's user avatar
  • 261
4 votes
1 answer
290 views

How to handle "reference to packed field is unaligned" error?

I am revisiting old code and am now encountering an error (synthetic recreation): error[E0793]: reference to packed field is unaligned --> src/main.rs:9:22 | 9 | println!("{:?}", ...
kmdreko's user avatar
  • 55.5k
1 vote
3 answers
54 views

How can I reference the active cell within a loop through different sheets?

I am stuck where it is properly reading that I have two rows that fulfill the "If" condition, but it is copying row 1 both times on separate sheets, rather than row 8 and 10. Is there a way ...
Coding1's user avatar
  • 13
1 vote
3 answers
70 views

Function overload resolution for template type parameters with respect to references and pointers

I've been working on some code as an exercise. template <typename T> const T& larger(const T& a, const T& b) { std::cout << "Calling larger(const T&, const T&)&...
Mutating Algorithm's user avatar
0 votes
0 answers
26 views

Find the address of the hyperlink in a cell in excel with the VB code?

I am using following code to find the address but am unable to find the cell reference For i = 5 To lastRow ' Assuming row 1 is header ' Get the cell containing the hyperlink in column S Set ...
Babar's user avatar
  • 11
0 votes
1 answer
82 views

Size of a Kotlin class that contains custom objects as it's data members

I understand that in Kotlin(or Java) an object is a referenced type. i.e. private var Object1: Obj1? = Obj1() Here var Object1 is a reference(8 bytes) to the instance of class Obj1(on Heap). Thus, If ...
Jatin guglani's user avatar
0 votes
0 answers
45 views

a function returning a dereferenced pointer has type reference? [duplicate]

In the code repository I am working on, I found the following function: const Type & (int n) { ... return *this; } A dereferenced pointer of type * Type has type Type. How can this function have ...
Svalbard's user avatar
  • 192
-1 votes
1 answer
80 views

Handle invalid variable name error in bash indirect references

Take a look at this simple example: x="foo bar" echo ${!x} It erros: -bash: foo bar: invalid variable name. I'm writing a script where a positional argument will indicate a "color name&...
Shayan's user avatar
  • 788
0 votes
0 answers
32 views

Doxygen: show refs to file

I want to show references to a file in doxygen documentation. SETUP I have three files in a directory: main.c, req.yml and dox.cfg main.c content: #include <stdio.h> /** * @brief This function ...
Yetam's user avatar
  • 1

15 30 50 per page
1
3 4
5
6 7
1153