Skip to main content
0 votes
0 answers
97 views

I have a fairly straightforward MYSQL query which retrieves details from a sale and stores them in an array (I've simplified it by just using 1 saleid which has only 1 salesdetails row - other sales ...
Andreas BB's user avatar
0 votes
1 answer
67 views

I need to apply a jax function to a sequence of arrays of varying sizes. For example: import jax.numpy as jnp arrs = [jnp.array([1., 2.]), jnp.array([6., 7., 8.]), jnp.array([12.])] ...
Ben's user avatar
  • 639
Advice
1 vote
6 replies
182 views

I'm new to Python and I'm trying to write a script that removes all even numbers from a list. My logic was to loop through the list and, if a number is divisible by 2, remove it. Here is my code: ...
Yevhen Ivashchenko's user avatar
Advice
1 vote
4 replies
71 views

I am wanting to assign a group indicator to my data based on the difference between a value of a field in the row and the value in the same field in the previous row. I think data.table's shift() ...
Will Phillips's user avatar
3 votes
1 answer
94 views

I used to do audio sampling but now I have moved into images.I am trying to implement the discrete fourier transform for a image(16x16 bits). I have created my own image decoder.Every file contains ...
Root Groves's user avatar
-6 votes
2 answers
120 views

I'm trying to create a setup where a user can talk to a chatbot, and the chatbot will run through a predetermined list of responses in consecutive order. The bot will respond each time the user gives ...
Berlin Mair's user avatar
0 votes
2 answers
114 views

I have a global variable FlowTable() as Variant. I delete rows in it within a loop. Each time it runs, it should update the Ubound(FlowTable) because one row will have been deleted. I tried to enforce ...
Chris's user avatar
  • 43
1 vote
1 answer
60 views

I am trying to iterate through a list of Urls find some elements, one of which is a list of other Urls. I then want to, in the same overarching loop iterate through the second list of Urls and find a ...
Nip's user avatar
  • 77
1 vote
1 answer
118 views

I am trying to recreate YSAP Terminal Christmas Tree in C instead of in Bash. I know there's a bunch of weird code as I don't do a lot of C programming, so a lot of it is mashed together from what I ...
Justin Aungst's user avatar
1 vote
2 answers
95 views

I'm trying to make 3 LEDs (a red, a green, and a blue) flash simultaneously. The blue one should flash slowly, the green one should go quicker, and the red should be fastest. I tried putting multiple ...
StriderRobotics's user avatar
0 votes
2 answers
85 views

This is a follow up to a similar question Plot with 2D histograms bins answered by @theozh. I've been trying to modify the linked code to work in a loop. However I've encountered a few problems ...
SofaScientist's user avatar
-2 votes
3 answers
94 views

I am looping around a cart dictionary that is in the session and I have defined a product for all the items. When each cart item button is clicked, they are sent via ajax, but only the first item is ...
Samyar's user avatar
  • 35
1 vote
2 answers
85 views

Why doesn't continue remember the command's exit status in sh? Given this loop: #!/bin/sh for i in 0; do false || continue done echo $? Output: 0 #!/bin/sh for i in 0; do false done echo $? ...
Rihad's user avatar
  • 139
Best practices
0 votes
4 replies
135 views

I have a list of ranges that consist of a start and end value. I need to optimise the list by identifying any overlapping ranges and merging them so that there is no duplication on the list. I have ...
Michael's user avatar
  • 507
6 votes
4 answers
243 views

I was working on a one-liner to subtract a constant value (e.g. 100 in this case) from a specific column using awk. So far I can manage to get to where I can print the last iteration only – which ...
Matteo's user avatar
  • 693

15 30 50 per page
1
2 3 4 5
6439