Linked Questions
12 questions linked to/from How safe is the use of Block and Internal`InheritedBlock
2
votes
1
answer
88
views
Is the use of Block to temporarily override definitions inherently unsafe? [duplicate]
This may have been discussed before, if so, please let me know.
Consider the following example:
x = 5
Dynamic[{Clock[], x}]
This will always display the ...
598
votes
19
answers
155k
views
Where can I find examples of good Mathematica programming practice?
I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
211
votes
25
answers
17k
views
What are some useful, undocumented Mathematica functions?
There have already been some questions about some undocumented functionality in Mathematica. Such as (please add to these lists!)
How can one find undocumented options or option values in Mathematica?...
19
votes
4
answers
632
views
Internal DynamicModule steals scope of external DynamicModule
I have two dynamic objects, one nested in the other. Both have their own functions defined, as follows. I have simplified them to the point where they don't make much sense, but can still illustrate ...
8
votes
2
answers
1k
views
How to replace a variable that was assigned a value before
Question
How to make the replacement $f[x] \to f[y]$ for an abitrary function $f$ if $x$ was assigned a value before?
Example 1
How can I make the replacement $x +1 \to y + 1$ if I have assigned ...
11
votes
2
answers
809
views
Is there a convention on which name to use for a throwaway variable? (Like underscore in Python) [duplicate]
I would prefer to write {_, foo} = LongFunctionName[arg1, arg2] instead of foo = LongFunctionName[arg1, arg2][[2]] or ...
8
votes
1
answer
1k
views
DSolve with SetOptions[Solve, Method -> Reduce] Behaving Differently in Ver 11.1.1
With version "11.1.1 for Microsoft Windows (64-bit) (April 18, 2017)",
DSolve[{SI'[s] == Sin[PH[s]] , PH'[s] == Sin[SI[s]]/e}, {SI[s], PH[s]}, s]
produces the ...
7
votes
1
answer
790
views
ReplaceAll inside an Iterator
I'd like to apply a set of rules to an expression defining the iterators of the table, like this:
...
8
votes
1
answer
267
views
Dynamics and Block interfere
As mentioned by Albert Retey in a comment, we can unintentionally interfere with our dynamics as follows
...
22
votes
0
answers
429
views
Documentation of the frequently-used functions in the context of Internal` and Compile` [duplicate]
In this site, I have gradually found out that there is a collection of functions in all kinds of answers. For instance, Compile`GetElement, ...
1
vote
1
answer
71
views
Weird behaviour of If inside of Block definitions?
I am on Mathematica 9 and I have discovered, that, when I use If inside of the definitions of the Block variables, then other, ...
1
vote
0
answers
48
views
Dynamic fails to update after evaluating `Pause[]` within `Block` [duplicate]
When evaluating this, the final value of a is 0 as it should be, but Dynamic[a] shows a <...