Skip to main content

Questions tagged [increment]

DO NOT USE THIS TAG ALONE. Use with a language tag like [javascript] or [python]. Adding one to the value of a variable, generally with the use of an increment operator.

-6 votes
1 answer
40 views

How do you increment a number made with an onclick (in html)? [closed]

function incrementValue() { var value = parseInt(document.link('number').value, 10); value = isNaN(value) ? 0 : value; value++; document.link('number').value = value; } <div class="link"&...
Nemat's user avatar
  • 1
1 vote
2 answers
46 views

Why are these results different between two types code of Java? [duplicate]

First of all, my mother language is not English. Now I study Increment(++) ande Decrement(--) operators of Java. I tried an issue. But the result of mu code differents from my expectation. Issue ...
Mariin5's user avatar
  • 19
1 vote
0 answers
19 views

Kotlin - how can I create a list of numbers between a range and stepped by a certain value [duplicate]

In Kotlin, I'm trying to create a val with a list of numbers within a specific range, incremented by 1.5. How can I do this? I've tried the below, but I'm getting an error with "step". val ...
Vaz's user avatar
  • 508
0 votes
3 answers
71 views

Decrement value MongoDB, prevent negative number

I'm using MongoDB and I have a document where I want to increment a count field. However, I need to ensure that this count does not go below zero. For example, if inc is -2 and the current count is 1, ...
I3_T_00's user avatar
0 votes
1 answer
18 views

Incrementing Key in Simple React To Do App

I have an incrementing key in my React To Do App so I can filter out certain tasks with an id identifier. For some reason, I have to declare and define my id outside of the main function. Why can't I ...
Shuumi's user avatar
  • 25
0 votes
2 answers
57 views

Autoincremental values for multiple columns in snowflake

is there a way to create sequence without any gaps in snowflake. I cannot use row number as I am running the updates/inserts multiple times which will end up creating same row numbers 1 to n on every ...
rajalakshmim's user avatar
3 votes
3 answers
149 views

PHP 8 how to concisely increment dynamically generated variables

PHP 8 raised the Notice to a Warning that an unset variable/array key is worked on. PHP 7.4: // Below would create a variable and set it to 0 + 1 // Below would generate a Notice level error. $...
Martin's user avatar
  • 22.6k
0 votes
0 answers
34 views

How to auto increment name value in a HTML dinamic "+" form input

I have this HTML form and JavaScript to add a dinamic form input when I click the + button, how can I give an individual name to each input field? name="name1" name="email1", name=&...
berriop's user avatar
0 votes
1 answer
16 views

Why is my angular datetimepicker adding increment/decrement text over arrows on input?

I can't figure out why my datetimepicker in my angular project is suddenly adding these weird lines of text over my arrows on the time input. They appear to be related to increment/decrement hours/...
IAMABANANA's user avatar
0 votes
2 answers
96 views

C increment ++ unexpected result

I have a problem with using increment ++ while trying to increase the value of an int variable. I'm passing the address of the variable called records to the function open() than opens a file in ...
Agent 47's user avatar
0 votes
0 answers
35 views

How to copy label with name - Visual Studio 2022

I created a new label. It came with "label1" name. I changed the name "label1" to "myLabel1". I'm copying this: "myLabel1" When I paste it comes as: "...
Doğukan Topaloğlu's user avatar
0 votes
1 answer
22 views

Adding (increment) values to a record in Laravel or creating a new row

I want to say that if there is a row in the "ListingPoints" model where "ListingPoints" is equal to 1 and "review_cat_id" is equal to 1, then the value of "...
rafig khiyavi's user avatar
1 vote
1 answer
18 views

Why is the cart increment not working properly?

I need to increase or decrease the quantity of items on the cart, but when I click the increment button for a particular item, it increases the quantity of all the items in the cart. Here's my code - ...
olaaababyy's user avatar
1 vote
1 answer
61 views

Variable in Python going up by more than 1 at a time

I am currently making a project for my school for fun, and I came across a problem. The project is a paddle and ball game, and every time the ball hits the paddle the score SHOULD go up by one, but ...
Not Rend3r's user avatar
-1 votes
1 answer
45 views

Increment number on each node with excluding one

I'm trying to automatically name node number in tomcat server.xml on several nodes. I have for that the playbook below: vars: - node_number: "{{ ansible_host_all.index(inventory_hostname) + 1 }}...
Kain Taozia's user avatar

15 30 50 per page
1
2 3 4 5
238