Print everything on line after match
Get string after character
How to shift EXIF date/time created by time in days, hours, minutes? Hide specifics messages in chat When to use virtual destructors? I have a solid understanding of most OOP theory but the one thing that confuses me a lot is virtual destructors. I thought that the destructor always gets called no matter what and for every object in the chain. When are you meant to make them virtual and why? Prove that $a^{2^n}=1 \mod 2^{n+2}$ I would like to prove that  $$a^{2^n}\equiv 1 \pmod {2^{n+2}}$$  I tried induction but could not get it.  Thank you very much! Make CMD-Delete a keyboard shortcut in Apple Mail to move a message to the archive? Create keyboard shortcuts for touch bar's functions I have broken the touch bar in my MacBook Pro 13". Only the ESC key keeps working.  Replacing the touch bar may be expensive so I'd like to know if it is possible to replace its functions with keyboard shortcuts.  The functions I am highly interested in are:   volume screen backlight keyboard backlight I'm trying to include graphics in my Latex-file, which I compiled with latex+dvipdf on OS X. Latex however returns this error: "Cannot determine size of graphic"  My graphic is exported from PowerPoint, so I have tried both .pdf and .png. I get the same errors for both.  Sample code that doesn't work:  \begin{figure}[htb] \begin{center} \leavevmode \includegraphics[width=0.8\textwidth]{graph.png} \end{center} \end{figure}   If I have to manually set some measurements of the image, please tell me how I can find out those measurements. I need the image to take up about 80% of text width and be centered. Thanks. I'm taking an intro course in Probability theory, and we have just defined expectation for a random variable as $E(X) = E(X^+) - E(X^-)$ if either of them is finite (extending the definition first from simple positive rv to positive rv, and then to all rvs, positive or not).  Then I came across this result for the expectation of a positive random variable. Let $(\Omega, \mathcal{F}, P)$ be a probability space and $X \ge 0$ be a positive rv:  $$ E(X) = \int_{\Omega} X dP = \int_\Omega \int_0^\infty \mathbf{1}_{\{X &gt; t\}} dt  \, d P = \int_{0}^\infty P(X &gt; t) dt. $$ Actually, I'm familiar with this result, and the proof I've seen before involves converting $\int^\infty_0 P(X &gt; t) \, dt$ to a double integral. What I'm struggling with is the step $ \int_{\Omega} X dP = \int_\Omega \int_0^\infty \mathbf{1}_{\{X &gt; t\}} dt  \, d P $, and also the formal definition of an expectation itself.   I have no previous with integration or a "hard analysis" background, and the material covered so far in the course I'm taking has only used $\int_\Omega X dP$ as a notational device for $E(X)$. In general, any pointers to literature or "intuitive" explanations are more than welcome.  Thanks in advance! Where can I find the source code of Ubuntu? I would like to know where to find the source code of Ubuntu. I'd like to see how far it is "open source". Consider I've set variable site and needs to be printed by echo or printf, but If I use single quote to write something and want to use variable then how?  Example:  $ site=unix.stackexchange.com $ echo "visit:$site" visit:unix.stackexchange.com   But If I use single quote:  $ echo 'visit:$site' visit:$site   Then we know that '' is strong quote and will not expand the variable   I've tried something:  $ echo 'visit:"$site"' visit:"$site"   but do not succeed. So, I am looking for way to print value inside variable while using single quote. Prove that $\prod_{k=1}^{n-1}\sin\frac{k \pi}{n} = \frac{n}{2^{n-1}}$ Using $\text{n}^{\text{th}}$ root of unity  $$\large\left(e^{\frac{2ki\pi}{n}}\right)^{n} = 1$$  Prove that   $$\prod_{k=1}^{n-1}\sin\frac{k \pi}{n} = \frac{n}{2^{n-1}}$$ Is any UFD also a PID? In Ubuntu 13.04 there was an option to use the PPA by Relan in order to get ExFat functionality. Seeing that in Ubuntu this functionality is now available from the repositories without the PPA I tried this but failed to make it work.  So my question is how do I enable exfat support? Is there any built-in software or terminal method allowing me to view the hardware profiles on my system? Windows equivalent of such a feature would be Device Manager. Aside from the Force, is there magic in Star Wars? I am in 1.13 Pre-Release 7 trying to make a one command creation and I need an item with a specific name. The command I use is /give @p diamond_sword{display:{Name:"Sword of Power"}} and it gives my a diamond sword, but it doesn't have the name.   This is me running the command.   This is the command not working. Can't update because the word prox* is blocked I live in Ethiopia and the government blocks all urls with the word "proxy" in them. I couldn't use that word in the title above because that would make the url contain the word proxy.   When I apt-get upgrade I get errors because some packages like libproxy1, libproxy1-plugin-gsettings, libproxy1-plugin-networkmanager, python-libproxy all contain the p word.  Therefore, it is all blocked. I tried putting the urls into proxy sites, but they all just returned to their home page.   Are there any other solutions? Context Around this Code: I am making a schedulable class run each Sunday to track a couple of metrics important to the team.   Question: I am looking to consolidate DML operations and a big part of this is understanding pass by reference vs pass by value.  I want to pass the salesOps user object to the method SDREfficiencyLastWeek. I made the return type void, because I figured that I will be passing this by reference and I can make all the updates in the method without having to anything.   Why I am confused:    I read the above article and am thrown off by the following statement:  "Non-primitive data type arguments, such as sObjects, are also passed into methods by value. "   If the object is indeed passed by reference, then the query for the salesOps user in my code should be sufficient enough to edit all fields on that object without actually having to state each field in the query.  global class SDREfficientMetricsSchedulable implements Schedulable  {     global void execute(SchedulableContext sc)      {         User salesOps = [SELECT ID FROM USER WHERE id = '0056A000002Z3p9QAC'];         List&lt;String&gt; queries = new List&lt;String&gt;();          String contactsWorked_lastWeek  = 'select count(id) results from contact where LastActivityDate = last_week';         queries.add(contactsWorked_lastWeek);          String demosSet_lastWeek            = 'select count(id) results from form__c where CreatedDate = last_week';         queries.add(demosSet_lastWeek);          String demosCompleted_lastWeek  = 'select count(id) results from opportunity where (stagename = \'Unqualified Demo Completed\'  OR stagename = \'Qualified Demo Completed\' )  and RecordTypeId = \'0126A000000yudDQAQ\' and CloseDate = last_week';         queries.add(demosCompleted_lastWeek);          String qualifiedDemos_lastWeek  = 'select count(id) results  from opportunity where RecordTypeId = \'0126A0000004Ao6QAE\' and isclosed = false and  SDR_Owner__c != null and CreatedDate = last_week';         queries.add(qualifiedDemos_lastWeek);          String closedWon_lastWeek       = 'select count(id) results  from opportunity where RecordTypeId = \'0126A0000004Ao6QAE\' and iswon = true and  SDR_Owner__c != null and CloseDate = last_week';         queries.add(qualifiedDemos_lastWeek);            SDREfficiencyLastWeek(queries, salesOps);          update salesOps;     }       public void SDREfficiencyLastWeek(List&lt;String&gt; queries, User salesOps )     {        }  } These two exercises I encountered recently seem to develop some type of connection between GCD and LCM I can't quite figure out. Exercise 1:  Find all the numbers $x$ and $y$ such that: $a) \ GCD(x,y)=15, \ LCM(x,y)=150$ $b) \ GCD(x,y)=120 \ LCM(x,y)=1320$ $c) \ GCD(x,y)=100 \ LCM(x,y)=990$  Exercise 2:   Find all the numbers $m,n$ such that $GCD(m,n)=pq , \ LCM(m,n)=p^2qs$  where $p,q,s$ are prime  The first thing that is known to me is that $GCD(x,y) \cdot LCM(x,y)= x \cdot y$ Also $LCM(x,y)$ is at most $x \cdot y$ while $GCD(x,y)$ is at most $\max \{x,y\}$. Last thing is that $GCD(x,y)|LCM(x,y)$. Using all this I tried to solve the first exercise: $a)$ First two obvious pairs are $x=15, y=150$ and $y=15, x=150$. Now neither of the numbers can be bigger than $150$ or smaller than $15$. So we are looking for numbers in the range $15-150$ that satisfy $x \cdot y = 15 \cdot 150$ Another such pair is $(x,y)=(30,75), \ (x,y)=(75,30)$. Similarly for $b)$ we find that the only possible values are permutations of the set {$120,1320$} and in $c)$ since $100$ does not divide $990$ no such numbers exist. Now exercise 2 is what made me think there is actually another connection I'm not quite aware of since now it's about arbitrary prime numbers and the previous method doesn't work anymore. My intuition is that it has something to do with $GCD$ or $LCM$ of the $GCD(x,y), \ LCM(x,y)$ Why does everyone's wand still work for them?