11,364 reputation
12456
bio website
location
age 28
visits member for 2 years, 7 months
seen Oct 18 at 21:30

Aug
24
awarded  Enlightened
Aug
24
awarded  Nice Answer
Aug
23
answered Problem with UpdateInterval
Aug
23
revised Mathematica Destructuring
edited body
Aug
23
revised Mathematica Destructuring
added 795 characters in body
Aug
23
comment Mathematica Destructuring
@Mr.Wizard And another thing, if you call something like f[_Integer]:=code;f[2.3] You get the unresolved "call". If you try to emulate this using your method, you get the unchanged input to the replacement, instead of getting the unresolved "call". To be specific 0.3/._Integer:>code yields 0.3, while dFunction[{_Integer},code][0.3] yields itself, meaning that your output specifies that you have the unresolved call, rather then just passing on the input to higher functions. Speedwice my best bet is that you win by a factor of 2 due to my version having two pattern checks.
Aug
23
comment Mathematica Destructuring
@Mr.Wizard I didn't claim that it was superior in any way. It's a stylistic choice I sometimes find I have a short function which doesn't do much, so I replace it with an anonymous function, however if the function relies on pattern matching, as is often the case for my MapIndexed functions, I can't easily do this. But with this definition it's no problem. So really it's a style choice. I decided to post it since Mike also commented that it was a shame Function didn't support destructuring.
Aug
23
answered Mathematica Destructuring
Aug
23
comment Is there a convenient way to copy/paste text-interspersed SE code snippets into Mathematica?
@R.M I ran the code posted in the answer and the suggested command StackAPI`GetCode["http://meta.mathematica.stackexchange.com/a/307/5"], which returned a set of errors from StringCasesand StringReplace. Seems like the call to the API is failing, returning {"answers" -> {}, "page" -> 1, "pagesize" -> 30, "total" -> 0} from the Import.
Aug
22
answered Is there a convenient way to copy/paste text-interspersed SE code snippets into Mathematica?
Aug
22
comment Arranging elements in a Grid by drag&drop
@Jennifer I added a short description of these variables.
Aug
22
revised Arranging elements in a Grid by drag&drop
added 457 characters in body; added 2 characters in body
Aug
22
answered Problems with setting style options
Aug
22
revised Arranging elements in a Grid by drag&drop
deleted 10 characters in body
Aug
22
comment Arranging elements in a Grid by drag&drop
@YvesKlett The skeleton of the code is something I worked out previusly, where I also used MouseAppearance to change the cursor to the item being dragged, however that code is quite wrangled up in a lot of other stuff, and not generally applicable. If I recall correctly it's quite bothersome trying to get the positions to match exactly when you begin the dragging.
Aug
22
revised Arranging elements in a Grid by drag&drop
Added more nicely enclosed function providing functionality
Aug
22
answered Arranging elements in a Grid by drag&drop
Aug
21
comment Filling between boundaries
@rainer I simply supplied an example. If you want to fill it in alternatively look through the documentation for Filling.
Aug
21
answered Filling between boundaries
Aug
20
awarded  Necromancer