Top "Mutable" questions

A mutable can be modified after it is created.

Convert immutable Bitmap file to mutable Bitmap

A: Bitmap immutableBmp= BitmapFactory.decodeResource(getApplicationContext().getResources(),R.drawable.sample); mutableBitmap=immutableBmp.copy(Bitmap.Config.ARGB_8888, true); B: Bitmap immutableBmp= …

android bitmap immutability mutable
How to convert a mutable HashMap into an immutable equivalent in Scala?

Inside a function of mine I construct a result set by filling a new mutable HashMap with data (if there …

scala immutability scala-collections mutable
Are strings in Ruby mutable?

Consider the following code: $ irb > s = "asd" > s.object_id # prints 2171223360 > s[0] = ?z # s is now "zsd" &…

ruby string immutability mutable
Two dimensional vectors in Rust

Editor's note: This question predates Rust 0.1 (tagged 2013-07-03) and is not syntactically valid Rust 1.0 code. Answers may still contain …

vector rust mutable rust-obsolete
How do you declare the values of a dictionary entry as mutable?

The Google yields plenty of example of adding and deleting entries in an F# dictionary (or other collection). But I …

f# dictionary mutable
Always declare std::mutex as mutable in C++11?

After watching Herb Sutter's talk You Don't Know const and mutable, I wonder whether I should always define a mutex …

c++ c++11 thread-safety constants mutable
NSArray @property backed by a NSMutableArray

I've defined a class where I'd like a public property to appear as though it is backed by an NSArray. …

objective-c ios nsarray mutable
What is the proper way to remove elements from a scala mutable map using a predicate

How to do that without creating any new collections? Is there something better than this? val m = scala.collection.mutable.…

scala scala-2.8 mutable scala-collections
How can I do a mutable borrow in a for loop?

I tried: fn main() { let mut vec = [1, 2, 3]; for mut x in &vec { *x = 3; } for mut &x in &…

for-loop rust mutable borrow-checker
Correct Style for Python functions that mutate the argument

I would like to write a Python function that mutates one of the arguments (which is a list, ie, mutable). …

python mutable