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

Not possible to increment the counter using set state in a simple recursive function in React

I understand that setState is asynchronous, but does it explicitly wait for all other code to be executed before it completes (even setTimeout with delay)? I've been trying to increment a counter ...
milance78's user avatar
0 votes
0 answers
23 views

How Do I Create a Column that Incrementally Counts How Many Times a Value Appears in Another Column in a Pandas Dataframe [duplicate]

I have a dataframe that is similar to the following: Data Type 0 123 1 1 3453 1 2 23436 2 3 876 2 4 34652 1 5 14346 2 6 87682 3 7 14 ...
Aaron Horowitz's user avatar
0 votes
4 answers
90 views

Python: Decorator to count swaps in sorting algorithms

I want to write a decorator that will count the number of swaps in a sorting algorithm. I created a swap function to swap numbers and a decorator that counts each call to this function. The issues I'...
UsernameTHC's user avatar
1 vote
1 answer
107 views

It's supposed to be a MOD10 counter but it counts from 0 to 9 and resets to 4. Why?

It's supposed to be a MOD10 counter, but it counts from 0 to 9 and resets to 4. Why? Please give me the solution as a code and explanation for it if possible. module MOD10 (clk, clr, q); input ...
Hazar H's user avatar
  • 11
0 votes
1 answer
94 views

python pandas simple row numbering on monthly basis

I am failing to find a solution for trading research. I have a large dataset of market data running from 1993-2024. Since calendar days do not match the trading days. It might be implemented by "...
David Hajes's user avatar
1 vote
1 answer
90 views

How to combine 2 plots (density and contour plots) into one plot?

I want to combine the density and contour plots in one plot like the following picture in the RStudio. I used the following code to create the two separate density and contour plots: library(MASS) ...
miss alhejaili's user avatar
0 votes
0 answers
58 views

Statically assign IDs in c++ [duplicate]

It's rather easy to create a unique identifier class, which ensures every instance will automatically be attributed a unique integer upon construction: class UniqueIdentifier { UniqueIdentifier() {...
galinette's user avatar
  • 9,282
0 votes
0 answers
49 views

How to add a counter next to each href link of video in php page

I am weak in Ajax. I searched a lot for examples that would help me solve my problem, but I did not find any. I have a list of videos on a php page, and I want to add a counter next to each link. I ...
Asma Gobjukah's user avatar
1 vote
2 answers
150 views

for loop with two counters in Delphi

I'm new to Delphi so I apologize for the banality of my question. How can I write in Delphi a for loop with two counters like this in C++: int i, j; for (i=0, j=0; j<100; i++, j++) { //do something ...
steve.b's user avatar
  • 85
0 votes
2 answers
53 views

Is there a way to COUNTIF the number of partial name matches (REGEXMATCH) within a column of cells?

Im trying to make an Absent & Late counter based off answers from a google form. The google form collects whos absent and late through checkboxes and in the linked sheets all the names are ...
RAPHAELLE ABBY MONTAYRE's user avatar
1 vote
2 answers
133 views

Comparing counters and pointers in string loops in C

I write these codes to read characters in a string The first use Counter: const char str[] = "Hello World!"; for (unsigned short i = 0; str[i]; i++) { char c = str[i]; } The second use ...
M 027's user avatar
  • 155
0 votes
1 answer
74 views

Custom circular Countdown progressbar in Qt widget C++

I want a circular time counter to display the remaining time of a process that looks like the figure below I use Qty 6.6.3 and Qty widgets If anyone has an idea to do this, I would appreciate it if ...
abbas akbarzade's user avatar
0 votes
0 answers
37 views

Entity Framework: How to generate a (not Id) counter that resets each year

I have an entity "JobOrder" in EF that uses "Id" as incremental identifier (on SQL Server DB), with a field "Code" that is actually calculated, once the joborder is ...
laurarana's user avatar
-2 votes
1 answer
62 views

Counter in custom sequence using JK flip-flops

I need a counter that displays a custom number sequence instead of counting up or down. I know I'm gonna need 3 JKs, meaning 2 ICs with 2 flip-flops. a few logic gates, but I don't really get how I ...
Waffle_Runian's user avatar
0 votes
1 answer
37 views

How to meter an external counter in Micrometer?

I want to meter an external system counter in Micrometer. For the context: I want to provide Redis Streams specific metrics like https://redis.io/docs/latest/commands/xinfo-groups/ There is a field ...
pixel's user avatar
  • 26.3k
1 vote
1 answer
43 views

How to set counter value in TIM5 in Stm32 before starting it?

I am currently using Stm32F446Ret6 board for a project which involves starting timer, for which i am using Tim5. The problem i am facing is __HAL_TIM_SET_COUNTER(&htim5, 2000); is not setting the ...
Raymond Jude's user avatar
6 votes
2 answers
247 views

Measure balanceness of a weighted numpy array

I have player A and B who both played against different opponents. player opponent days ago A C 1 A C 2 A D 10 A F 100 A F 101 A F 102 A G 1 B C 1 B C 2 B D 10 B F 100 B F 101 B F 102 B ...
HJA24's user avatar
  • 384
2 votes
3 answers
121 views

How to get Buttons Enabled? (logic issue?)

I currently have a program with some teams that are in pairs. Clicking on a team increases the Wins of the team being clicked, and increases the Losses of the pair it is linked to. A team with two ...
Jazzwal's user avatar
  • 35
0 votes
1 answer
60 views

Javascript slider add counter slide number

I have a slider built in Javascript, CSS, and HTML with no dependencies. The slider works fine. How could I display the counter slide number in Javascript inside the div element .gallery-counter? For ...
Mathieu Préaud's user avatar
0 votes
1 answer
83 views

How can I increase my counter and have it persist across scenes and runtime

How can I make the muon counter "0/15" from the stage selection scene number go up when the player object touches the muon game object which you can only touch them in the stage scenes and ...
Linedol trainer channel gammin's user avatar
0 votes
0 answers
95 views

Automatic counter

I´d like to make an automatic counter beside a specific condition. For example, the counter should count the sequence of victories of a team. If the result is win count 1, see another date, if another ...
Murilo Evangelista's user avatar
0 votes
1 answer
45 views

How to Match Javascript id to my table view id

I need to have the same id tag as what is in my view table below in my code where the 'somethinghere' is at is where I could use some help this needs to match the same value number as myRow for some ...
Donnie's user avatar
  • 43
0 votes
2 answers
78 views

Tracking Page Visits in React using database at backend or API

I have a home page where whenever a user visits, I want to know how many times it has been visited till date. Now I dont required to save the count on local storage but in database or persistent ...
Sarvesh Agarwal's user avatar
0 votes
2 answers
50 views

Adding a counter for the position of a record in a R dataframe in a "for" loop

I have some code that runs a sports league table standings simulation, using a "for" loop in R. For each iteration of the loop, a table of standings (i.e. a dataframe) df is produced like ...
Alex's user avatar
  • 165
1 vote
1 answer
43 views

Why sequence_out is xx in the 2-bit up-counter testbench?

I'm trying to write a 2-bit up-counter in Verilog, and it must have dff in it's design. But, when I test it, outputs are = xx. Can you please help me to fix it? module dff(d,clk,q); input d,clk; ...
Yalda Shabani's user avatar
0 votes
1 answer
51 views

Is there a current alternative to MediaWiki's "Counter" extension?

I'm using MediaWiki with the "Semantic MediaWiki" extension. I would like to be able to use a command to increase a tally by whatever amount I input, such as to list a total price for items ...
user182238's user avatar
0 votes
1 answer
41 views

How to make the count up stops randomly after the start button is clicked in flutter

Countup( begin: 0, end: 100, duration: Duration(seconds: 5), separator: ',', style: TextStyle( fontWeight: FontWeight.bold, fontSize: 22, ), ) This is my code above, how can I make the ...
Kingsley Jere's user avatar
1 vote
0 answers
42 views

How to make a bill counter using cv2?

I'm trying to make a bill counter based on their color using Python and cv2, it sometimes works fine detecting the bill's color, but it detects a bill as if it were 2 or even 5, because the color ...
Sahm's user avatar
  • 21
0 votes
0 answers
17 views

How can I create two scenarios that will increase longest dry period by one day and two days, respectively in my rainfall data

I'm relatively new to python. I have a data frame containing rainfall data. I would like to create function with a 'scenario A' that will increase the longest dry period (days with rainfall <= 0) ...
Kelechi Igwe's user avatar
0 votes
0 answers
66 views

How to configure Freeradius weekly reset on a day other than Sunday?

I'm running FreeRADIUS 3.0.20 and it works fine. In the sqlcounter module, I'm using hourly, daily, weekly, monthly counters. I understand that a hourly counter resets at 0 minutes, and a daily ...
Alex's user avatar
  • 1
0 votes
0 answers
28 views

How to create a dataframe of counter.keys and counter.values

I want to create a dataframe from 1 column that contains 1 of each variable in one column and the count in another. This is what i have tried, i know zipping a and b is useless because its already a ...
Daisy's user avatar
  • 29
1 vote
0 answers
31 views

How to display a counter after open new website with window.open() or any other method

If I click on a button it will open a new browser tab and run a website. I want to set up a counter so that user can see how many times he spend.Counter should display only after open new website with ...
md rahed's user avatar
2 votes
2 answers
85 views

Is there a way to decrease counter in a For Each loop?

I have the following source csv (wbSource): ID Value 125 A 145 A 173 A 201 A 203 A 650 B 888 B I want to use VBA to copy all rows with Value = A to a table "Principal" in another ...
smAC's user avatar
  • 23
1 vote
2 answers
236 views

How do i edit the codepen FlipDown.js Countdown?

I found this countdown clock in CodePen, but I need to edit it, I need to set the final date to May 30, 2024. ¿Does anybody know how to set up the final date? document.addEventListener('...
Diego Diaz's user avatar
0 votes
1 answer
31 views

variable counter in table template with fitnesse automation

is it possible to create variables with a counter in fitnesse with table template, like a data dictionary or an array for example: |table template|customers| |customers| |name|surname|birthdate| |john|...
harronmetton's user avatar
0 votes
0 answers
44 views

Simulink system that increments every second (in sync with system time)

Currently, I have this system that increments every second: The subsystem (which shouldn't be modified) is shown below: Does anyone know how I should modify this such that the pulse generator is in ...
kene02's user avatar
  • 213
0 votes
1 answer
67 views

How to code calculation of Walsh & Lawler Rainfall seasonality index in R

I am struggling to loop across multiple variables that require counters to calculate rainfall seasonality. I end up getting errors due to counters not functioning correctly or in the correct order. I ...
Nicola's user avatar
  • 11
0 votes
1 answer
53 views

How to get a running count from a string value fields

I have a table that needs to be manipulated to have a rolling count. The issue I'm having is getting it to aggregate continually. id |sent|read_at|created_at |sent_at |...
Juice_n_jingles's user avatar
0 votes
1 answer
39 views

Create counter on Grafana

I'm using Influx DB to store some data, only TRUE and FALSE on a variable. That data is being graphed on Grafana. I would like to implement a counter tht increases any time the FALSE changes to TRUE. ...
Matías Idrobo's user avatar
2 votes
3 answers
87 views

How can I count the value of previous rows until criterion is reached?

I have a dataset, where each row indicates one correct/wrong interaction of a participant. I would like to count the number of wrong interactions, until the participant has logged a correct answer ...
caeco's user avatar
  • 23
0 votes
0 answers
39 views

Display Ring on Divi slider module

As Divi doesn't allow modules to be displayed using Divi slider, i tried to come with a workaround. My only issue is that my ring drawing animation doesn't work in the first time the slide is loaded ...
hamdalaye's user avatar
  • 107
0 votes
1 answer
95 views

Binary Coded Decimal Counter in VHDL

I have written this BCD-Counter in VHDL but the 10th place counter counts up every clock cylce instead of once, so instead of going from 09 to 10, the output is 09,19,29,39,... until bcd1_overflow is '...
focus0941's user avatar
0 votes
2 answers
102 views

Conditional cumcount with reset in pandas [closed]

I am trying to create a cum count column that counts the instances of a boolean variable, but resets to zero when it encounters a zero in the boolean variable. I am looking for a conditional cumcount. ...
greek_newbie's user avatar
-1 votes
1 answer
56 views

Using one "class" or one "id" for multiple counters in javascript? [duplicate]

I am trying to use the same "id" or "class" for multiple buttons to incrementally count by 1 using javascript. The code below shows how I can count by increments of 1 by clicking ...
bkw's user avatar
  • 111
1 vote
0 answers
18 views

Discord bot response is +1 each time slash command is used?

I'm using ccommandbot to make a custom bot for my discord server. I have absolutely no coding experience. I want to use /spill to track how many times someone spills liquid on their desk. So each time ...
Liv Senevoravong's user avatar
0 votes
1 answer
99 views

Incremental counter based on several conditions previously being met

I am attempting to create an incremental counter in an ID column based on several conditions being met in 2 other columns and then "resetting" those conditions being met to ascertain the ...
reytla's user avatar
  • 53
0 votes
0 answers
88 views

candle pair count pine script trading view

`why pair counter in my code not working pine script v5 Example: GGGG RR should be count as 1 Pair the if it again happen say GG RRRR then that should be (previous pair+1) Candle body should be more ...
workid's user avatar
  • 1
-1 votes
1 answer
38 views

Python InfiniteTimer Test Code on counting Failed Loop fails

I am trying to test my IP latency and using the InfiniteTimer I have just added a failCount global but when I try to increment in the tick() callback function I get an error. File "C:\Users\ken38\...
ken205726's user avatar
0 votes
0 answers
49 views

Comparing and Arranging data from a list of arrays

I have data containing [code] [status] [device type] in a list of arrays. Device type can either be A or B. The array looks like this: sample_list = [["C1-0001", "Offline", "A&...
GohanHango's user avatar
0 votes
0 answers
38 views

Is there a way I can make stopwatch but having both timer up and down method?

`countDown is completed, when i want to start the timer again the timer starts from the vlaue where the countDown was clciked. so, i want a solution that will help me to start the timer from the ...
Roman's user avatar
  • 1

1
2 3 4 5
106