Questions tagged [removeall]

Issues regarding using removeAll method in Java's Collection class

306 questions
188
votes
3 answers

How to remove all git origin and local tags?

How do you remove a git tag that has already been pushed? Delete all git remote (origin) tags and Delete all git local tags.
Amir Hosseinzadeh
  • 7,360
  • 4
  • 18
  • 33
98
votes
7 answers

Remove empty strings from array while keeping record Without Loop?

This question was asked here: Remove empty strings from array while keeping record of indexes with non empty strings If you'd notice the given as @Baz layed it out; "I", "am", "", "still", "here", "", "man" "and from this I wish to produce the…
Universal Grasp
  • 1,835
  • 3
  • 20
  • 29
81
votes
8 answers

RemoveAll for ObservableCollections?

I am looking for Linq way (like RemoveAll method for List) which can remove selected items from my ObservableCollection. I am too new to create an extension method for myself. Is there any way I remove items from ObservableCollection passing a…
Arpit Khandelwal
  • 1,743
  • 3
  • 23
  • 34
54
votes
7 answers

How to select an element's parent and the parent's siblings

I have this code: $("#test").siblings('p').remove(); $("#test").remove(); How can I chain this code instead of writing it separately?
user2281332
45
votes
4 answers

How to remove parentheses and all data within using Pandas/Python?

I have a dataframe where I want to remove all parentheses and stuff inside it. I checked out : How can I remove text within parentheses with a regex? Where the answer to remove the data was re.sub(r'\([^)]*\)', '', filename) I tried this as well…
Alexis
  • 8,531
  • 5
  • 19
  • 21
38
votes
3 answers

Uninstall/remove Carthage from iOS/Xcode project?

Here is a link to Carthage: https://github.com/Carthage/Carthage It additionally adds some changes in project files so I can simply remove extra files/folders and it will work but I can't use Carthage in future again because of some errors. And of…
Vyachaslav Gerchicov
  • 2,317
  • 3
  • 23
  • 49
33
votes
3 answers

How to remove all components from a JFrame in Java?

I'm writing a program where I have a JFrame and I want to remove all components from it, then add just one component to it and repaint the frame. What I have so far is something like the code below (called in an object that implements JFrame, where…
scaevity
  • 3,991
  • 13
  • 39
  • 54
30
votes
7 answers

Java: removing numeric values from string

I have suceeded with the help of this community in removing numeric values from user input, however, my code below will only retrieve the alpha characters before the numeric that has been removed: import java.util.Scanner; public class…
user2558595
  • 399
  • 3
  • 6
  • 12
18
votes
3 answers

Best way to remove one arraylist elements from another arraylist

What is the best performance method in Java (7,8) to eliminate integer elements of one Arraylist from another. All the elements are unique in the first and second lists. At the moment I know the API method removeall and use it this…
17
votes
6 answers

crash while removing objects from NSMutableArray

In my iphone project (ARC enabled) i have a nsmuatble array which contains some 5 managed objects (which are retrieved from core data ) and in some scenario i need to remove all the objects from that nsmutablearray i have used following methods to…
Ravi Kiran
  • 691
  • 3
  • 9
  • 22
14
votes
4 answers

Which is more efficient : using removeAll() or using the following HashMap technique to retain only changed records in an ArrayList

I have 2 ArrayLists A and B of the same datastructure C (hashCode() and equals() overridden). C represents a student's record. The two lists are of the same size and represent new student records and old ones respectively (the students are the same…
Daud
  • 7,429
  • 18
  • 68
  • 115
14
votes
5 answers

remove all options from select jquery but only one

I have a select that contain this values: