Top "Mutable" questions

A mutable can be modified after it is created.

Create mutable List from array?

I have an array I'd like to turn into a List, in order to modify the contents of the array. …

java arrays list mutable
volatile vs. mutable in C++

I have a question about the difference between volatile and mutable. I noticed that both of the two means that …

c++ volatile mutable
Mutable strings in Python

Please, do you know of a Python library which provides mutable strings? Google returned surprisingly few results. The only usable …

python string mutable
How to make any view to draw to canvas?

I have a short question: Suppose I have a (mutable) bitmap that I need to modify (add images, texts, etc...) . …

android bitmap draw android-canvas mutable
Why can't strings be mutable in Java and .NET?

Why is it that they decided to make String immutable in Java and .NET (and some other languages)? Why didn't …

java .net string mutable
List of lists changes reflected across sublists unexpectedly

I needed to create a list of lists in Python, so I typed the following: myList = [[1] * 4] * 3 The list looked like …

python list nested-lists mutable
Existence of mutable named tuple in Python?

Can anyone amend namedtuple or provide an alternative class so that it works for mutable objects? Primarily for readability, I …

python mutable namedtuple
How I can mutate a struct's field from a method?

I want to do this: struct Point { x: i32, y: i32, } impl Point { fn up(&self) { self.y += 1; } } fn …

rust mutable
In Kotlin, how do you modify the contents of a list while iterating

I have a list: val someList = listOf(1, 20, 10, 55, 30, 22, 11, 0, 99) And I want to iterate it while modifying some of the values. I …

list iterator kotlin mutable
Mutable variable is accessible from closure. How can I fix this?

I am using Typeahead by twitter. I am running into this warning from Intellij. This is causing the "window.location.…

javascript closures mutable