4,418 questions
-3
votes
1
answer
154
views
How do I consolidate an object of arrays of timestamped values into single array of objects? [duplicate]
I need to aggregate all the timestamped values into their sums. (Please note data may be missing for a specific log at specific timestamp.)
I have this:
const logs = {
log_1: [
{ x: "...
0
votes
0
answers
57
views
How to change my slurm script to perform benchmark on Thin node
I'm trying to run the following script, but after a few seconds (approximately 4) the job ends without creating the output_file with the data and without creating outout and error slurm files.
#!/bin/...
Best practices
0
votes
5
replies
104
views
Option Array, locating and returning array with correct criteria
I have an object db that has one field containing SKU's that correspond to another object that contains different venues.
db.SKU = [1002,1005,1001,1008,1007];
I then have another object listing the ...
9
votes
1
answer
164
views
How to remove character differences from multiple strings [duplicate]
Let's say I have a bunch of product strings that could vary slightly in format, e.g.:
Super red Megaman T-shirt
Super Megaman blue T-shirt
Super black Megaman T-shirt
Super Megaman T-shirt - ...
-3
votes
1
answer
111
views
Excel - Dynamic array FILTER to return ARRAY for Stock Portfolio Cost Tracking
I'm updating a tracking spreadsheet for a stock portfolio and would like to dynamically pull the holdings of the portfolio at specific time periods so that I can view the holdings at any point in time,...
1
vote
2
answers
109
views
Implementing a factorial function in Scala
I'm working out of Scala for the Impatient (3rd Edition). (I'm not doing this for a class.). I'm trying to implement a factorial function using to and reduceLeft without a loop or recursion. This ...
-3
votes
2
answers
69
views
Add key/value to dict in map method
I have this code:
results = "[ { user_name: 'User 1',
email: '[email protected]',
userid: 'HJ10092',
event_type: 'download',
country: 'Venezuela',
doc_type: 'mspowerpoint',
...
-3
votes
1
answer
84
views
Rewriting nested loop with reduce [closed]
I wrote the below code to solve a prep test, found online. The goal is to find the min absolute difference between numbers in an array.
function minimumAbsoluteDifference(arr: number[]): number {
/...
2
votes
0
answers
47
views
NVIDIA webinar on parallel reduction gridsize
In the last example of Mark Harris' webinar I don't understand the indexing before the parallel reduction part. In "Reduction #6" the gridSize/number of dispatches was ceil[N (the size of ...
0
votes
1
answer
42
views
Flatten Date Sequence with an attached Value in Google Sheets (Without the use of Macros)
This is a similar question that was posted before but with a little expansion to the problem.
The original post was this link:
Create flatten dates sequence in Google Sheets in one column (without ...
3
votes
1
answer
98
views
OpenMP reduce on large heap array cause segment fault
When I try to reduce a large heap array with OpenMP reduction, it segment fault:
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
...
0
votes
1
answer
93
views
Inject behavior when last element is used before referencing accumulator
I am a a bit confused by some of the behavior of the of the inject (alias reduce) command in Ruby
Background
For any array, the second element (referenced after the accumulator) reflects the last ...
-1
votes
2
answers
84
views
2d array - group by first item and calculate average of corresponding number
I have a 2d array which contains a list of series with title, rating, and time spent watching. For example:
let seriesList = [["Squid Game", 3.5, "4 days"], ["Squid Game",...
0
votes
2
answers
91
views
Label the row according to the source
I want to importrange from Spreadsheet OLD with several tabs/sheets into Spreadsheet NEW. What i want to do is to import values from SheetA and Sheet B.
First column: vstack(importrange(SheetA!A5:A),...
5
votes
3
answers
114
views
Why has my array element been changed by this declaration?
Javascript code:
const bigArray2 = [
[1, 2, 3],
[2, 4, 6],
[3, 6, 9],
];
//creates single-layer array containing all elements of every array within bigArray2
const combinedArray = ...