Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

I am attempting to use a single element of an array, when creating a string message, but it is using both elements, concatenated by a space, whether I use $myArray[0] or $myArray[1]... # Multiple ...
Todd Powers's user avatar
Best practices
0 votes
1 replies
22 views

I've been researching this for a day and I've found a lot of conflicting information on multiple websites. I'm writing a simple test that will allocate and initialize a char** (array of strings, char*...
Maryann's user avatar
  • 39
-4 votes
2 answers
96 views

I am trying to produce a multi-colored cube in perspective, a Minecraft logo, on an HTML canvas. This is part of my code for producing the top face of that cube: for (let i = 0; i < 16; ++i) { ...
Ignacy's user avatar
  • 17
-2 votes
0 answers
82 views

I have this part of my code where I have an array and want to compare it with other constant arrays, to find a match. As I am working with Multi-dimensional arrays, I decided to store these constants ...
grdj's user avatar
  • 1
-3 votes
0 answers
47 views

I have two arrays (one going from 0-49 listing every US state, and another one going from 0-49 listing the US capitals.) and I need to binary search the second array to match a selected US state to ...
Waluigi Apparition's user avatar
4 votes
2 answers
132 views

For background, I am working to create a version of minesweeper that runs in the terminal to become more familiar with coding bigger projects in c. I am coding in VScode, to run on a Linux server (...
Librarian of Stars's user avatar
1 vote
1 answer
51 views

I am doing an assignment on matrices and gradients, where the final answer must be expressed as a row vector. vr = np.array([1, 2, 3]) vrr = np.array([[1, 2, 3]]) Mathematically, a row vector should ...
Louis Chua's user avatar
Advice
0 votes
1 replies
63 views

I have this json data which I need to convert into an object. The json has a parent/child relationship instead of actual children object in the parent object. { "queryType": "tree&...
ads's user avatar
  • 1,743
0 votes
2 answers
123 views

I have a table with data structured like this. Each product ID has a list of element IDs--for each element, there is a dictionary including a list of elements and their assigned IDs. Not every element ...
Tyler Moore's user avatar
Best practices
0 votes
5 replies
91 views

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 ...
Powl_London's user avatar
Advice
0 votes
1 replies
58 views

So in iOS 26, the search field changed a bit where it can be at the bottom. While other apps have the search in the nav bar, wallet has it in the toolbar, so when it's pressed it changes to a ...
Chefski's user avatar
  • 43
4 votes
2 answers
77 views

I have a search function on my site that takes a text input and searches "documents" for a matching string of text, then displays the matching items in a list. This works perfectly. I just ...
dead-in-a-damn-ditch's user avatar
-8 votes
0 answers
113 views

I need to create an arraylist, that contains an array of objects to act as the rows of a table, like this: ArrayList<Object[]> rows = new ArrayList<>(); each of these Object[] arrays will ...
Luna's user avatar
  • 1
0 votes
1 answer
83 views

The operation: operation.recordMatchedBlock = {recordID, result in switch result { case .success(let record): print("RecordID: \(recordID), record: \(record)") let ...
valentine's user avatar
1 vote
1 answer
53 views

I have a table which looks like this: I want to copy the first two columns of data and insert them before the EOF, but empty them before the paste. The end result should look like this: So far, my ...
Stuart L's user avatar
  • 181
-7 votes
0 answers
120 views

I'm using C#. I have a certain number of Newtonsoft.Json.Linq.JArray, let's say A1, A2, A3, and so on. I need to create an array or something similar of this objects in a way that, if I do something ...
iii's user avatar
  • 17
1 vote
0 answers
68 views

I have a table with the follow definition: CREATE TABLE "test" ( id UUID PRIMARY KEY, created TIMESTAMPTZ NOT NULL, description TEXT, permissions TEXT[] ); I want to bulk ...
F21's user avatar
  • 33.6k
5 votes
0 answers
206 views

I implemented a simple 2D array wrapper using a single contiguous std::vector and, benchmarked it against std::vector<std::vector<>>. Surprisingly, array2d is just slightly faster! #...
Ali Sedighi's user avatar
0 votes
1 answer
105 views

I have a DolphinDB table with an array vector column. I need to remove duplicate rows based on subset relationships within that column. Sample Input: sym prices a [3,4,5,6] a [3,4,5] a [2,4,5,6] a [5,...
xinyu zhang's user avatar
1 vote
1 answer
82 views

Premise I have a MultiDatePicker bounded to a closed range of the current month. In addition, I have a datePicker representing a "Start Date" that is the current day. I want the Day of the ...
tishly's user avatar
  • 67
1 vote
2 answers
74 views

Situation I have two tables. ing_master is a master list of ingredients; pdet is a product table, with an ingredients field formatted as json array. For each product's ingredient list in pdet, I want ...
Kade's user avatar
  • 13
Tooling
0 votes
4 replies
107 views

I would like to compare unordered lists / objects with an indeterminate depth in javascript like: const t = { key: [ { subKey: [ { subSubKeyOne: 1, subSubKeyTwo:...
Ratinax's user avatar
  • 41
-7 votes
1 answer
173 views

I have an object obj; and I then obtain an array arr of key-value pairs. Assuming that the key sets of obj and of arr are disjoint (i.e. no key appears in both) - how do I efficiently add all pairs in ...
einpoklum's user avatar
  • 137k
-6 votes
0 answers
150 views

I have a simple class that contains a fixed size int array. The class can initialize the array, shuffle it, and print it: #include <iostream> #include <algorithm> #include <random> ...
dawidg81's user avatar
3 votes
2 answers
117 views

I'm working on this piece of code as part of my coursework, ideally any advice I get for this would be educational in some way; I don't want an exact answer, just need someone who knows more than I do ...
Eve's user avatar
  • 33
4 votes
4 answers
118 views

How can I map an unknown value alongside other known values in bash using an associative array, so that: #!/bin/bash array=("foo" "foo" "bar" "something else" &...
Caio's user avatar
  • 75
3 votes
2 answers
63 views

I'm trying to find the outbreak time (when the number of zombies >= number of humans) as a function of the zombification rate gamma, using the following code: arrOutbreakT = [] arrGamma = np....
me1ll0's user avatar
  • 33
-5 votes
2 answers
136 views

This is my code $serverGuestFile = fopen($_SERVER['DOCUMENT_ROOT'] . '/server/guest.txt', "r"); $serverGuestFileData = fread($serverGuestFile,filesize($_SERVER['DOCUMENT_ROOT'] . '/server/...
Hahanap's user avatar
-1 votes
0 answers
43 views

I created a php array file. My PHP Array File Example. I put array to g.horje.com/t.php <?php $val = array ( 0 => array ( 0 => '1', 'id' => '1', 1 => 'Search Engine ...
Md Rakib's user avatar
Advice
0 votes
3 replies
100 views

I have an List of Objects that implements the Comparable Interface that I want to sort. I do not want the original List returned sorted, nor do I want an new List returned in sorted order. What I ...
bauerjlb's user avatar
Advice
0 votes
5 replies
88 views

I've been working on a program that prints out each word, their number of occurrence's and percentage of the number occurrences over total length of the sentence. As you can imagine I had to create a ...
Mehmet emi Sevim's user avatar
Advice
2 votes
3 replies
119 views

When using setters/getters on arrays, does your set() override the entire array or just the key? What is the accepted or best practice for this? Would you use set() for something like this or would ...
germanshedder's user avatar
1 vote
1 answer
138 views

I'm trying to implement a lambda function (for educational purposes) to initiate an array to append to the front of potentially encrypted data to save information like salt and initiation vector, ...
Lucy's user avatar
  • 83
0 votes
2 answers
160 views

Here are two React components: function MainScreen() { const [stopwatches, setStopwatches] = useState([ new Stopwatch('A'), new Stopwatch('B') ]); const [selectedStopwatchIndex, ...
eric's user avatar
  • 31
1 vote
1 answer
69 views

Regarding the array reversal problem, I guess loop invariants are logically correct, based on the symmetry of the elements in the array and their relationship after reversal. However, I don’t ...
Morgan's user avatar
  • 13
1 vote
2 answers
67 views

I'm trying to loop over an XML file and output the structure. However, I'm only getting one set of data on the second loop. Below is my code, and below that is a snippet of the XML structure. <...
ColdFusionDude's user avatar
Advice
1 vote
14 replies
249 views

I need help regarding a code I want to write in c++. I want to develop a program that receives and visualizes CAN messages on a GUI. The messages in question are about 100 distinct ID's, so we're not ...
Simone Sesana's user avatar
4 votes
3 answers
175 views

The practice question I am working on reads as: Read two strings, both of them do not contain white spaces (but may contain non-alphanumeric, such as ‘,’, ‘.’, ‘/’ ...). Display the first string ...
Andrew Attfield's user avatar
-2 votes
2 answers
198 views

I'm setting my first steps in COM communication. I have an application, written in C#, using a byte array, and that is working fine. When I try to do the exact same thing in C++, it does not work. I ...
Dominique's user avatar
  • 17.6k
1 vote
1 answer
69 views

The {plumber2} R package recently got released and I'm trying to understand how to leverage an API. This basic example below works as long as I'm passing only one string without comma in my query. #* ...
Michaël's user avatar
  • 341
0 votes
0 answers
118 views

I am implementing an ordered list that automatically inserts elements in the correct sorted position using a Comparator. The list is built from scratch (not using java.util.ArrayList) and uses an ...
Raam's user avatar
  • 11
Advice
1 vote
9 replies
201 views

unsigned int n = 1; char* s = "X" + 1; s[-n]; Is that third statement undefined in C23? It seems it is, as by the standard in 6.5.2.1.2: ... The definition of the subscript operator [] is ...
Kyle's user avatar
  • 1,116
-5 votes
1 answer
137 views

I'm doing an assignment for an engineering course I'm taking, and I'm testing my code as I go along. For some reason, it gives an error when I compare an array element to a value passed into my ...
Maxwell Rantilla's user avatar
2 votes
1 answer
66 views

When editing an array of enumeration with unknown size in Dymola (2025x r1), it is possible for the user to set a value to the array which is not a vector: type Catalogue = enumeration(A "A",...
AngeliqueR's user avatar
Advice
1 vote
4 replies
97 views

Circular shifting cshift in fortran as an equivalent in Julia : circshift. But I'am seeking an equivalent of eoshift (https://fortranwiki.org/fortran/show/eoshift) which is a acyclic shifting that ...
aitzkora's user avatar
  • 339
2 votes
2 answers
187 views

ff I have a function foo, it needs to accept a string, this string can be passed to it directly by typing at the terminal, from a variable or from the clipboard. function foo{ [CmdletBinding()] ...
Ralf_Reddings's user avatar
1 vote
2 answers
182 views

The following code is trying to set the test array in the first for loop, but it can't be used in the second for loop. int main() { int *test[3]; /** Try to set the array value one by ...
stackbiz's user avatar
  • 1,914
0 votes
0 answers
27 views

I am trying to fetch a comma separated list of coordinates from a database and then show them on a Mapbox GL JS map. By using the following FeatureCollection, I am able to show a Line between ...
trainmania100's user avatar
0 votes
1 answer
47 views

I am using the cross-sectional engine and need to store multiple rows of fields as a single array vector. However, I have encountered several issues during the process: The scenarios I attempted are ...
xiao feng's user avatar
3 votes
1 answer
148 views

Let's say I have an array_1 containing a string which is a name of another array_2. And now I would like to convert the array index into a variable containing the array_2. I have the following working ...
Jimski's user avatar
  • 1,040

1
2 3 4 5
8364