Questions tagged [counting]

Counting is the action of finding the number of elements of a finite set of objects.

Counting is the action of finding the number of elements of a finite set of objects. The traditional way of counting consists of continually increasing a (mental or spoken) counter by a unit for every element of the set, in some order, while marking (or displacing) those elements to avoid visiting the same element more than once, until no unmarked elements are left; if the counter was set to one after the first object, the value after visiting the final object gives the desired number of elements. The related term enumeration refers to uniquely identifying the elements of a finite (combinatorial) set or infinite set by assigning a number to each element.

Counting using tally marks at Hanakapiai Beach Counting sometimes involves numbers other than one; for example, when counting money, counting out change, "counting by twos" (2, 4, 6, 8, 10, 12, ...), or "counting by fives" (5, 10, 15, 20, 25, ...). There is archeological evidence suggesting that humans have been counting for at least 50,000 years. Counting was primarily used by ancient cultures to keep track of social and economic data such as number of group members, prey animals, property, or debts (i.e., accountancy). The development of counting led to the development of mathematical notation, numeral systems, and writing.

1837 questions
0
votes
1 answer

Counting the duration of each item transection by condition of I(received[Date]), P(issue[Date]

ITEM A 5-19-2014 1:46:54 PM P 5-20-2014 9:41:15 AM I ITEM B 5-14-2014 11:06:31 AM P 5-14-2014 2:34:48 PM I 5-20-2014 10:23:50 AM P 5-21-2014 11:59:00 AM I …
0
votes
1 answer

C - Function is not counting the correct amount of given character

as said on the title, my function is not calculating the correct amount os characters in a given string. The function is this one: void contar(char **texto, int *quantidade, int N) { int i, j, aux; for(i=0;i
Falcon
  • 89
  • 7
0
votes
2 answers

Tracking how many elements processed in generator

I have a problem in which I process documents from files using python generators. The number of files I need to process are not known in advance. Each file contain records which consumes considerable amount of memory. Due to that, generators are…
Santanu C
  • 1,362
  • 3
  • 20
  • 38
0
votes
2 answers

Boxplot labels with the number of non-missing values in R

I have several columns (in a data frame) and boxplot them with this command: boxplot(allm, las=2) It´s all ok, but I wish to put in the label how many non-missing observations they are in each column (in this case the numeric values, because I have…
user3091668
  • 2,230
  • 6
  • 25
  • 42
0
votes
1 answer

Finding an exact substring in a range of cells in Excel

I'm looking for a way to find an exact string of text within a range of cells so I can count the number of occurrences of the substring. By exact, I mean that if the range contains multiple occurrences of the values "apple" and "apples", and I want…
0
votes
0 answers

Counting types of files with global variables

I have a recursive function (mandatory that it's recursive) that travels through directories and looks at type of files (dir, file, sock, pipe, char, block, or link), but I don't know what approach to take. I was thinking something with global…
jabk
  • 1,388
  • 4
  • 25
  • 43
0
votes
2 answers

Using jQuery to count dynamic
  • elements by class using event handler
  • I'm trying to use jQuery to count ul li elements with a certain class. The class is being toggled on and off by another jQuery script: $(document).ready(function(){ $(".checkbox1").click(function(){ $("li.tom").toggleClass( "hider"…
    0
    votes
    5 answers

    Count distinct key-value pairs in a 2d array

    I need to count the unique key-value pairs in an array of arrays (regardless of which row they come from). Sample input: $info = [ ['car' => 'Audi', 'previous_car' => 'BMW'], ['car' => 'Audi', 'previous_car' => 'Seat'], ['car' => 'Audi',…
    0
    votes
    1 answer

    I want to count the number of elements which are preceded by 0 but are greater than 10 and less than 20

    % counting the number of transitions from state 0 to 1, % rain is an array of size 545. count1=0; n=numel(rain); for k=1:n-1, if (rain(k)<=0) & (10
    0
    votes
    1 answer

    Count the number of orders in the order table

    I just needs some help on a formula to count the numbers of orders in the orders table for each customer. Table Name = "Orders" See the image: So in another worksheet, the formula counts the orders for each individual customer. I countn't get the…
    user3392350
    • 1
    • 1
    • 1
    0
    votes
    2 answers

    C#, Counting iterations for a complaint process

    i have to create a programme that will handle complaints i have to track how many times i complete the process, this means i will need a count that increases when i return to the first form in the process however the number always resets when the…
    0
    votes
    1 answer

    Keep count for element with different ids

    I am trying to create a thumbs up/down rating demo http://jsfiddle.net/HfNL9/1/ var ups = 0; $('.rating .voteup').on('click', function () { var currentId = $(this).attr('href'); ups = ups + 1; $(currentId + ' > .up').html(ups); …
    sdvnksv
    • 9,350
    • 18
    • 56
    • 108
    0
    votes
    3 answers

    Counting then sum particular values?

    I have a data as below ( just a part of my data) month NumberOfMonths Jan 4 Jan 3 Feb 2 May 1 Jan 4 Feb 1 May 2 Mar 12 Feb 2 May 1 So I want to create a data frame as below Month …
    Ram
    • 359
    • 1
    • 6
    • 15
    0
    votes
    4 answers

    How to remove duplicated white spaces in a string and count the number of removed spaces in Java?

    This forum has a solution for removing duplicated white spaces in java using String.replaceAll() However this solution can't be applied if we need to count the removed white spaces. Is there any other way to solve this problem?
    0
    votes
    2 answers

    Counting the number of disabled DIVs

    I am working on this example here. What I have is, say, two sections (div id="sec1" and "sec2"), each of which contains divs (div id="Q+id"). Using radio control, user disables either section 1 or section 2, thus disabling all contained divs and…
    AlexShevyakov
    • 425
    • 7
    • 18
    1 2 3
    99
    100