Skip to main content
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
95 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
53 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
104 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
105 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
67 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
42 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
146 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
83 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
68 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
234 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
269 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
213 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
85 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
62 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

15 30 50 per page
1
2 3 4 5
41