Reputation
4,002
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 9 30
Newest
 Nice Answer
Impact
~49k people reached

Jan
28
awarded  Nice Answer
Dec
31
comment Get DownValues that do not involve patterns?
one way of extracting the inputs/outputs: Cases[DownValues[f], (_[Verbatim[f][value : Except[_Pattern]]] :> result_) :> (value -> result)] (general note: i figure this out by using FullForm. e.g. FullForm[x_] => Pattern[x, Blank[]])
Dec
26
comment How to generate a random snowflake
i just noticed this isn't particularly in line with what OP was looking for. i don't think it'll hurt anyone though and it's in the Christmas spirit
Dec
26
revised How to generate a random snowflake
added 2 characters in body
Dec
26
comment How to generate a random snowflake
some of those remind me of snowflakes i've seen on other planets. ah the memories
Dec
26
revised How to generate a random snowflake
deleted 7 characters in body
Dec
26
revised How to generate a random snowflake
deleted 1 characters in body
Dec
26
answered How to generate a random snowflake
Dec
20
comment Module that finds the sum of digits of any given positive integer
@rola please see my answer to this question. it's important to understand that Mathematica's syntax is very "raw", in that there are no keywords. Module is not a keyword. it's a regular symbol/function that you could make your own version of. the important syntax is :=, which expects a pattern on the left and basically anything you want on the right. the purpose of Module is to create local variables. if you don't need local variables then you don't need Module, you can just write the expression, or e.g. f[x] := (Print[x]; x)
Dec
20
comment Module that finds the sum of digits of any given positive integer
@rola Look in the Mathematica documentation (F1 button in Mathematica), it is very useful. Total is basically the same as Plus @@ # & which is the same as Apply[Plus, #] &. The main difference, I suppose, is that Total allows you to specify the level (for example you can add up all the elements of a matrix, instead of its rows).
Nov
30
comment Pasting monospaced text into Mathematica notebook destroys aligment
maybe i'm being an idiot by bringing this up, but you can do some basic vector editing (by hand) in Mathematica
Oct
11
awarded  Announcer
Oct
9
awarded  Announcer
Sep
20
comment Raster with ColorFunction is blank when Dynamic Updating is disabled
@AlexeyBobrick Yep, I lowered the number of kernels. But I don't know if that is a general solution. As I wrote in the update, the problem appears to have something to do with the way Dynamic interacts with Rasterize, which is most likely an actual bug. Look at this thread which deals with the underlying Dynamic problem. I don't know why the number of kernels has an effect.
Sep
10
awarded  Nice Answer
Sep
10
revised Equivalent of MATLAB's “hold on” function
added 9 characters in body
Sep
10
revised Equivalent of MATLAB's “hold on” function
added 3D version
Aug
25
comment Programming Mathematica in plaintext, i.e. no formatting, non-notebook
@acheong87 you can just right-click in a Notebook and insert a Code cell, which will have standard text/formatting (same cell type as in New -> package). also check out my answer here for an example of the kinds of things you can do with a Mathematica notebook. and do try to play with Manipulate. i don't miss Vim much in Mathematica because Mathematica code is very succinct. i consider around more than 200 lines to be a large Mathematica program. you can accomplish a lot very efficiently once you get into the vibe of the language
Aug
19
comment Automate mouse clicks with Mathematica
hmm wonder why this syntax didn't occur to me. @RodLm feel free to change the accepted question
Aug
19
comment Automate mouse clicks with Mathematica
@RodLm for some reason i had assumed you were familiar with Java. to be clearer: the mousePress function expects an integer. mousePress(InputEvent.BUTTON1_MASK) works in Java because InputEvent.BUTTON1_MASK is an integer in Java. what you do with this knowledge is something i leave to you :)