Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
89 views

I added following and followers by using intermediate model, it's ok but does not correctly specify objects in the intermediate model. I expect the user who follows must to be in the user_from field ...
Samyar's user avatar
  • 35
3 votes
1 answer
58 views

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 ...
Emil Sahlén's user avatar
  • 2,162
0 votes
1 answer
110 views

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<...
Luca Ignatescu's user avatar
0 votes
1 answer
55 views

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?...
Nikos Angelopoulos's user avatar
1 vote
1 answer
116 views

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{}) // ...
JFFIGK's user avatar
  • 704
0 votes
2 answers
108 views

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 ...
Francisco Salas Igea's user avatar
1 vote
1 answer
74 views

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; ...
Athan Clark's user avatar
  • 3,988
0 votes
1 answer
44 views

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 ...
Vasily Liaskovsky's user avatar
0 votes
1 answer
154 views

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. ...
Saber Safdari's user avatar
0 votes
0 answers
92 views

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 ...
ohyeah2389's user avatar
0 votes
1 answer
72 views

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 ...
Taylor Brown's user avatar
0 votes
1 answer
235 views

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 ...
chaotic3quilibrium's user avatar
1 vote
1 answer
287 views

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 ...
Razi Syed's user avatar
1 vote
0 answers
214 views

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 ...
Miles's user avatar
  • 11
1 vote
0 answers
86 views

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 ...
holamynameisyes's user avatar
1 vote
0 answers
63 views

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 ...
Ruafel's user avatar
  • 33
1 vote
1 answer
73 views

Sorry if this is obvious; I'm new to Rpi and Linux in general. Im trying to create code for a timelapse camera such that when it turns on, it starts taking images and saves them to a folder. The part ...
Andrew Miller's user avatar
0 votes
1 answer
89 views

#include<stdio.h> #include<stdlib.h> struct Node { int val; struct Node *link; (*link).val = 12; // error }; int main() { struct Node *link=(struct Node*)malloc(sizeof(...
Rajdip0000's user avatar
0 votes
1 answer
138 views

This is something of a follow-up to a previous question of mine. TL;DR: I tried to create a self-referencing struct by heap allocating the self-referencee using a Box. It was pointed out that I can't ...
hjpev's user avatar
  • 771
0 votes
1 answer
453 views

I have following code for self-referencing entity @Data @Builder @EqualsAndHashCode(callSuper = false) @NoArgsConstructor @AllArgsConstructor @Entity @Table public class Dictionary implements ...
cane's user avatar
  • 1,057
0 votes
1 answer
224 views

I am trying to implement a self-referential struct in rust. Background I am writing a crate which is based on another crate. The underlying crate exposes a type Transaction<'a> which requires a ...
hjpev's user avatar
  • 771
0 votes
1 answer
349 views

I have this situation on a project Im working on, made in Symfony 5 and API Framework 2 (latest 2 version): we have a User entity App\Entity\User now users can be Reps or PAs for other users. Any ...
diogo.abdalla's user avatar
1 vote
2 answers
31 views

I'm trying to do a sort of running total with a variable window size. I want to sum a value from the current row to the last time another row met a condition. Mock Data: I want a formula for the last ...
Glen Hamblin's user avatar
2 votes
1 answer
130 views

How would one go about checking whether a given ID is within a hierarchy of IDs? For example, let's say I have the following hierarchies in a self-referencing table called locations (e.g. these are ...
rlarson's user avatar
  • 75
0 votes
1 answer
81 views

What is the best practice for such a relationship in regards to data consistency and performance? My first instinct was to add a new self-referencing column: ALTER TABLE Edata_auction ADD COLUMN ...
Anton Duzenko's user avatar
-1 votes
1 answer
709 views

I am trying to add value of cell A1 to cell A2. However, I want to keep adding A1's value to A2's current value because I want to keep some monthly record and that is represented by A2. I will keep ...
Awais Saeed's user avatar
0 votes
1 answer
210 views

I'm writing an A* algorithm for Rush Hour (game) in order to learn the basics. For that I wrote a class named Board, which instances also act as the 'nodes' for the A* search. For the algorithm to ...
Gabriel Balassa Turu's user avatar
0 votes
0 answers
66 views

I am working on a SQL Server 2016 database where I have recipes and ingredients stored in separate tables. The relationship between recipes and ingredients is stored in a junction table. I am using a ...
Santiago Jose Gianotti's user avatar
0 votes
1 answer
76 views

I have a struct, and want to define another struct that references its field. struct Tweet { text: Text } #[ouroboros::self_referencing] struct BorrowedText<Owner> { owner: Arc<Owner>,...
mq7's user avatar
  • 1,339
0 votes
1 answer
62 views

My lab rails new test1 -d mysql rails g scaffold User name rails g migration AddTeacherToUsers #add_reference :users, :teacher, index: true rails g scaffold Lab name user:references rails db:create ...
Patrick Su's user avatar
0 votes
1 answer
121 views

I want to reference to the history of the identifier in the same line. It is probably not possible this way. But it works in thinkorswim. I would want the signal either print +1 or -1 else print the ...
Martinko's user avatar
0 votes
1 answer
200 views

I need to build an index, where first I check if a string already exists in the store vector, or if not, add it to the store and get its position in it. Once done, I will need to consume the store, ...
Yuri Astrakhan's user avatar
2 votes
1 answer
207 views

My teacher gave us a homework to draw a class diagram using something like this class PersonRole{} class Employee{ isA PersonRole; } class Manager { isA Employee; 0..1 -- * Employee; } I know in ...
AmazingEgg's user avatar
4 votes
1 answer
1k views

I have this prisma schema model Directory { id String @id @default(cuid()) name String? parentDirectoryId String? userId String parentDirectory ...
Filip Pham's user avatar
0 votes
1 answer
77 views

Hello everyone Im having trouble coding the body for a function that consumes a compound data list of universities and produces the name of the university with the lowest tuition. The language is BSL ...
BTDN's user avatar
  • 3
0 votes
1 answer
100 views

How can I access a Python object by it's address that I get from id(self.__dict__)? The background is the following, I want to access one class instance from the other (both classes mimic custom ...
foobar's user avatar
  • 23
0 votes
1 answer
290 views

Given the code snippet below: use std::{io::BufWriter, pin::Pin}; pub struct SelfReferential { pub writer: BufWriter<&'static mut [u8]>, // borrowed from buffer pub buffer: Pin<...
Babur Makhmudov's user avatar
-1 votes
1 answer
80 views

This is the code I'm trying to run: class poly { public: int vnum; vrtx vrts[this->vnum]; }; (Note: The class name "poly" and other class "vrtx" are named ...
Angus McMillan's user avatar
0 votes
1 answer
255 views

Let's imagine we have a very simple AST for programming language with only functions and calls use std::sync::Arc; struct Function { pub body: Vec<Call> } struct Call { pub function: ...
gavrilikhin.d's user avatar
0 votes
2 answers
75 views

I am working on a Symfony 6.1 project and have the following situation. I have an entity called "MaterialGroup". A material group can be in a parent-child relation with itself so one ...
schwaluck's user avatar
  • 155
1 vote
1 answer
80 views

Quoted from vec::push implementation: pub fn push(&mut self, value: T) { // This will panic or abort if we would allocate > isize::MAX bytes // or if the length increment would overflow ...
user3698446's user avatar
0 votes
1 answer
39 views

I have these tables: Category: id, name, parent_id CategoryImage: id, url, category_id CategoryImageHistory: id, user_id, category_image_id parent_id of Category is a foreign key to another Category ...
nanakondor's user avatar
1 vote
1 answer
4k views

I am trying to create a single-column dynamic range and refer to it in the same column but all examples google throws up use the entire column, with the referencing cell in a separate column. I will ...
ruphz's user avatar
  • 31
0 votes
1 answer
203 views

I'm writing a hierarchy of classes of C++, let's say A, B inheriting A, C inheriting A, and D inheriting B. Now, all of these classes must have a method bar() &, whose body is: { A::foo(); ...
einpoklum's user avatar
  • 138k
2 votes
2 answers
221 views

I'd like to create a list data structure that can zipWith that has a better behavior with self reference. This is for an esoteric language that will rely on self reference and laziness to be Turing ...
Darren Smith's user avatar
0 votes
1 answer
975 views

I have a table that have a hierarchy structure with a parent having many children and a children having many parents. As an example the following struct: type User struct { gorm.Model Name ...
Manuelarte's user avatar
  • 1,904
0 votes
3 answers
180 views

Is it possible to initialize instances of classes with attributes that are dependent across (not in circular way)? Today, I use dictionaries instead of classes as follows: dictA = {'A1': 10} dictB = {'...
aeiou's user avatar
  • 447
0 votes
1 answer
89 views

Is it possible for a list in R to refer its own objects, while defining it? Example: ui_names <- list( gen_button = 'Generate Report', gen_description = sprintf("Press '%s' button to ...
Karol Daniluk's user avatar
0 votes
1 answer
130 views

I have to old scripts (V2) I want to modify only for myself and dont reach out anyone to help me out with my bad coding skills ;) The code looks that way: weight = s(abs(change(close))) c = weight * ...
Athenes's user avatar
0 votes
0 answers
64 views

The following class would not compile because it has an incomplete type for self-reference. class SelfRef{ using DependencyReference = std::array<SelfRef, 10>::const_iterator; public: std::...
Dávid Tóth's user avatar
  • 3,315

1
2 3 4 5
13