How can I find the difference between two times
Compare two dates with JavaScript
Can screen layouts or workspaces be locked? filling an occluded plane with the smallest number of rectangles I've got a specific problem which I'll try to describe as clearly as possible.   I have a defined rectangular region on a cartesian plane, and within that region there are other given rectangular sub-regions that are described in terms of their 4 vertices, ie {(x1, y1), (x1, y2), (x2, y1), (x2, y2)}, so that these regions form 'occlusions' on the plane. These regions don't overlap, but they can form more complex polygons when different-sized rectangles adjacent to each other appear joined.  here's an illustration:   I am interested in the space between these shapes, and how to define the space in the same way the occlusions are defined, that is as a set of rectangles. In particular I want the definition optimised so that the space is described using the smallest possible number of rectangles. For example, an incomplete rendering might look like this:   Can anyone suggest a way forward with this? How can I have the original set of vertices (describing the black rectangles) generate the 'complementary' set of vertices (red rectangles) such that the number of red rectangles is minimal?  I suspect it's a variation of a 'packing problem', but I have a feeling it might be fairly simple... Transparent background but solid title bar and text in Windows 7 I'd like to have a terminal like the one in Ubuntu where the background is transparent but title bar and text is still solid. I have tried Console, but setting the alpha value makes the entire window transparent, which makes the text hard to see.  Is that possible? Lost my APFS partition after using EaseUS partition manager on Bootcamp I used macOS mojave(APFS partition) and Windows10(Bootcamp). And I tried to expand Bootcamp partition with moving Windows OEM partition by EaseUS partition master in windows. After this, I can’t find APFS partition installed macOS.  I use MacBook Pro 2016.  I think “disk0s2” was APFS partition, but now it is “Windows Recovery” partition.  Do you have any ideas to solve this? (I am Japanese, so I'm sorry for my poor English)  I tried “gpt show” and “diskutil list” on macOS Recovery   Additional information  I tried dd if=/dev/disk0s2 count=1 bs=512 command in a Terminal app of macOS Utility from network boot, and the terminal says,  -bash-3.2# dd if=/dev/disk0s2 count=1 bs=512 | vis -c 1+0 records in 1+0 records out 512 bytes transferred in 0.005472 secs (93568 bytes/sec) )us??-ҵ?\^A\0\0\0\0\0\0\0?\M^F\^Z\0\0\0\0\0\^A\0\0\M^@\0\0\0\0NXSB\0\^P\0\0?\M^B?\^B\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\^B\0\0\0\0\0\0\0"\^R???\M^_@}\M^Bvy57 ?(h?8\0\0\0\0\0?\M^F\^Z\0\0\0\0\0\^X\^A\0\0 l\0\0?\M^J\0\0\0\0\0\0\^R\r\0\0\0\0\0\0\a\0\0\0004*\0\0\^E\0\0\0\^B\0\0\0\^S*\0\0!\0\0\0\M^Qr8\0\0\0\0\0\M^U?\b\0\0\0\0\0\^A\^D\0\0\0\0\0\0\0\0\0\0d\0\0\0\^C\^D\0\0\0\0\0\0\M^T\M^N\^A\0\0\0\0\0\M^V\M^N\^A\0\0\0\0\0?0\^B\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0-bash-3.2#   . Let $A, B$ be subsets of a metric space $X$. If $A$ is compact and $B$ is closed, show that the distance between $A$ and $B$ is achieved.   Attempt at a proof:    Let $A$ be compact and $B$ be closed. Let $m=d(A,B)=\inf_{b\in B} d(A,B)$. Then, there are two possibilities: (a) $\exists b\in B$, $d(a,b)=m$. If this is the case, we're done. (b) $\forall b\in B$, $d(a,b)&gt;m$. In this case,     there exists a sequence $\{b_n\}\subseteq B:$ $d(a,b_n)\rightarrow m$ as $n\rightarrow\infty$ by definition of infinum. Then there exists a subsequence $\{b_{n_k}\}$: $d(b_{n_1},a)&gt;d(b_{n_2},a)&gt;...$ which is monotonic decreasing. Then note that $d(b_{n_k},a)&lt;d(b_{n_1},a)&lt;\infty$. So it's a bounded sequence. Now I want to show that it has a convergent subsequence that converges to $b\in B$ and then I want to do the same for $A$. And then finally to show that $d(a,b)=m$ in fact. Any clues to how to get there? Why are there so many places to put a binary in Linux? There are at least these five:   /bin/ /sbin/ /usr/bin/ /usr/local/bin/ /usr/local/sbin/   And on my office box, I do not have write permissions to some of these.  What type of binary goes into which of these bins? A zero-dimensional ring is Noetherian? Proposition: Let $A$ be a non-zero ring that is not a field. Suppose $A$ is zero dimensional. Then it is Noetherian.   Proof: Let $p$ be a prime ideal of $A$. If $p$ is not maximal, then $p \subsetneq m$ for a maximal ideal $m$. Hence $dim A \ge 1$, contradiction. Hence every prime ideal is maximal. Consequently, every increasing (or decreasing) chain of prime ideals will be trivial in the sense that it will have length $0$. Hence the ring is Noetherian (and Artinian).  Is there a problem with the above proof? I bought a Mac (13", early 2011) almost 5 years ago. When I first got it, it was running under OS X 10.7 and it was pretty fast. I've being upgrading it ever since and it's now running under Mac OS X 10.11.  I guess it didn't totally survive the upgrades because, today, there's a lot of bugs, freezes, lags, "spinning beach ball" appearing,... for example, when I write something on a normal program/editor, the cursor freezes for a few seconds, then catches up to what I'm writting.  As you can guess, that's really annoying! I've been thinkning about upgrading the hardware but I don't know what to do: should I change the RAM to 8 GB - 1 333 MHz (currently my computer has 4 GB - 1 333 MHz)? Or should I upgrade to an SSD (which is pretty expensive and difficult to install)?  Thank you very much. The value of a, b and c for this integral Find out the value of $a, b$ and $c$, for which $$ \lim _{x\to 0}\:\:\frac{1}{x^5}\left(\int _0^x\:\left(a+b \cos\left(t\right)+c \cos\left(2t\right)\right)dt\right)=\frac{1}{5} $$  My first thought was to separate the integral into multiple ones because i thought that it is pretty clear that each integral is a common one and a,b,c are constants and can be taken out . After I solved the integral, that's where I had the problem. I couldn't do the limit of the result that I've got in order to find out the value of $a,b$ and $c$ . "Two are better than one" or "Two is better than one"? I just came across the phrase "Two are better than one", but I had always heard it in my head as "Two is better than one". This is partially due to the Boys Like Girls song. Which one of these is actually correct? In BibTeX, I need to cite another entry as a note/comment of a first one, something like:  @article{Paper1, author = {Author A.}, journal = {The Journal of XX}, number = {1}, pages = {4252}, year = {2000}, note = {see updated results in \cite{Paper2}    } }  @article{Paper2, author = {Author B.}, journal = {The Journal of YY}, number = {2}, pages = {1}, year = {2001} }   Could you give a suggestion in doing this?  I think my need is not really fitting to what proposed here: Zero visitors? What happened to site analytics about a week ago? I'm trying CTest in CMake in order to automatically run some of my tests using make test target. The problem is CMake does not "understand" that the test I'm willing to run has to be built since it is part of the project.  So I'm looking for a way to explicitly specify this dependency. Extend tourist visa stay in USA due to coronavirus and waive I-539 fee My mom has come to US on a tourist visa and her I-94 expires on the first week of May.   Due to the coronavirus, travel restrictions have been imposed in our home country (India). Also we want to avoid the risk of traveling in flights at this time.  Is there an easy way to to extend her stay in the US by one or two months?  I am aware that we should fill out an  to extend our stay. But in-order to submit the online application it requires a fee of $370.    Is filing I-539 the easiest way to extend her stay at this time? If so, is it possible to waive the fee due to the coronavirus situation?  After filing I-539 should she wait for an approval to continue her stay? Or is the receipt good enough?   Can you please help me with these? Thanks!  [Edit 1]:  With the current situation of the virus, traveling anywhere sounds like a very risky operation, especially for elders.   That is the main reason behind this question. If the US government will allow visitors to overstay until Covid-19 settles down! I've only found a recursive algorithm of the extended Euclidean algorithm. I'd like to know how to use it by hand. Any idea? A floor is paved with rectangular marble blocks,each of length $a$ and breadth $b$.A circular block of diameter $c(c&lt;a,b)$ is thrown on the floor at random.Show that the chance that it falls entirely on one rectangular block is $\frac{(a-c)(b-c)}{ab}$  I thought over this problem,i found total number of cases as area of rectangular marble block,but i cannot find the favorable number of cases.Favorable number of cases cannot be area of rectangular marble block$-$ area of circular block,as the answer suggests.What should be the correct logic,please help. I have a Samsung 960 Pro SSD with Ubuntu 18.04  is it safe to put the swap file on there or would it hurt it in the long run,  I heard some people saying that new SSDs don't suffer from that issue anymore, is this true? New three-tiered badge idea: Explainer →Refiner → Illuminator The difference between a poor or meh question and a stellar question can often simply be someone understanding it and providing it a great answer. I can't begin to count the number of times I've justified re-opening a question as a moderator by saying:     Look at the answer it got, though. This isn't something we want deleted, this is something we want fixed, because it's obviously valuable. Someone with domain knowledge can easily edit that question based on the answer it received.   This doesn't only apply to borderline-poor or poor questions – sometimes a good edit means the difference between 100 and 10,000 people finding something through typing things into Google. Good titles are hard.   We think we've come up with a way to provide incentive for good, opportunistic edits to happen more often, ideally without questions needing to go through closure or collecting a centimeter of dust before they do. What if we simply rewarded folks that answered and edited questions with a special, relatively difficult to earn badge?  Let's say that you answer something, and:   You edit the question 12 hours before or after answering it. This allows you to edit now, answer later &mdash; or answer now and edit later, when you have the time. Your edit isn't rolled back, or outright rejected if it was a suggested edit The question is not closed for any reason, even simply being a duplicate Your answer has a score of 1 or higher   &hellip; then you've done something that we probably want to recognize. You understood something, you provided the knowledge that you have, and then you provided an edit to make sure that more people in need of this knowledge can find it, while raising the overall quality of the site.  Here's the proposed tiers for the badge (within the above stated criteria):   Explainer (Bronze): Answered &amp; edited 10  questions Refiner (Silver): Answered &amp; edited 50 questions Illuminator (Gold): Answered &amp; edited 500 questions   We think this is going to be pretty hard to game. You can't go leaving streaks of terse snark all over the place on questions you know are going to be closed anyway, and junk edits aren't going to fly.  We're talking about rewarding folks that take a tiny bit more time out of their day just to write a more descriptive title so that folks can find the awesome answer that they wrote. Just doing that alone can make a big difference. Sure, it's a tad hard to get at the gold level, but it's supposed to be. If you routinely edit questions that you answer and have done so for some time, you'd probably get it the day we roll it out.  While this is technically something that we came up with on the quality initiative ( | ) &mdash; this badge could be earned on all of our sites.  What do you think? What did we miss? What could be better about the idea? Filter bibliography by author? I would like to create a template for a publication list that can then be used by several people. The idea is that there is one bib-file which contains all of the publications. Peer-reviewed entries are marked with the keyword = pr. Then there is the master-file of the type scriptreport in which everyone can integrate their chapter-file in order to merge the publication lists of everybody into one file. The chapter file is the core of everything and should be reusable. It should filter out the entries for the respective author from the bib file and print them out in two lists (peer-reviewed and non-peer-reviewed). My problem is that I don't really know how to filter by author in this case. Here are the rough codes of the two files: Master: \documentclass[a4paper]{scrreprt}  \usepackage{biblatex}  \title{Publication list}  \addbibresource{sample.bib}  \begin{document}     \maketitle          \tableofcontents     \newpage          \include{Researcher}     \newpage \end{document}  chapter: \chapter*{Researcher} \addcontentsline{toc}{chapter}{Researcher}          \nocite{*}     \printbibliography[keyword={pr}, title={Peer-reviewed}]          \nocite{*}     \printbibliography[notkeyword={pr}, title={Non-peer-reviewed}] Call $P(k): k!&lt;k^k$, for $k\geq 2$ Test it out with 2, and it's true ($2&lt;4$).   Assume that $P(k)$ is true for some $k\geq2$.  Then show that $P(k+1)$ is true.   $P(k+1): (k+1)!&lt;(k+1)^{k+1}$  Ministep: $(k+1)!=k!(k+1)$ Ministep: $(k+1)^{k+1}=(k+1)^{k}(k+1)$    $k!(k+1)&lt;(k+1)^{k}(k+1)$  Can I just pull out that (k+1) and call it a day? That will make $k!&lt;(k+1)^{k}$.   We're already assuming that $k!&lt;k^k$, for some integer $k\geq 2$, and I don't think I need to prove that $k^{k}&lt;(k+1)^{k}$. I mean, I guess I could go prove that as well, but let's assume for the moment that I don't have to. Since we're assuming the original $P(k)$ is true, I should be able to write $k!&lt;k^{k}&lt;(k+1)^{k}$ right? That would prove the $k+1$ case. Is this the correct way to go about things? It seems too easy, but makes sense.  Thanks for confirmation and/or pointing out mistakes!