Questions tagged [addition]

Addition is a mathematical operation that represents combining collections of objects together into a larger collection. It is signified by the plus sign (+).

addition
Filter by
Sorted by
Tagged with
-4 votes
0 answers
22 views

midterm_2324_ City’s_Growth [closed]

Create a function population_growth to return the population number a city may have given some parameters. The function receives three arguments: the actual population number, the average yearly ...
Matilde Murta's user avatar
0 votes
0 answers
42 views

BigInteger addition and subtraction implementation c#

I have an assignment to implement BigInteger. I have this code, which works correctly, when we have 2 possitive integers. Inside each method, the usual algorithm for adding or subtracting in a column ...
Kseniia Kravchenko's user avatar
0 votes
0 answers
29 views

Im curious how array indexing works here because this works but im confused why

public Polynomial add(Polynomial other){ int max = Math.max(coefficients.length, other.coefficients.length); int[] newPoly = new int[max]; for (int i=0; i<max; i++){ if (i<coefficients....
Suleman Dawood's user avatar
0 votes
1 answer
17 views

How do I add 1 into a column of numbers and replace null value with 1 as well in python

out_df['# of Days'] = out_df['# of Days'].replace('',1) out_df['# of Days'] += 1 print(out_df) Would work except when cell's have NULL as their value, it does not add the 1 value. Trying to add 1 to ...
Heidi Xiong's user avatar
0 votes
0 answers
9 views

Change add to cart button text on click event in Woocommerce on shop pages

Help me please. Here I found a code that works and I need it. Maybe someone knows how to make this work on the pages of the store and product categories? add_action( 'wp_footer', '...
Roman Makodich's user avatar
-1 votes
0 answers
9 views

How can I change the label 'add to cart' to 'pre-order' when a product variant (size) is selected?

I have a website on WooCommerce built with Elementor. What I would like to happen on the single product page is for the "add to cart" button to change its label to "pre-order" only ...
mattia ambrami's user avatar
1 vote
1 answer
57 views

How can just using the += "syntactic sugar" cause an infinite loop? [duplicate]

Let a = [-1, -2, -3]. I want to modify the list a so that a == [-1, -2, -3, 1, 2, 3], and I want to use map to achieve that. I have the following different pieces of code I've written to do this: a = ...
Pro Q's user avatar
  • 4,664
0 votes
0 answers
32 views

Adding numeric values in one CSV to those in another CSV based on matching another value in the same row

I've been tasked with using Powershell to count the number of occurrences where a particular action occurs in an application on a remote system. The count of actions is already being put into a CSV ...
MichaelH's user avatar
0 votes
1 answer
44 views

Overloaded function not outputting correct answer

I am attempting to create an overloaded contructor that will take in integer and add them with the byteAdd function. However; whenever I compile the output is always the default constructor rather ...
Steven Osi's user avatar
0 votes
1 answer
37 views

Sort a column automatically when an entry is added/deleted and directly create/delete a related row

I'm trying to create a google sheet that sorts new entries automatically in the "Name" column (see image1). I found the sorting script online, and it works as needed regarding the "Name&...
Candle's user avatar
  • 5
3 votes
2 answers
44 views

Adding together matrices of two different dimensions with column/row matching

I have matrices of varying dimensions such as: a <- read.table(text = " Si N1 N2 A1 A2 A3 A4 A5 Z1 Z2 Z3 Z5 IN M S Si 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 N1 0 1 0 1 1 1 1 1 ...
Hard_Course's user avatar
-1 votes
1 answer
31 views

How to divide rows of data into separate groups based on the value of a column in the data set and calculate the total time of each group?

I have telemetry data that lists the detections of an individual whenever they have been in this zone. For each session, I want to calculate the total time the individual was in that zone. I assume ...
bubblehobby's user avatar
0 votes
4 answers
61 views

Python, Magic Methods: cannot understand the task

I'm learning python I should make a task but i cannot understand it :) How the "mississippi" has to be passed to the magic method? I see that only list of integers is passed to the Counter. ...
nadine's user avatar
  • 13
0 votes
0 answers
22 views

I have an issue with the result of additions and subtractions if the result is less than 5. Top many decimals [duplicate]

This is a Calculator I'm building. Whenever I try to do small subtractions or addition (e.g. 7.8 - 7.6) it shows up a very long strand of unnecessary decimals (0.20000000000000018). You can find the ...
Tony Hopkins's user avatar
1 vote
1 answer
52 views

How many additions operation can be performed instead of single multiplication in FPGA?

How many addition operations can be performed instead of a single multiplication on FPGA? In terms of used resources - as an example - energy and logic area cost. I would like to know it for multiple ...
Yevhenii's user avatar
0 votes
0 answers
11 views

How can we set new java parameters as default?

We are upgrading our system to java 17. However, we need to set some parameters after the transition. It is very difficult to add new parameters one by one to 200+ Tomcat jvms running on 10+ servers. ...
maerdogan's user avatar
0 votes
0 answers
42 views

Unrecognized mnemonic CHAR0?

First-timer with PEP/8 code here. I'm trying to learn how to code a simple addition program. Here's what I've got so far: LDA 0x0011,d ADDA 0x0013,d ORA 0x0015,d STBYTEA 0x0010,d CHAR0 0x0010,d STOP ....
Ryan Barham's user avatar
-2 votes
1 answer
30 views

TypeError: Child2.__init__() missing 1 required positional argument: 'c'

class Parent: def __init__(self, a): self.a = a class Child1(Parent): def __init__(self, a, b): super().__init__(a) self.b = b class Child2(Parent): def __init__(...
Suka's user avatar
  • 1
0 votes
1 answer
31 views

how do I add to a number value in html through javascript [duplicate]

I tried HTML: <br> <span id="myspan">0</span> Javascript: button.addEventListener("click"), function() { document.getElementById("myspan").textContent=(&...
ac34u.de's user avatar
0 votes
0 answers
13 views

I need a batch file to find files with specific extension and add in them one line of text

I'm completly new and dont know a thing about creating batch files. I used to study informatics but now I'm car mechanic :) I've got few computers in few places containing VMware machines that need to ...
Michał Gadomski's user avatar
0 votes
4 answers
168 views

How does addition of negative integers work in C?

Given this simple code snippet: #include <stdio.h> #include <stdint.h> int main() { int8_t a = -1; printf("Dec: %d, Hex: %hhx\n", a, a); int8_t b = a + 1; printf(...
Lion Lai's user avatar
  • 2,005
0 votes
0 answers
24 views

add a printer using only its Name

I would like to add a multifunction device type printer/scanner using powershell I have one code but no works by name or I have to add it several times 1-version rundll32 printui.dll,PrintUIEntry /in ...
Marcin B's user avatar
1 vote
0 answers
60 views

Is it better to assign all the members of an array and then add another array, or to assign each member and immediately add?

I have a section of code whereby I am assigning one of 2 values to the X members in an array of POINTs, and then adding a second array to the first. The array sizes are fixed at 16. Initially I had ...
poby's user avatar
  • 1,664
0 votes
0 answers
22 views

How to do addition in integer in simple tag in Apache XML camel route

<setHeader name="hfour"> <simple resultType="java.lang.Integer">4</simple> </setHeader> <setHeader name="transstart"> <simple>{...
kamesh vedagiri's user avatar
0 votes
0 answers
73 views

Implementing Bitrix24 crm.deal.add in ASP.NET Core Web API 6.0 with Authentication

I'm working on integrating Bitrix24's crm.deal.add method into an ASP.NET Core Web API 6.0 application. The objective is to create new deals in Bitrix24, passing data like first name, last name, email,...
Levan Amashukeli's user avatar
0 votes
0 answers
26 views

using textWatcher for input

I am working an app that display table inputs and a total, i am using a text Watcher to keep truck with changes in the edit text but the issue, when I tried to change inputs the total won't display ...
Rey Mark Enriquez's user avatar
0 votes
1 answer
30 views

Qualtrics "add choice" button for respondents not working

I used the helpful code on this thread: "Add choice" button for respondents in Qualtrics Code: var that=this.questionId; jQuery("#"+this.questionId+" tr.ChoiceRow:not(:lt(...
ALav44's user avatar
  • 1
3 votes
1 answer
116 views

gcc using `lea` instead of `add`

I wanted to remember how a compiler performs integer division by 2. Interestingly, I found a particular behavior that I do not understand: https://godbolt.org/z/87n3x5Gjv int div2(int x) { ...
ugo_capeto's user avatar
0 votes
0 answers
95 views

Detect when someone adds you to a contact in telegram

I want to send a message to someone when he share contact to me, this is my code: foreach (var update in updates.UpdateList) { switch (update) { ...
Tony's user avatar
  • 35
0 votes
1 answer
82 views

normalize the result of a floating point addition

In floating point arithmetic I added two binary numbers 1.1100*2^4 and 0.0110*2^4 and I got 10.0010*2^4. How many left shifts should I do to normalize it? Is it (10.0010*2^4), 1.0001*2^4 or 0.1000*2^4-...
Harika's user avatar
  • 13
1 vote
2 answers
74 views

SQL COMMANDS to add a new column

I have customer table with column First_Name and Last_Name of Customer, I want to combine these two column with one Customername and add this Customer_Name column in the table also .and want to remove ...
Prachi Yadav's user avatar
0 votes
1 answer
91 views

Problem adding training phrases in several dialogflow intents, whit several acounts

Today we had a problem with dialogflow. We have tried adding training phrases in several dialogflow intents, from different accounts, without getting the changes applied. An agent message appears ...
Lorena Ruiz's user avatar
0 votes
3 answers
57 views

How to add two vectors together to get a list in R

I am attempting to add two vectors together. How do I return all results of a vector added to another vector in list format? Like so: a = c(1:4) b = c(5:8) where expected result is the following list ...
geoscience123's user avatar
0 votes
0 answers
46 views

I got the following error when trying to add a dependency using poetry. How do i resolve it?

I have poetry installed and I am trying to add packages. I have my toml file set as follows: name = "your-project" version = "0.1.0" description = "Your project description&...
jahrue's user avatar
  • 13
0 votes
0 answers
20 views

Why do I get 90.370+1.180+8.450 = 100.00000000000001 in Javascript? [duplicate]

I am trying to add three numbers "90.370", "1.180" and 8.450. And I get the result as 100.00000000000001. when I slightly change these values I am getting exact 100. Can someone ...
Srikar Gajji's user avatar
0 votes
1 answer
153 views

How to check if overflow occurs in risc-v addition?

To check overflow after multiplication in RISC-V, we can use mulh and mulhu. But how can one check overflow after add or sub instruction?
user153245's user avatar
0 votes
1 answer
57 views

Why does one method of adding all the elements of an array fail when similar methods succeed [closed]

I have an array of doubles. To simplify the example, I use an array of length 3. I want to add all 3 elements of the array. I do it in 3 ways. Here's the program to demonstrate. #include <stdio.h&...
rkg125's user avatar
  • 51
0 votes
0 answers
81 views

Anomaly when adding floating points of high precision [duplicate]

Consider the following example: int main() { float x = 1.0f; float a = 0.0000000000000001f; //16 floating point std::cout<<std::fixed; std::cout<< std::...
Constantinos Glynos's user avatar
0 votes
0 answers
36 views

Add 2 decimals in c while using strtol() and fprintf() [duplicate]

I am new to programming and I got the homework to write a program that adds 2 numbers. I have to use strtol() to convert strings to int. Also in case the user does not input anything or just 1 number ...
Leo's user avatar
  • 1
1 vote
2 answers
36 views

How to add rows in a dataframe by a column condition python

I have a dataframe like that: df = pd.DataFrame({'year': [2022,2022,2022,2022,2022,2022,2022,2022,2022,2022,2022,2022,2022,2022,2022,2022,2022,2022,2022], 'month': [1,2,3,1,2,3,4,5,6,7,8,9,10,11,1,2,...
Cristina Dominguez Fernandez's user avatar
0 votes
0 answers
23 views

How to add new rows to a dataframe in order to satisfy a condition in a column, and copying the rest of the columns

I have a dataframe like this: df1 = pd.DataFrame({ "client":[1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,3,3], "month": [1,2,3,4,5,1,2,3,4,5,6,7,8,9,10,11,12,1,2], &...
Cristina Dominguez Fernandez's user avatar
2 votes
1 answer
105 views

adding a column from one dataframe to another according to shared values

In python, I want to add a column from dataframe A to dataframe B. But the rows should be match with the primary key. I tried dataframeinsert() and .add but they are not doing it with regarding to ...
murat can Urhan's user avatar
0 votes
1 answer
49 views

Adding Record in DBF from VFP9 Form entry

I have created a Form which will add the student's details in DBF. The DBF field names are stud_fnme, stud_mnme, stud_lnme, stud_dob etc. there are total 30 fields. I want, once entering the details ...
EddieM's user avatar
  • 1
0 votes
1 answer
229 views

Helm repo add clarification

Want to understand how the helm repo add command works: I am installing artifactory. Jfrog docs state to run the following command: helm repo add jfrog https://charts.jfrog.io This writes files to my ...
user1757898's user avatar
0 votes
2 answers
157 views

It is possible to add an asterisk to certain values ​in a column that meet a certain condition?

id <- c("a", "b", "c", "d", "e") value <- c(3, 4.1, 13.2, 8.0, 10.1) df <- data.frame(id, value) like this: id Value a 3 b 4.1 c 13.2* ...
Sergio's user avatar
  • 1
0 votes
1 answer
79 views

Detecting for Overflow using addu in MIPS

I am struggling with the implementation in MIPS of detecting for overflow and throwing an error using addu. This is for a school assignment. We were given code that was a very basic bank ledger. The ...
TJream's user avatar
  • 5
0 votes
0 answers
60 views

In ARM64 Assembly, output is only showing %d

I'm new to assembly in general and I can't figure out what i'm doing wrong in this code. .text .global _start .align 2 _start: mov x0, #2 // first number mov x1, #2 ...
Christinne's user avatar
0 votes
0 answers
168 views

set VLC player options

I have C# code to play video in VLC player , I want to set video option while adding URL to play. My code is as below. AxAXVLC.AxVLCPlugin2 axVLCPlugin21; axVLCPlugin21.playlist.add(<some video ...
Amit Jadhav's user avatar
-2 votes
3 answers
231 views

How to calculate hours and minutes from decimal numbers in SQL Server

working hours column values be like 2 5.3 7.45 0.5 0.3 2.05 Expected output 18.40 (18 Hours 40 Minutes) Explanation 2 (2 hours) 5.3 (5 hours 30 mins) 7.45 (7 hours 45 mins) 0.5 (50 mins) 0.3 (30 ...
Relax's user avatar
  • 327
0 votes
1 answer
103 views

Using VBA to add a row and fill columns with a text

I need to add a row after any row filled in (even partially) and insert automatically a warning if a cell is "No". Under the column "Is certified?" if the cell is "No" it ...
Berin 's user avatar

1
2 3 4 5
113