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 is a mathematical operation that represents combining collections of objects together into a larger collection. It is signified by the plus sign (+).

It is commutative, meaning that order does not matter, and it is associative, meaning that when one adds more than two numbers, order in which addition is performed does not matter.

(Wikipedia)

5629 questions
1
vote
1 answer

Adding a row-dependent value to each row

I have a 2D array containing the following numbers: A = [[1, 5, 9, 42], [20, 2, 71, 0], [2, 44, 4, 9]] I want to add a different constant value to each row without using loops. This value is a n*c with n being the current row and c being…
Felipe Moser
  • 323
  • 4
  • 19
1
vote
1 answer

Create in array with keys in .plist (Cocoa/iPhone SDK)

Hey guys, trying to add (object?) to a my plist programmatically, heres what I've cooked out so far: NSString *documentsDirectory = [[NSString alloc] initWithString:[[[[NSBundle mainBundle] resourcePath] stringByDeletingLastPathComponent]…
DexCurl
  • 1,683
  • 5
  • 26
  • 38
1
vote
1 answer

Jq to add the element in json array conditionally and print the entire modified file

I have a json file with the below format. I would like to add the element {"test" : "2"}in propDefs[] if the .children[].type=="environmentApprovalTask" and .children[].role.name== "GCM approver" and output that to the new file. I want the entire…
kanskr
  • 43
  • 1
  • 5
1
vote
1 answer

In PHP, why does `print 08+"51";` give 51?

In PHP, I haved tried this code print 08+"51"; but I don't know why it gives 51, while print 07+"51"; give 58 ?
1
vote
1 answer

Adding two 4 digit binary numbers using adder circuits

I need to write a program that adds two 4 digit binary numbers using an adder circuit that gives us an answer. I need to use the int() function to convert this from binary to decimal (both values need to be displayed). I am struggling to create a…
LotusAlice
  • 135
  • 1
  • 3
  • 12
1
vote
2 answers

VHDL - Simultaneous addition of large 2D array. What is the syntax for this

I have reached a position in my design in which we need to massively increase parallelisation, but we have many resources to spare in the FPGA. To that end, I have the type defined as type LargeByteArray is array(0 to 10000) of std_logic_vector(7…
1
vote
2 answers

jquery: add #hash to all links if it doesn't already have one?

hey guys, the following code works fine... I'm adding a #wpf-wrapper hash to all links that are inside of #wpf-wrapper. $('#wpf-wrapper a').live('click',function() { $(this).attr('href', $(this).attr('href') + "#wpf-wrapper"); …
matt
  • 42,713
  • 103
  • 264
  • 397
1
vote
1 answer

How to add hours to a timestamp

I have a string variable some_time = "12:30", and I want to add 2 hours to it so the result is "14:30". I believe by first turning the string into a timeformat, temp_time = datetime.datetime.strptime(thetime, '%H:%M').time() so that >>>print…
1
vote
3 answers

Implement addition in abstract Scala class

I have the below abstract class and its two subclasses: abstract class BoundedNumber(val lowerBound: Double, val upperBound: Double, val value: Double) { require(value >= lowerBound &&…
bugfoot
  • 667
  • 7
  • 20
1
vote
1 answer

How to UIView add into the SCNNode? Swift

ARKit ios related question. the view add into the SCNNode. my requirement is two label's UIView add into the SCNNode and Show. //SCNNode Create Function func Val() -> SCNNode { //SCNNode Create using SCNode() let holderNode = SCNNode() …
1
vote
1 answer

Adding hexadecimal numbers in Arduino ending with wrong result

I wrote a simple code where I add hexadecimal values multiplied by 0x1, 0x100 and so on together. uid = (nuidPICC[0] * 0x1000000); uid = uid + (nuidPICC[1] * 0x10000); uid = uid + (nuidPICC[2] * 0x100); uid = uid + nuidPICC[3]; when I pass…
andz
  • 274
  • 1
  • 3
  • 12
1
vote
1 answer

HAProxy add some headers before 302 redirect

I'm trying to add some security headers to the responses that are directed to a specific port. I have the following configured frontend: frontend desenv_ext_1 bind *:80 bind *:443 ssl crt /etc/ssl/certs/cert.pem mode http option tcplog…
R Wagner
  • 25
  • 1
  • 4
1
vote
2 answers

Add a variable (column) in data set (SAS)

I can't find the solution for this simple problem: I want to add a colum/variable in my data set. This variable will always have the same value, stored in the macro variable &value. And I am in a macro so I don't know if it change anything... This…
videorama17
  • 25
  • 1
  • 3
  • 7
1
vote
5 answers

Simple SVN commands

Seemingly lame question, but I've been through all the docs and tutorials and am unable to figure out exactly what I want. My repo is https://sourcerepo.something/mystuff My working folder is /var/www I copy new files into /var/www …
eeejay
  • 5,394
  • 8
  • 29
  • 30
1
vote
4 answers

Split String after every x Digits

I have a little problem. I need to split a String into x parts and add it together. EDIT: if i want to split it with x=3 then i will need 4 parts but if i want to split it with x=4 then i will need 3 parts. So my hardcoded code is bad. and my x…