How do I count the number of inputs in a loop?
I'm trying to find a way to count how many times a number has been inputted in a loop but unable to find a calculation to find the answer,
can anyone help??
Please take me step by step on how to solve this problem as I'm new to Java.
Today's spam day, I guess. Listen, you and the paint-squares-guy, too:
STOP TO FUCKING SPAM THIS FORUM WITH YOUR QUESTION. ONCE IS ENOUGH. TWICE IS ANNOYING. TEN TIMES IS LIKELY TO MAKE ME COMPLAIN TO SUN AND HAVE YOUR NEWBIE ASSES KICKED!
Similar Messages
-
How can I count the number of times a timed loop finished late?
I am getting occasional timing errors in a timed loop under windows XP and would like to count the number of errors, but I can't find a simple software counter vi
The timed loop has a terminal (boolean) to indicate if the previous iteration finished late. Just increment an integer shift register if this happens.
The attached shows a very simple demo (LabVIEW 7.1).
LabVIEW Champion . Do more with less code and in less time .
Attachments:
LateCounter.vi 76 KB -
How do I count the number of records returned in the CMIS query
How do I count the number of records returned in the query CMIS?
SELECT COUNT(*) FROM ora:t:IDC:GlobalProfile WHERE ora:p:xRegionDefinition = \'RD_PROJETOS_EXCLUSIVOS\''}
Euler HomeroHi Euler,
interestingly enough, the reference guide for CMIS ( http://wiki.alfresco.com/wiki/CMIS_Query_Language ) that I found does not mention the COUNT function at all. On the other hand it states that: "The SELECT clause identifies which virtual columns to return in the result set. It can be either a comma-separated list of one or more queryNames of properties that are defined by queryable object types or * for all virtual columns."
There are, however, some other posts like e.g. http://alfrescoshare.wordpress.com/2010/01/20/count-the-total-number-of-documents-in-alfresco-using-sql/ which state that they could make it working.
Having asked in the WebCenter Portal forum, I assume that your content repository is WebCenter Content. The CMIS doc for the Content is available here: http://docs.oracle.com/cd/E23943_01/doc.1111/e15813.pdf (no COUNT there either). It does, however, mention explicitly that "CMIS queries return a Result Set where each Entry object will contain only the properties that were specified in the query.". This means your could rather investigate the Result Set. Note that there are also other means than CMIS how to get the requested result set (e.g. calling a search service directly via so-called RIDC).
In the given context I am also interested what your use case is. OOTB CMIS in WebCenter Portal is used, for instance, in Content Presenter, where it is content rather than "parameters" what's displayed. -
How i can count the number of words in a string?
hi, i want to know how to count the number of words in a string
e.g. java is a very powerful computer language.
i will get 7 words.
thanks in advance..Jverd, this has actually been answered, but due to an
attack of goldie-itis, all the answers were hosed.
The OP did get an answer, though.Yeah, I know. I just didn't know if he saw the answer before it went away. -
How do I count the number of *'s in a string?
I need to count the number of * in a string of carakters. And the return the number. 0 for no *'s in the string 2 for two *'s in the string and so on.
It's probably quite simple but I can't figure out how!Like this.
james_t_dk wrote in message
news:[email protected]..
> I need to count the number of * in a string of carakters. And the
> return the number. 0 for no *'s in the string 2 for two *'s in the
> string and so on.
>
> It's probably quite simple but I can't figure out how!
[Attachment Untitled 10.vi, see below]
Attachments:
Untitled_10.vi 18 KB -
How do I count the number of occurrences of a string within a group of cells?
Hello all, I'm trying to figure out how to count the number of times a child has completed certain tasks. Here is a sample of the data (it is highly simplified here, but contains what I hope is needed to answer my question):
Unnamed Table
Objective
John
Ann
Alex
Dave
Eric
20a 20b 20c
x
20a 20b 20c
x
20a 20b 20c
x
x
19b 20a
x
x
20c 21b 22
x
What I am trying to do is count the number of times each child completed each objective - but I can't figure out how to go about splicing up the "objectives" fields for counting while still being able to compare them to whether or not the "child" has 'an x in the box' in that particular row.If I read your example correctly, John's counts should be 2 for 20a, 1 for 19b, 20b and 20c, and 0 for any other objectives listed.
Here's an example that will work for your data set, assuming that any objective ma occur only once in each row of column A of the Main table. I've added an a to objective 22, but I think it is unnecessary, provided there is no objective 122, 221, etc.
This uses a two step process.
The table AUX extracts the objectives completed by each student, using the checkboxes in Main. Note that it also adds a space at the beginning and end of each string. This provides an extra character before the first objective code and after the last objective code in that row, used by the wildcard specification in the formula in the Summary table.
Formula:
Aux::B2: =IF(OFFSET(Data :: $A$1,ROW()-1,COLUMN()-1)," "&OFFSET(Data :: $A$1,ROW()-1,0)&" ","")
Fill right to the last column and down to the last row of Aux.
Summary uses COUNTIF to count the number of occurrences of each of the objectives listed in column A of that table.
Formula:
Summary::B2: =COUNTIF(Aux :: B,"=*"&$A2&"*")
Fill right and down as the previous formula.
Regards,
Barry -
How do I count the number of cells with a particular text in it?
I have a column with peoples name in each cell. I want to count the numbe rof times a persons name appears in the column. How do I do this? any help would be great ! thanks in advance.
Hi Evilhomer,
The function COUNTIF will do this. Here are two Tables on one sheet. Table 1 contains names in Column B.
Table 2 contains the names once only (in any order) in Column A, with a COUNTIF formula in Column B to count how many times a name occurs in Table 1.
The formula in Sheet 2, Cell B2 is:
=COUNTIF(Table 1 :: B2:B5,A2)
Enter the formula in B2 then copy down.
It is easier to create the two tables on one sheet. If you then want to move a table to another sheet, Numbers will convert the formulas to keep the references valid.
There are other ways to do what you want. Please reply if this is not what you want.
Regards,
Ian. -
How can I count the number of unique cells?
I have a column in my spreadsheet that looks like this:
Date
Items
3/25
Item A
3/27
Item A
3/29
Item A
3/25
Item A
4/25
Item B
6/1
Item B
7/13
Item B
8/9
Item B
3/5
Item C
1/2
Item C
5/15
Item D
3/25
Item D
What I want is something that will list all the unique items that I have and count the number of times that Item shows up in my spreadsheet. For example, the results should look like this:
Item A: 3
Item B: 4
Item C: 2
Item D: 2
I thought for sure that I can do a chart in numbers and it would count the number of items but no, not so much.I apologize. When I pasted the table in Numbers running in French the values of column B were treated as dates.
I leave the screenshot untouched because the contents of this column changes nothing to the calculations.
In cell D2 of the main table, the formula is :
=IF(ISBLANK(C),0,IF(COUNTIF($C$2:$C2,"="&$C2)=1,COUNTIF(C,"="&$C2)+(ROWS(A)-ROW( ))/100000,0))
Apply Fill Down
In cell A2 of table aux, the formula is :
=IFERROR(LARGE(main :: D,ROW()-1),"")
In cell B2 of table aux, the formula is :
=IF(A>0,LOOKUP(A2,main :: D,main :: C),"")
In cell C2 of table aux, the formula is :
=INT(A)
Apply Fill Down
Yvan KOENIG (VALLAURIS, France) samedi 6 août 2011 23:33:10
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
My iDisk is : <http://public.me.com/koenigyvan>
Please : Search for questions similar to your own before submitting them to the community
To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer ! -
How do I count the number of unread emails in WebCenter ?
how can I show unread emails counter on webcenter spaces ( I used the default WC Mail task flow )
Hi Euler,
interestingly enough, the reference guide for CMIS ( http://wiki.alfresco.com/wiki/CMIS_Query_Language ) that I found does not mention the COUNT function at all. On the other hand it states that: "The SELECT clause identifies which virtual columns to return in the result set. It can be either a comma-separated list of one or more queryNames of properties that are defined by queryable object types or * for all virtual columns."
There are, however, some other posts like e.g. http://alfrescoshare.wordpress.com/2010/01/20/count-the-total-number-of-documents-in-alfresco-using-sql/ which state that they could make it working.
Having asked in the WebCenter Portal forum, I assume that your content repository is WebCenter Content. The CMIS doc for the Content is available here: http://docs.oracle.com/cd/E23943_01/doc.1111/e15813.pdf (no COUNT there either). It does, however, mention explicitly that "CMIS queries return a Result Set where each Entry object will contain only the properties that were specified in the query.". This means your could rather investigate the Result Set. Note that there are also other means than CMIS how to get the requested result set (e.g. calling a search service directly via so-called RIDC).
In the given context I am also interested what your use case is. OOTB CMIS in WebCenter Portal is used, for instance, in Content Presenter, where it is content rather than "parameters" what's displayed. -
How do I count the number of times a word appears in a column?
What I have is a spreadsheet logging work history. Let's say the work location is "office", "home", or "travel" and I want to have a separate cell in another table for totals, count up the number of time each appears in the data for the year. So it would look like this:
Date
Location
sept 1
office
sept 2
home
sept 3
home
sept 4
travel
sept 5
office
sept 6
office
sept 7
office
sept 8
travel
sept 9
home
sept 10
office
Totals
Days
10
Office
5
Home
3
Travel
2
I just can't figure out how to develop the formula to put in the Totals column to make it work this way. If you can help me achieve this I'd really appreciate it!Hi SpartanAntarctican,
Table 1 to record your locations
Date
Location
sept 1
office
sept 2
home
sept 3
home
sept 4
travel
sept 5
office
sept 6
office
sept 7
office
sept 8
travel
sept 9
home
sept 10
office
Table 2 to sum your locations
Totals
Days
10
Office
5
Home
3
Travel
2
In Table 2 the formula in B2
=ROWS(Table 1::A)−1
Minus 1 because there is a Header Row in Table 1.
In Table 2 the formula in B3 (and Fill Down)
=COUNTIF(Table 1::B,A3)
You can check this by adding 5 + 3 + 2 to arrive at 10
Or maybe delete Row 2 put the Days calculation into a Footer Row in Table 2
=SUM(B) .
Regards,
Ian. -
I'm using Numbers 3.2 and would like to count the names in a column which satisfy a condition in a different column. There are 3 "streams" through which these names have come to me, and I would like to easily identify how many have come from each stream. Any help?
Hi DirtyDawg,
COUNTIF is your friend here.
If your source is in column C and your streams are 1, 2 and 3:
=COUNTIF(C,"=stream1")
=COUNTIF(C,"=stream2")
=COUNTIF(C,"=stream3")
These need to be in a footer or header row or in a different column than C.
hope this helps,
quinn -
How do i count the number of times a cell has been referenced by other cells' formulae?
Hello,
I have a spreadsheet of recipes and ingredients that use checkboxes to let me know which recipes I can make based on the ingredients I have on-hand, using a formula like this one: =IF(AND('Spirits' :: A42,Mixers :: A18,Mixers :: A41,'Spirits' :: A25 ),Table 3 :: $A$2,Table 3 :: $A$3). If I've checked all of the boxes for ingredients that are required for any one of my recipes, the cell that the formula is in returns something like "YES"; otherwise, it returns a blank. It works well enough, but I'd like to include a cell next to each ingredient with a formula that will look through the hundreds of recipes, which all use a formula like the one above, and return a count of the number of times the ingredient's cell is referenced in those formulas. That way, I'll know which ingredients are the most commonly used in my eclectic collection of recipes. I thought something like =COUNTIF('Recipes' :: A2:A343, "=A2") would work, but it doesn't look at the cell references in the formulas, so no, it doesn't work. Any ideas? I'm using Numbers 2.3Hello
There's no formula to inspect other formula in Numbers. So what you asked cannot be achived in such a way you described.
A simple alternative method would be to build recipe-ingredient matrix as follows.
E.g.
Table definitions:
Recipes
A1 Recipe \ Ingredient
A2 A
A3 B
A4 C
A5 D
A6 E
A7 F
A8 # recipes / ingredient
B1 X1
B2 TRUE
B3 FALSE
B4 TRUE
B5 FALSE
B6 TRUE
B7 FALSE
B8 =COUNTIF(B,TRUE)
C1 X2
C2 TRUE
C3 TRUE
C4 FALSE
C5 TRUE
C6 TRUE
C7 TRUE
C8 =COUNTIF(C,TRUE)
D1 X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E(Y::$C$2:$C$5))=COUNTIF(B7:I7,TRUE)
J8
X
A1 Ingredient
A2 X1
A3 X2
A4 X3
A5 X4
B1 in-stock?
B2 TRUE
B3 TRUE
B4 TRUE
B5 FALSE
C1 code
C2 =IF(B2,1,0)
C3 =IF(B3,1,0)
C4 =IF(B4,1,0)
C5 =IF(B5,1,0)
Y
A1 Ingredient
A2 Y1
A3 Y2
A4 Y3
A5 Y4
B1 in-stock?
B2 TRUE
B3 FALSE
B4 TRUE
B5 FALSE
C1 code
C2 =IF(B2,1,0)
C3 =IF(B3,1,0)
C4 =IF(B4,1,0)
C5 =IF(B5,1,0)
In "Recipe" table, the first row is header row and the last row is footer row.
Hope this may help,
H -
Applescript - how can I count the number of records in a Word data source?
I have written a script in AppleScript to open Word and then perform a mail merge from a data source and everything is working fine.
One thing I want to do but am struggling with is to return the number of records in the mail merge.
I am trying things like:
get last record of datasource of mydatasource
and also haven't been able to find anything in the AppleScript 2004 Word Reference Guide.
Can anyone help as I have been searching the web and trying things all day and I am sure it can't be difficult.
Thank you.I don't think there is an automatic way to get a line count, but I don't have any problem just counting the lines on a page. Maybe some more information about what you are trying to do and why you can't do it would help someone to come up with a helpful suggestion.
-
How do you count the number of unique values?
I wanted to know how to create a function that will tell me how many unique values are in a list of values.
For example if I had this list:
15
15
12
12
12
2
1
I would get a result of 4. Because there are only 4 unique values 15, 12, 2, and 1.
I'm trying to create a spreadsheet that modeled the Sainte-Laguë method of voting; in case you're wondering. I'm using Numbers '09 if it matters.
ThanksThanks for the responses. That was fast.
I was hoping to fit it all in one cell, but I guess I could hide the columns used for calculation. I tried Badunit's Function and it works. However I found that if I have a column of all the same number it will return 0, when in fact it should return 1. Like if I had a column of 14s I should get one, because the number of different values that appears is 1. Also a minor note is that COUNTIF(B$2:B2,B2) should be COUNTIF(B2:B$2,B2), that makes sure that if you have anything below it doesn't interfere. At least that's what made it work for me.
Well I looked at the way you did your chart, Badunit, and it makes more sense than the way I was doing it. I was having to manually enter the number of seats every new row. I think it would have been easier to write a java program.
Anyways you guys have been helpful. Thanks again. -
How do I count the number of 1's in a Boolean Array??
I have a boolean array of 1000 0's or 1's and want to know the number of times this array is in the 1 position.
The array is repeated within a structure and i need a number for each iteration to be passed onto the next (using a shift register).
Never really used boolean arrays before so none of the standard things i use seem to work?
Thanks in Advance.
RossRoss,
The quick easy way is to convert the boolean array to a 0-1 array from the boolean menu, then sum the array using "sum array elements" from the numerical menu.
Bruce
Bruce Ammons
Ammons Engineering
Maybe you are looking for
-
IPhone 4 Voice call problem when wifi is active
Not always, but randomly my voice calls (send/receive) establishes properly. However, neither me or the other party can hear anything. The most common times it occurred, is when the wifi is active. Any suggestion anyone please? Additional Info: I had
-
How can I set up email in my iphone 4?
I tried so many times to set up, I start to do it, settings, mail..., add account, I chose outlook I add my email and password, verified but that's it, It doesn't show me for IMAP or POP... to add my info.. What should I do? It doesn't works....
-
Specific PDF page range via URL
Hi! We have a 60 page PDF, but would like to be able to only show pages 5-10 (or whatever) via a URL and have parameters in the URL only show pages 5-10. Is this possible? It would be as if the URL parameters hide/omit pages 1-4 and 11-60, and simp
-
Best Video Creation Settings?
What settings should I use if I'm creating video for watching on the Touch? Since the screen res is 480x320, does it make sense to match that? H.264 format best choice? Bitrate of less than 1500kbps? I'm trying to minimize the size, but I still want
-
Q: Why does a simple index.html page containing an inserted .flv movie, created in Dreamweaver CS4, work perfectly in any browser in Windows XP, but when tested in Windows 7 browsers, show only a bunch of icons where the movie should be be...and what