Tag Info

New answers tagged

3

Just to summarize the comments by @alephalpha and @Kuba for MandelbrotSetPlot[{xmin + ymin I, xmax + ymax I}, ColorFunction -> (f[#,#2,#3,#4,#5]&)] Slot #1 corresponds to the horizontal coordinate x. If ColorFunctionScaling -> True, then #1 ranges from 0 to 1 as x ranges from xmin to xmax. If ColorFunctionScaling -> False, then #1 ...


9

UnitConvert[Quantity[179., "Centimeters"], MixedRadix["Feet", "Inches"]] returns Quantity[MixedRadix[5, 10.472440944881885`], MixedRadix["Feet", "Inches"]] which formats as 5'10.4724"


2

There is no such build-in function. However, one can write it easily convert[q_Quantity, units_List] := MapAt[{Total@#} &, #, -1][[2 ;;, 1]] &@ FoldList[Through@{IntegerPart, FractionalPart}[Last@#/#2] #2 &, {q, q}, Reverse@Sort[Quantity /@ units]] convert[Quantity[179., "Centimeters"], {"Feets", "Inches"}] (* {Quantity[5, "Feet"], ...


6

Disclaimer: these are all guesses, believe at your own risk. As the first argument, you specify a list of patterns to localize. For example, {x}, {x[2]}, {x[][2]}, or x[2]/;True This creates a dynamic environment around the second argument inside which the following happens: Changes to those patterns' own/down/subvalues while in the environment aren't ...


21

Internal`LocalizedBlock behaves the same as Block, but it can localize non-Symbols (e.g. f[1], Subscript[x, 0], etc.). For example, Internal`LocalizedBlock[{Subscript[x, 0]}, Subscript[x, 0] = 1] (* 1 *) Compare this to Block[{Subscript[x, 0]}, Subscript[x, 0] = 1] (* During evaluation of In[79]:= Block::lvsym: Local variable specification ...


4

These String items were directly read from the 10.0.2 Front End, including quite a few not listed elsewhere in this Q&A: {"AltKey", "ByteCount", "CellChangeTimesList", "CellCount", "CellStyleName", "CodeContext", "CommandKey", "ConnectedControllers", "ControlKey", "ControllerData", "ControllerState", "ControlsFontFamily", "ControlsFontSize", ...


7

Version 10 introduced some undocumented functionality that makes it easier to explore the style hierarchy. As usual, "undocumented" === "buyer beware". We start by evaluating: StyleManager`OpenStyleManager This does nothing other than trigger the auto-loading of certain symbols. We'll come back to a more interesting use of this symbol later. Now, we ...



Top 50 recent answers are included