1,275 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
3
votes
2
answers
199
views
Problem with satisfying a C++ concept in a std::visit
I've a C++ concept where I need to check that the class has a particular public attribute.
My problem is that the concept works if I use it directly, but fails if I use it in std::visit.
This is the ...
0
votes
1
answer
73
views
What is "freezing" and how to declare a vector of variant record type?
I've written the next piece of code in order to declare a vector of lexical elements:
type Lexical_Element_Kind
is (
Delimiter, -- & ' ( ) * + , - . / : ; < = > |
-- => .. ...
0
votes
0
answers
49
views
Query Variant Data Type with Pyspark (Spark 4.0)
I use Spark 4.0 and have the following code
from pyspark.sql import SparkSession
from pyspark.sql import functions as F
from pyspark.sql.types import StringType
json_data = [
('{"auswahl&...
1
vote
0
answers
145
views
Conversion of a pyspark DataFrame with a Variant column to pandas fails with an error
When I try to convert a pyspark DataFrame with a VariantType column to a pandas DataFrame, the conversion fails with an error 'NoneType' object is not iterable. Am I doing it incorrectly?
Sample code:
...
2
votes
3
answers
179
views
Polymorphism in std::variant when all template types are derived from the same base class
I want to store objects of different types in a std::set and rely on std::set's sorting to later access them by some key variable which is present in every type. To store different types I am using ...
0
votes
2
answers
96
views
initialize subclass of cuda::std::variant
I'm implementing polymorphism on GPU with std::cuda::variant, so far it's working with Circle, Square, Shape:
struct Circle;
struct Square;
using Shape = cuda::std::variant<Circle, Square>;
...
Rahn's user avatar
- 5,575
0
votes
0
answers
91
views
CLion WSL Toolchains: "No variants found" even though WSL distributions are installed
I'm trying to set up WSL as a toolchain in CLion. In Settings > Build, Execution, Deployment > Toolchains when I select WSL, the "Toolset" dropdown shows "No variants found", ...
0
votes
3
answers
132
views
Visit variant of nested classes : how to avoid redundant code?
I have a lot of polymorphic classes. Each of them has a nested class named Configuration containing all the hyperparameters required by the class. For each class tree, I create a variant of the ...
1
vote
0
answers
27
views
Is it possible to create a discount code for a specific variant using the BigCommerce API?
I’m working with the BigCommerce API and need to achieve the following:
Create Discount Code for a Variant:
Is it possible to create a discount code specifically for a variant (not the whole product), ...
0
votes
0
answers
101
views
Conditional Macro MS-Excel Interstore transfer project
I have a macro that I use for doing interstore transfers between stores and calculates stock transfers based on certain criteria. It loops through a list of sending stores and evaluates potential ...
0
votes
2
answers
68
views
Losing variant after using with to activate workbook
I have a workbook with lots of code in it that I have been using for many years. One of the worksheets has code that is supposed to create and populate a validation list with the names of folder names ...
1
vote
2
answers
145
views
Weird result of std::variant
I'm struggling with an odd behavior of the below code. The problem is that output of this snippet is "double". But we have an int in lhs.
I dug for a while and figured out the compiler put a ...
0
votes
0
answers
107
views
Precompile std::variant instantiation?
I am using a C++ std::variant with around 100 structs as possible choices. This type is used throughout my application and compile times tend to point to the instantiation and generation of various ...
2
votes
2
answers
297
views
Get a compile-time index to a std::variant when visiting it? [duplicate]
I have a std::variant of possibly repeated types, and I would like to increment the active index of the variant.
Here is an example demonstrating what I would like to do:
template <typename... Ts&...
1
vote
1
answer
123
views
Delphi 2009 can not compare '' with 333 while Delphi 6 could: "Could not convert variant of type (UnicodeString) into type (Double)" in Delphi 2009
I am trying to migrate a Delphi 6 application with TdxDBGrid to Delphi 2009, and for the time being I would like to keep TdxDBGrid, because it has features that TcxGrid does not (we're moving to ...