Category "arrays"

How do you use a JSON array in a "WHERE IN" clause in MariaDB

I am using MariaDB version 10.2 I have an array of GUIDs stored as JSON in a table and I want to select rows from another table where the ID matches any of the

Setting a pointer to a specific array and/or struct element

Here is the scenario: I have an array, AllElements of structure ElementSet, and inside of that structure - is a set of myElement structures and also an array of

How to query an array of FLOAT?

I have a table with a column with type double precision[] created like this: from sqlalchemy import Column, String, ARRAY mytablename= 'mytable' class creat

Program in assembly x86 [closed]

I recently made a program with C++ and ASM. Can anyone help me make this code a more efficient one , in the ASM part or both. I would really a

Initializing a class with numpy array question

So I have defined the following function to be entered into a class: MatrixConverter(arr) Which works exactly how I want it to, taking in a numpy array as argu

How to average columns of data from multiple, flat arrays?

Let's say I have 4 arrays with the same amount of values in each: $array1 = array(0, 7, 5, 0); $array2 = array(2, 6, 10, 0); $array3 = array(4, 8, 15, 10); $arr

Sort flat array by multiple rules

I would like some help regarding my sort function for an array as it is not working as I expected. This function is to sort array of [0,1,2,3,4,...23] into arra

I tried to solve Best Sum problem in Python but I am not able to figure out the issue, please suggest what is wrong

The function should return an array containing the shortest combination of numbers that add up to exactly the target sum. If there are two (or more) possibiliti

How to set value by call variable name from string c#

Now I'm new for c# development. I have 100 data from Array and also have 100 variables. How can I match 100 data with 100 variables? for example for(int cou

javascript to return values on decrement

My code is following var points = 4; var yModifier = []; for (var i = 0; i <= points; i++) { yModifier.push([]); }; yModifier.forEach( (a, j) =&g

Query formula not working with error AVG_SUM_ONLY_NUMERIC

I am getting this error on my query. Unable to parse query string for Function QUERY parameter 2: AVG_SUM_ONLY_NUMERIC I don't understand whats the problem is

How to save and load multiple arrays in android Java?

I'm very new to Android Dev, within this month, and I'm attempting to create a simple app to store 'medication' that a user needs to take each day. Currently, I

BigQuery standard SQL: how to group by an ARRAY field

My table has two columns, id and a. Column id contains a number, column a contains an array of strings. I want to count the number of unique id for a given arra

How to make binary tree from array in javascript?

I have an array var array = [8,10,12,5,3,6]; Logic First node would be root node. If new node value is less or equal =< than parent node, It would be left

How do you remove duplicate values in array in Python?

I have an array where each element is the mean of a set of random numbers. I want to be able to remove duplicate values in this array. How would I go about doin

Excel array countif formula

I want to use COUNTIF function to evaluate how many items out of 2,0,0,5 are greater than 2? In Countif function, first argument is range and second is criteria

C++ Read txt and put each line into Dynamic Array

I am trying to read input.txt file, and trying to put each line into the array as string (later on I will use each element of array in initializing obj that's w

Vector reversal using recursion

I'm supposed to reverse the order of an array. I was asked to break the array into two halves and run two recursive functions on each half. When I run the funct

Find an object with certain private value in a java Collection

I am currently coding a game that uses an 8x8 grid. I have to stock a domino (2x1 size) in the grid for every player but when a player wants to add a Domino to

Find the Max and Min element out of all the nested arrays in javascript

I have a array like so: var arr = [[12,45,75], [54,45,2],[23,54,75,2]]; I want to find out the largest element and the smallest element out of all the elemen