I have been observing relatively frequent front-end crashes on OSX with 9.0.1, especially when notebook has large amounts of images (for instance, couple hundred images in a list). Is this common, and are there any ways to make the front-end handle this issue more gracefully?
@soandos You could write a function that takes the first item from given argument when it's a list and calls itself, otherwise gives the first argument
I don't have Mma handy here, but something like FirstList[x_List] := FirstList[First@x]; FirstList[x_] := x;
I will be teaching a class in image processing in fall 2013, and will be using Mathematica as the primary computational tool. Hence I will be introducing 40-50 students to Mathematica, most of whom have extensive computer experience (in C, java, Matlab, python, etc.) but not in Mathematica. I hav...
@DominicMichaelis The only consistent method I am aware of is experimentation. Use either Timing or AbsoluteTiming (and, no, I don't have a coherent rationale for one over the other) to measure. Likely, they're both input length dependent, so vary that as a paramater, in addition to number of inputs. My bet is Join is faster, as Union also sorts the result.
@MarkMcClure you may be right, and while W|A is likely the largest mma application in existence, I am of the opinion that we should be cautious on what we allow. Certainly, = plot sin (and more complex queries) should be allowed, but do we want questions along the lines of why does "mass of a cone of manganese 1.7 metres height 2.6 metres base radius" fail? Obviously, we can close them with prejudice, if need be, but I'm not sure if we should go there at all.
Hence, I urge caution. But, I am open to discussion.
RootApproximant can turn an approximate solution into a perfect solution, such as for a square divided into fifty 45°-60°-75° triangles. A square can be divided into triangles, for example by connecting opposite corners. It’s possible to divide a square into seven similar but differently sized triangles or ten acute isosceles triangles. Classic puzzles involve cutting [...]
@rcollyer or, do we really want answers like "type use WA from inside mma" to be OK? I don't but it is something to discuss (admittedly it has, and the general conclusion was "no", but opinions change).
and I am not sure why WA is so important for mma. yes, the *Data functions and the = plot sin stuff depends on WA, but I think right now, and at least for me, these are even less important than the palettes (criticism of which people here thought was silly-I agree).
I mean, of course I've played with the downloadable data, but if all this was removed, I wouldn't even notice. similarly for the WA integration. does anybody really use mathematica like this? how?
@acl yes, I agree. The data functions are nice in principle, but except for a few cases (e.g. PolyhedronData, GraphData) the fact that nobody knows where the data come from or how reliable they are is a big obstacle to using them for anything serious. As for W|A, I don't use it inside Mma at all, although the fact that you can use Mma to compose the result and tune the interpretation of queries is perhaps useful.
Could someone help me with something... I wanted to gather two lists in one, so I could the final result in ListPlot3D. For example, a = { {1,1,1}, {2,2,2} }; b = { {3,3,3}, {4,4,4} }; AppendTo[ a, b ]; But this gives me {{1, 1, 1}, {2, 2, 2}, {{3, 3, 3}, {4, 4, 4}}}
I have a big list of integer triplets tri, and I need to select those which only contain integers from a given set idx. What's the fastest way to do this?
Select[Sort /@ tri, Intersection[idx, #] === # &] is not particularly fast.
Pick[tri, Times @@ (mask[[#]] & /@ Transpose[tri]), 1]; where mask is a list of 0s and 1s, the 1s corresponding to the positions of idx elements in Range[maxInteger].
It really depends what sort of rights you want to grant people in the code. Nobody can do anything with it unless you let them.
But, if you want to be sure they know where they stand, better to have a licence of some sort. Otherwise maybe you have to sue a lot of people for copyright infringement :)