Category "arrays"

How to fill and access a Django ArrayField?

To solve my (kinda specific) problem, I found that I have to use Django ArrayField: https://docs.djangoproject.com/en/2.1/ref/contrib/postgres/fields/#arrayfiel

Finding performance feasibility using array strings

Here is the requirement details: time = ["09-13", "12-14"] getResult(time) = false The first performance runs from 9 a.m. to 1 p.m. and the second one starts

Movie Recommendation: Generate similar movies for all movies

I'm using scikit-learn TfldfVectorizer to produce the TF-IDF matrix #Import TfIdfVectorizer from scikit-learn from sklearn.feature_extraction.text import TfidfV

Split string of possibly adjacent elements of unknown length by type in JS

Given a string (actually a svg path) such as: "M72 0v754h405v-86h-311v-211h302v-86h-302v-285h311v-86h-405z" I want to obtain an array where each element is eit

How to get multiple values by index in an ojAlgo-array?

Let's say I have an ojAlgo-array defined like this ArrayAnyD<Double> regularArray = ArrayAnyD.PRIMITIVE64.make(10); regularArray.loopAll((final long[] ref

Using array_intersect on a multi-dimensional array

I have two arrays that both look like this: Array ( [0] => Array ( [name] => STRING [value] => STRING )

Finding Arithmetic Mean of Subarrays Efficiently in an Array

I am trying to find number of ways o calculate arithmetic mean of a subarray of an array. It boils down to this; given an array X and an integer S, how many con

Power Automate reminders to be send on number of days from initial day

I am working on SharePoint List solution that acts on date trigger. The base date is a date of parcel receipt. I need a set of reminders that stop once Picked f

Average test score from result array with varying group sizes

I am working on a problem where I have to calculate the average from a bunch of test results with the following criteria. -his program was tested on several tes

Codility CyclicRotation Javascript Solution: Empty array returns an error

I am trying to solve this problem in codility. My solution passed all the tests except for one with empty array and rotation of 1 as arguments. I'm someway lost

Program to find number of elements between two elements a and b (where a and b both are inclusive)

Given an unsorted array of size n, write a program to find number of elements between two user-defined elements a and b (where a and b both are inclusive) of a

How to POST Object Array with Retrofit?

I send the data from the postman like this: {"contacts":[ { "idContact": "201", "name": "Joseph", "lastName": "Herrera",

Can PostgreSQL JOIN on jsonb array objects?

I am considering switching to PostgreSQL, because of the JSON support. However, I am wondering, if the following would be possible with a single query: Let's s

Electronics Shop

I have been working on this question, and after submitting my code 7 cases passed, however, 9 cases failed. The question link is here of HackerRank : Electronic

How to find Z highest subset Sums from the array of N elements

I have an array of numbers, now I want to find all possible subset sums and get the top z elements in it. Example: Input : arr[] = {2, 4, 5}, z = 3 SubsetSums

Remove specific object from array during aggregation

I have documents with the following structure: {field: ["id1", "id3"]}, {field: ["id2", "id1"]} To query the documents I use aggregate({$match: {'field' : { $i

Accessing a JSON array inside of a JSON object in Android Studio

I am testing my knowledge and ability with android studio and API's, I have been using volley and I have come across a little problem. The API I have been using

How can I access and process nested objects, arrays or JSON?

I have a nested data structure containing objects and arrays. How can I extract the information, i.e. access a specific or multiple values (or keys)? For examp

searching in arraylist always not found

no matter what I use indexof() or contains or .equals() changing everything to uppercase or to lowercase It always return false and not found can someone please

convert dictionary to abstract matrix in julia

I'm trying to do dimension reduction, and I got a: d = Dict{Tuple{String, String}, Vector{Float64}} Trying to apply umap on it. While umap can only accepts abs