Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
0 votes
1 answer
89 views

I am working on a function where I will be recieving data from an SPI communication and then get the date/month/year from them I have created a function to do the latter void set_file_header(const ...
Maaz Madha's user avatar
1 vote
1 answer
40 views

I have to split a string and use a part of it for further processing. So the idea is: string='aaa-bbb-ccc-ddd' parts=(${(@s:-:)string}) print -- $parts[3] # ccc I would like to refactor the second ...
MaxPowers's user avatar
  • 5,541
2 votes
2 answers
81 views

I have a for in loop in my ViewModel that I want to process elements in an array one at a time, and if the API result from each element has a count of 1, then continue to the next element in the array,...
jonathan3087's user avatar
0 votes
1 answer
78 views

I'm trying to make a simple 3d renderer in CMU Graphics using rotation matrices. When I rotate the camera 90 degrees (left or right), and I try rotating (up / down), it does a "barrel roll" ...
Johan Nordén's user avatar
-6 votes
0 answers
59 views

.model small .stack 100h .data ;menu IDS dw "anmol","jia12","chaht", "nida1$" passwords db 0000h,0001h,0002h,0003h,0004h start_msg db "Welcome to ACJN ...
Nida Irshad's user avatar
Advice
1 vote
12 replies
132 views

Say I have a combination of the following: # This is a [string[]] type $A = [string[]]@("Aasdf","Casdf","Basdfs") # This is a [string] type $B = "Dasdfs" # This ...
Appleoddity's user avatar
  • 1,281
Advice
1 vote
5 replies
100 views

So I'm trying to learn CUDA C. I had an idea for a simple code that could calculate the simple average of a float array. The idea is that main() will call a host function get_average(), which will ...
bob.sacamento's user avatar
-2 votes
0 answers
44 views

I have the following which creates an array (of sorts!): var combined = []; function slides(){ $.ajax({ type: "GET", url: '../queries/get_all_slides.php', cache: false, dataType: &...
George Feichter's user avatar
0 votes
3 answers
76 views

I need to convert a JSON file to CSV in a bash script, this a sample file: { "total": 1, "jobs": [ { "deviceData": { "deviceId": "...
Cinghiuz's user avatar
-1 votes
0 answers
28 views

I want to make the collection view pills like the first screenshot but the moment i scale height up the width also scales up with it, i want small height and more width kind of resembling the fatso ...
Aman Khan's user avatar
Best practices
2 votes
3 replies
82 views

I have an array and I want to create a mask for this array based on a threshold, sorry if the explanation is a bit convoluted. The first step is to find the intervals of elements higher than half of ...
cicciodevoto's user avatar
-1 votes
0 answers
79 views

I have two arrays that won't multiply together, I just get a single zero. I would expect the result to be an array. Is there some behaviour of dynamic arrays that I don't understand here? The arrays ...
Toby Beisly's user avatar
4 votes
3 answers
155 views

I am on a quest to understand the nullable reference type system in C# (well, I guess the non-nullable reference types are the unique part). The mechanics of this particular situation are totally lost ...
ChromaKey's user avatar
4 votes
2 answers
114 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
1 vote
12 replies
169 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
-2 votes
2 answers
133 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
  • 37
-3 votes
0 answers
108 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
4 votes
2 answers
146 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
58 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
68 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
140 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
102 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
94 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
79 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
0 votes
1 answer
84 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
54 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
1 vote
0 answers
69 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
223 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
114 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
85 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
90 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
113 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
179 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
  • 138k
3 votes
2 answers
120 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
130 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
68 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
139 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
44 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
103 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
4 replies
94 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
120 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
146 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
  • 105
0 votes
2 answers
170 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
75 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
70 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
257 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
177 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
1 vote
1 answer
70 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
119 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
205 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

1
2 3 4 5
8364