« first day (924 days earlier)      last day (3569 days later) » 

1:48 AM
Could someone with V10 running Windows please evaluate this code for me Framed@Pane[Style["+", 12], {12, 12}, Alignment -> {Center, Center}] and let me know if the alignment is centred? There has been a bug persisting for several version on Windows. Just wondering if it has been fixed yet. thanks
 
2:29 AM
@Mike Honeychurch, the + is centred horizontally, but below centre vertically. I get the same on Linux however.
 
@Szabolcs No, but that sounds very interesting! I assume that the best you can hope for is to get something like a confidence interval. I'm 90% certain the root is in this interval but only 50% certain that it's in some smaller interval. Good luck!
 
3:19 AM
Thanks @Simplex . Looks like this is one of the many bugs that persist for multiple versions that Wolfram simply ignore. Not good enough on their part IMO
 
It crashed again on me when doing a paste inside a string. Still can't guarantee repro it though. However, if I start a new notebook, type "abc", copy it, type " in a new cell, paste the "abc", and then try to undo, it won't undo properly.
You have to copy the quotes around "abc".
 
 
1 hour later…
4:54 AM
@MikeHoneychurch, does Framed@Pane[Style["+", 12], {12, 12}, BaselinePosition -> Baseline, Alignment -> {Center, Center}] work as expected?
 
 
4 hours later…
8:36 AM
@Simplex on a Mac alignment works properly for Pane. i.e. both horizontal and vertical alignments are centred. This has been broken for a long time on Windows (and it seems Linux). It is another example of an ongoing bug that frustrates any attempt to get consistent layouts across platforms.
 
@Gabriel Have you seen this answer? mathematica.stackexchange.com/a/5593/17
@MikeHoneychurch Looks the same in 9.0.1 (which is mis-aligned)
 
8:59 AM
@MikeHoneychurch @Simplex Same on Mac OS X
 
Maybe convert the "+" into Graphics? Something like `ExportString["+", "PDF"] // ImportString[#, "PDF"][[1]] & //
Cases[#, FilledCurve[__], \[Infinity]] & // Graphics`. Graphics objects seem to have more "stable" layout than texts. (ref [the Grid vs GraphicsGrid question](http://mathematica.stackexchange.com/q/52185/17).)
 
As far as I know, this is not a bug but the behavior of different font-sizes.
I had a similar issue lately when I was creating icons. It seems that := is not aligned. The colon is lower than the equal sign. This vanishes for larger font-sizes.
 
@halirutan On windows we have this:
 
9:41 AM
@Silvia I have a work around that doesn't involve using graphics ...graphics is something i want to avoid. Point is that these bugs should not persist over 3 or 4 versions. And figuring out work arounds ends up being time consuming. Just fix the bugs!
 
10:07 AM
@MikeHoneychurch Sorry was just cooking the meal. The most annoy thing I faced is HorizontalGauge[Dynamic[x]]. It keeps "shaking" when I drag the marker. Now I know I can change the ImagePadding setting to a fixed value to fix the problem, but I still don't understand why they're designed like this.
 
10:24 AM
@Silvia Perfectly still in OS X.
 
10:47 AM
This post about the slow start up of V10 is a nice read. A minute to start up Mathematica is embarrassing for Wolfram.
 
 
3 hours later…
1:18 PM
@halirutan Are you around by any chance?
 
@Öskå Chances are in your favour :-)
 
@halirutan :D Great :) You worked on the imgur uploader right?
 
@Öskå yep
 
I'm currently trying to fix the clipboard issue on Linux, so I was thinking that copying text through xclip to a temp file, then copying the xclip content to the clipboard might "fix" the copy/paste issue with chrome. Right now I'm doing this:

Run["echo " <> "\"Plot[something]\"" <> " > ~/.mmaclip"]
Run["cat ~/.mmaclip | xclip -selection clipboard"]

My question is that on the imgur uploader one only has to select a cell, and the selected text turns into a png image. Thus, would it possible to do the same and export the selected cell to the ".mmaclip" file?
Plot[Evaluate[Table[BesselJ[n,x],{n,4}]],{x,0,10},Filling->Axis];

I just pasted the above line thanks to that without additional bytes.
 
@Öskå OK, when I see this right, you want to know how you can convert any selection (be it a cell) to a string, right?
 
1:27 PM
@halirutan Exactly.
Then replacing "\"Plot[something]\"" by "\"content_of_the_selected_cell\"".
 
@Öskå I would use NotebookRead[SelectedNotebook[]] and turn the box expression into a string.
 
Ideally I would fancy an additional button on the imgur palette or an other palette allowing to select a cell and pasting it without issues.
Because I'm getting really really annoyed by these additional bytes added all the time.
 
@Öskå First of all (although I already have reported it to Wolfram), it would probably be helpful to create a post in the Wolfram Community (group: UserInterface) because there, more officials will see it.
 
@halirutan Did they fix it in the v10 after you reported it?
 
I'm really annoyed by this too, but as it stands only a very tiny part of the Mathematica users have this issue (you and me ;-)).
@Öskå Nope
 
1:34 PM
I've seen a few questions with the same issues (the interrogation marks). So it's not just you and me :)
 
@Öskå How bout we create a separate branch on the ImageUploader repository and include it there? Because including this button in the general palette will break it for other users (they don't have xclip) or we have to make it system dependent.
 
@halirutan Could create a xclip version only? I mean, only those interested in the feature would use it.
 
@Öskå That's what I mean be "a separate branch".
@Öskå But first, we need a reliable way to turn every possible selection into a string.
 
@halirutan Then we are thinking the same, that's a beginning :P
@halirutan The problem is that I don't see any way to turn a cell content into a string.., this is beyond my knownledge (same goes with turning it into an image). I tried looking to this but I didn't really find it.
 
@Öskå Turning it into an image is pretty simple, because you can use Rasterize for that. The question is, what should happen if the user selects and copies an image, or a 2d formula? Do we want to transform it to input-form?
 
1:42 PM
@halirutan Copying anything else than a text input (so no image in the input) shouldn't be handled IMO. There is the ImageUploader for that.
@halirutan There are only a few image processing cases when an image is used directly in an input, and it's usually in the docs only. When I use it I rather like to have the image defined before, then use it as a variable inside the image processing function. Same goes with Graphs.
 
@Öskå OK. I have to see how Mathematica does it. Maybe there is an easier way than reading and transforming the selected boxes directly.
@Öskå I support this feature-request and will look at it when I have time later :-)
 
@halirutan I'm happy that you do :D Please let me know if I can help, I would be happy to learn. If I can help we might need a room :P
 
@Öskå I will.
 
@halirutan Danke :) Keep me posted and good afternoon :)
 
2:01 PM
@halirutan Looks like this answer does the job and store the selected cell (or selected text) into a variable x.
Even if it's apparently dangerous.. :)
 
Review etiquette question: Just reviewed a First Post, which was a comment instead of an answer. A comment on the answer by @Öskå recommended deletion, and I shared that opinion. My options at this point are "No action needed" and "skip". Is there any value in me adding to the comments or is the no-action-needed approach fine since my concern has already been mentioned by another reviewer?
 
@Öskå This has serious flaws. It doesn't work even for simple cases. Do you have any idea whether it is possible to get the current clipboard?
(not print or insert it like Paste[] does!)
 
@bobthechemist I guess neither "No action needed" or "Skip" would help (you would get a +1 for the First Post review stats if you click on "No action needed" though). I already flagged the answer, I guess nothing more can be done.. :) Don't know if rm or Mr.W. deleted it or if it's simply the user who deleted it.
@halirutan The current clipboard without Mathematica?
 
@Öskå Just whether it is possible to store the contents of Paste[] into a variable in mathematica.
Do you know a way?
 
2:17 PM
I have no idea I'm afraid. This comment works for me though.
↑ works only when a cell is selected, doesn't work when text is selected.
 
posted on July 30, 2014 by Wolfram Blog

Kenzo Nakamura uses Mathematica to create Escher-inspired mathematical art. His trademark piece, Three-Circle Mandala, depicts a large circle covered by three smaller, repeating circles that form a Sierpinksi gasket. When Nakamura began using Mathematica, he didn’t originally intend to use it for his artistic endeavors. He found the program by chance at a seminar while [...]

 
2:38 PM
@halirutan x = NotebookGet[ClipboardNotebook[]][[1, 1, 1]]
 
@RolfMertig Genau!
 
3:15 PM
Can TextRecognize do hand-written numbers, or do I have to resort to Classify? I.e., how to make TextRecognize[Erosion[Closing[Binarize[
Import["http://www.mertig.com/zahl.jpg"]], 0.5], 1]] return 335104859`
 
3:29 PM
img = Import["http://www.mertig.com/zahl.jpg"];
i = ImageResize[ImageCrop[Closing[Binarize@img, .5], {First@ImageDimensions@img, 51}], 500];
ii = Blur[Erosion[i, 2], 3]
TextRecognize@ii

@RolfMertig Can't get closer than that.. :)
 
@Öskå Thanx!
 
@RolfMertig I don't get why the first one is read as a 5 while the second is read as a 3..
 
@Öskå I think I have to use Classify anyway. Do you know how I can get 9 distinct images? I.e., one for each number? (Kind of ImageSplit or something similar) ?
 
@RolfMertig One of the problem is that the 3rd 5 is going over the 1, so you can't use ImageSplit without having pieces of numbers leftover
 
I was playing with WatershedComponents and ImageForestingComponents, but I am not so familiar with those functions.
Something like ImageForestingComponents[
Closing[Binarize@Import["http://www.mertig.com/zahl.jpg"], .5],
Automatic, {4, 2}] // Colorize
ImageForestingComponents[
Erosion[Closing[
Binarize@Import["http://www.mertig.com/zahl.jpg"], .5], .5],
Automatic, {4, 4}] // Colorize gives me different colors for each number.
Now how do I segment with respect to colors?
 
@Öskå cool. so many functions in image processing ...
 
@RolfMertig I know nothing about ImageProcessing either.. :) And I have v8, so I don't have most of the fancy functions.
 
@RolfMertig Take a look at ComponentMeasurements. In order to separate each number you can for example compute the bounding box of each component and use ImageTrim to select them. SelectComponents can be useful as well. There are a few questions on number sand TextRecognize; basically Tesseract (the underlying engine) is not good at individual characters but it can do it if the conditions are good. For hand-written numbers Classify will perform much better.
The old approach (based on answers here) was to use ImageCorrelate.
 
@Pickett thanx.
 
Can't do better than I did before.., I managed to have i.stack.imgur.com/un2Jz.png but after that, can't figure out what to do to make it cleaner.
 
4:22 PM
@Öskå I almost had it.. until, yes until:
 
4:42 PM
@Öskå I'm on my way home now. Would you test this here. It copies and prints the current selection as text where it can handle even styled things with Integrage or whole cells:
Button["Copy", Block[{value},
  value = NotebookRead[SelectedNotebook[]];
  If[Head[value] === String,
   value = Cell[value]
   ];
  If[Head[value] =!= Cell,
   value = Cell[BoxData[value]]
   ];
  Print[First@
    MathLink`CallFrontEnd[
     FrontEnd`ExportPacket[value, "PlainText"]]];
  ]
 ]
If it gives reasonable output in many cases, you could try your xclip approach with it
 
5:02 PM
@bobthechemist I usually upvote the comment. If I can't be sure it's been flagged for deletion, I'd flag it also from the button on the answer. (I'm sure it can show up in the mods' review queue only once.) Then I'd click "No action needed", if that's my only choice. (Isn't there a "Done" button normally?)
 
@MichaelE2 "Done" appears after you edit it only (I think?)
 
@Öskå Seems like I've seen it after making a comment....maybe it was something else. I don't pay that close attention to the buttons.
 
@MichaelE2 I never comment from the review page.. :)
 
5:34 PM
@MichaelE2 Thanks - there is a done, but it wasn't highlighted unless I did something, and was hesitant to flag so as not to bother mods with something that looked as if it were already flagged.
 
5:46 PM
@halirutan Your function works like a charm, I'm just having issues with single quotes and printf. If I copy a code with single quotes, printf will eat them considering that they belong to it.. e.g. this is the following command as it looks like from your function:

fun[cmd_] := Run["printf " <> "'" <> cmd <> "'" <> " > ~/.mmaclip"]

and this is what gets written by printf in the .mmaclip file (so what will be pasted):

fun[cmd_] := Run["printf " <> " <> cmd <> " <> " > ~/.mmaclip"]
So the code is your function with "InputText" instead of "PlainText" (to preserve spaces) plus:

fun[cmd_] := Run["printf " <> "'" <> cmd <> "\\n'" <> " > ~/.mmaclip"]
fun@x
Run["cat ~/.mmaclip | xclip -selection clipboard"]
 
6:05 PM
@Silvia I have. It seems that in windows 8 they have removed the command line compiler support from the sdk. I am trying to install visual studio express 2012 to get this working. Very frustrating
 
6:17 PM
Has anyone encountered this issue with v10 Help: pressing F1 on a function opens my browser and sends me to wolfram.com (not even the reference pages)
 
7:12 PM
@halirutan Maybe this time I should get myself a Mac :/
@Gabriel I installed VS express 2013 for this too, it worked. (Now I'm using the intel compiler, which works like a charm.)
@RolfMertig Try DominantColors[(* your colorized image *), 14, {"Color", "Coverage", "CoverageImage"}]
 
8:01 PM
Any recommendations on how to best organize the custom functions used on a daily basis? Straight in the init.m, single package, any specific place where you leave you. I know this is highly subjective as @Mr.Wizard pointed out, but would love to hear from those who are very much experiences and understand potential pros and cons.
 
8:29 PM
@PatoCriollo I prefer packages over init.m because lets me load only the functionality I need. This is important to me as my work often pushed the memory limits, so I liked to limit what was needed.
As to organization, I try to have each package have a narrow scope, as this goes with the theme of limiting what I load at any give time. But, I also tried to make each package relatively complete within its scope. This took some extra time, and usually I stopped at good enough, but it would give me something to tinker with.
 
8:54 PM
@PatoCriollo To clarify I recommended putting the functions in one or more packages, and loading those pages from init.m, not putting the functions directly in init.m.
 

« first day (924 days earlier)      last day (3569 days later) »