830 questions
0
votes
1
answer
53
views
Merging two Vec<(u32, Vec<u8>)> without duplicate keys
I have 2 vectors which are of type Vec<(u32, Vec<u8>)>. I want to merge these two vectors, and I want the result to have unique keys. In case of same keys, 2nd vector should overwrite ...
0
votes
1
answer
24
views
Merge the 2 array based on id and prioritize the latest filtered on top
const menuFilteredProducts = getMenuWiseProduct(products);
const categoryFilteredProducts = getCategoryWiseProduct(products);
let mergedProducts = [];
const prioritizeCategory = true;
if (...
0
votes
1
answer
31
views
How to merge an array on matching keys while adding the numerical values of others [duplicate]
My first post here even though I've been gathering knowledge from you guys from years. I'm trying to merge the following array where the names match, but I need to add the hours together.
Everything ...
-2
votes
2
answers
72
views
Merge objects inside an array of objects with duplicates
I have "available" data and want to convert it into "desired".
I tried to merge all objects inside array using this but its not working coz as you can see for timestamp = 10 we ...
0
votes
1
answer
186
views
Why clickhouse fails to quckly merge two sorted tables on their primary keys?
I have two huge tables, of 2bln rows:
CREATE TABLE transactions (
`id` UInt64,
`from_address` String,
`date` UInt64,
)
ENGINE = MergeTree
PRIMARY KEY from_address
ORDER BY from_address
...
2
votes
4
answers
142
views
Why I could not simply read sheets and merge all the content in a single Variant?
Context: I'm trying, in VBA / Excel, to read the content of multiple large sheets (arround ~100k rows in total) and to store it in a Variant in order to work on the data in memory.
Why : I want to ...
1
vote
1
answer
49
views
PHP combine two associative arrays with different keys
I want to combine two associative arrays with different amount of keys and keep all the keys in the final array even if they are null or empty
I have tried array_merge but the keys that are not ...
0
votes
2
answers
105
views
How to combine multiple query formula results with the same number of columns vertically? [duplicate]
I have a spreadsheet with 31 Day level sheets and a few summary sheets being used for a daily sales report, using which I'm trying to create a legder. For this, I want columns A, B and C from each of ...
0
votes
0
answers
235
views
Merge Struct column in delta table using spark
How to apply merges to the struct column nested fields in the below table. An existing row in the employee table has structData column with STRUCT datatype and stores data with nested fields. When an ...
2
votes
1
answer
134
views
Python code execution too slow due to bottleneck - seeking performance optimization
I'm currently facing a performance issue with my Python code, specifically with the execution speed. I've identified a bottleneck in my code, and I'm seeking advice on how to optimize it for better ...
0
votes
2
answers
108
views
Merging sorted arrays with defined length in Python (good practices)
I have encountered interesting case during practicing writing Python algorithms on Leetcode.
The task: "You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two ...
0
votes
0
answers
28
views
How to merge lists, received from 2 REST APIs with the `limit` and `offset` parameters, and receive result with `limit` and `offset` parameters too?
Shortly
How to merge lists, received from two REST APIs with the limit and offset parameters, and return merged list as a result of calling the 3rd REST API also with the parameters limit and offset?
...
0
votes
0
answers
44
views
Expected parameter 2 to be an array, null given for array_merge ()
My wp-includes\widgets.php has this section which includes the line that throws this error.
function _register_widget_update_callback( $id_base, $update_callback, $options = array(), ...$params ) {
...
1
vote
1
answer
53
views
Merging two arrays using Jq command
I have the following JSON object that I want to merge. So the scenario is ticketId and requester_id should become an attribute of each objects in componentsByProdTourId array.
Here is the input JSON ...
0
votes
0
answers
33
views
How to merge two array[mapItem1,mapItem2,...] into one in YAML
The yaml file content is:
localDns1: &localDns1
- &item1
name: value1
dns: value2
- &item2
name: value3
dns: value4
localDns2: &localDns2
- &item3
name: ...
0
votes
2
answers
67
views
Why aren't the 0s being spliced out when merging a sorted array?
I'm working on this challenge:
https://leetcode.com/problems/merge-sorted-array/
This is my code:
/**
Do not return anything, modify nums1 in-place instead.
*/
function merge(nums1, m, nums2, n) {
...
0
votes
1
answer
43
views
In Flutter how to combine two map'ed variables
I am new to Flutter. I am sending two separate strings from Json to create a table in Flutter:
String one contains Column Titles with ~ separator
"column_titles": "Col Title 1~ColTitle-...
0
votes
4
answers
54
views
Multidimention Array combine with one array in javascript with specific key
I have one array like below
[
{
"__typename": "ConfigurableProduct",
"uid": "MzY3",
"name": "AISLING BODYSUIT",
"crosssell_products&...
-1
votes
1
answer
35
views
Group data in an associative multidimensional array and remove duplicates in subarrays
I have an array like this:
$array = [
[
2 => 'kategorie_01',
'tags' => [
1 => 'tag_01',
2 => 'tag_02',
],
],
[
3 => '...
0
votes
6
answers
508
views
Combining two or more arrays into one array according to numeric keys without duplicates in subarrays
I have the following scenario made of arrays with numeric keys.
I need to have an array which stores all the values in the arrays grouped by numeric key and without duplicates.
I cannot make them ...
0
votes
3
answers
83
views
Merge 2 arrays at specific indices in Javascript
I have a target array, say: [A, C, E, F, H].
I have another array toMerge that needs to be merged into target, say: [B, D, G, I].
I also have an integer array that tells the indices of target array ...
1
vote
1
answer
413
views
How to use INDIRECT (or alternative) in an Array into a Matrix
I want to merge multiple arrays that are in multiple sheets into a single matrix with the size of Max(Columns(arrays)) x Count(arrays).
See image bellow to better understand the inputs and expected ...
2
votes
4
answers
45
views
merging multiple lists with shifting elements into one big list
How can I merge/extend a list to include the elements in another list which contains more information? The problem is the index where shifting occurs is not constant.
[1,2,3,4], [2,3,4,5], [5,6,7,8], [...
0
votes
1
answer
23
views
How I can select two elements to one list with linq
Firstly I need to create string array that include elements came from different properties of one object.
At the below code MyDatas is IEnumerable, prop1 and prop2 are string.
var array = myDatas....
0
votes
1
answer
81
views
Merge two json overwriting different innested objects in php [duplicate]
I have two json objects with innested objects and I need to merge them into one object overwriting the original values with the ones from the second object.
First JSON
{
"field 1" : {
...
0
votes
1
answer
106
views
Array merge from foreach loop in PHP
I'm making a website that uses foreach loop for the output. The output is a bunch of arrays, but it's not quite right. I used the foreach twice because it requires 2 arrays for the output. I got the ...
0
votes
2
answers
81
views
How to merge below array in PHP?
I have two json format where I am converting that json into array and then merge it, but its not working.
see below two json format.
Below is my code in PHP and its not merging the array, what wrongs ...
0
votes
0
answers
690
views
Combining Xarray datasets is too slow
I am working with satellite data which has measurements over different locations for different times. I am working with netcdf data in the form of xarray Datasets. I'd like a "union" of ...
-1
votes
3
answers
107
views
Combine elements within the array [duplicate]
I have no idea why this question has been marked as a duplicate, because the so-called duplicate is about using array_merge to combine arrays - this question is about combining element trees WITHIN an ...
0
votes
1
answer
3k
views
Merge duplicate cells - Google Sheets
The intended operation is to search column A for duplicate values (column is already sorted). Each duplicate value in A should be merged into 1 cell. Also, merge the same rows in B,C,D,E,F,G,H (take ...
-2
votes
1
answer
231
views
Warning "Using uninitialized memory 'x' " when trying to work with an element from an array even though I read all the elements [duplicate]
I'm trying to combine two sorted arrays and when I compare two of the elements, each one from one of the two arrays, I get the warning " Using uninitialized memory 'x' ".
Here is my input:
5 ...
1
vote
1
answer
86
views
Merge two multidimensional arrays using recursion, but not on full data set
I'm trying to add 2 array data to each other with array_merge(). It's just attached to the back. But lower levels are ignored.
Is there an alternative to array_merge() that will merge the user values ...
0
votes
1
answer
745
views
Excel : How to merge two dynamic arrays into one dynamic array, with alternating rows?
I have two dynamic arrays, A1# and B1#. I want to combine them into a dynamic array, C1#, like so:
Column A
Column B
Column C
x
4
x
y
5
4
z
6
y
5 ...
Currently, I am using the solution provided ...
-1
votes
1
answer
369
views
Merge multiple WP_Query results into an array with no duplicates
I have a custom post type with its own custom template, and I want to display blog posts that are related to the custom post type title. However, I want to display a referenced post first, then search ...
0
votes
2
answers
171
views
Union of two array, but time complexity is the issue
Multiple solutions available online for union of arrays, I came up with one of my own which is working fine but again it has significant time complexities (which I obviously don't know). So in order ...
1
vote
5
answers
79
views
Merge Objects in a array and increase count
[{name:"abc",value:5},{name:"abc",value:10},{name:"abc1",value:5},{name:"abc1",value:15}]
I want to merge it by name so that the new array will be
[{name:"...
-1
votes
1
answer
55
views
How to combine multiple arrays of duplicate first element (Combine only second element) in PHP?
I've an array of arrays in which I've 2 values in each array first one is personID and second one is Skill, there are multiple skills of same persons I need all same skills to add in an array with ...
1
vote
4
answers
731
views
I want to merge values of a nested Json object with javascript:
So How to merge values of a Json object like this:
{"zz0": "value 1","zz1": "value 2","zz2": "value 3"}
into this:
{"key":["...
0
votes
2
answers
618
views
Merge array of objects with multiple same keys (Dynamic keys)
What is the best way to merge array contents from JavaScript objects sharing multiple key in common and keys list is also dynamic so we don't know that how much keys are there key is there in keyname ...
1
vote
0
answers
151
views
DBT- Nested_Table Merge
I want to do a merge operation in DBT.
my target table is nested. I wrote the code in 2 steps.
In the 1st stage, I bring it to the level I want in my target table.
In part 2, I merge it. but since I ...
0
votes
1
answer
313
views
MergeSort only works with power of 2 array lengths
I'm trying to do a MergeSort algorithm in c, and it doesn't exactly work, when i try small arrays ( lengh < 4) it works juste fine, but when it goes above 4, it only works with power of 2 length ...
0
votes
1
answer
91
views
How to merge existing Google Sheet tabs copy a range of variable unknown length and append those values to a new sheet using Google Apps Script?
I'm a novice at programming, let alone Google AppsScript. Hopefully this is detailed enough for you to understand my issue and help me find a solution.
I am currently pulling data from an API and ...
0
votes
1
answer
475
views
Merge incoming array document to existing document with elasticseach script in logstash
I want to merge new document to existing document. My existing document is like that:
{
"_source": {
"name": "xxx",
"recall": [
{...
1
vote
1
answer
80
views
How to best merge arrays?
I have 3 arrays. I need to add some values from array "data2" and "data3" to "array1".
I wrote a code example, but in my code, I missing all indexes that do not exist in ...
0
votes
1
answer
227
views
Import multiple Google Sheets into 1 sheet / The JavaScript runtime exited unexpectedly/
the code is good no bug was identified, but the folder is very heavy (full of files) so the runtime (execution) is infinite and I have this as a comment
The JavaScript runtime exited unexpectedly.
...
0
votes
0
answers
53
views
Merge results of PHP functions as one JSON object
I have three functions, live_event() - the main function, archived_video() - runs inside live_event() if conditions fail and additional_videos() which should be run in all cases and its results ...
1
vote
1
answer
3k
views
Pick the points on horizontal axis
There are many sets of points on the horizontal axis of coordinate plane. If a point is plotted in between any set that set is reduced to that point. Given X Sets, find minimum number of points one ...
0
votes
1
answer
147
views
Is there a way to merge two nested array based on common key [closed]
This are the two array that needs merging based on common id, the nested array should also be merged
First Array
const arr1 = [
{ id: 1, name: "sai", accounts: ["a"] },
{ ...
3
votes
4
answers
718
views
How to create a new array of objects from two arrays based on object values?
I'm struggling with merging two arrays of objects (fetched from blockchain data) into a new array based on object values.
The goal is to get the latest interaction with a user.
A simplified but close ...
-1
votes
3
answers
178
views
Merge arrays with Sum specific value keys
If someone has already done it, the idea is to merge different arrays into one and also merge the values sum of price, qty only for the identical keys.
In my example I only put two arrays to be merged ...