Questions tagged [find-occurrences]

435 questions
0
votes
2 answers

Count items that occur in series

Is there any way to count items that occured in a row (in series without interruption)? Lets say we have
100
120
Klajdi
  • 337
  • 1
  • 10
0
votes
2 answers

Find the most frequently word using hashmaps c++

I need to find the most frequently occurring word and return that value. I must use hash maps and the fuction would take a file name. This is what I've done so far but im very confused. int most_frequent_word(string filename) { string words; …
0
votes
1 answer

Python Pandas co-occurrence after groupby

I would like to compute the co-occurrence percentages after grouping. I am unable to determine the best method for doing so. I can think of ways to brute-force the answers, but this means lots of hard-coded calculations that may break as more…
Mark
  • 81
  • 1
  • 2
  • 6
0
votes
2 answers

Special occurrency counting in data table

(preamble) I don't know if this is the right place for that...I actually have a problem solving/optimization issue for the counting over a table. So if it's not. very sorry and deserve the minusrating. Here's the data frame dat <-…
Stefano
  • 361
  • 1
  • 4
  • 21
0
votes
3 answers

Find number of occurrences of substring

I have a small problem. I'm solving one programming task, but have a problem with it. It is simple one, but time limit make it a bit harder. Find number of occurrences of substring. You will be given M - length of substring; substring to find, N…
Jozef Bugoš
  • 137
  • 1
  • 2
  • 8
0
votes
1 answer

Remove all occurrences in a text file with batch script

Let say in a text file, I have: Planets.txt Mars Earth Jupiter Saturn Mars Uranus Jupiter Pluto How can I remove all the occurrences and left the words appear once in a text file? Output_Planets.txt (Occurrences:…
WhatWhereWhen
  • 473
  • 1
  • 5
  • 6
0
votes
1 answer

How to count occurrences with 'Divide and Conquer' method

I'm looking for an algorithm to count the number of occurrences of each element in an array, using the Divide and Conquer method. Here's an example; Input: 12-3-5-3-12-3 OutPut: (12, 2), (3, 3), (5,1) Can anyone at least give me an idea where to…
DaPoox
  • 139
  • 4
  • 16
0
votes
1 answer

Count occurrences and stretch array in matlab

Let input = [0 0 0 5 5 7 8 8]; I now want to transform this vector into the form output = [3 3 3 3 5 5 6 8]; Which basically is a stairs plot. Explanation The input vector is used to plot data points along the x-axis. The y-axis is thereby…
sge
  • 7,330
  • 1
  • 15
  • 18
0
votes
4 answers

How to find occurances of numbers in table columns?

How do I find the numbers from specific columns in a table with the highest occurances and display them in the corresponding cells of another table based on the 10 most occuring numbers? https://jsfiddle.net/5feak8j0/2/ var col1Array = new…
Ace
  • 223
  • 4
  • 14
0
votes
1 answer

Mark Occurrences does not work in xtend editor in Eclipse Mars

Eclipse behaves strange here. I've updated everything. And "Mark Occurrences" works in a normal Java editor, but it does not in and xtend-editor. Do you have any information what's the reason for that? Is this a bug? I've also tried to use the…
armin.miedl
  • 1,070
  • 1
  • 11
  • 16
0
votes
2 answers

JavaScript - removing the same occurences from an array

I have two inputs, one where I choose a letter and one where I say how many of those letter occurrences to splice. Right now I am only able to delete all the occurrences of the letter I select from the input box, but I would like to be able to set…
SimeriaIonut
  • 516
  • 2
  • 11
  • 20
0
votes
1 answer

Python 2.7 Find occurences from datetime and plot

Since I didn't find anywhere else this topic I will ask it here. I am getting data from CSV file, I have written datetime format in one of columns. I get that column with pandas module and then I need to count occurrences in specific time slots and…
alphiii
  • 1,597
  • 3
  • 21
  • 27
0
votes
1 answer

Count number of occurrence with a 'class' condition

I am trying to count the number of occurrences of species (distributed along an altitude gradient) in 'class' of altitudes. Here is the original data frame : tab R sp N Hauteur Alt Plot Quadrat Microhab Cover 1 R2 B 1 0-50cm 350 P1 Q1 …
user4978107
0
votes
1 answer

Google Sheets - Count number of occurences of word BEFORE comma

I'm trying to count the number of times specific words, names in this case, occurs in a column. However, there may be any number of names in each cell in that column, and I'm only interested in the first one in each. If there is more than one name…
0
votes
1 answer

Find and Highlight Least Common Occurrence(s) in Variable Range

I have a code that has a variable range with many categories in each column that display data. I need to highlight the least commonly occurring values as a percentage of the total number of cells. If there are 300 cells in the column, it needs to…
Coding Novice
  • 437
  • 2
  • 8
  • 22