Questions tagged [find-occurrences]
435 questions
0
votes
3 answers
Storing hashmap values as program iterates
I am trying to solve the programming challenge outlined below, wherein basically you need to find the word in a given sentence with the greatest number of repeated characters. I have struggled a bit with this, and was lucky enough to find some code…

resu
- 321
- 1
- 6
- 18
0
votes
1 answer
number of occurrences by lines R
I have this array:
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1
[38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[75] 1 1 2 1 2 2 1 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2…

yokie
- 153
- 9
0
votes
1 answer
Find occurrences of each value of a datagridview column in a text and display each occurrence to the next column
I am having a problem here. I am trying to display how many times each one of the strings in datagridview column "Values" appear. I am trying to display each occurrence next to each value(for example I want this: 71->4, 83 ->7 , 0B->6 etc.). Here is…
0
votes
2 answers
Display words in decreasing order of their occurance
I have to count the occurrences of words and display them by number of occurrences (in decreasing order). I can count the words but don't know how to proceed further. It may be I'm not doing it efficiently. If possible please suggest a…

Gaurav Rajput
- 873
- 3
- 11
- 19
0
votes
1 answer
AWK: Ignore lines grouped by an unique value conditioned on occurrences of a specific field value
Please help revise the title and the post if needed, thanks.
In short, I would like to firstly group lines with a unique value in the first field and accumulate the occurrences of a specific value in the other field in the underlying group of lines.…

Francis
- 6,416
- 5
- 24
- 32
0
votes
0 answers
How can i count the occurences of vector item in R?
I am newest in using the R Language. I want to get the item with the maximum occurences in the vector.
So, if i have a vector as bellow: vec<-as.vector(c(1,2,3,1,4,1,2)).
I want get 1.
Thanks.

Sasa88
- 327
- 1
- 3
- 15
0
votes
1 answer
Map of number of occurrences in a list
I'm working with this type of list:
data Elem = Dot | Star
and I've to print a list of tuples, with 2 units, in which the first indicates the length of a sequence of "Star" in the list and the second lists the locations where this sequence appears…

notdodo
- 149
- 2
- 15
0
votes
7 answers
Counting occurrences of the largest number
I have been attempting to code for a program that stores input into an array and then allows me to print it out. It also lets me know which number is the largest. What I am trying to figure out is how can I get my program to tell me the amount of…

Ernesto Banderas
- 25
- 1
- 4
0
votes
3 answers
Counting combined occurrences across two columns
Hi I have a data frame Y which looks like the following
O T Dist
2 13 0.123
2 3 0.452
2 4 0.213
3 5 0.231
3 8 0.213
4 5 0.123
5 8 0.543
I wish to create a new data frame which counts the total number of times a number appears in the…

akakakak
- 1
- 2
0
votes
3 answers
How can I remove unique elements in a list? Haskell
How would I remove unique elements in a list, so only frequently occurring elements remain, (only using prelude functions). for example
["abc","abc","a","b","c","b"]
would return:
["abc","b"]
In the case that all elements occur exactly once, all…

Arthur
- 347
- 1
- 4
- 14
0
votes
1 answer
Regular Expression javascript repeat with optional sections
Why doesn't this javascript regexp code work? According to the documentation it should:
Here's my String for parsing (it's the rails nested form information):
flex_table[flex_rows_attributes][0][flex_cells_attributes][0][id]
What I want are these…

LongHike
- 4,016
- 4
- 37
- 76
0
votes
0 answers
count occurrences of each value for each names across list or vector
I want to count occurrences of each value for each names() across a list (alt a vector)
lst <- list(`a,b`=1, `b,a`=2, `a,b`=2, `b,a`=1,`a,b`=1,`a,b`=2,`b,a`=1) # list
vec <- unlist(lst) # vector
# ether list or vector would work
I can't figure out…

jO.
- 3,384
- 7
- 28
- 38
0
votes
1 answer
(MatLab) Count number of occurrences in array and check if bigger than parameter
I am a new user of MatLab and I am stuck with a simple task. I have an array made of 0s and 1s: I need to check if 1s occur more than X time consecutively.
i.e. A = [ 0 1 1 1 0 1 0 1 1 1 1 0 1] and I need to know if I have 4 (for example)…

Paris
- 1
0
votes
1 answer
Removing Occurences of String from another in C (Code and Error Messages)
Can someone tell me what's wrong with my code? I've looked extensively at the error messages VS gives me, but I'm at a loss. I've attaches error messages for more info.
//Inclusion of necessary header files
#include
#include…
0
votes
2 answers
Mysql count occurrence by group as a column value
I've made the following query:
select ba_brand, ceil(sum((sk_front + sk_depth + sk_warehouse + (sk_exhibition IS NOT NULL))) / count(distinct(vi_pdv_id_pdv))) as 'inventory',
count(vi_pdv_id_pdv)
from sf_visit_stock
join sf_visit on sk_vi_id_visit…

Metafaniel
- 29,318
- 8
- 40
- 67