808 reputation
27
bio website
location
age
visits member for 2 years, 6 months
seen 7 hours ago

I do software engineering at a civil engineering firm. I work with C# and Wolfram Language (i.e. "The Language Formerly Known As Mathematica").

I recently learned some Go. You should, too. It's quite nice.


7h
comment Problems with NMinimize
What input code defines xy3d?
Jul
18
revised How to refuse close de Dialog when press Enter Key
Duh moment for me. Second argument of Overlay makes Invisible unnecessary (and seems to eliminate some extra spacing below the InputField)
Jul
18
comment How to refuse close de Dialog when press Enter Key
@d555, no problem, glad to help. I updated the answer a bit, turns out the second argument of Overlay can be used to make the DefaultButton "present" yet invisible still. So it's simpler than I'd originally explained.
Jul
18
revised How to refuse close de Dialog when press Enter Key
Duh moment for me. Second argument of Overlay makes Invisible unnecessary (and seems to eliminate some extra spacing below the InputField)
Jul
18
revised How to refuse close de Dialog when press Enter Key
Also clarified the last explanatory bit a tiny bit.
Jul
18
answered How to refuse close de Dialog when press Enter Key
Jul
14
comment Add one to a major diagonal of a matrix given a coordinate point
@ibayibay1 Btw, the following is a great doc page to read to effectively understand the evaluation mechanism of Mathematica: reference.wolfram.com/language/tutorial/Evaluation.html Reading & understanding this is essential for intermediate/advanced programming with Mathematica. For basic things, one can scrape by without it.
Jul
14
comment Add one to a major diagonal of a matrix given a coordinate point
@ibayibay1 Black-colored symbols are either built-in symbol names (e.g. functions, settings variables, etc) or symbols that you've assigned values in your own code. Blue-colored symbols are those that don't yet have an assigned value or meaning. While is the built-in control-flow construct, while while has no meaning by default. This is actually why your original definition updated only one board entry (the one above (x--) and to the left (y--) of your input); while's lack of definition means that all of its "arguments" are evaluated once, in order, when it is first seen.
Jul
13
comment Add one to a major diagonal of a matrix given a coordinate point
@ibayibay1 That's alright, I've been bitten by casing bugs when using other languages, too. But, I should definitely offer an apology to you here: I edited while in your original question to While and failed to mention this change to you, as I incorrectly assumed it was just a typo during the question write-up and not a typo from your actual definition (and thus an integral part of the question). Sorry for the oversight. (and from this I learn to be more careful in future edits)
Jul
12
comment Add one to a major diagonal of a matrix given a coordinate point
This is a near-duplicate of the second part of the answer I provided (~9 hours beforehand).
Jul
12
comment Add one to a major diagonal of a matrix given a coordinate point
@ibayibay1 You want && because you want to 'back up' x and y as long as neither x nor y equal 1. As soon as one of them equals 1, you're at a top-left edge and you want to stop the loop. Likewise for the second loop, but for the bottom-right edge. I think your intuition toward || was originally pointing you to the equivalent !(x == 1 || y == 1) (via De Morgan) for the first loop. Re it not working as intended, I've tested it again and it works correctly. If you're still stuck, show me your input (including diag1 definition) and your output.
Jul
12
revised Add one to a major diagonal of a matrix given a coordinate point
Filled in the OP's example listing so that it stands alone; corrected `while` to `While`; slightly tweaked title to be a bit more accurate (I think)
Jul
12
revised Add one to a major diagonal of a matrix given a coordinate point
Added a fuller explanation addressing the OP's actual example code.
Jul
11
suggested suggested edit on Add one to a major diagonal of a matrix given a coordinate point
Jul
11
answered Add one to a major diagonal of a matrix given a coordinate point
May
28
comment Why setting PlotPoints make my 3d contour plot broken?
Setting MaxRecursion -> 1 (along with PlotPoints -> 20) gives me an artifact-less graphic in 32-bit 9.0.1 (on Lubuntu 14.04, fwiw). I don't have an answer to your actual question (why it otherwise breaks), though. Possibly a bug in the adaptive sampling algorithm controlled by MaxRecursion... maybe worth a report to WRI Support?
May
12
comment Module in numerical model for NonlinearModelFit is slow and leaks memory
When I evaluate your example sequence, model[1, .1] complains with NDSolve::ndinnt : Initial condition f0 is not a number or a rectangular array of numbers. Are you using a specific definition for f0 that you could edit into the question?
May
9
revised How can I tell how much memory is taken by an expression?
Added a note that I made another suggestion to WRI...
May
9
revised How can I tell how much memory is taken by an expression?
Just saw someone else block some code in a quote, trying it out here. Very nice.
May
9
comment How can I tell how much memory is taken by an expression?
@RichardFateman, I found a way to overcome the counter limit, if you're still interested in a way around that. Unfortunately, I couldn't come up with a way to do the "actual"-ByteCount in any reasonably correct way without unsharing the expression and thus blowing things up when the expression is too large to fit in memory. For smaller expressions, though, I've found it pretty useful.