Reputation
13,919
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
27 56
Newest
 notebooks
Impact
~143k people reached

Dec
9
comment List consisting of positions of the matrix elements and the elements themselves
@J.M.: good point, yours is not only slightly shorter but also somewhat faster (still slower than Table for me, though)...
Dec
9
comment How to export heterogeneous data to single file?
you could as I mentioned use some JSON-compliant encoding to store binary data in JSON as a string, but as JSON doesn't per se know anything about pictures the "receiving" side would have to know how to decode the corresponding strings and how to interpret the binary data. If you write or define the receiving side yourself that is no problem, otherwise JSON probably is not the format to choose. Can you give more specific requirements of "some standard format"? Maybe someone can suggest an alternative then...
Dec
8
comment List consisting of positions of the matrix elements and the elements themselves
Interesting that you mention that MapIndexed is faster. For me the table approach also seems to be slightly faster, at least if one keeps the Sequence for flattening the indices. For the Table approach I think you'd need Dimensions[mat][[2]] for the j loop counter for nonsquare matrices?
Dec
8
comment List consisting of positions of the matrix elements and the elements themselves
this is quite short and straightforward: MapIndexed[{Sequence @@ #2, #1} &, mat, {2}]. But what exactly would make you consider an approach "faster"?
Dec
8
comment How to export heterogeneous data to single file?
The problem with Compress that I see is that it seems pointless to export to a commong standard like JSON and put stuff into it that only Mathematica can read. Why are you exporting to JSON in the first place? On the other hand, if you don't Compress I doubt that what ExportString[_,"JPEG"] will create is in general a legal JSON string, (you'd need check the JSON standard definition for what is OK). If you need to read with other software I'd consider something like a hex encoded jpeg ("Base64" or "UUE"), which I think is also a more or less standard way to handle binary data in JSON.
Dec
8
answered What is the correct way to perform the Gram-Schmidt process?
Dec
6
comment Backquote in string template?
I really like this one. If you add InsertFunction->ToString the OPs example with a number will also work.
Dec
2
comment Scoping in assigning a derivative
@IstvánZachar: thanks for pointing that out, fortunately I was never using them in my code anyway :-). But why are you saying "this is by design"? It looks rather inconsistent to have two of them live in a different context and have different attributes than the rest...
Dec
1
comment Seeking for method to speedup and get more flexable control Notebook History
this site is a place to learn such stuff, for that particular feature I was struggling about the CellChangeTime option when looking at the raw expression for cells (Cell -> Show Expression) for another reason. Then over time you get the greater picture...
Dec
1
comment Seeking for method to speedup and get more flexable control Notebook History
@matheorem: that looks as if you don't have the edited history notebook opened. You have to have it opened in Mathematica before evaluating my code. You can try to just evaluate Notebooks[] and check that there is one entry which shows the title "Notebook Modification History Overview". You can then also just remember its position in the list and do NotebookSave[Notebooks[][[2]]] (if it was the second in the notebook list)
Dec
1
comment Seeking for method to speedup and get more flexable control Notebook History
@matheorem: sorry, forgot about that: as it has all the settings for a palette, the notebook can only be saved programmatically, I have now added code which needs to be evaluated in another notebook while the history overview nb is open and will do that...
Dec
1
revised Seeking for method to speedup and get more flexable control Notebook History
added 397 characters in body
Dec
1
comment Seeking for method to speedup and get more flexable control Notebook History
to finish my second to last comment: I have now included a fix for the timezone in the answer...
Dec
1
comment Seeking for method to speedup and get more flexable control Notebook History
@matheorem: what is the problem with saving? Which step are you talking about? It will be easiest to do steps 1-5 with a copy within one of your personal directories. Then you just have to do the final replacement e.g. as an administrator...
Dec
1
revised Seeking for method to speedup and get more flexable control Notebook History
added 125 characters in body
Dec
1
comment Seeking for method to speedup and get more flexable control Notebook History
@matheorem: I have edited my answer and added a description of how you can change the default option. As for the timezone>
Dec
1
revised Seeking for method to speedup and get more flexable control Notebook History
added description of how to change default for selection setting in system dialog notebook
Nov
30
answered Seeking for method to speedup and get more flexable control Notebook History
Nov
30
comment Seeking for method to speedup and get more flexable control Notebook History
When you close the window which is titled "Notebook Modification History Overview", is Mathematica then still not responsive?
Nov
30
comment Seeking for method to speedup and get more flexable control Notebook History
My question was whether this happens just because you have switched on notebook history tracking for those notebooks in the preferences or whether this only happens when the notebook history dialog is open as your screenshot shows? As for the CellChangeTimes option, that is an option for Cells which the notebook history feature uses to store the editing timestamps. It is what you'd have to READ when you want to just see the last cell change times...