611 questions
3 votes
1 answer
58 views
Storing Future next to source of said Future
I have a type which semantically behaves like a stream but doesn't actually implement the futures_util::Stream trait. Instead, it has a method get_next which repeatedly returns a Future yielding the ...
0 votes
1 answer
95 views
Avoiding Self Referential Structs
I'm writing a program that operates on a Vault object. This Vault object contains a directories field which is a vec of Directory objects. So something like this struct Vault{ directories: Vec<...
0 votes
1 answer
53 views
Self-reference entities SaveChanges failure!! Am I missing something?
I have an entity public class ExpenseCategory { public int Id { get; set; } public string Label { get; set; } = string.Empty; public int? ParentId { get; set; } public ExpenseCategory?...
1 vote
1 answer
104 views
Create 'static Stream from a Stream which is lifetime-coupled to its source
I have a certain API I have to use: struct API; struct Ctrl; impl API{ fn get_stream(&self) -> (impl Stream<Item = i32> + '_, Ctrl) { (futures::stream::iter(1..=5), Ctrl{}) // ...
0 votes
2 answers
105 views
self-reference mutate in R
Hellow, I'm trying to build a tibble by a mutate operation that needs a self reference filter. My objectie is to get the maximum value of a variable for all the available values of that variable that ...
1 vote
1 answer
67 views
Prevent self-referencing relation in SurrealDB
I am trying to apply the table permissions system SurrealDB offers to enable row-level security in its tables, but am seeming to fail with a simple example: DEFINE TABLE node SCHEMAFULL TYPE NORMAL; ...
0 votes
1 answer
42 views
How to override only method signature in typescript?
A have an external array-like interface I want to implement interface ListOf<T> { readonly length: number; readonly [index: number]: T; item(index: number): T | null; // note the parent ...
0 votes
1 answer
146 views
Self relation in C# [duplicate]
I have a class called Person that has an attribute called friends from which is a list of type Person. Actually, I am going to create a many-to-many relationship between the Person class and itself. ...
0 votes
0 answers
83 views
Self-referential pointer to field inside of same ctypes structure doesn't output usable type
I'm trying to recreate this structure (from https://github.com/ac-custom-shaders-patch/acc-extension-config/wiki/Other-Things-%E2%80%93-Custom-AI#drawing-debug-lines)... struct cai_debug_lines { int ...
0 votes
1 answer
68 views
How can an `extension` reference the type of `this` in dart?
Let's say I have some datatypes, and I want a function gimmeThis() that simply returns this. Currently, the code in main() does not compile, because the result of gimmeThis() is MyClass. How can I ...
0 votes
1 answer
234 views
How can I create a tail recursive merge method in Scala on a self-referential tree structure (or is it even possible)?
UPDATE 2024.03.16: Provided code that produces the correct output, but is still not tail-recursive. How can I create a tail recursive merge method in Scala on a self-referential tree structure (or is ...
1 vote
1 answer
269 views
Why self-reference a column from the same table in a SQL subquery?
I'm working on subqueries in the Google Data Analytics Course. There are many places you can rent bikes from. These places are bike stations. The query is to calculate the difference between average ...
1 vote
0 answers
213 views
How to nicely solve self-referencing object update error?
In my project I have a bunch of models, that are all derived from the class 'Entity'. Simplified, this means they all have the following properties: public Guid Id { get; set; } public DateTime ...
1 vote
0 answers
85 views
C convert array to a arguments for a function [duplicate]
I have a list of arguments of different types: value_info args_array[10]; value_info is defined as follows: typedef int int_type; typedef float float_type; typedef double double_type; typedef bool ...
1 vote
0 answers
62 views
Declaring a variable of self-referencing generic type in C# 10.0
Good time of the day! I have a generic interface which has a self-reference: public interface IBuilder<TObject, TBuilder> where TBuilder : IBuilder<TObject, TBuilder> { public ...