Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

C# - Desktop application - Restrict App self access to file explorer

I'm actually in a research phase for a personnal projet i'm thinking of and i have a question about a topic for which i can't seem to find an appropriate answer on the net. Context : A Desktop ...
Olrig's user avatar
  • 1
1 vote
2 answers
70 views

Troubleshooting Iterator-Like Concept Definition for Pointer-Like Iterators in C++

I am new in C++20. I’ve been refining a C++ concept, IteratorLike, designed to encapsulate the behavior of iterators. The concept checks for element access, iterator advancement, and end-of-sequence ...
燈火ヤ's user avatar
4 votes
2 answers
122 views

C++ template friend class does not satisfy conceptual constraints because it is an incomplete type

#include <mutex> #include <shared_mutex> template<typename T> concept is_buffer = requires (T t) { { t.pointer() } -> std::same_as<char*>; { t.capacity() } -> ...
gxglous's user avatar
  • 71
0 votes
1 answer
98 views

Data masking and when I need to use the Pick function

I am currently working through R for data science and I am confused as to when you use the pick function to deal with data masking. For example why does this work? grouped_mean <- function(df, ...
franklin ross's user avatar
0 votes
0 answers
66 views

Printing std::u8stream in std::ostream and a concept for checking it

In the codebase I have to support there is a concept checking that some type can be printed in output stream: template <typename T> concept OstreamFormattable = requires( const T& t, std::...
Fedor's user avatar
  • 19.9k
0 votes
1 answer
48 views

Concept with 2 type

I have a concept that check if the operator< is available to be used on 2 types: template<class T, class _T> concept LsOp = requires (T r, _T l) { { r < l } -> bool; }; And I wan't ...
DipStax's user avatar
  • 502
2 votes
1 answer
86 views

Distinguish one and two-dimensional container using concepts

I want to distinguish one and two-dimensional containers using concepts. My first try was the following: template<typename C> concept Container1D = requires(C c) { std::begin(c); std::...
wimalopaan's user avatar
  • 5,332
3 votes
1 answer
167 views

using concept to define same class with different concept

I want to create template class to get reference type and non-reference type template class with same class like below template <typename T> requires (std::is_reference_v<T>) ...
yi bruce's user avatar
19 votes
2 answers
1k views

How to do simple C++ concept has_eq - that works with std::pair (is std::pair operator== broken for C++20)

Compiler Explorer link template <typename T> concept HasEq = requires(T t) { { t == t } -> std::convertible_to<bool>; }; struct X {}; static_assert(not HasEq<X>); //bool a = ...
lewis's user avatar
  • 1,203
0 votes
1 answer
111 views

Python fucntions , how I should started the programming [closed]

So, I have question about the functions of python. Should I learn all combinations , for example math function in order to be a Junior programmer. Then for django developer must know how to work with ...
Шомухаммад шоабдуллаев's user avatar
0 votes
1 answer
54 views

Java POJO instanciate member as soon as it declaration

With my team we are refactoring an app and we're adding lombok to help writing (and reading) pojo class. There are differents issues with this refactoring and some of you may have hives after reading ...
bedomon's user avatar
  • 330
5 votes
2 answers
10k views

Good example of stateless and stateful components in React?

React - what is a good analogy to wrap my head around Stateful and Stateless Components? I had trouble going through this abstract concept during my bootcamp and I still struggle to comprehend that. ...
curious_orange's user avatar
0 votes
4 answers
896 views

Information on Flutter Bloc pattern to reuse the state and event classes

I am using flutter_bloc package for state management and extends with Equatable. I have made Event class and state class for the data to display which I receive from api. It is the simple app where I ...
Harry's user avatar
  • 274
3 votes
0 answers
252 views

Friend class template with a requires-clause

The following C++20 code is accepted by both clang and GCC but rejected by the Sonar static analyzer with "requires clause differs in template redeclaration": template <typename T> ...
Pavel Kirienko's user avatar
0 votes
1 answer
571 views

Visual Studio Community 2022 Identifier concept is undefined

I'm a beginner with C++ and VisualStudio Community 2022(v17.4.3) and started to familiarize myself with concept feature but got into trouble with build. I'm trying to run this code but build is failed ...
Dron4K's user avatar
  • 474
0 votes
0 answers
120 views

What is the point for using "Future" in Flutter while we do also have "asyn-await"?

I am new to Flutter coming from a JavaScript world. In JS we also use async-await mechanism for asynchronous programming. But I noticed that in Dart/Flutter there is another thing named Future that ...
best_of_man's user avatar
5 votes
1 answer
362 views

What happens when the name of a C++20 concept is the same as the name of a class type

Does C++ define the behavior of the following code: template <class T> concept C = true; struct C {}; template <C T> struct A {}; template <struct C T> struct B {}; int main() { ...
ValueError's user avatar
0 votes
2 answers
401 views

( NGRX : Angular 8+) Pagination for a list of vast amount of data coming from a rest api

I am very new to NGRX and I am in need of help to understand the below scenario. we have 70000+ rows in our database and we want to retrieve them using a REST API to perform the CRUD operations on ...
ishan's user avatar
  • 1
0 votes
1 answer
125 views

How to constrain a template to a specific type [duplicate]

I am trying out template programming in C++ where I programmed a template for matrix. template < typename T, unsigned int R, unsigned int C> requires StringOrArithmeticType<T> class ...
Code4Fun's user avatar
  • 137
3 votes
2 answers
297 views

What are the benefits of using `and` instead of `&&` when defining concepts? [duplicate]

I found that some CppCon speakers used and instead of && to define concepts and used && in "normal" boolean expressions, but I can't figure out the benefits of doing so. The ...
FeignClaims's user avatar
2 votes
2 answers
3k views

How to specify "master" and "worker" nodes when using one machine to run Kubernetes?

I am using an Ubuntu 22.04 machine to run and test Kubernetes locally. I need some functionality like Docker-Desktop. I mean it seems both master and worker nodes/machines will be installed by Docker-...
best_of_man's user avatar
0 votes
0 answers
264 views

Parent prop passed as child state not updating on parent prop update

I have recently come across situations where I want my child to re-render whenever the prop from the parent changes given the prop is passed as the initial value of state in Child. But it is not ...
Anjan Talatam's user avatar
0 votes
2 answers
197 views

C++ Concept: How to define this circular-dependent constraint?

I have two classes Communication and Handler. Communication is templated with the Handler it will use. template<HandlerLike THandler> struct Communication; where HandlerLike is a Handler that ...
Yuanyi Wu's user avatar
  • 329
0 votes
0 answers
29 views

What do you call the non-buisness logic of an application?

I am currently working on a project that can have a few UI and OS customization depending on the clients country. It affects things like logos, texts and small functionality. The core of the app ...
mic_drop's user avatar
5 votes
1 answer
3k views

What is cluster and node in RabbitMQ?

About RabbitMQ two concept is unknow to me, cluster and node ? what is different between them?
RezaRastgoo's user avatar
1 vote
1 answer
83 views

What does the bag exactly mean?

I am not sure whether it is a topic or concept in the whole web development context, but when it comes to Laravel, the Php framework, I faced with this word (bag, or error bag) number of times, but I ...
Mostafa islami's user avatar
3 votes
2 answers
264 views

C++20 concept fails to compile when template class object instantiated with value

Please refer to the following C++20 code: template<bool op> class Person { const bool own_pet; public: Person() : own_pet(op) {} consteval bool OwnPet() const { return own_pet; } ...
Donotalo's user avatar
  • 13k
-2 votes
1 answer
33 views

What type of a value (or data) is stored in a variable having a datatype of the same name as its parent class name?

In the following code snippet: class Node{ Node next; String data; Node(String data){ this.data = data; this.next = null; } } What kind of data is being stored in the ...
Udbhas Dutta's user avatar
1 vote
1 answer
188 views

Why do we use two different loop variables while sorting an array using merge sort?

I was learning to merge sort an integer array, when I noticed that while copying the sorted array elements to the original array, we need two separate loop variables to run simultaneously, while the ...
Udbhas Dutta's user avatar
2 votes
2 answers
53 views

Delegate protocol implementation on Swift (kinda conceptual)

I came across this scenario today and wondered if something like this already exists: a built in way to automatically delegate a protocol implementation in Swift. I know it'd be only syntax sugar on ...
Mik's user avatar
  • 41
0 votes
1 answer
29 views

function calls during recursion

Suppose, in a recursive problem, we call the function as follows: class MazePaths{ public static int countPaths(int n, int m, int i, int j){ // base cases if(i == n-1 && j == m-1) // ...
Udbhas Dutta's user avatar
0 votes
3 answers
476 views

How can i get to a bot to respond to dms

So working with discordjs and was wondering if it is possible to have my bot respond to commands sent in dms with the bot is there a way to listen to DMs? Example: user DMs the bot with !test and the ...
Exiled Pho's user avatar
0 votes
1 answer
916 views

std::integral not found in clang13 c++20 error

i try to learn c++20 concepts my compiler version is "Clang 13" i try to compile very simple code block but i got errors following. "error: no type named 'floating_point' in namespace '...
Radem's user avatar
  • 29
1 vote
1 answer
57 views

test class type without specifying template argument in c++20 [duplicate]

I would like to select instance by type while iterating via std::apply in a std::tuple. Since I have multiple times the same class in my tuple I can not just use std::get Is there a way to express ...
Deub's user avatar
  • 23
0 votes
2 answers
271 views

How to use four numbers to decide an unique number ID?

I want to have a rectangle in the coordinate, and use X, Y, W, H to represent that. Is that possible to use four numbers(X: 102, Y: 45, W: 13, H: 55)to decide a unique ID, the ID should be uint256, ...
leojail's user avatar
  • 349
0 votes
1 answer
273 views

Struggling with the concept of middelware - Is a middleware an independent process or part of an application?

Im struggling to understand the concept of a middleware. Is a middleware at runtime something that runs independent from an application and has to be called via a socket (or any other way to make a ...
user234234234's user avatar
0 votes
1 answer
134 views

how set airflow DAG Concept scheduling

I'm trying some airflow DAG Schedule. I scheduled like below code. Task1 >> [Task2, Task3] >> Task4 Then, i expected running Task4 once, when finished task2 and task3. but.. i think... ...
박현균's user avatar
0 votes
0 answers
56 views

Content Provider - Usage

I have never worked on content providers. so, I have a basic definition kind of knowledge about it. All I know about them is, Content Providers manages access to a structured set of data. and, it ...
Dhara Vamja's user avatar
2 votes
2 answers
353 views

template class method specialization using concepts

There is a template class A with template parameter T. I want this class to have a method f if T is of integral types. The class A also has a lot of other methods, so I don't want to have ...
Maksim Surov's user avatar
0 votes
0 answers
45 views

how to form the combinations of different notes that add up to 4 which is given by the user?

You are given some amount of money and notes of different values, determine how many ways notes can be organized to get the same amount of money. Each note is available in abundant quantity so that it ...
Yogesh Singh's user avatar
2 votes
1 answer
233 views

implement a C++20 concept

How can I programatically implement a concept as if it were an actual "interface"? For example, I was trying recently to write a contigious iterator for a custom container. And because ...
modanashar's user avatar
2 votes
2 answers
456 views

Concept-restricted range-based for loop of std::list<std::reference_wrapper<T>>

I have some class Foo and a std::list<std::reference_wrapper<Foo>> and would like to iterate over its elements with a range-based for loop: #include <list> #include <functional>...
Maximilian Keßler's user avatar
0 votes
1 answer
100 views

Why do clients broadcast an endorsed transation instead of the peers doing it themselves?

I have a conceptual question. The normal transaction lifecycle involves: A client sending a transaction to a few peers. The peers simulate it and endorse it. The endorsement is sent back to the ...
Tejas Sanap's user avatar
3 votes
1 answer
490 views

C++ Concepts Compound Requirements without noexcept and return-type-requirement vs Simple Requirements

template<class T> concept C1 = requires(T a, T b) { a + b; }; template<class T> concept C2 = requires(T a, T b) { { a + b }; }; Would there be a difference between C1 vs C2 functionally? ...
rencedm112's user avatar
0 votes
2 answers
450 views

How Can I Get Value_Type on both value and pointer by using template in c++?

template<class T> struct TypeInfo { using value_type = is_pointer<T>::value ? T * : T; }; This code is just pseudocode. I wanna find value type for each pointer and value. ...
sunkue's user avatar
  • 278
1 vote
1 answer
256 views

Trouble defining a Nim concept with an auto type inside

I'm having trouble defining a concept with an auto type inside. It looks like Nim is complaining that type T = auto becomes untyped. Here is a minimal example (run it online here) taken basically from ...
schneiderfelipe's user avatar
2 votes
0 answers
129 views

Specify output_iterator concept as function argument within a concept

I am trying to write some example of a concept that requires implementing a "read" method. This "read" method would take a number of bytes to read and an output iterator to write ...
domtop's user avatar
  • 51
1 vote
1 answer
872 views

Clean static interface with C++20 concepts

I was trying to create a static interface using C++20 concepts, and the following code seems to do the job: template <class FOO> concept FooConcept = requires { static_cast<void (FOO::*)(...
fdev's user avatar
  • 167
4 votes
1 answer
422 views

Bug in C++20 concepts with template member functions and std::invocable

I was experimenting with C++20 concepts and the Eigen library, and I incurred an unexpected behavior. Specifically, consider the following concept requiring a type to be callable with either an Eigen::...
fdev's user avatar
  • 167
2 votes
1 answer
436 views

Azure RBAC Custom Roles

I am currently trying to work out a concept for a roles and rights concept. Azure RBAC already has a few built-in roles but I am trying to create a few more custom roles. Are custom roles directly ...
kjnns's user avatar
  • 21

1
2 3 4 5 6