Skip to main content
Filter by
Sorted by
Tagged with
Advice
2 votes
12 replies
283 views

In Python, we know that while loops can run infinitely, but is there any way to make a for loop run infinitely? From my prior checking, I found a way to do so by importing the 'itertools' module, but ...
Ibrahim Sheriff's user avatar
0 votes
1 answer
258 views

I have an error with the react-native-calendars's agenda. I quite new to react native, and this is my second attempt to use an Agenda. Every time I tried, I have the "maximum update depth ...
edwylin's user avatar
  • 17
0 votes
1 answer
127 views

I was making a program in which user can keep entering numbers till user enters a multiple of 10. So I wanted to created a for loop for that and didn't knew what should be the infinite loop condition ...
Sanskar Kumar's user avatar
2 votes
4 answers
182 views

I have a postgress table incoming_records which contains 2 column supervisor_id, emp_id create table incoming_records(supervisor_id,emp_id)as values (null,01) --top level resources with blank ...
GD_Java's user avatar
  • 1,471
1 vote
2 answers
98 views

I am trying to solve the Set Mismatch problem using Cyclic Sort in Python. The problem statement is as follows: Problem Statement You have a set of integers s, which originally contains all numbers ...
Suhas's user avatar
  • 23
0 votes
0 answers
239 views

someone could help me understand why I had 2 Shelly 1 Mini Gen3 unusable after I run a very simple script on them? Below is the script: Shelly.addEventHandler( function (event, ud) { print('raw ...
AlexMork's user avatar
-2 votes
3 answers
136 views

index.jsx const { startTransition, useEffect, useState } = React; const { createRoot } = ReactDOM; function App() { const [foo, setFoo] = useState([1]); const [bar, setBar] = useState("1"); ...
pistol magic's user avatar
0 votes
0 answers
148 views

I am working on a project and am using whisper.cpp for speech to text. I am not using the Java bindings, and am instead compiling examples/stream and running it using the Process/ProcessBuilder API. I ...
Elijah Crum's user avatar
0 votes
1 answer
109 views

I'm implementing the partition function for QuickSort, and I've come across behavior that seems confusing. Specifically, in the partition logic: int partition(int A[], int low, int high) { int ...
Omm's user avatar
  • 37
0 votes
1 answer
74 views

I'm building a React app where I fetch data from an API and update the state. However, I'm facing a bug related to useEffect dependencies, which is causing an infinite re-render loop. Here's the ...
Merajul Hasan's user avatar
2 votes
3 answers
174 views

I am representing a collection of turtles, each with a moment when hatched. I want to randomly choose any mature turtle. I pretend that minutes are years, in this aquarium simulation. record Turtle( ...
Basil Bourque's user avatar
0 votes
0 answers
43 views

I have a mosaic of cells with interleaved movement, but I have not achieved a toroidal effect so that the cells appear again. import UIKit class ViewController: UIViewController { @IBOutlet ...
Gabriel Isaac González Arroyo's user avatar
-2 votes
1 answer
72 views

def stick_game(): num_sticks = 11 player = 1 playing = True print("***** WELCOME TO NIM! *****") print("Each player will take turns removing") print("...
Jacob Brooks's user avatar
-1 votes
1 answer
386 views

this code snippet do infinite recomposition while scrolling , not able to find why? How to manage state and animation in a HorizontalPager in Jetpack Compose? I'm working with Jetpack Compose and ...
Akshat Singhal's user avatar
0 votes
1 answer
369 views

We’re running an older Identity server on .NET Framework 4.6.2 with IdentityServer4, which we plan to replace early next year. In the meantime, though, we’ve had to upgrade our primary application to ....
Xytech's user avatar
  • 1
-1 votes
2 answers
148 views

I just started learning Verilog and made a system clock and its respective testbench, but it is getting stuck in an infinite loop in the testbench. Could you please help me? Below is the ...
Kartikey Pant's user avatar
2 votes
1 answer
65 views

I've been attempting to make a word soup program in C for an assignment: the program accepts user-inputted words and places them onto an NxN board, where each cell is a character. However, I'm running ...
Epikkyu's user avatar
  • 21
1 vote
0 answers
74 views

Context I was implementing a LinkedList sort solution with python (over on leetcode.com). The solution is a bottom up merge sort approach (divide and conquer). The code below is incomplete, it's ...
oussema's user avatar
  • 389
0 votes
2 answers
116 views

I'm trying to customize certain cells in a WinForms DataGridView, but I'm running into an issue where the painting event is firing over and over again non-stop forever, even when not scrolling through ...
Bighead's user avatar
  • 75
-1 votes
2 answers
205 views

This is a program which allows only authorized shareholders to attend a meeting, which is given as a file input. It asks for a name on the terminal and checks if it is in the file. If it is not, it ...
KeShAw's user avatar
  • 49
-1 votes
2 answers
76 views

I have written the code given below to get RGB value of each pixel which belongs to a image uploaded from a file. Then i want to list all color values of every pixels in the listbox. But "for&...
Ozzie's user avatar
  • 31
1 vote
1 answer
151 views

Well, i am trying to create a program that reads from a file descriptor piece by piece (defined as BUFFER_SIZE), until it finds a '\n' or the EOF. The problem its i am getting stuck in a infinite loop,...
Rache Bartmoss's user avatar
0 votes
1 answer
52 views

I read somewhere that canister upgrades can be (e.g. maliciously) prevented by another canister called by it by not returning from the call. But how come that a call could not return? It is limited by ...
porton's user avatar
  • 5,919
1 vote
1 answer
117 views

I've not added any features yet in this program and only added some tasks in "1)Create an account" while in this code block when you enter your name after pressing enter, it starts looping ...
Kanak Bodkhe's user avatar
0 votes
1 answer
80 views

I have 500x500 grid and random coordinates on this grid. I'm trying to get new random coordinates but they shouldn't be too close to the previous ones. I'm come up with this: In an infinite loop I ...
user26600642's user avatar
0 votes
2 answers
123 views

I have a class in c# called Pose. Its functionality is not really important, but it contains as fields another Pose called _parent, and a List called _children. In the setter for the _parent, I need ...
YaBoyShredderson's user avatar
1 vote
0 answers
40 views

I am implementing this custom hook for a cart where basically fetches productIds, and variants from async storage, then fetch all the information of the products from Firestore. The logic then syncs ...
Josh Lsc's user avatar
0 votes
1 answer
113 views

this is my component. i don't know why the moment i reload the page it'll always give me infinite loop issue. it'll throw the error the moment i go the page. i can't even fill in anything inside the ...
nfs's user avatar
  • 9
0 votes
2 answers
180 views

React version: 18.3.1 Steps To Reproduce Create a component that renders the children inside a , but only after it has obtained reference to that div (via putting the div node into a state) Pass a ...
Suren Poghosyan's user avatar
0 votes
0 answers
133 views

I have been asked to run a python script from the Windows Task Scheduler. In my python script I will substantially use watchdog library in order to instanciate and run an Observer that will monitor ...
Fra B's user avatar
  • 13
0 votes
1 answer
47 views

I want to have a redirect from https://example.com/app/my.page to https://example.com/app/my.page?login=INTERNAL but unfortunately I go into an infinite loop I have some staging script for httpd.conf ...
Viper's user avatar
  • 23
0 votes
1 answer
133 views

Context System: Fedora 40 Library Used: pthread.h Details: Read "To the point" if not interested I apologize for providing no code here as the whole program is more than 4000 lines of code ...
Programmer Newbie's user avatar
0 votes
1 answer
89 views

I'm trying to synchronize multiple threads. I expect script output when using threading.Condition and threading.Barrier will be about the same, but it's not. Please explain why this is happening. In ...
eugeny's user avatar
  • 1
0 votes
1 answer
208 views

I'm trying to solve a problem involving a fixed-bed reactor that uses a system of ordinary differential equations, but for some reason it gets stuck in an infinite loop. Here's the code: import numpy ...
Renato's user avatar
  • 11
1 vote
3 answers
137 views

I'm encountering a problem with using both + and * static functions in a Swift extension. I just want + to be * and * to be +. When I use just the + operator, it works fine, but when I include both ...
Adrian's user avatar
  • 167
2 votes
1 answer
115 views

Working on an online practice problem and ran into an issue that I can't seem to figure out. I am looking to find the longest length of a string of characters whose characters can only be replaced &...
EdAlex's user avatar
  • 45
-4 votes
1 answer
85 views

month = {"January" : "01", "February" : "02" , "March" : "03", "April" : "04", "May"...
Đinh Quốc Huy's user avatar
-4 votes
1 answer
118 views

In the following code, #include <iostream> #include <vector> using namespace std; vector <int> otm; vector <int> past; vector <int> strength; bool leaves(int n){ ...
Yuri Korostelev's user avatar
0 votes
0 answers
55 views

I'm trying to read a file that has this format: 1 2 3 4 I'm trying to store these values into an array using a while loop: ifstream myfile("file.dat"); int n, i; int myarray[30]; if (!...
theheretic's user avatar
0 votes
1 answer
61 views

At first, I tried to use a view pager, but due to the overall size issue of the view pager, I didn't think it was right to implement such a screen. So I started using Recycler View and even worked on ...
Duseop's user avatar
  • 149
1 vote
1 answer
82 views

I've tried implementing a one-card game with c, but my code is that when I run about 5 times, I fall into infinite loop at least 2 times. I've talked to chat-gpt a lot to solve this problem, but I ...
user25529716's user avatar
1 vote
1 answer
70 views

I encountered this problem when experimenting with file I/O. This method compiles: public static int testMethod1() { try { while (true); } catch (Exception e) { ...
tariqalr's user avatar
1 vote
0 answers
161 views

I have the following code which attempts to process a kafka message, and if it fails, logs/publish it to another topic for later processing. @Service class KafkaConsumerService( private val ...
phoenix's user avatar
  • 325
1 vote
1 answer
159 views

I have the following code at the moment: executed = False while executed == False: try: inp = input("Enter the variable you want to change (e.g.: limit = 10): ") eval(...
Westec's user avatar
  • 21
-2 votes
1 answer
99 views

I'm using the useState() hook in Deno Fresh, which is based on Preact. In an island I have: import { useState } from "preact/hooks"; export default function(){ const [state, setState] = ...
Ooker's user avatar
  • 3,400
0 votes
1 answer
185 views

Hello I am learnign about finite automata and I want to see if these diagrams and my explanation make sense. {w ∈ Σ∗ | w contains the substring 1010} using five states There is the substring of 1010 ...
cool cat's user avatar
2 votes
1 answer
70 views

I'm trying to code a GridWorld simulation in Haskell via reinforcement learning. I'm stuck because I keep falling into an infinite loop on line 109. I've been staring at this problem for a week, and I ...
Jan's user avatar
  • 33
0 votes
1 answer
67 views

I have a c# infinite loop code on a WinForm project, which uses a value in SQL which alternates between 1/0 and if it's 0 it'll continue the process, while if it's 1 it'll stay in the loop. The ...
MasterOfNothing's user avatar
0 votes
1 answer
475 views

I have a code that worked before but after I updated all the libraries, it started to render the App component continuously and React is throwing an Infinite Render Loop error: Minified React error #...
Cosmin Glodean's user avatar
-2 votes
3 answers
118 views

I am running a loop on a python Class method that depends on a boolean variable. When I try to change the value of the variable from outside, it seems like it is stucked in the loop and I cannot ...
Mario Kroll's user avatar

1
2 3 4 5
72