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

Return same Parameter On Some Objects By type

I want that remove my if what can I do? I retrieve my data from database and in all of type they have some field named IsVerified is anyway that i can remove ifs??? private bool CheckDetailsAreVerified(type) { bool isVerified; …
0
votes
4 answers

How to use removeIf() to remove 2 conditions?

I want to use removeIf to remove 2 conditions, but I did not find the proper way to do that. For example, I want to remove students whose grade is below ‘B’ Code as follows: Student[] group1 = {new Student(), new Student(), new Student(), new…
YULIANG WANG
  • 3
  • 2
  • 4
0
votes
1 answer

Java remove if condition don't work as it have to

Can have few plans and few tariffs. Need to remove all tariffs from plan, when remove == N. Tried to do it with this code, but nothing happens. I mean, I debugged and saw in console, that remove is T, but code don't remove tariffs anyway. How to fix…
Deividas.r
  • 17
  • 1
0
votes
0 answers

How can I remove and add back a div when an input is selected and also add it back if selection changes

So I am a month into learning JS and I am building a website project that calculates the delivery cost based on the type of parcel and dimensions of the parcel I have put the dimensions input field (length width and height) in a div (dimensions) In…
cheve
  • 41
  • 5
0
votes
2 answers

How to remove specific duplicate data in array after sorting?

This is my code: FileWriter writers = null; try { BufferedReader reader = new BufferedReader(new FileReader("Database.txt")); ArrayList dataList = new ArrayList<>(); String line = ""; while ((line = reader.readLine()) != null)…
0
votes
0 answers

why does this simple std::remove_if on an unordered_map not compile?

//try8.cpp #include #include #include std::unordered_map m_foo; int main() { using value = std::unordered_map::value_type; std::remove_if(m_foo.begin(),…
Long Bu
  • 513
  • 4
  • 9
0
votes
3 answers

Removing selected duplicates in a python list

Suppose i have the following list: my_list = ["sam","sam", "is", "a", "is", "sam" , "good", "person", "person"] Now my requirement is to write a function that selectively removes duplicates. I want to use this function in a for loop. suppose i want…
Samit Saxena
  • 99
  • 1
  • 9
0
votes
2 answers

count and remove from dataset

I would like to remove certain people from my dataset if a condition is fulfilled. I have panel data and ideally would like to count the number of completions for every person and delete them from my dataset if a person has never completed…
Lisam
  • 31
  • 7
0
votes
2 answers

Delete an entry in hashmap while iterating

I have a loop to iterate a hashmap. If the condition is satisfied I need to remove the key, value pair from the hashmap. I am unable to do it using the below code. How can I achieve this? for(HashMap.Entry m:commons.entrySet()){ …
0
votes
1 answer

remove null array field from dataframe while converting it to JSON

Is there any method where i can create a json from a spark dataframe by not using those fields which are null: Lets suppose i have a data frame: +-------+----------------+ | name| hit_songs| +-------+----------------+ |beatles|[help, hey…
0
votes
1 answer

Is there a functionality in spring security to auto remove token from db once expiry time of that token is completed

I have implemented below code for spring security. I am using spring version 2.3.0.BUILD-SNAPSHOT with security oauth-2 version 2.3.0.RELEASE Is It possible to remove / revoke granted access token once its expiry time is completed? If so which…
0
votes
1 answer

How to filter csv data to remove data after a specified year?

I am reading a csv in python with multiple columns. The first column is the date and I have to delete the rows that correspond to years previous to 2017. time high low Volume Plot Rango 0 2017-12-22 25.17984 …
0
votes
1 answer

thrust remove_if using the thrust::zip_iterator,how to delimit pred?

this is my code a definition of the zip-iterator `using namespace std; typedef thrust::device_vector::iterator IntIterator; typedef thrust::device_vector::iterator FloatIterator; typedef…
wpf1118
  • 3
  • 1
0
votes
1 answer

Delete element "*" and "Letter" from column

I have some columns in my dataset, that either have an * in last position or a letter ranging from A to G. Can someone explain why these are in the dataset and how i can remove them from the column? Because I can't run analyses with the variables,…
Amy
  • 91
  • 1
  • 12
0
votes
2 answers

Remove a element from List of objects based on inner object list value in java

How can I remove the element from the list if some inner list attribute value fails to meet the condition.The trick here is that attribute is itself a list and comparison is based on some attribute of that inner list. Please refer the below sample…
Nishant Varshney
  • 685
  • 2
  • 14
  • 34