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
2 answers

Removing a sublist from a list

I have a list e.g. l1 = [1,2,3,4] and another list: l2 = [1,2,3,4,5,6,7,1,2,3,4]. I would like to check if l1 is a subset in l2 and if it is, then I want to delete these elements from l2 such that l2 would become [5,6,7,1,2,3,4], where indexes 0-3…
user7190127
0
votes
1 answer

C++ removing certain symbol/punctuation

token.erase(std::remove_if(token.begin(), token.end(), ispunct), token.end()); It seems that using ispunct will remove all punctuation. Is it possible to only remove certain types? For example if I want to remove all punctuation except, for example…
0
votes
0 answers

xamarin - Resource.designer.cs special character issue

The auto_generated code is below: public partial class Id { // aapt resource value: 0x7f050002 [issue is here] public const int HotDog/NametextView = 2131034114; // aapt resource value: 0x7f050001 public const int HotDogImageView =…
0
votes
1 answer

Remove Marker Google Map api v2 - Android

I want to draw and remove Marker according to the previous conditions must be how Example: int a ; if( a > 0 ) { draw Marker } if(a == 0) { remove Marker }
0
votes
2 answers

PHP Remove email addresses from comma separated string

I'm trying to delete the email from a comma separated string. I have a script that brings me emails. Any way to do this quickly: $cadena = "Example1@email.com,0001,00005,0010,Example3@email2.com,003"; $cadena = explode(",", $cadena); …
user6079755
0
votes
0 answers

How to replace/delete specific lines in subtitles (text) file?

So far, I've created a batch file which adds suffix to the files' names from the selected folder, which types are: *.avi *.mkv *.mp4 *.ass Now, I would like to add the option to search for specific text through the *.srt / *.ass files (subtitles…
Silver007
  • 99
  • 9
0
votes
2 answers

How to remove duplicate rows in both using a condition in R

The data I have is something like that: RES1 <- c("A","B","A","A","B") RES2 <- c("B","A","A","B","A") VAL1 <-c(3,5,3,6,8) VAL2 <- c(5,3,7,2,7) dff <- data.frame(RES1,VAL1,RES2,VAL2) dff RES1 VAL1 RES2 VAL2 1 A 3 B 5 2 B 5 …
wthimdh
  • 476
  • 1
  • 5
  • 19
0
votes
1 answer

incorrect lambda usage in remove_if

so I have a vector holding vectors like so: vector> vec; And I am trying to use a comparator (pred) to iterate through the vectors within vec and determine which vectors get deleted by remove_if and erase. My code so far is as…
user313
  • 681
  • 1
  • 8
  • 21
0
votes
1 answer

angular.js: remove html element if expression is true

I have Collection in my controller $scope.EventMarketCollection = [ { Id: 1, EventMarketName: 'Full Time Result', OddsKey: 108, EventMarketOutcomes: [ { Id:…
Arkadi
  • 1,153
  • 1
  • 14
  • 35
0
votes
8 answers

Javascript remove specific css value

I am trying to remove the word "Quantity" from below and I think I am close but obviously something is off since it's not working.
With:
alisa
  • 3
  • 1
  • 2
0
votes
3 answers

What is the best way to remove elements in a std:list that satisfy certain conditions?

I have a user-defined structure like this: struct Cell{ int dirty; double data; Cell* c; // bool operator==(const struct Cell& other) { // /* I am not sure if I need this function here...*/ // } }; Then, I defined a list like…
user4971772
0
votes
1 answer

Remove all Elements With a Custom Null Value Java

So I've been working on some code and I have a custom class named word. From here I have a list of words (dupeWordList) and would like to remove all words from that list that have a value of null. Keep in mind, value is variable inside the word…
Will Fisher
  • 413
  • 5
  • 18
0
votes
3 answers

Remove Specific Value from DropDown

I am beginner to the dot.net, can any one suggest me how to remove specific value in fetched dropdown list. Here why I am mentioning fetched means that dropdownlist is generated from or fetched from a table using sql. sqlquery=SELECT DISTINCT…
Nachiappan R
  • 182
  • 1
  • 1
  • 20
0
votes
2 answers

how to remove characters from items in a list, using another list as reference

I am trying to remove specific characters from items in a list, using another list as a reference. Currently I have: forbiddenList = ["a", "i"] tempList = ["this", "is", "a", "test"] sentenceList = [s.replace(items.forbiddenList, '') for s in…
Zac
  • 362
  • 1
  • 4
  • 16
0
votes
0 answers

Sorting of iterator after removing elements in loop

In my code I have written a function to get all entries for one specific store. My query gives all entries back and after iterating in these entries, I remove the query's with the importing parameter Status. The entries are sorted in a corrected…
Timvdb92
  • 63
  • 9