Suppose I have a variable var1, a function MyFunction, and a graphic SomePlot. I remember ...
I want to convert a hexadecimal string to a decimal (base 10) number: 16^^ff 16^^ToExpression["ff"] The 1st line returns the correct answer of 255, while the 2nd ...
I needed to write patterns that could distinguish between arbitrary-function and polynomial forms of Root objects, for example, ...
How to convert an image to a compressed string representation equivalent to one copied to clipboard by `CopyToClipboard[image]`?
In my recent question I asked How to embed an image into a string? The suggested solution was ...
Note: The bug described in the post is in Mathematica 9, and has been fixed in 10.0. The documentation for String contains the following statements: Strings ...
Is it possible to define custom compound assignment operators like ⊕= similar to built-ins +=, *= etc?
I would like to do something like this: ...
Say I have a PDF: PDF[LogNormalDistribution[1.75, 0.65], x] Calculating it, Mathematica gives me an expression that looks like this: I want to extract the ...
I have been working on picking expressions apart using Head and Part and encountered a little mystery. Consider the canonical ...