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
21
votes
7 answers

cmd line rename file with date and time

Project moving forwards, I can see why creating .bat files to do things can become addictive! I can now save somefile.txt at regular intervals, I then rename somefile.txt by adding the time and date to create a unique file name ren somefile.txt…
user611620
  • 211
  • 1
  • 2
  • 4
21
votes
4 answers

Adding new item to the top of the RecyclerView

I am adding an item to recyclerview position 0 programamticly public void addQuestion(Question question){ this.questionList.add(0, question); notifyItemInserted(0); } This is working very well and the items do appear in the list at top BUT…
Chris Blank
  • 213
  • 1
  • 2
  • 4
21
votes
6 answers

Add multiple values to a vector

I have a vector of ints that I want to add multiple values too but too many values to add using a lot of push_backs. Is there any method of adding multiple values at the end of a vector. Something along the lines of this: std::vector
Eejin
  • 770
  • 1
  • 8
  • 29
20
votes
3 answers

Add a row to a matrix

I have a matrix A like 1 2 3 4 5 6 7 8 9 0 and I want to expand it with a row of ones to get 1 1 1 1 1 1 2 3 4 5 6 7 8 9 0 I create the row of ones with col_size = size(A, 2); ones_row = ones(1, col_size); How can I add my ones_row to the…
andandandand
  • 21,946
  • 60
  • 170
  • 271
19
votes
22 answers

Adding binary numbers

Does anyone know how to add 2 binary numbers, entered as binary, in Java? For example, 1010 + 10 = 1100.
PulsePanda
  • 1,806
  • 10
  • 33
  • 56
19
votes
5 answers

create .ics file on the fly using javascript or jquery?

Can someone tell me if there is any jquery plugin to dynamically create .ics file with values coming from the page div values like there would be
9:30am
10:30am
AJSwift
  • 709
  • 4
  • 12
  • 26
19
votes
1 answer

How can I add an anchor tag to my URL?

MVC 3.net I want to add an anchor to the end a url. I tried to include an anchor query string but the hash '#' changes to %23 or something like that in the url. Is there a way of working around this?
DevDave
  • 6,700
  • 12
  • 65
  • 99
19
votes
1 answer

Android ArrayAdapter.Add method not working

The ArrayAdapter.add() method is not working for me. I am using Eclipse Helios 3.6 with ADT Plugin, Target Source is a Froyo 2.2 emulator and 2.2 HTC Evo 4g. Here is my java class import android.app.Activity; import android.os.Bundle; …
Mike
  • 245
  • 1
  • 3
  • 9
19
votes
2 answers

Can git commit "empty versions" of new, non-empty files?

Can git commit empty versions of some files? The case in point is that I need new (untracked), non-empty files to first be added and committed as empty files, so as to mark their contents as being new and to be reviewed (the full, untracked file…
Eric O. Lebigot
  • 91,433
  • 48
  • 218
  • 260
19
votes
4 answers

python error 'dict' object has no attribute: 'add'

I wrote this code to perform as a simple search engine in a list of strings like the example below: mii(['hello world','hello','hello cat','hellolot of cats']) == {'hello': {0, 1, 2}, 'cat': {2}, 'of': {3}, 'world': {0}, 'cats': {3}, 'hellolot':…
stt
  • 321
  • 1
  • 2
  • 4
19
votes
10 answers

How to add all numbers in an array in C++?

Instead of typing array[0] + array[1] //.....(and so on) is there a way to add up all the numbers in an array? The language I'm using would be c++ I want to be able to do it with less typing than I would if I just typed it all out.
ShadowWesley77
  • 365
  • 1
  • 5
  • 16
19
votes
9 answers

Need help in adding binary numbers in python

If I have 2 numbers in binary form as a string, and I want to add them I will do it digit by digit, from the right most end. So 001 + 010 = 011 But suppose I have to do 001+001, how should I create a code to figure out how to take carry over…
user3246901
  • 191
  • 1
  • 1
  • 3
19
votes
4 answers

Click event doesn't fire for table rows added dynamically

I have an empty table to which I'm adding rows via jQuery using: $('#table > tbody:last').append('' + symbol.Code1 + '' + symbol.Code2+ '' + symbol.Code3+ ''); Everything is OK but when…
user1770849
  • 193
  • 1
  • 1
  • 5
19
votes
6 answers

How To Add An "a href" Link To A "div"?

I need to know how to add an a href link to a div? Do you put the a href tag arounf the entire "buttonOne" div? Or should it be around or inside the "linkedinB" div? Here's my HTML:
Wardenclyffe
  • 2,401
  • 3
  • 19
  • 17
19
votes
7 answers

How can I add javascript object to another object in dynamic

Suppose I have several javascript object {"type":"gotopage","target":"undefined"} {"type":"press","target":"a"} {"type":"rotate","target":"long"} How can I add this objects to another object like config={} I know how to if each inserted object…
hh54188
  • 14,887
  • 32
  • 113
  • 184