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", …
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…
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…
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 …
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 =…
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?
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…
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,…
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…
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++) { …
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…
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…
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…
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…
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…
MD98
  • 93
  • 6
1
2 3
32 33