Questions tagged [remove-if]

Common Lisp 'remove-if' function.

Common Lisp 'remove-if' function.

It's signature is:

remove-if test sequence &key from-end start end count key => result-sequence

CLHS: remove-if

201 questions
0
votes
1 answer

Two condition filtering and removing Zero Values

I have a simple dataframe of counts in a growing pepper experiment. I want to remove observations where both treatment's[(Control and Covered) Fruit_total are equal to zero. I tried filter but I can only handle one variable at a time. Any advice?…
I Del Toro
  • 913
  • 4
  • 15
  • 36
0
votes
3 answers

achieving the same result but using a different kind of loop

so this method performs daily checks that adds one day to the displayedDays in order to determine the freshness of an item, so the method adds a day then check if it's rotten by calling the method isRotten() and if it's rotten it removes it the…
0
votes
3 answers

How to remove all elements from sorted Ruby array which are closer to its closest neighbour than a limit?

I have a sorted array of real numbers in my Ruby program. I want to remove all the elements which are very "similar": their difference is smaller then a given limit. So finally I want to keep only those elements, which are well distinguishable from…
Konstantin
  • 2,983
  • 3
  • 33
  • 55
0
votes
1 answer

Remove (delete, replace or unlink) old image file while updating

I have implemented the (bulletproof) uploader in my script. But when I try to update my records by changing the DB table row for example: I want to update and (replace) the old game image with a new game image (I am using a rename method)! I find…
Jodyshop
  • 656
  • 8
  • 12
0
votes
3 answers

Remove specific rows in R

I have a dataframe where I would like to remove specific rows. I would like to remove the row where there is the "Référence" word and the 3 rows under the "référence" row. See my example here. I think I have to use grepl function. Thank you for…
MaxB
  • 139
  • 8
0
votes
1 answer

Comparison of lists - remove elements

My question is - How to remove objects from the list by comparing it with the second list. List1 - The first list contains email addresses. List2 - The second list contains only domains in the format "@domain.com" etc I would like to delete…
0
votes
3 answers

Constraining remove_if on only part of a C++ list

I have a C++11 list of complex elements that are defined by a structure node_info. A node_info element, in particular, contains a field time and is inserted into the list in an ordered fashion according to its time field value. That is, the list…
maurizio
  • 745
  • 1
  • 7
  • 25
0
votes
2 answers

tiny but strong: remove unused fields

I use TBS and OpenTBS for parsing office templates in a PHP script. Files of type rtf or txt are processed with TBS and those of types docx or pptx with OpenTBS. The merged files are used in an office context for letters, submissions and the lot, so…
patmin
  • 117
  • 1
  • 10
0
votes
1 answer

remove_if erases everything from vector

I'm writing a program for an assignment - it's supposed to be a database for information about employees in a company. Basically, a vector containing structures (individual employees). The trouble I'm having is that remove_if erases everything…
0
votes
1 answer

Removing specific values within a XML element using XSLT?

During my XSL transformation, I would like to delete all the tags with ContextID="de_DE". This means that the following XML: 1234
AlexD
  • 19
  • 3
0
votes
1 answer

delete an element from an array with conditions python numpy

i have 3 array a and b with the same size a= [1,20,0,3,9,9,9,55] b= [1,5,6,9,9,9,9,55] i need to delete the element 0 from a and delete the element in the same index in the array b will look like this: a= [1,20,3,9,9,9,55] b=…
Amal Kostali Targhi
  • 907
  • 3
  • 11
  • 22
0
votes
1 answer

Remove add more button after adding 5 rows and show it again once the are less than 5 javascript/jQuery

I am cloning the content of div "template" into the div "placeholder" using 'add more' button. I would like once I added 5 rows the add button to dissapear and once I remove one of the 5 to show again and be able to add again rows until they rich…
Acdn
  • 568
  • 2
  • 13
  • 26
0
votes
1 answer

Wrong element is removed after leaving method which used std::erase succesfully

I am working on a graphics engine. The engine has a std::vector of drawables. A Drawable is an object which contains a Model and a DrawableObject, which in turn holds a shader program and a bunch vertices from a 2D or 3D model. Adding new Drawables…
oddRaven
  • 672
  • 1
  • 7
  • 20
0
votes
2 answers

Copy index of vector Elements with condition

I want to save the indices of my bool vector where the vector element is false. I have the following code: vector incumbent_solution; // (0,0,0,1,1,0,0)... vector I_minus_S(incumbent_solution.size()); auto it =…
Franneck
  • 31
  • 2
  • 9
0
votes
5 answers

ArrayList remove except if contains character

Android Studio - Java How can I remove all entries from an ArrayList except the ones that contain certain characters independently from upper and lower case? String[] numbers = new String[] {"One", "Two", "Three", "Four", "Five", "Six", "Seven",…
LoveCoding
  • 79
  • 2
  • 13