I am trying to get current UTC date time in millis. But every code I used for this returns me the device's current date time. When I chenge my device's date, time it shows me chenged one. So, I want to get GMT/UTC date time so that it will show me correct date even if user changes the date, time of his/her device.  Codes I tried:  Calendar calendar = Calendar.getInstance();         long now = calendar.getTimeInMillis();   and  DateFormat df = DateFormat.getTimeInstance();         df.setTimeZone(TimeZone.getTimeZone("UTC"));         String gmtTime = df.format(new Date());         Date gmtDate = df.parse(gmtTime);   Actually I want to set an alarm at November 15 2017, 5 PM using AlarmManager, receive that event hide some activities in my app which I don't want to show after this date, time.  How can I acheive this?  Thanks in advance!
When I create a new Date object, it is initialized to the current time but in the local timezone. How can I get the current date and time in GMT?
I've come across a paper that mentions the fact that matrices commute if and only if they share a common basis of eigenvectors. Where can I find a proof of this statement? Dictionaries on iOS 8 not working When Free shipping is available hide other shipping methods except Local pickup in WooCommerce I currently have WooCommerce setup to allow free shipping on orders over a certain amount. However, I also have local pickup available and would like to allow BOTH if over a certain amount. I have the following code to remove the other rates, however it also doesn't keep the local pickup option. function fd_shipping_rates( $rates, $package ) {           $all_free_rates = array();          foreach ( $rates as $rate_id =&gt; $rate ) {         if ( 'free_shipping' === $rate-&gt;method_id ) {              $all_free_rates[ $rate_id ] = $rate;             break;         }     }          if ( empty( $all_free_rates )) {         return $rates;     } else {         return $all_free_rates;     }  } add_filter( 'woocommerce_package_rates', 'fd_shipping_rates', 10, 2 );  Any help regarding this is much appreciated! I am looking for a code solution only as I am looking to minimise unneeded plugins. EDIT: I recently found this article on  website regarding this exact issue. Fly and Two Trains Riddle Is it possible to install an old version of Mac OS on a new Mac? CHECK constraint in MySQL is not working How can I use an align environment flush left? Is there a way possible to imitate the align environment for math mode commands, without having all writing being placed toward the center on the output page?  MWE:  \documentclass{article} \usepackage{mathtools}  \begin{document} \begin{align*} \cos\theta_1 \cos\theta_2-\sin\theta_1\sin\theta_2 &amp;= \cos(\theta_1 +\theta_2) \\ \sin\theta_1 \cos\theta_2 + \cos\theta_1 \sin\theta_2 &amp;= \sin(\theta_1+\theta_2) \end{align*}  \end{document} A generalized version of the second Borel-Cantelli lemma says     Theorem 5.3.2. Second Borel-Cantelli lemma, II. Let $\mathcal F_n, n \ge 0$ be a filtration   with $F_0 = \{\emptyset, \Omega\}$ and $A_n , n \ge 1$ a sequence of events with $A_n ∈ \mathcal F_n$ . Then   $$ \{A_n \,i.o.\} = \left\{\sum_{n \ge 1} P (A_n |\mathcal F_{n−1}) =\infty \right\}. $$   An exercise of this lemma is     Exercise 5.3.6. Show    $\sum_{n \ge 2} \mathbb P (A_n | \cap_{m=1}^{n−1} A_m^c ) = \infty$ implies $P (∩_{m \ge 1} A_m^c ) = 0$.   I think we can actually prove that $\cap_{m \ge 1} A_m^c = \emptyset$. My proof is like this: Let $B_n = \cup_{m = 1}^n A_n$. Let $\mathcal F_n = \sigma(A_1,\dots,A_n)$, which forms a filtration. It is easy to verify that $$ \mathbb P (A_n | B_{n-1}^c ) = \mathbb P (A_n | \mathcal F_{n-1})(\omega) $$ when $\omega \in B_{n-1}^c$.  Assume there exist $\omega \in \cap_{m \ge 1} A_m^c$. It follows from the previous lemma that $$ \omega \in \left\{\sum_{n \ge 1} P (A_n |\mathcal F_{n−1}) =\infty \right\} = \{A_n \,i.o.\}. $$ In other words, $\omega \in \cap_{m \ge 1} \cup_{n \ge m} A_n$, which contradicts $\omega \in \cap_{m \ge 1} A_m^c$.  Is this the right proof? I'm embarking on a journey to create a conference abstract book using XeTeX and got stuck within five minutes:        The missing 'g' in 'somethin' influences the line height of the following line. How can I correct this?  At the end I want to be able to include the abstracts and corresponding information through our online registration system, so this should be a global setting.  My MWE:  \documentclass[10pt, a5paper]{article} \usepackage{fontspec}  %% GEOMETRY \usepackage[left=2cm, right=1.5cm]{geometry} % to change the page dimensions  \newenvironment{AbsHead} {     \fontsize{16}{22}\headfont\noindent }% {     \vspace{0.5 cm} }  \newenvironment{AbsAuthors} {     \fontsize{12}{14}\authorfont\noindent }% {    \vspace{0.5 cm} }  \begin{document}  ￼￼￼￼\setmainfont{Minion Pro} \newfontfamily\authorfont{Helvetica Neue Light} \newfontfamily\headfont{Helvetica Neue Condensed Bold}  \begin{AbsHead}The XIAP  something something something somethin somethin somethin somethin somethin somethin somethin something something\end{AbsHead}   \begin{AbsAuthors}Somebody Someone\end{AbsAuthors}   \noindent Purpose: Lorem ipsum \end{document} I was just wondering how can you use "there is" followed by a word that is in plural, e.g  "There's cupcakes in the fridge"  and  "There is a couple of things we can do --"   Is it just slang? I'm a bit annoyed with the typesetting of citations that biblatex deems "ambiguous". In the following example, I have two papers with the same first author, but a different second author in two different years. When citing in the main text, the second author is included before "et al", since biblatex deems these references to be ambiguous. However, the references were published in different years, so I cannot see why these are ambiguous. Is it possible to get these citations referenced using only the first author?  MWE  \documentclass{article}  \usepackage{filecontents} \usepackage[hyperref,style=authoryear,natbib=true,maxbibnames=10,maxcitenames=2,useeditor=false,url=false,useprefix,giveninits=false]{biblatex} \addbibresource{ref.bib}  \begin{filecontents}{jobname.bib} @book{author_book, title = {Book's title}, author = {Author, Some and Better, Some and Cetter, Some}, location = {The City}, publisher = {Publisher}, date = {2005}, } @book{author_book2, title = {Book's title}, author = {Author, Some and Getter, Some and Cetter, Some}, location = {The City}, publisher = {Publisher}, date = {2006}, } \end{filecontents}  \bibliography{jobname} % \bibliography{ref}  \begin{document} Hello world \citet{author_book} \citet{author_book2} \printbibliography \end{document} How do I install Java? How to run a background task in a servlet based web application? Why is the "Arnold Schwarzenegger" terminator referred to by two different product numbers (T-101, T-800)? Reese's boyfriend seems to constantly be asleep. When I try and talk to him, she warns me that he's been hard at work all night, but I can't actually enter the shop at night.   Is there any way to talk to him or any benefit for doing so? I've tried to talk to him daily for a week (thinking it was something akin to talking to Sable) but I've had no luck. Trying to come in after-hours doesn't work. What is some good free software for doing physics calculations?  I'm mainly interested in symbolic computation (something like Mathematica, but free). Let's have breakfast    Let's have a good breakfast      I've learned that indefinite articles aren't used before uncountable nouns, so why is a used before the adjective "good" here?    Is there an exception to the rules or is it wrong? Proof Check: Every Cauchy Sequence is Bounded Sorry if I keep asking for proof checks. I'll try to keep it to a minimum after this. I know this has a well-known proof. I understand that proof as well but I thought I'd do a proof that made sense to me and seemed, in some ways, simpler. Trouble is I'm not sure if it's totally correct. It's quite short though. I was just hoping someone could look it over and see if it is a valid proof. Thank you!  Lemma: Every Cauchy sequence is bounded.  Proof: Let $(a_{n})$ be Cauchy. We choose $ 0&lt;\epsilon_{0}$. So $ \forall \; n&gt;m\geq N_{0}$ we have that $\vert a_{n}-a_{m} \vert &lt; \epsilon_{0}$. Therefore $(a_{n})$ is bounded for all $ m \geq N_{0} $ by $ \epsilon_{0} $. Since $ \mathbb{N}_{N_{0}}$ is finite, it is bounded. So, for all $ m&lt;N_{0} $, $ (a_{n})$ is bounded. Therefore $(a_{n})$ is bounded.  I realize I haven't said what the bounds are but I think that's sort of irrelevant. So long as we know it's bounded. Any help is much appreciated! How do "pet" Walkers help ward off other Walkers? In both the comics and the show, Michonne first appears with two walkers that she essentially keeps as pets.    The comics sort of half-explain this - as per :     She notices walkers don't attack one another and hacks off the arms and lower jaws of Mike and Terry. She chains them up by their necks to use them as escorts for an escape that was successful.   In , we see that even if they still sort of smell like Walkers, the Walkers can smell/detect the living and will attack.  In ,      We see Andrea effectively making a new "pet" so that she can use to deter the Walkers that she comes across on her trip to the prison. Along the trip, she is shown to come within close range of Walkers, but they give her space when she points the "pets" in the right direction.   Why would the Walkers not just attempt to go around the "pets"? What about them creates an effective protective barrier? What happened to the ia32-libs package? The ia32-libs package is no longer present in Ubuntu 12.04 repositories for a 64bit system. Are there any available replacement packages available for download?