Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
179 views

MRE: MyType = MyDataCtor [MyType] | MyDataCtor2 MyType MyType | ... other cases (none of which require the map operation) foo :: Type1 -> Type2 -> (Type1, Type2) For example, for the ...
kesarling's user avatar
  • 2,334
-1 votes
1 answer
58 views

I need to join two RDDs as part of my programming assignment. The problem is that the first RDD is nested, while the other is flat. I tried different things, but nothing seemed to work. Is there any ...
Ahmed Sohail Aslam PhDCS 2025 's user avatar
0 votes
1 answer
52 views

During a current school project of mine, I came up with a specific sorting algorithm which I nicknamed parallel_sort. By giving it a list of integers and a list of dictionaries, it sorts the ...
Gjyslaf's user avatar
6 votes
2 answers
267 views

I'm building a container which uses, as its internal representation, a couple of standard containers, each with a different type. I need to code my version of emplace(..) and here's where I got stuck. ...
Andrea Bocco's user avatar
  • 1,088
0 votes
2 answers
113 views

I have tuples in the form (Status and priority) [State,prio] States are defined so: enum State { A = "A", B = "B", C = "C" ... } Now i want to sort an ...
stot's user avatar
  • 1,124
2 votes
2 answers
200 views

I'm making it using multi inheritance with a pair struct that contains an index and the type of the element in a recursive structure like this: template<int index, typename... ts> struct ok; ...
thefentmaster5's user avatar
2 votes
2 answers
135 views

I have a code that loops on tuples indexes: for _ip in np.ndindex(params_shape): ... loglik[_ip, ...] = ... If my tuple is (0, 1), I would like the last line to access loglik[0, 1, ...]. ...
Kiffikiffe's user avatar
1 vote
2 answers
103 views

My goal is to compare the contents of two 2-d arrays (~15k rows, 8 columns) and get a list of the rows/columns where the comparison (greater-than) is true. I need that output in a readable format, ...
BunnyKnitter's user avatar
0 votes
1 answer
78 views

I want to concatenate two tuples in DolphinDB in the way similar to concatenating vectors. For example, I have two tuples: a=(1,2,3) and b=(4,5,6) and I attempted to use join to obtain re=(1,2,3,4,...
douya huang's user avatar
2 votes
3 answers
236 views

How to iterate over tuple in compile-time? problem code: #include <array> #include <cstddef> #include <tuple> namespace { class Solution { public: template <size_t ...
arniiiii_ua's user avatar
4 votes
2 answers
215 views

I needed a type that could generalize several types that cannot be converted to each other. For example: There are 2 types A and B. A is not convertible to B, B is not convertible to A. That is, these ...
Halturin Evgeniy's user avatar
4 votes
1 answer
113 views

clang-tidy reports the following piece of code as bugprone-use-after-move template <typename F, typename Tuple, size_t... I> auto transform_tuple_impl(F&& f, Tuple&& tuple, std::...
Stégosaure's user avatar
2 votes
1 answer
285 views

I recently had to update the virtual environment for one of my libraries from Python 3.7 to 3.10, which also involved updating Pandas from 1.1.5 to 2.3.0. In the previous virtual environment, this ...
Jan Stuller's user avatar
1 vote
2 answers
97 views

It would be nice if there was something like tuple but that didn't actually construct the types, but just held them as template parameters, with the features of std::tuple, the indexing and such. Is ...
Zebrafish's user avatar
  • 16.5k
-2 votes
1 answer
82 views

I am using a long ad hoc script for exploratory data analysis -- not for tool development. The script has gotten quite long, so I've taken to deling ephemeral variables to keep the Spyder Variable ...
user2153235's user avatar
  • 1,285
0 votes
0 answers
28 views

I am a beginner with the Slider tool and retrieved a code which used to work but does not anymore. I found a similar code here to test the Slider tool in this answer which provides a self-contained ...
lorenzaccio's user avatar
0 votes
0 answers
30 views

I have a TableView.class which is used to store the TableViewDefinitions: public class TableView<T, U> extends Auditable implements Serializable { @Id @GeneratedValue(strategy = ...
kszemes's user avatar
2 votes
4 answers
172 views

I have several custom data structures which are essentially arrays of primitive types: template <typename T> class Vec3 { static constexpr size_t SIZE = 3; T v[SIZE] = ...; // some init ...
Quorrin's user avatar
  • 119
2 votes
1 answer
258 views

I would like to create a class that looks something like ConfigAndPath: import pathlib from typing import TypeVar, Generic from dataclasses import dataclass, astuple class ConfigBase: pass T = ...
Siddharth Suri's user avatar
-5 votes
1 answer
159 views

I have a following problem to solve. Given a number max generate all possible 3-tuples (for example) in the range from -max to max for all 3 numbers. Obviously I can write a simple nested loops (in C++...
rk85's user avatar
  • 163
-2 votes
3 answers
91 views

I have two lists that look like - list_a = [('gfhr_10_dfrght_sl', None, None), ('gfhr_11_dfrght_sl', None, None), ('mnop_yxt_done', None, None), ('mnop_yxt_gd', None, None), ('frdf_yxty_syn', None, ...
Katrina Marrie's user avatar
-3 votes
2 answers
112 views

I'm training my AI model with a huge data set, so that it's impossible to preload all the data into memory at the beginning. I'm currently using psycopg2 to load data from a Postgresql DB during ...
Leon's user avatar
  • 2,165
0 votes
1 answer
103 views

Here is my issue - I have a locals code block like the below. I need to create a Map from these values (these values are used in multiple places) locals { object = { 1 = { name = "...
TheDemonLord's user avatar
7 votes
2 answers
223 views

I have a following header: #include <string_view> #include <tuple> std::tuple<int, int, int> foo(std::string_view sv); class s { public: s(std::string_view sv); ...
Dominik Kaszewski's user avatar
1 vote
3 answers
73 views

Being primarily a crystallographer and chemist/physicist I encounter rather simple problems, which turn out not to be straightforward :-) My task here is that I have a set of, for example, integer ...
rk85's user avatar
  • 163
2 votes
1 answer
142 views

#include <iostream> #include <tuple> struct my_struct { const std::tuple<int, float> t{5, 3.14}; template<std::size_t i> decltype(std::get<i>(t)) get() { ...
sayurc's user avatar
  • 650
0 votes
0 answers
15 views

I am trying to use the python version of libSBMLon Spyder.I previously used Cobra to do so and it works. Now, I use the command "model = ls.SBMLReader.readSBML('model.xml')" and I get the ...
Alain Garnier's user avatar
0 votes
1 answer
147 views

Here is the challenge: I have an iterated for-each loop to create a bunch of elements in a list: test_count = 90 test_items = [for i in range(local.test_count) : format("test%02s", i+1)] ...
TheDemonLord's user avatar
0 votes
1 answer
98 views

Given a list of tuples, where each tuple consists of 3 integers, transpose the list recursively so that the "rows" and "columns" are swapped. The result will be a list of lists. So ...
Hưng Nguyễn Duy's user avatar
0 votes
2 answers
120 views

I got myself into a big mess trying to add support for arrays in query arguments for an API. The way I am handling this now is join array by commas const params = new URLSearchParams() params.append(&...
Alex's user avatar
  • 66.6k
0 votes
1 answer
95 views

I have a basic interface, which I use down the line to enforce specific values on other interfaces: interface ObjectWithEnforcedValues { values: readonly EnforcedValue[]; } enum EnforcedValue { ...
Tom's user avatar
  • 235
2 votes
1 answer
62 views

I have class inherited from tuple and try to check default constructor with is_default_constructible template< typename ... Args > class IdentifierType: public std::tuple< Args... > { ...
Vladimir Shttl's user avatar
0 votes
1 answer
60 views

I have the following code that sums the elements in a tuple: t = ("j","h","w","j") print(sum(t)) I got the following error: TypeError: unsupported operand type(...
Dinux's user avatar
  • 1,364
1 vote
1 answer
81 views

I thought I understood the key argument for the sorted function, but for the life of me, I cannot figure out why it appears to be applying the tuple index to the string inside the tuple instead of to ...
hepcat72's user avatar
  • 1,225
-1 votes
1 answer
59 views

on a classs definition i can set this : private let GameWallDefinition = ["LL3":(104,0.0,62.0,10),"LL2":(99,0.0,60.0,20),"L0":(94,0.0,0.0,50)] but i can for more esay ...
CKJBeOS's user avatar
  • 81
2 votes
3 answers
127 views

I have a class inherited from standard tuple: #include <concepts> #include <cstdint> #include <iostream> #include <string> #include <tuple> #include <vector> ...
Vladimir Shttl's user avatar
3 votes
2 answers
174 views

I want to have the default property correctly infer the ArkType Type from the schema property, infinitely deep and infinitely wide. Accomplishing simple inference was easy... with the use of a ...
inducingchaos's user avatar
2 votes
3 answers
213 views

Something like: var Tuple1 = (x:2,y:4); var Tuple2 = (x:0,y:-1); var Tuple3 = Tuple1 + Tuple2; // desired output: (x:2,y:3) Is there a simple way, or must I do something like: Tuple3.x = Tuple1.x + ...
akTed's user avatar
  • 245
1 vote
1 answer
69 views

Here, José Valim explicitly wrote that it isn't persistent. But the official documentation here (5th para.) says otherwise, it seems. I'm confused because I don't know how to check it myself yet. Can ...
al.hram's user avatar
  • 11
-1 votes
1 answer
148 views

I have a class inherited from standard tuple: #include <concepts> #include <cstdint> #include <iostream> #include <string> #include <tuple> #include <vector> ...
Vladimir Shttl's user avatar
0 votes
0 answers
76 views

I have 2 tuples: std::tuple< std::wstring, int64_t > item(L"str", 10);; std::tuple< const std::wstring&, int64_t > item_ref = item; In the second tuple, the first param is ...
Vladimir Shttl's user avatar
1 vote
1 answer
53 views

I have an array of tuples in PostgreSQL 17. I couldn't get SELECT...INTO...FROM to work for some reason: SELECT ARRAY[(1,2)] AS a INTO temp_table; ERROR: column "a" has pseudo-type record[] ...
Ludovic Aubert's user avatar
1 vote
2 answers
77 views

I have the following class definitions. I would like to create an Alphabet of Letter classes where each Letter class is constructed using an argument from the parameter pack passed to the Alphabet ...
pic32cpp's user avatar
0 votes
1 answer
222 views

what seems to be the problem with the code l = [1,2,4,5,6,7,8] t = *l i have read that *l gives comma separated single values so the statement should be similar to t = 1,2,3,4,5,6,7 which is a tuple ...
Sachin Dobhal's user avatar
2 votes
1 answer
82 views

I have a DataFrame with tuples in cells: import numpy as np import pandas as pd data = np.empty((3, 4), dtype=[('cost', np.int32), ('count', np.int32)]) data['count'] = 0 data['cost'] = [[10, 2, 20,...
Alex Anushat's user avatar
1 vote
1 answer
369 views

I use remoteSecure function to query remote table from one clickhouse server to another. We have two enviroments PROD and DEV from where remote queries are sent. PROD clickhouse has version 23.7.3.14, ...
Alexandr  's user avatar
1 vote
0 answers
90 views

I'm trying to write an ECS system that can query components by value, reference, or mutable reference. For this, I want a different implementation for various tuple types as an Archetype. trait ...
gjh33's user avatar
  • 121
3 votes
2 answers
109 views

I have the following set of tuples: ('red', 'hot', 'big'), ('red', 'hot', 'small'), ('red', 'cold', 'big'), ('blue', 'hot', 'big'), ('blue', 'cold', 'big'), ('green', 'hot', 'big'), ('green', 'cold', '...
depthofreality's user avatar
0 votes
1 answer
181 views

I'm trying out this demo code to play with std::ranges::views::cartesian_product in g++13. I'm wondering about the for loop in main: #include <cstdio> #include <tuple> #include <array&...
AntPalmer's user avatar
2 votes
0 answers
245 views

I am trying to update discord activities while playing my game in unity by DiscordGameSDK. I am weak in this area, so I admit that I copied everything from the guide, but I got stuck with this error: ...
Miłosz's user avatar
  • 21

1
2 3 4 5
243