Questions tagged [remove]
491 questions
41
votes
4 answers
Flutter Remove list item
I have a question in my flutter dart script, this my script:
List replytile = new List();
replytile.add(
new ReplyTile(
member_photo: "photo",
member_id: "001",
date: "01-01-2018",
…
![](../../users/profiles/9363835.webp)
Denis Ramdan
- 842
- 3
- 11
- 25
6
votes
5 answers
remove matrix from a list of matrices
I have a list of 12 matrices called M and I'm trying to remove every matrix from the list that has 0 rows.
I know that I can manually remove those matrices with (for example, to remove the second matrix) M[2] <- NULL. I would like to use logic to…
![](../../users/profiles/14745417.webp)
littleisrael
- 75
- 4
6
votes
6 answers
How to remove an unnamed element from a single item list?
This may sound a very beginner's question and very well it could also be a very basic and stupid question, but somehow I am having headache in doing it.
Let's suppose I have a single item list
v <- as.list("1, 2, 3,")
v
[[1]]
[1] "1, 2, 3,"
Now I…
![](../../users/profiles/2884859.webp)
AnilGoyal
- 14,820
- 3
- 16
- 30
6
votes
4 answers
Remove top row from a dataframe
I have a dataframe that looks like this:
level_0 level_1 Repo Averages for 27 Jul 2018
0 Business Date Instrument Ccy
1 27/07/2018 GC_AUSTRIA_SUB_10YR EUR
2 …
![](../../users/profiles/9478743.webp)
SBad
- 895
- 2
- 17
- 28
5
votes
2 answers
R: How to truly remove an S4 slot from an S4 object (Solution attached!)
Let's say I define an S4 class 'foo' with two slots 'a' and 'b', and define an object x of class 'foo',
setClass(Class = 'foo', slots = c(
a = 'numeric',
b = 'character'
))
x <- new('foo', a = rnorm(1e3L), b = rep('A', times =…
![](../../users/profiles/2997814.webp)
user2997814
- 53
- 4
5
votes
1 answer
How do I uninstall a package in Elm?
If I have installed a package with elm install *package name* how do I then uninstall it?
![](../../users/profiles/11741992.webp)
Brock
- 581
- 1
- 8
5
votes
1 answer
GitHub: How do I remove myself as a contributor of another person's repositories
I want to remove a repository I was added to as a collaborator from my list of "Repositories" (found on the left on the main page at GitHub when logged in). But, I can't find a way to do that.
Note: My question is different from how to remove…
![](../../users/profiles/250610.webp)
MikeTheTall
- 2,742
- 3
- 24
- 36
5
votes
9 answers
How to remove a row from a 2d array?
I have a simple array, sort of like this:
1 2 3 4 5 6 7 8 9
6 2 7 2 9 6 8 10 5
2 6 4 7 8 4 3 2 5
9 8 7 5 9 7 4 1 10
5 3 6 8 2 7 3 7 2
So, let's call this matrix[5][9]. I wish to now remove every row within this matrix that contains a certain value,…
![](../../users/profiles/213877.webp)
AlexT
- 561
- 1
- 7
- 20
4
votes
1 answer
Remove any element from a HashSet and get ownership (random order is fine)
How can I remove an element from a HashSet in Rust and take ownership of it? I'm aware the element chosen would have a pseudorandom order, which is fine.
Currently, I'm doing it like this:
use std::collections::HashSet;
fn main() {
let mut items…
![](../../users/profiles/9470078.webp)
Monolith
- 717
- 8
- 24
4
votes
1 answer
Why do I get a different result if instead of x I directly pass array element ar[0] in std::remove function?
#include
#include
#include
#include
using namespace std;
int main()
{
vector ar = {1, 2, 2, 2, 3, 4, 5, 5, 5, 6, 7};
vector sum;
int n = ar.size();
for (int i = 0; i < n; i++)
{
…
![](../../users/profiles/14131454.webp)
saurov deb
- 41
- 2
3
votes
2 answers
Removing Multiple Lines after a specific word using Python
I want to remove the last section of an article (i.e. References section) in a .txt file using Python. By "the whole section" I mean everything after the word "References":
Is there a way to remove all the content after the word "References" using…
![](../../users/profiles/11048963.webp)
Z Azin
- 57
- 6
3
votes
2 answers
`conda env remove` hangs for 16 hours, what are my options?
At 5 PM yesterday evening, I executed:
(my_root) C:\Users\W>conda env remove --name py36
Having made no apparent progress overnight, I just killed it at 08:45 AM.
In executing the same command from the same environment (my_root), it took no more…
![](../../users/profiles/9249533.webp)
CreekGeek
- 804
- 6
- 13
3
votes
2 answers
How to remove an element from an array that is inside an object in React JS (ES6)
I would like to remove an element from an array that is inside an object and override that object with the new values. See example below.
var obj = {
a: [1, 2, 3],
b: [4, 5, 6],
c: [7, 8, 9]
}
I would like to remove the number 5 from obj…
![](../../users/profiles/12291641.webp)
CustyZ01
- 136
- 1
- 8
3
votes
4 answers
How to remove part of each string-element in a list in Python?
I have a long list of dates in the form ["2019-11-01 00:15:00+01", "2019-11-01 00:30:00+01", "2019-11-01 00:45:00+01" ... and so on] in the type of strings. I would like to go through the list and remove the "00:15:00+01"-part. I have tried with a…
![](../../users/profiles/14844515.webp)
frevheim
- 39
- 2
3
votes
2 answers
Remove multiple list elements knowing their indices in python
What is the best and most pythonic way to delete items from a list knowing only the items indices?
my_list = ['zero', 'one', 'two', 'three', 'four']
my_removal_indices = [0, 2, 4]
# what to do
my_list = ['one', 'three']
Please note that something…
![](../../users/profiles/13785949.webp)
MD98
- 93
- 6