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
36
votes
6 answers

How to use ArrayList.addAll()?

I want to fill an ArrayList with these characters +,-,*,^ etc. How can I do this without having to add every character with arrayList.add()?
masb
  • 2,813
  • 3
  • 20
  • 20
36
votes
2 answers

How to Install Older iOS Simulators in XCode 4.2.1 (SDK5.0)

I have just bought a new iMac. I then downloaded the latest SDK 5.0 and installed XCode 4.2.1. Everything is working fine. Though I realized that there are only iPhone and iPad Simulators 5.0 available for debugging. So I went on clicking the More…
GeneCode
  • 7,545
  • 8
  • 50
  • 85
35
votes
4 answers

How to add same view to parent multiple times by inflating it only once

I have a LinearLayout with vertical orientation as parent, I want to add some view programmatically multiple times to this parent. Right now I am inflating the child every time getting new references to every UI element before adding to parent. This…
mkso
  • 3,178
  • 4
  • 27
  • 35
35
votes
7 answers

Dynamically add textViews to a linearLayout

I read this somewhere here and I totally lost it, but could use some assistance. My app is pulling the column names from sqlite into an array. I want to create a textview and edit text for each one (via the size of the array), and I remember reading…
Anthony Honciano
  • 1,683
  • 5
  • 24
  • 30
35
votes
3 answers

ListView with Add and Delete Buttons in each Row in android

I am developing an android application in which I have made one ListView. I have to add 2 buttons with each row in ListView. These 2 buttons are Add and Delete. When user selects one of the buttons then some actions should be taken. How can I do it?
Looking Forward
  • 3,579
  • 8
  • 45
  • 65
34
votes
3 answers

Two children with the same key in React

Application works, my classes really adds a new element but I see below warning in console! Warning: Encountered two children with the same key, [object Object]. Keys should be unique so that components maintain their identity across updates.…
Nikola Lukic
  • 4,001
  • 6
  • 44
  • 75
34
votes
26 answers

What is the best way to add two numbers without using the + operator?

A friend and I are going back and forth with brain-teasers and I have no idea how to solve this one. My assumption is that it's possible with some bitwise operators, but not sure.
user23126
  • 2,051
  • 5
  • 18
  • 16
32
votes
4 answers

How we can add two date intervals in PHP

i want to add two date intervals to calculate the total duration in hours and minutes in fact i want to perform addittion as shown below: $a = new DateTime('14:25'); $b = new DateTime('17:30'); $interval1 = $a->diff($b); echo "interval 1 : " .…
Sheikh Rahat Ali
  • 1,293
  • 8
  • 37
  • 61
30
votes
3 answers

adding multiple existing folders and multiple existing files to Visual Studio project in single step

Does anyone have a way to add multiple folders and (existing) files within those folders to a Visual Studio project in a single step (or via macro)? Let's assume all of the folders and files were copied/pasted into the project folder where they…
JustBeingHelpful
  • 18,332
  • 38
  • 160
  • 245
30
votes
4 answers

How to undo all added files in Mercurial

Say I type hg add in Mercurial, and there a bunch of untracked files in my working directory that are not ignored. What is the easiest way to un-add all those files without explicitly typing the name of each file? Can I just un-add them all with one…
PICyourBrain
  • 9,976
  • 26
  • 91
  • 136
30
votes
3 answers

Can I modify git-add's hunk size?

I have a file that I've been working on and then realized that I had a mistake in it a few lines above where I've been working. I quickly fixed the mistake and want to commit it before I commit the rest of my work. Great, this is where git add…
pr1001
  • 21,727
  • 17
  • 79
  • 125
29
votes
3 answers

Why is OCaml's (+) not polymorphic?

I am an OCaml newbie. I like OCaml's speed but I don't fully understand its design. For example, I would like the + operator to be polymorphic to support integer, float and so on. Why do we need +.?
z_axis
  • 8,272
  • 7
  • 41
  • 61
28
votes
1 answer

How add key to dictionary without value?

in normally we should add key and value together in dictionary type. like: myDict.Add(key1, value1); myDict.Add(key2, value2); I want to know, Is there any way to add key first, then insert its value? (not both of them at the same time)
Iran_Girl
  • 439
  • 2
  • 11
  • 18
27
votes
2 answers

Magento remove css or js from specific view

Hi i added this to catalog.xml layout definition: css/local.css and this to inside the same file:
zsitro
  • 1,812
  • 3
  • 24
  • 34
27
votes
7 answers

Time calculation in php (add 10 hours)?

I get the time: $today = time(); $date = date('h:i:s A', strtotime($today)); if the current time is "1:00:00 am", how do i add 10 more hours to become 11:00:00 am??
myphpsql00
  • 441
  • 2
  • 5
  • 7