417,612
questions
-1
votes
0
answers
11
views
Adding and removing selections from an array for a compensation calculator
codepen: https://codepen.io/strozilla/pen/abVYbrx
const compensationRates = {
10: { single: 171.23 },
20: { single: 338.49 },
30: {
single: 524.31,
withSpouse: 586.31,
...
1
vote
1
answer
34
views
Uninitialized array literal
I want to create a pointer that is either an array or a null pointer. Something like
int * arr = (condition) ? int[var] : NULL
but there doesn't seem to be a way of declaring an unnamed, uninitialized,...
-1
votes
1
answer
39
views
Why can't I assign an address to an array, but assigning an array to a pointer works in C++?
I have the following code:
int main() {
int val = 25;
int arr[] = {10, 20, 30, 40, 50};
arr = &val; // This line causes an error
int* ptr = arr; // This works fine
cout <&...
0
votes
0
answers
6
views
Unhiding Parent and Children Sheets and move to Right of Index Sheet
I am calling the Parent sheet with the Listbox, and the Parent Sheet should be moved to the right of the "Index" Sheet, and then the Case Statement with the Array Sheets, which are the ...
0
votes
0
answers
15
views
In Java, is it possible to concatenate the contents of two PDF files in order to concatenate the visible contents of the files? [duplicate]
I have a back-end Java application that grabs the contents of PDF files from a blob in the database, and puts them into a byte[] array to be able to download.
My end goal - if possible - is to append ...
-3
votes
0
answers
38
views
How do I get my program to accept only zeros for part of a string and then zeros and ones for another part of the string?
int main() {
int size;
cout << "Enter the length of the binary number:\n";
cin >> size;
std::vector<int> numbers(size);
string binaryIn;
//region of ...
0
votes
2
answers
14
views
How to use the output of a CONCAT() function as an array in Excel
I would like to use the output of a CONCAT() function as the title for an array within XLOOKUP(). The XLOOKUP() formula I am using that works is:
=XLOOKUP(MetricDesired,'2023-12-13_000_Report.txt'!$C:...
2
votes
3
answers
44
views
Minimum number of operations for array of numbers to all equal one number
You have one array of numbers, for example [2, 5, 1]. You have a second array of numbers, for example [8, 4, 3]. For each of the numbers in the second array, how many operations would it take to make ...
0
votes
1
answer
24
views
Distinct for jsonb_path_query_array
Have some trouble with jsonb_path_query_array in pgsql.
Is there a way to distinct values inside arrays?
I have something like this
select jsonb_path_query_array(public.table.column, '$.Idents.type' ) ...
-1
votes
0
answers
39
views
Does .NET have an official or standard class for arrays that use value equality rather than reference equality?
I keep running into cases where I need an array with value equality. An array of records that itself acts record-ishly. At the moment I'm working on an IIncrementalGenerator and want all the ...
1
vote
1
answer
18
views
I have tried to implement search functionality in react, when I clear the input, I am not getting back the full list
The search functionality works but when I clear the input value, the complete list does not show up. I am using filter method for it, I am not understanding how can I get the full list back.
//search ...
-11
votes
0
answers
73
views
What happens if a [null] value is sent to an int array? [closed]
I will ask a simple question
public int[] Ids { get; set; }
What error will I get if I send [null] to my property?
public int?[] Ids { get; set; }
Will I get an error if I change it like this? (...
0
votes
0
answers
32
views
Hackerrank perfect pair question, TimeLimitExceededException
Given an array of integers. count number of perfect pairs from the array, the Perfect Pairs is a pair of integers (x, y) if both of the following conditions are met:
min(|x-y|,|x+y|) <=min(|x|,|y|)...
0
votes
1
answer
46
views
How can I proxy [[set]] on all JavaScript array objects?
I'm trying to proxy the [[set]] method on JavaScript arrays. Is it possible to proxy all arrays, and not just a specific one? My handler would check the object being set in the array and if it ...
-2
votes
0
answers
8
views
Find element of rank r in each window of size k
Given an array of size N and a sliding window of size K,You need to find an element of rank r(1<r<K) in each window in O(NlogK) time complexity.
I know brute force approach but for larger values ...