Finding a ray which intersects a polygon as many times as possible
Finding a ray that intersects a polygon as many times as possible
Restoring open software after a restart event in windows I find that at the end of a long day, I sometimes have a large number of programs running. All which I will need to use tomorrow. Normally, this isn't an issue, I can simply lock the machine and come back tomorrow. My problem arrises when windows update launches in the middle of the night and force restarts my computer. That in turns closes all my open software. I of course save everything regularly so I don't loose anything, but I waste time reopening all of those resources whenever there is a restart.   [EDIT]  I should clarify that I still want to be able to restart my computer when an update comes down. Preventing the restart only delays the problem until later. I should have been more specific in that I want to be able to recover my working environment after a restart for any reason. Things like scheduled maintence, power loss, updates, and software installs.  [EDIT]  I can't simply have them setup to launch at startup becasuse those files change from week to week. So I need something that monitors what I have open, and gives me the option to "recover" those software sessions when I log back in.  Anyone have any suggestions on what I can do? I'd even be willing to purchase software to do this for me if that is the only option.  Thanks Why was the Triwizard cup portkey in Goblet of Fire two-way? At the end of the scene in the cemetery in GoF, the spirits who emerged from Voldemort's wand tell Harry to go grab the trophy (which, of course, was a portkey that took Harry and Cedric from the maze to the cemetery), and that the trophy portkey would take Harry back to Hogwarts.  Why would the portkey do that?  Are all the portkeys 2-way?  If possible, I would prefer as much of the answer based on canon (or JKR) as feasible I followed the instructions and got success response but I didn't receive email.  Then I used the id to get Email Status and got 404 error.  Here is my json :  POST :   {     "To": {         "Address": "example@gmail.com",         "SubscriberKey": "example@gmail.com.tw"     },     "Options": {         "RequestType": "ASYNC"     } }   GET : {id}  Please let me know how I can resolve the issue. Fake induction proofs There are many lengths in LaTeX. For instance, \enskip, \enspace, \quad, \parskip, \smallskip, ...  Some of them are mostly used for vertical spacing, some others are mostly used for horizontal spacing, and perhaps some of them are used in both cases. I wonder whether there is a list that indicates the meaning and intended use of each length in LaTeX.  By "intended use" I mean not only whether the length is vertical or horizontal, but in which circumstances it is a good practice to use that specific length. Please stop using SoftwareEngineering.SE as your toilet bowl Stack Overflow users have been using the "off topic - belongs on SoftwareEngineering.SE" close reason as an alternative to all the other close reasons. It'd be helpful if people actually read the FAQ and the six  before voting to migrate questions like:   , no redeeming value to favorite lists that become argumentative , "help my exact situation" questions are too localized , fails 5 out of the 6 guidelines , fails 4 out of 6 , too localized and too vague , too broad   Absent a reversal of the Stack Overflow community from viewing SoftwareEngineering.SE as the Stack Overflow cesspool, can the "off topic - belongs on SoftwareEngineering.SE" close reason be removed in favor of manual migration by moderators who can actually spend the 10 seconds to determine if the question should be closed outright first?    To say that SoftwareEngineering.SE is such a nebulous place and nobody knows what its scope is as the reason why crappy questions keep getting migrated there is to miss the point. Good questions are good questions on all of the sites, and questions that are too vague, that are too argumentative, too localized, and too broad are universal close reasons. There is no special dispensation for SoftwareEngineering.SE to have bad questions, even if you personally think the questions on there suck.  Even the six subjective guidelines for subjective questions are universal guidelines: they affect all sites. So even if you had no idea what the consequences of using the "off topic - belongs on SoftwareEngineering.SE" close reason were, there are still all of the other close reasons for which bad questions, like the ones above, can be closed. After Hoth, why did Vader pursue the Millennium Falcon instead of Luke's X-Wing? In The Empire Strikes Back film, the opening crawl says:     The evil lord Darth Vader, obsessed with finding young Skywalker, has dispatched thousands of remote probes into the far reaches of space....   It has also been established in Return of the Jedi that Force users can sense each other:     Chewie whines nervously. Luke stares at the Huge Super Star Destroyer    that looms ever larger before them.      LUKE: Vader's on that ship.   If Darth Vader is obsessed with finding Luke and he can sense his presence, the obvious thing to do would be to follow Luke's X-Wing after the battle of Hoth rather than the Millennium Falcon. Why didn't he? Who decides which half of the universe should be destroyed? Find the smallest integer $n$ greater than $1$ such that the last $3$ digits of $n^2$ are the same as the last $3$ digits of $n$. Find the smallest integer $n$ greater than $1$ such that the last $3$ digits of $n^2$ are the same as the last $3$ digits of $n$.  So far I've got $n^2 = 1000k + n$ which means $n^2 ≡ n \mod 1000$. I  don't know how to proceed since 1000 seems to be a bit high. How to use fakeslant as slanted but not italic font with fontspec? Using fontspec with Luatex it is possible to create a fake slant and use that as italic should no italics be around:  \setmainfont[ AutoFakeSlant=0.15 ]             {FontName}   However, also if an italic version exist this faked slant will be used both for \itshape and \slshape. How can I keep using the shipped italic font defined by the ItalicFont= parameter to \setmainfont but use fake slant for \slshape? Variance of sample mean. Let $X_1, X_2, \ldots X_n$ be random variables with mean $\mu$ and variance $\sigma^2$. We define the sample mean $\bar{X} = \sum_{i = 1}^n X_i$.  I am having trouble understanding why the variance of $\bar{X}$ is $\sigma^2 / n$.  Here is what I worked out thus far:  $$\begin{gather} \sigma_\bar{X}^2 = E((\bar{X} - \mu)^2) = E(\bar{X}^2 - 2\bar{X}\mu + \mu^2) = E(\bar{X}^2) - 2\mu E(\bar{X}) + E(\mu^2) = E(\bar{X}^2) - \mu. \end{gather}$$  However, I'm not sure what to do with the $E(\bar{X}^2)$. How to replace the_post_thumbnail template tag and show the first inside the post image instead Why does $\lim_{n\to\infty} z_n=A$ imply $\lim_{n\to\infty}\frac{1}{n}(z_1+\cdots+z_n)=A$? I'm self-studying a bit of complex analysis, and I'm attempting to figure out the following.   Suppose $\lim_{n\to\infty}z_n=A$. How can I show that $$ \lim_{n\to\infty}\frac{1}{n}(z_1+\cdots+z_n)=A. $$  Is there a clever way to write the limit to make it more approachable? Thank you. Is it possible to add subtitles of a figure which contains subfigures I have a single image which contains two sub-images. I want the following subtitles (a) and (b) to be shown correctly.   In which, left sides is my current image which contains two rectangular. And right sides is my expected result. I found a solution is that we can use subfig package. However, it requires separating the original figure into two subfigure. In that question, I am regarding that we do not need split original figure, I want to write (a),(b) directly below figure. Thanks Current solution is  \begin{figure}[H] \captionsetup{labelfont={bf}}   \centering     \subfloat[]{\centering\includegraphics[scale=0.5]{Fig1a.png}} \\     \subfloat[]{\centering\includegraphics[scale=0.5]{Fig1b.png}}   \caption{This is main figure}   \label{fig:9} \end{figure} How can I tell if two Minecraft mods are compatible? If I want to use two mods together, e.g.  and  (which don't state compatibility with one another), how can I tell if they will work together (and not break Minecraft - forcing me to re-download a fresh copy)? Sequence Limit Problem: If $0 \leq x_{m+n} \leq x_n + x_m$ then limit of $x_n/n$ exists tense and time and composite sentence If the eating meal starts at 7:00 AM and finishes at 8:00 AM. the drinking liquor starts at 7:00 AM and finishes at 7:50 AM.  can I say that :   I drank the liquor when I ate the meal. I ate the meal when I drank the liquor.   Is I need to use progressive tense ? How to permanently assign a different keyboard layout to a USB keyboard? I often plugin a USB keyboard to my laptop (in addition to external monitor and mouse, which all virtually convert my laptop to a desktop computer) and I prefer using a different keyboard layout then.  I have to manually change the current keyboard layout each time I plugin this USB keyboard.  And I'd like to use an automated way for this, if possible.  's answer to the question  gives some clues, but it seems I'll need a startup script for this task as the device ID for my USB keyboard changes every time the computer starts.  This startup script will probably first include the command xinput -list | grep "USB Keyboard", and another command to grab the first USB Keyboard ID number displayed and then use it in the final command to set my chosen layout for that USB keyboard as below:  setxkbmap -device &lt;NUMBER&gt; -layout &lt;LAYOUT&gt; In ZF, how would the structure of the cardinal numbers change by adopting this definition of cardinality? In ZFC, a good way of ordering sets by cardinality is by leveraging the notion of an injection. We define: $$X \lesssim Y \leftrightarrow \mbox{ there exists an injection } X \rightarrow Y.$$  Alternatively, we can leverage the notion of a partial surjection, by which I mean a partial function that hits every point of its codomain at least once.  $$Y \succsim X \leftrightarrow \mbox{ there exists a partial surjection } Y \rightarrow X.$$  Now in ZFC, these approaches are equivalent, in the sense that $$X \lesssim Y \iff Y \succsim X.$$  But if we just consider ZF (that is, we drop choice) then the equivalence breaks down. However, we've still got the forward implication, because the converse of an injection is always a partial surjection.  A specific question. Define that two sets are weakly equipotent iff $X \succsim Y$ and $Y \succsim X$. Question: does weak equipotence imply genuine equipotence? I'm guessing "no."  A general question: In broad terms, how would the structure of the cardinal numbers in ZF be altered by adopting $\succsim$ rather than $\lesssim$ as the fundamental order relation, and taking equality of cardinal numbers to correspond to weak equipotence of sets? I'm guessing this would hide a lot of the (usually very complicated) structure of the cardinal numbers in ZF.  Remark. The order symbols can be written \lesssim and \succsim. So I had  closed within eight minutes of asking.  Is this a little fast? Not only do I object to the reason it was closed (not a real question, come on I'm asking for decent books!), but it was closed insanely fast. Should there be a grace period for questions (diamond mods exempt if so) before they can be voted on to be closed?