Questions tagged [find-occurrences]
435 questions
1
vote
0 answers
Using OpenCV Templatematch with multiple occurences
I'm playing around with OpenCV and Templatematch. I have found some code which I basically understand, but is having some problems 'adjusting' to my simple needs.
The code does template match on a picture of an HMI. The HMI consists of both 7…

Gumse90210
- 11
- 3
1
vote
1 answer
Need a regex to modify a second match and ignore the first and last
Library context, using MarcEdit which can also use regex.
I need this:
=773 \\$tEtudes inuit$x0701-1008$1Vol. 44 1-2, $2p. 53-84
to be changed to this:
=773 \\$tEtudes inuit$x0701-1008$1Vol. 44, no. 1-2, $2p. 53-84
Problem is, the 44 in this case…

Frederic M.
- 13
- 2
1
vote
1 answer
How to count occurence of variable eacht time it occurs and remove outliers in R
I have a vector. On the hand I want to remove factors, which seem to be classified not correct. For instance the "D" at position 7. As the surroundings are "A" this should be "A" too. I know there must be a rule, for example, if the 3 values before…

mcfly
- 49
- 5
1
vote
3 answers
Find occurences from a list of strings
I would like to create a function without external libraries that finds letters from a list of words (strings) and counts their occurrence only if the word has more than 3 characters Then prints them in order.
List with words
word_list = ['THE',…

devblack.exe
- 428
- 4
- 17
1
vote
2 answers
Finding # of occurrences of fractions in Java
I am trying to find and print the number of occurrences of fractions from a file in my program. Fractions that simplify down to the same number counts as an occurrence, so 12/6 counts for 6/3 as well. So far, I have separated the fractions into…

Branden
- 29
- 2
1
vote
0 answers
How to count number of times specific word occurs in a range in MS Excel?
I am analyzing data having 450000 cells in a column range which is taking a long time to find occurrences of a specific word hence hanging Excel. The formula I am using is =SUMPRODUCT(LEN(range)-LEN(SUBSTITUTE(range,word,"")))/LEN(word)
Please help…

Taib Bilal
- 19
- 1
1
vote
4 answers
Count occurrences of an event by date with C#
I am facing an issue with counting the number of occurrences by date in C#. Should I use Linq to filter it? Please advise. Thank you.
Date
Player ID
1/1/2001
23
1/1/2001
29
1/1/2001
24
3/1/2001
22
3/1/2001
23
My preferred output…

curiouscat
- 23
- 5
1
vote
3 answers
My code does execute for small sample but not for a large
I try to count the frequency of word occurances in a variable. The variables counts more than 700.000 observations. The output should return a dictionary with the words that occured the most. I used the code below to do this:
d1 = {}
for i in…

Paul Engelbert
- 97
- 7
1
vote
2 answers
Equality between two propositions nat -> nat
I am currently working in a project in coq where I need to work with lists of nat -> nat. So basically I will have a definition that takes a list (nat -> nat) and a proposition f : nat -> nat as parameters and the goal is to retrieve the index of f…

Musher Soccoli
- 149
- 3
1
vote
1 answer
Count number of. consecutive occurrences in sequence per group in R
I have a slight program issue I cannot seem to figure out.
I am wondering how i can in an elegant way count the number of consecutive numbers in a sequence starting from different values per group in r
for example, we have a data frame with names…

user547928359
- 13
- 4
1
vote
1 answer
Function to find number of occurrences in list
So I already have a function that finds the number of occurrences in a list using maps.
occur :: [a] -> Map a a
occur xs = fromListWith (+) [(x, 1) | x <- xs]
For example if a list [1,1,2,3,3] is inputted, the code will output [(1,2),(2,1),(3,2)],…

m.18
- 70
- 1
- 8
1
vote
4 answers
sorting of an array in nested array and their occurence
I have nested loops e.g.
arr = [[2,5,4,6],[7,3,1,8],[3,9,1,1],[2,4,3,2]]
Is there a way to sort them independently? To receive something like:
arr = [[2,4,5,6],[1,3,7,8],[1,1,3,9],[2,2,3,4]]
I would like also to know if any of the sorted inner…

prs
- 11
- 2
1
vote
2 answers
count occurrences of items in an array from an nested items in an array of objects javascript
I have this array of dates.
const dateArray = ["7/12/2021","7/13/2021","7/14/2021","7/15/2021"]
and I am trying to see if any of these dates appear inside my other array of array of objects, those dates will match something inside the…

Thorai219
- 53
- 5
1
vote
2 answers
String search by coincidence?
I just wanted to know if there's a simple way to search a string by coincidence with another one in Python. Or if anyone knows how it could be done.
To make myself clear I'll do an example.
text_sample = "baguette is a french word"
words_to_match =…

Pomodor0
- 19
- 3
1
vote
2 answers
Finding the first occurrence of a character in a list
I want a code that input the number of lines (empty ones are counted), then the lines itself, then the word I want to find and finally, where the first occurrence of one character happened. Please with no imports.
I have this rn:
lines =…

japanesemagic
- 21
- 5