I'm developing an application and for the custom purposes of the app, I need a custom MessageBox.  I've created a new WPF Window and I'd like to force the user to interact with the custom message box before returning to the application, thus preventing them from using the application until a button inside the custom message box is pressed.  I've tried using .Focus() but it didn't work at all.  To give a perfect example of exactly what I want:  Try to press "Save As" in Outlook and then click on the "Mail" window again. You instantly get "redirected" to the "Save As" Dialog and can't do anything on the main window until the dialog is closed.  Any ideas how to make this possible?
If I have a Xaml Window, how does one open it as a child window, and then have the parent window wait for the child to close before the parent window continues executing?
Was Voldemort allowed to visit Hogsmeade while in school? We know that in order for third-years and up to be allowed to visit the village of Hogsmeade, they must present a form duly signed by their parent or guardian. When Harry’s guardians, the Dursleys, miss their opportunity (!) to sign his, he is not allowed to go to Hogsmeade. Both Cornelius Fudge (as Minister for Magic) and Professor McGonagall (as head of Gryffindor House) refuse to sign the form on his guardians’ behalf—probably at least in part because they think there’s a mad killer on the loose looking for Harry, but also, as McGonagall specifically states, simply because:  “You heard what I said. No form, no visiting the village. That’s the rule. […] The form clearly states that the parent or guardian must give permission.” Prisoner of Azkaban, Bloomsbury/UK paperback, p. 113  Obviously, Tom Riddle did not have any parents or guardians ready to sign his form for him: his mother was dead, his father likely did not even wish to know of his existence, and if he did have a legal guardian at all (I don’t know how orphanages worked in Britain in the 1930s), it was likely to be  (warning: Wikia link) as the matron of Wool’s Orphanage where Riddle grew up. As Mrs. Cole was perfectly Muggle in every way and was never told by Dumbledore—nor, we must assume, by the boy himself—that Riddle was a wizard attending a wizardry school, it seems unlikely in the extreme that she ever signed Riddle’s form to visit Hogsmeade.1 I don’t recall any incidents in the books where Voldemort speaks specifically of him visiting Hogsmeade as a school boy (then again, why would he?); but being content to remain at the castle while his classmates have fun in the village seems quite out of character for him, too. Are there any (canonical) indications whether special provisions were made for orphans with no legal guardians to sign, so that they were allowed to visit Hogsmeade after all? Or, oppositely, whether such cases were played strictly by the book and unguardianed orphans, and thereby Riddle, were not allowed to visit Hogsmeade?    1 One might of course easily envision that Riddle simply Confounded Mrs. Cole to sign the form; but that would lead to detection of underage magic (assuming this was even a thing in 1940). Riddle may of course have forged Mrs. Cole’s signature, but that would be rather likely to be discovered as a forgery, since at least Dumbledore was aware that Mrs. Cole did not know of Riddle’s magical abilities. Taking a screenshot (within X) How can I take a screenshot in X.org?  I am unsure if the Print Screen button will "just work" and I don't know how I would go about testing it. Why is spawning threads in Java EE container discouraged? One of the first things I've learned about Java EE development is that I shouldn't spawn my own threads inside a Java EE container. But when I come to think about it, I don't know the reason.  Can you clearly explain why it is discouraged?   I am sure most enterprise applications need some kind of asynchronous jobs like mail daemons, idle sessions, cleanup jobs etc.  So, if indeed one shouldn't spawn threads, what is the correct way to do it when needed? Bug in time of expiring bounty Noticed this many times but was too lazy to post.  So I see a message in my inbox that bounty is completed and now in grace period, however its title says that "bounty expiring soon"    Wonderful (not wonderful of course). I click it, and... guess what?    Ok. So 49 mins left. But the main problem is that time traveling is . (if it is not, please forbid it). Fastest way to convert string to integer in PHP Using PHP, what's the fastest way to convert a string like this: "123" to an integer?  Why is that particular method the fastest? What happens if it gets unexpected input, such as "hello" or an array? Keeping the time stamp when syncing with Ubuntu One? Can somebody explain "leveraged debt investment positions" and "exposures" in this context for me, please? "The strong bond performance has led to a surge in leveraged debt investment positions that are ultimately funded by the banks' interbank exposures and WMPs. But nobody really knows how levered these positions are, who has financed them, and by how much," S&amp;P said. "The contagion risks for the financial sector could be high."  source: Error in Obj-C : Expected identifier or '(' Defender of the Realm hat broken, or just badly worded? Description of the hat unlock requirement:     at least 5 flags dismissed as helpful and at most 20% of non-disputed flags declined   Does "dismissed" mean something unusual here, or is this hat not unlocking properly? I'm not sure if that means "since winter bash started" or "since your account was created": if the former, I've flagged 8 items so far today, of which 6 were marked "helpful" (the other two are still active; none have been disputed or declined). If the latter, the flag page indicates I've flagged 391 items (plus 6 for spam), of which 1 was declined (which incidentally, I assume that was by accident, given that the question was closed soon after for the reason I flagged it for), 1 was disputed (that one was legitimate), and 21 are still open. That is definitely way under 20%.  So what's up with that unlock?  edit: it appears to be the case (further edit: this has now been confirmed first-hand) that this hat unlock disregards any flags that are the flag equivalent of voting to close. I put forth that if this is intended behavior, well, it shouldn't be (if it's to equalize the playing field for over-3k-rep people, it should just also count votes-to-close. Though granted, I suppose in the scheme of things it really doesn't matter much, as it'll all go away in a couple weeks anyway. But dang it, I want to show off all the flagging I do! :p) How to Self-Study Mathematical Methods? Edit:  Ok, user  made comment that truly helps narrow the focus of my question. Basically, I'm asking for a self-study course of Mathematical Methods.  Thanks to his recommendation I identified a book that is very close to the answer:  Mathematical Methods in the Physical Sciences by Mary L. Boas  Supposedly, the book covers most of the Math a person needs to learn in order to understand the simulations I presented.  Does this book suit my needs?    Hello,  I have always been interested on the idea to study Math at an Undergraduate level to be able to implement simulations like the followings:  Finite Difference Simulation of the Wave Equation    Heat Equation in Two Dimensions    Besides my precollege experience in Math, I have only been able to do very simple simulations due to my lack of knowledge of Advanced Math. Every time I ask about the inner workings of the simulations I get redirected to papers that look like foreign language to me and, unfortunately, I depend on easy-to-read tutorials to understand them, and while I have found   I'm more interested in reaching the solution myself.  I checked some of the questions related to book recommendations for self-study and while they are very helpful I'm interested in learning by example (There is a book called: "Accelerated C++ Practical Programming by Example" that fits very well my study habits)  Thanks in advance. Environment.TickCount vs DateTime.Now How to interleave the lines of two or more files? I have tried to get the 2 files output in a single file.  I have tried below command:  cat file1 file2   but here file2 data is appending to file1.  What I need is file1 1st line followed by file2 first line, and file1 second line followed by file2 second line etc.  Can anybody tell me how to do this in a simple way? My model has a clear plastic (or glass) dome with objects inside.  The objects appear dark.  I've tried the glass shader with color 100% RGB, with very small IOR, and using just a refraction shader.    I know Cycles has problems with caustics, but I just want broad illumination to fall clean through the glass.  The light-to-column path can ignore refraction, but is blocked or tremendously attenuated. The camera-column path needs refraction, and seems to work fine anyway.  This demo image offers all optical paths of interest:   light upon object, seen directly light upon object, seen through glass (looks okay) light through glass onto object, seen directly. This is the shadow on the lit side of the column just below the glass tubing.  I expect full illumination, but there is shadow.  There is some light, but it's diffuse light from the floor. light through glass onto object, seen through glass. This     I did at one point try non-progressive rendering, and find extremely coarse light where there shouldn't be shadow, but this is not a practical way to make nice images. I've even tried cranking up certain sampling settings to many thousands, but still get bad noise though less, at the cost of long render times. I  would like to finish my creations sometime before "Star Trek, the Generation After the Next" becomes real life, if you know what I mean.  The next image is an example. I think Transmission in Sampling was 5000, but not sure.    I'm using Cycles in Blender 2.67 on a quad core Linux machine, 16GB RAM. Machine limits have never been a problem for 3D rendering.  Possibly, I screwed up some setting when I made my startup file, and just need to fix it. OTOH maybe this is just a limitation of path tracing, or of the way Cycles does it. If that's the case, what to real-world Blender artists do when they need to produce images on a budget and schedule?  What is the practical real-world fix? How do I escape a single quote in SQL Server? How to add a subclass as a subview so that background of subview is set in front of superview Don't show pending suggested edits to me after I run out of votes Now that I've reached 2k on Stack Overflow, I get access to the "Suggested Edits" review queue.  Although I only have 20 edits per day, the "suggested edit awaiting" icon in the top bar is always there and it bothers me a lot!  My suggestion is to apply one of three solutions:   Remove the suggested edits icon when we reach the maximum (50) edits Remove the Highlight (orange) on the suggested edits Remove the suggested edits part when we click on it   What do you think? Conky does not work properly on Ubuntu 16.04 GNOME I have this strange problem with conky. It doesn't show properly on the desktop:    I've tried everything from editing conky widget file to reinstalling conky and conky manager (v.2.4). Who knows how to fix it? Proving that an ideal in a PID is maximal if and only if it is generated by an irreducible Path bar missing in file dialog after running software updater for Ubuntu 17.04 After running software updater, the path bar in the file dialog (for example the one you get when choosing Open File in in Google Chrome or Firefox) is missing. This is frustrating since it's no longer possible to copy a path from the terminal (for example) and paste it into the file dialog. Here is a screenshot of the dialog:     How can I get back the path bar? export CLASSPATH=.;../somejar.jar;../mysql-connector-java-5.1.6-bin.jar java -Xmx500m folder.subfolder../dit1/some.xml cd ..   is the above statement for setting the classpath to already existing classpath in linux is correct or not