16,566 questions
-1
votes
1
answer
50
views
How to Join two RDDs in pyspark with nested tuples
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 ...
-2
votes
0
answers
40
views
Passing nested template class as template argument in C++ [duplicate]
I have written some code like this:
#include <stdio.h>
template<
template<int N, typename T>
class SumPolicy
>
int Function(){
typedef SumPolicy<1234, int> P;
return ...
Advice
1
vote
8
replies
141
views
Making a palindrome out of a string of random letters (or any given value type inputs)
Found this code exercise on W3R. Been trying to figure out the relationship between the outer and inner loop (i and j), but can't seem to wrap my head around it. If anyone could walk me through this ...
-1
votes
2
answers
60
views
Nested dictionary, for yaml style markup
I couldn't figure out the way to process nested leafs/branches/parents, not sure what the actual best terminology is.
I've got the reading of the data happening correctly, far as i can tell.
Its in ...
7
votes
1
answer
203
views
Visibility of C++ nested class complete definition in the presence of forward declarations
In C++, forward declarations introduce an incomplete type. Incomplete types can be used to declare pointers, but they cannot be used to initialize values or access members because the complete ...
1
vote
1
answer
79
views
Counting values using nested SQL query
I have the following tables with values:
CREATE TABLE Produkty
(
Id NUMBER(10) NOT NULL,
Nazwa VARCHAR2(50) NOT NULL,
Status VARCHAR2(50) NOT NULL,
CONSTRAINT CHK_Status CHECK (Status ...
2
votes
1
answer
75
views
Jolt transformation with 2 level nesting and flattening it
I am trying to convert the following input to the below output using java but not able to get the inner nested attributes at all.
So from the below JSON I want to match the product class and subclass ...
0
votes
0
answers
23
views
Remove paired brackets and content within it
I need to process some data in python dataframe. The column "description" includes some special cases need to be removed.
In following example string: "LEATHER SEATS (REQ: include (Full ...
0
votes
0
answers
71
views
Evaluation of a function within a function in Mathematica
I apologise if the answer to my question is facile, but I'm new to Mathematica and normally use Matlab.
I have two variables that I define as follows:
delta = Sqrt[u^2 - 4DC(theta - lambda)];
xi = ...
0
votes
1
answer
45
views
Defining a named template for a matrix type
I have defined
template <typename T> vector< vector<T> > matrix
This template definition compiles OK without error. The following code:
typedef matrix<int> imat;
Produces ...
4
votes
1
answer
84
views
facet_nest_wrap display only on top level row and split in two column
I'm working on a very basic facet plot where I'm using ggh4x to attain a nested faceting scheme as per the figure below:
I have two main issues with this figure, I wish to organize it in two columns ...
0
votes
1
answer
41
views
ASP.NET: route matching template for traversing a tree structure
I have a tree structure of nodes, where each node has 0-n subnodes. Each node has a set of properties. I would like to expose that structure in a webservice.
let's say my route template for accessing ...
1
vote
1
answer
73
views
Django DRF, create an Item with associated tags whether they exist or not
I have the following create function for ItemSerializer class. It aims to create new Item with tags, creating tags on the fly if they does not exist or getting them if they exist.
class TagSerializer(...
1
vote
1
answer
167
views
How can the peer class be used not only on sibling elements but also within nested child elements?
The style for the label element itself applies but for the styled radio button it doesn't. as far as I could troubleshoot it's because the peer class can't be directly applied to nested elements but I ...
-1
votes
1
answer
147
views
Understand reflection usage with structs and interfaces
I try to understand the correct usage of reflection with a struct compose by nested structs that implement an interface on Golang;
Here the code:
package main
import (
"log"
"...
-1
votes
1
answer
80
views
Convert nested python dict to a pandas dataframe
I have weather data in a python dict that I'm trying to convert to a pandas df. (From there I'll load it into SQLServer but I've got that part working)
my_dict = {
'data.outdoor.temperature': {'unit':...
-1
votes
3
answers
161
views
How to decode nested numeric patterns in strings like 2[2[32]1[82]] in JavaScript?
I'm trying to solve a variation of the LeetCode "Decode String" problem in JavaScript. The adapted challenge could be formulated as:
Given an encoded string, return its decoded string.
The ...
-1
votes
2
answers
109
views
Retrieve nested private types in C# using reflection [duplicate]
It is possible to retrieve all the nested types of a class in C# using reflection using Type.GetNestedTypes.
However, those nested types are restrained to public types only.
In the following scenario, ...
0
votes
2
answers
211
views
How to build a nested adjacency list from an adjacency list and a hierarchy? [closed]
I have a simple adjacency list representation of a graph like this
{
1: [2, 3, 4],
2: [5],
3: [6, 9],
4: [3],
5: [3],
6: [7, 8],
7: [],
8: [],
9: []
}
which looks ...
4
votes
1
answer
206
views
Is Swig able to wrap nested structs when wrapping to produce python code?
The question is in the title. I try to wrap c++ code to python, which has nested structs (struct definitions inside another struct definition), and the inner struct doesn't appear in my python module (...
-1
votes
1
answer
121
views
Force git to treat a nested repository as a regular folder instead of submodule but still keep it as a git repository
This is an example directory structure
ParentRepo/
.git/
parent_file
ChildRepo/
.git/
child_file
child_untracked
I want ParentRepo to track changes of all files ...
0
votes
1
answer
159
views
I want nested Multi select dropdown in Mudblazor
☐ SaaS
☐ OnPrem Options
☐ Cloud
☐ Hybrid
☐ Other
My select dropdown contains parent options - SaaS ,On Prem and Other and My OnPrem contains 2 child options Cloud and Hybrid. On ...
1
vote
0
answers
193
views
Nested std::vector<std::vector> brings too many memory fragmentation and pollutes the cache
In my projects, there are several std::vector<std::vector<int>> dynamic arrays. The first dimension is about 10 million, the second dimension is about 10-100. Both of the dimensions are ...
2
votes
2
answers
74
views
How to extract nested json using json_normalize?
I have a nested json, but I can't understand how to work with them.
{
"return": {
"status_processing": "3",
"status": "OK",
...
0
votes
0
answers
33
views
Nested mutable and immutable borrows in rust [duplicate]
MRE:
enum MRE_Enum {
variant1,
variant2,
}
struct MRE_Struct {
dummy1: Vec<MRE_Enum>,
dummy2: isize,
}
// Private functions together
impl MRE_Struct {
fn foo(&mut self) ...
1
vote
1
answer
183
views
CSS nesting with Vite 6.2.3 & TailwindCSS v4.0.16 only works on dev, not on build
I'm working with:
Vite v6.1
Tailwind v4.0.16
Whenever I run my dev server, the .container classes are generated and everything works fine. The moment I do a build, .container is not included in the ...
0
votes
1
answer
55
views
Big Query - Extracting data from Nested Structure
I am trying to extract data from a nested table in Big Query. The table(Lets say UserDetails) has below format
Column name --> Nested Column
Example
Column 1 name : Details -->
Nested Column ...
-1
votes
1
answer
76
views
Django template nested 'for' loop from two different lists
I have two lists (if that is what Django calls them) containing an id and a key/value pair e.g. [{'id': x, 'string': 'string'}] one list assigned to variable 'periods' the other assigned to 'paydates'....
-2
votes
1
answer
56
views
Is there a way to use a function which references an object that in turn references that function? [closed]
I'm working on a practice game that uses an array of objects (plants) that will be chosen randomly. Questions are asked about light and water requirements, winning or losing the plant and moving onto ...
-2
votes
2
answers
69
views
Treeview table showing duplicates from list of lists [closed]
For a program that takes information from the network I would like to display it in a table to make selections (calculate average, stdev ect.). I created a list of lists and I am trying to populate it ...
-3
votes
1
answer
102
views
Recursive parsing of flat list as nested structure
This is sort of a follow up to How to parse a nested structure presented as a flat list?. Read it for the long explanation.
My current code:
def parse(code: list, top=True) -> tuple:
print(code)...
0
votes
0
answers
50
views
Does Datadog have a built-in way to flatten nested hashes before assigning them to Datadog?
I’m working with Datadog and need to send structured log data that includes deeply nested hashes. However, Datadog’s logging system doesn’t handle nested objects well when visualizing attributes, so I ...
0
votes
2
answers
50
views
How to declare ::before once and for and add separate content based on classes in nested css declaration syntax?
Having below HTML
.legend__list {
display: flex;
border: 2px solid rgb(241, 230, 230);
align-content: center;
.legend {
font-size: large;
color: greenyellow;
&.clan {
...
5
votes
2
answers
236
views
How to parse a nested structure presented as a flat list?
To easily understand my problem, below is a simplified version of some example input.
['foo', 1, 'a', 'foo', 2, 'foo', 1, 'b', 'foo', -1, 'foo', -1, "bar", 1, "c", "bar", ...
-1
votes
1
answer
104
views
Stop reentrant synchronization only for specified function (or code) while waiting but permit reentrant synchronizing in another function
What is the best way to achieve following goals?
Let's say, given are two synchronized functions func1 and func2
public class xyz {
private Object x1 = new Object();
private boolean isWaiting = ...
0
votes
1
answer
120
views
CSS counter with nested elements (counter value seems to increment for child elements, too)
I want to define a CSS counter that increments by 1 for each [data-fragment-index] element (inside a <section class="slide">):
section.slide [data-fragment-index] {
counter-increment:...
1
vote
1
answer
31
views
Render Nested objects value in html using Angular ngFor directive
I have an Object with nested object. I am trying to display in html using ngFor directive of Angular. But I got the result as multiple time.
Below my object
productlists = [
{
productname: '...
1
vote
0
answers
28
views
class-transformer Transform nested class
I am trying to do a Transformation of an input object to a Dto.
//input object
const input = {
"steps": [{ "id": 1}, {"id": 2}],
"foo": "bar",
"...
0
votes
0
answers
66
views
How to add in a nested factor within a model that is using aligned rank transformation
I am trying to add in a nested factor of individual ID into my model using aligned rank transformation (from the R ARTool package) so I can run ANOVAs. So far I have not had much luck in getting ID ...
0
votes
2
answers
380
views
Complicated xlookup across two sheets with multiple criteria
I have a worksheet that I want to pull data from one sheet to another but there is some logic that makes it complicated.
Master sheet with the raw data:
COL_H
COL_I
COL_J
COL_K
COL_L
SKU_R
SKU_L
...
1
vote
1
answer
53
views
if the symbol table is created at compile time how can it know the stack frame depth and offset in procedures depending on user input
I have looked for suggested question that answer mine but did not find any related ones.
I am studying compiler design and have come across the feature that a language supports nested lexical scopes. ...
1
vote
1
answer
77
views
Universal change of all existing elements in a VBA nested array
I have a composite data structure which I have defined using two nested classes. I am presenting a simplified version of the structure here:-
Routine Variable Type
------- -------- ----
...
2
votes
1
answer
45
views
Type mismatch when using generics with abstract nested classes
I find an "Argument type mismatch" error in multiply function and don't know how to fix it. The code is:
abstract class Semigroup<T1> {
abstract val one: SemigroupElement<T1>
...
0
votes
1
answer
59
views
Need help by selecting specific values from nested XML-file via PowerAutomate
I have a XML-file that looks like that:
<RESULTS>
<RESULTSHEADER>
<TEST1>
<IDENT>
<REGISTRATION />
<X>Value</X>
</IDENT&...
0
votes
0
answers
23
views
Unable to use nested objects in Livewire v.2
I am using Laravel 10, Livewire 2. I am using a Livewire component to create a DistributionGroup. Each of the DistributionGroup's will have 1 or more DistributionGroupGroup's, and each of those, in ...
0
votes
0
answers
72
views
Get data from SQL into a list with sublists in C#
In most cases, I use a simple observable collection in C# and fill it with data fetched from a SQL query.
Something like this works:
public class MyClass
{
public string mystring1 { get; set; } = ...
0
votes
1
answer
100
views
Populating a list of lists of TextBox
I have a grid of 81 modified TextBox items arranged in a 9x9 grid.
I added properties for row, column, block, and valid int entries for each box.
I was able to populate the row, column, and block ...
0
votes
0
answers
53
views
How to unnested a nested structure inside another nested structure?
I need to create a view for a database in DBeaver. It has one column with nested structure with another nested structure inside.
Nested(person_id String, person_name String, person_params Nested(key ...
1
vote
1
answer
45
views
Jolt transform for nested json unexpected output
I have the below JSON and need to filter based on field
[
{
"firstname": "ABC",
"lastname": "PQR",
"id": 1,
"address": {
...
0
votes
0
answers
285
views
How make DBeaver display nested structures correctly, with all keys and values?
Working with a Clickhouse database through DBeaver, and there are some columns with nested elements.
Nested(item_id String, item_name String, item_brand String,
item_variant String, ...)
But in the ...