返回首页
We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [nested]

This tag relates to any of various nested entities or operations in programming.

Filter by
Sorted by
Tagged with
2
votes
4answers
43 views

Remove dict which have the same id from a list of dict

I want to remove from a list of dicts, dicts which have the same ID. def removeDuplicate(elems, id): new_list = [] for elem in elems: if not elem[id] in [d[id] for d in new_list if id ...
0
votes
0answers
13 views

Custom annotation now working for nested object field

I have created small custom annotation which is for validation. If the field is annotated with custom annotation, it will throw the exception. Below is the code import java.lang.annotation....
0
votes
2answers
50 views

Extract sentences in nested parentheses using Python

I have multiple .txt files in a directory. Here is a sample of one of my .txt files: kkkkk; select xx("xE'", PUT(xx.xxxx.),"'") jdfjhf:jhfjj from xxxx_x_xx_L ; quit; /* 1.xxxxx FROM xxxx_x_Ex_x ...
0
votes
2answers
36 views

Parsing nested json response data using codable in iOS Swift?

I am trying to parse json data in decodable in swift 4. It prints nil value. i could not find what issue is this? here is model class: public struct TaskID: Decodable { let embedded: Embedded? let ...
-2
votes
0answers
92 views

Extract strings inside inconsistent nested brackets

I have seen multiple examples of extracting strings from nested brackets. But none of them has shown how to extract strings within nested brackets that are on a new line i.e. \n. For example, I have ...
0
votes
2answers
30 views

Nested template struct constructor implementation

How do I create a nested template struct implementration? For example, if I have: foo.h: template<class T> class foo { template<class U> struct bar { U u; bar(...
0
votes
1answer
35 views

Learning Python and got stuck in matrix multplication

def matrixmulti(mat1,mat2): result=[] ''' for i in range(len(mat1)): for j in range(len(mat2[0])): for k in range(len(mat2)): result[i][j] += mat1[i][k] * mat2[k][j] ...
0
votes
0answers
29 views

How to Unnest json array and apply schema in spark dataframe?

I have Unstructured JSON data I'm loading in using spark.read.json Data: data: array<array<string>> Example: "data" : [['A', 'B', '123'] , ['C', 'D', '456'] , ... ] I would like to ...
-1
votes
0answers
33 views

How do I access individual nested values in a json / jsonify response? Python & Flask

I made a script to do calculations I do daily in my job, thou when trying to flask-ify it I stumbled on a issue making use of the jsonified-response. The result-variables sent thru will always be the ...
2
votes
3answers
41 views

I'm trying to separate x and y points from a doubly nested list. I'm having a hard time in separating it correctly

I'm trying to separate x and y points from a doubly nested list, The list elements are series of x and y points and I need to separate them to individual x and y list. The list is of the form [[[x1, ...
0
votes
0answers
20 views

Spark - How to infer DF header info from nested keys

I'm working with the following JSON data set. I would like to extract nested column information stored in one top level key and apply it as a schema for data stored under a different top level key. ...
-1
votes
0answers
28 views

Filter nested array with multiple conditions [on hold]

I have the following array: [ { "Navn": "Long Island Iced Tea", "Nummer": "2", "Glas i ml": "250", "Instruktioner": "", "a": "Hæld ...
2
votes
1answer
26 views

Subset whole nested dataframe structure R

I have a dataset with nested structures in R (some cells are arrays from its original JSON structure). set.seed(123) data = list() data$nested_df_1 = data.frame(a = letters[1:10] ...
0
votes
2answers
24 views

How to nest hide() in a toggle() jQuery?

I tried to add hide() option to a div that has already had a toggle(). so that when div is expanded, the text is long enough, at the end of the text I want to have an anchor, when clicked the div to ...
0
votes
4answers
22 views

Trying to make shape using nested loops python 3

I am trying to make the following shape using python 3 nested loops: * * * * * * * * * * * * * * * * * * * * * * * * * I write this code: star = " * " shape = star i = 1 print(...
0
votes
1answer
41 views

Question about Loop Limit in VBA (Excel Macro)

To preface my code could be simpler and better made without a doubt. Nevertheless, it does the job and works perfectly except for a hard loop limit that it encounters. In short the objective is to ...
-1
votes
1answer
39 views

Attempting to loop back to the beginning to run my program again

I am currently writing a code where in my main function I am just calling other functions. I am attempting to reloop back to the begining so the user can run the program again. The main function is ...
0
votes
1answer
25 views

Issue with nested XSL apply-templates

I am trying to transform and xml file to html with xsl. At one point I need to populate a list of headings from particular tags (with the same nested structure). Part of my xml file is below. <...
0
votes
1answer
23 views

Validating the json files in a folder/sub folder through shell script

find dir1 | grep .json | python -mjson.tool $1 > /dev/null I am using the above command but this doesn't take the files as inputs. What should i do to check for all the json files in a folder and ...
2
votes
2answers
77 views

How to double loop over a vector of strings in Clojure?

I have this function that checks the cities in a csv file if they have over a population of 500000. I saved all the found cities to a vector but now want to loop over the vector twice in order to find ...
0
votes
0answers
33 views

Nested query in mysql, retrieve result dynamicly

I' trying to retrieve nested comments, I'm able to get all replies recursively for single commend by below code. SELECT id, name, parent_id FROM comments WHERE id = 2 UNION SELECT id, name, parent_id ...
0
votes
3answers
34 views

Creating a nested dictionary from tuples that counts the number of occurrences of a tuple item

I have to sort through a list of tuples and create a dictionary with the first item in the tuple as a key and nested dictionaries which would have the key as the second item and the number of ...
2
votes
0answers
25 views

Python's equivalent functions to fromJSON(), unlist(), attr() of R?

I wrote a code in R but it can't take my heavy files, so I switched to Python. But I've been looking for 3 Python's equivalent functions of R and haven't found any satisfying results. The 3 R ...
-3
votes
0answers
22 views

Create the triangle, diamond or ellipse with star in python

I need to write code in Python to create shapes such as diamond, triangle, and ellipse. Their height and width are given before and I should use them. Also, the command can be given like triangle 5 4 ,...
-3
votes
0answers
21 views

Javascript multiple dynamic key value set how i can fit exact same values via iteration i AM new i have no idea

[{ product_title1 = '', product sku1 = '', product price1 = '' }, { product_title2 = '', product sku2 = '', product price = '' }, { product_title1 = '', product sku = '', product ...
2
votes
1answer
46 views

For Loop to create new dataframes in each iteration

I have some data and I want to separate it based on values. For example when x and y are below 100 to keep these values in a separate dataframe when x is below 200 and y below 100 to keep these ...
-1
votes
0answers
33 views

Problem with Python while loop - doesn't seem to be iterating correctly

So the numbers part of my code works fine but it goes a bit funny in the nested while loop when I try convert the ASCII values back to letters and append them to the list. I tried printing k and it ...
2
votes
3answers
71 views

Creating nested data frames with variable dimensions

I have a data frame in which one column keys describes the format of all remaining columns. In the example below there are 2 such value-columns, but in general there may be many more. library(...
0
votes
3answers
30 views

Recursive alternative to nested for loop

I have 4 different sklearn regressors and I want to use a percentage of each prediction to build my final prediction. My idea is to loop through each possible version and calculate the RMSE using a ...
-1
votes
3answers
44 views

Nesting an If Statement

How would you convert the following into a nested if statement? if (numProductivity > 69 && numProductivity <= 199) bonus = BONUS_3; if (numProductivity > 30 && ...
0
votes
1answer
30 views

Typescript: recursive check nestest arrays

i have problem looping through a nested array that can contains arrays of itself... that should represent a dynamic menu as follow: this is how the objects are made: Interface IMenuNode: export ...
0
votes
1answer
32 views

How to invoke a nested function from inside a forEach loop in a JavaScript constructor function?

Code 1 - this.kitchenStatus() inside forEach is unreachable I am having trouble accessing the value of a function (this.kitchenStatus()) from inside a forEach, when I try the below I get "Uncaught ...
0
votes
2answers
14 views

Using nested IF in Google Sheets

I'm trying to create multiple IF in a single cell so if the cell states "Critical", then adjacent cells should state "response required within 24hrs". If the cell states "Medium", the adjacent cell ...
0
votes
4answers
73 views

List of dict to list of nested dict in Python

I have input_data like this: input_data = [ {'vehicle': '001', 'store': 'foo1', 'qty': 100}, {'vehicle': '001', 'store': 'foo1', 'qty': 200}, {'vehicle': '001', 'store': '...
2
votes
1answer
61 views

Convert CSV file into a nested JSON obj

I am trying to convert a CSV file to a JSON nested object. I am stuck since last Friday so I decided to ask assistance from the community. I have achieved to implement the task but I hardcoded the ...
0
votes
0answers
22 views

Looking for the likely better way to get at nested data with glom?

I have a particularly nasty stats object from a system that I need to retrieve data from (two of the many stats entries shown for brevity). 'http://localhost/mgmt/tm/sys/performance/all-stats/TMM%...
0
votes
1answer
25 views

How to reference nested scss class within media query?

I have media query used in scss class, I would like to create media query and define all scss class in that media query. I have trouble accessing nested scss class in media query. Here is my code ....
0
votes
2answers
62 views

Compare values between nested lists

I am trying to compare the last value inside two seperate lists with matching names. For example: [(('Matching Name', '2015-06-25', 25.37), ('Matching Name', '2018-08-09', 74.66))] I want to extract ...
0
votes
0answers
29 views

AWS Athena: extract and partition by value of a field from array of JSON records

I have historical data in JSON format with the following scheme. CREATE EXTERNAL TABLE `raw_table`( `time_stamp` timestamp, `event_1` array<struct<name:string, value_1:double, value_2:...
0
votes
1answer
47 views

Reading file containing multiple JSON objects using MS SQL Server

I need help reading JSON file in MSSQL I have a json format like this { "_id":{ "$oid":"5c6ceb395916c77f71d9f531" }, "uuid":"8337df01-7d98-4cdd-b5eb-7fafa88d3740", "firstName":"...
0
votes
1answer
55 views

How do I use Pandas to convert an Excel file to a nested JSON?

I am a rookie programmer and I'm trying to convert an excel file into a nested JSON using Pandas. I am posting my code and the expected output, which I am not able to achieve so far. The problem is ...
1
vote
1answer
53 views

Nested for loop and if condition pandas replacement

I have two different pandas data frames where in the first data frame (price), I have two columns. The first column named value has some values in it and the second column amount has the available ...
0
votes
2answers
50 views

sum list-column of matrices (from nested data.frame) using R, dplyr

I have a grouped data.frame, with a column m that contains 2x2 matrices, as in this example: library(tidyverse) d <- data.frame(g=c(1,1,2,2),x1=c(1,1,1,1),x2=c(1,1,1,1)) d_by <- d %>% ...
1
vote
3answers
38 views

python: comparing values in a list if exists in another list

So now I have 2 lists, list1 = [[0,1],[0,2],[0,10]] list2 = [[1, ['miniwok', 'food1']], [2,['chicken', 'food2']], [3,['duck', 'food3']], ..... , [10, ['pizza', 'food10']]] I want to compare the all ...
-2
votes
0answers
21 views

find values from excel and click then on a nested table in explorer

i have a table with some values on excel. let's say A1 A??CP1?? B1 B??CP1?? and so on. i want to look for these values when they are highlighted on a nested table of an i frame of internet explorer ...
0
votes
0answers
12 views

Nested structures | Should I declare “struct” again in the principal structure?

As you can see, both codes are almost the same, the difference is that in the first code I wrote the data type, I mean, I wrote "struct" before "directionInfo employeeDirection;". In the second code ...
1
vote
0answers
16 views

I would like to plot line segments from a doubly nested list and use interact from ipwidgets to control which sublist is plotted

I would like to plot line segments from a doubly nested list using interact from ipwidgets that control the list indices of the first layer of a nested list. X_Points = [[[X1,X2], [X3, X4], [X5, X6]]...
0
votes
0answers
4 views

destructing nested objects that are beside each other (siblings)

I'm working with React/Redux and have some nested reducers that I would like to destructure and assign variables too. Here is as example car = { type: "mazda", year: 2011, tireCondition: { ...
0
votes
1answer
48 views

How to properly pass nested lists from Applescript to Bash

I'm working on a project that involves using Applescript to make a list of open URLs within the users Google Chrome Browser, in order to save them for when I eventually want to re-open Chrome. Finding ...
0
votes
1answer
39 views

How can I access a nested array of objects [duplicate]

I have a collection called bills in a database. Each document in the collection is a bill that was passed in congress. Within each document, there is an array called votingRecord, comprised of ...

返回首页
杏彩计划 杏彩官网 杏彩APP 杏彩走势图 杏彩下载 杏彩官方 杏彩网站 杏彩怎么玩 杏彩官方 杏彩靠谱吗 杏彩代理 杏彩骗局 杏彩投注 杏彩倍率 杏彩开奖 杏彩漏洞