The difference between head & tail recursion
What is tail recursion?
How do I troubleshoot high 'svchost.exe' usage in Windows 7? I'm having a problem with Windows 7 64-bit. I thought it was slow and all, but then I saw that the CPU usage was always around 80% and started searching for a solution.  There are two svchost.exe's consuming around 30% each and in the resources monitor there's a system interrupts consuming 45% all the time. I tried closing the applications, but it makes no difference.  I tried some other things that I've found on Google, like disable system updates, but it didn't work.  I don't know if it will help but here's my specifications:  Core 2 Duo 4400 ATI Radeon 4850 4 GB DDR2 RAM     EDIT  I ran the suggested program and got this information; did I get it right?      EDIT  As you asked here it is, did I get it right now? The other TCP/IP there's nothing.    EDIT  I ran msconfig and took the services that one of the svchost.exe processes was using out of the startup and now my CPU is around 50%, but I still would like to improve it further. I can't lose that much CPU power just because of Windows...    EDIT  Yeah, there's nothing I can do here. I am going to reinstall Windows&nbsp;XP soon, it's really weird... How secure is Activation Lock on iOS 7 (and later)? Apple showed this new feature in iOS 7 called Activation Lock, that if you enable "Find My iPhone" on a device that is lost or stolen, a person that finds/gets the iPhone will not be able to wipe it or reset it. I'm curious whether the lock is designed to prevent these avenues to defeat the lock:   Can they completely drain the battery and leave the phone in that state for a couple of months and then try it? Or, can they use any third-party software that can access iPhone from outside the iTunes and wipe it that way? Or, can they simply "jailbreak" it and forget about this Activation Lock?   By what methods can this lock be defeated or bypassed? Extend x axis on graph? I'd like to extend my x axis a little longer. Is it possible to do that?  \centering     \begin{tikzpicture}[scale=1.5]      \begin{axis}[         xlabel=Reynolds Number,ylabel=Coefficient Discharge]     \addplot [color=blue,mark=*] coordinates {         (6485.41491,0.408143397)         (7927.942858,0.407370795)         (8663.115504,0.38550864)         (9219.462371,0.366953133)         (9537.374867,0.346531912)         (10491.11235,0.330115983)         (11087.19828,0.312041115)         (12219.76155,0.313951177)     };         \addlegendentry{1/4}     \addplot [color=red,mark=triangle] coordinates {         (6556.945221,   0.412644978)         (7868.334265,   0.404307857)         (8663.115504,   0.38550864)         (9187.671122,   0.365687778)         (9120.114717,   0.331371141)         (10443.42548,   0.328615455)         (11683.28421,   0.328817519)         (12875.45607,   0.330797337)     };         \addlegendentry{1/2 Lift}     \addplot [color=black,mark=*] coordinates {         (6843.066467,   0.430651305)         (8297.516134,   0.426361012)         (9203.566747,   0.40955872)         (8615.42863,    0.342911376)         (9298.940495,   0.337868614)         (10824.92047,   0.340619673)         (11683.28421,   0.328817519)         (12899.29951,   0.331409925)     };         \addlegendentry{3/4 Lift}     \addplot [color=yellow,mark=*] coordinates {         (6854.988186,   0.431401568)         (8398.850742,   0.431568008)         (9267.149246,   0.412388141)         (8567.741755,   0.341013343)         (9346.62737 ,   0.339601273)         (10753.39016,   0.338368882)         (11897.87515,   0.334857025)         (13030.43841,   0.334779157)     };         \addlegendentry{Full Lift}     \end{axis}% \end{tikzpicture}% I have cobbled together a command to return the process ID of a running daemon:  ps aux | grep daemon_name | awk "{ print \$2 }"   It works perfectly and returns the PID, but it also returns a second PID which is presumably the process I'm running now. Is there a way I can exclude my command from the list of returned PIDs?  I've tested it a few times and it appears my command is always the second PID in the list, but I don't want to grab just the first PID in case it's inaccurate. Are there infinitely many primes of the form $6^{2n}+1$ or only finitely many? Does anyone know whether there are only finitely many of primes of the form $6^{2n}+1$, where $n$ zero or any natural number? How to install qt 4.8 from repository? How to install qt 4.8 and QtCreator from repository ? When should I use  or >()? I know that &lt;, &lt;(), &lt;&lt; all are used to give input and  &gt;, &gt;() which are used to redirect output.  But I don't know what is clear difference between them and when to use them.  Please explain in detail and along with references if possible. Thanks I'm moving all files to a new computer, via an external hard drive. I am certain that broken links will be a concern. What can I do to fix this? Is there a 'Best Practices' kind of way to prevent this problem beforehand? I have many hundreds of .blend files, and of course, I fear losing them. How do I disable DVD auto eject in Windows 7? I just discovered an incredibly annoying "feature" of Windows 7 tonight.  If you click on your optical drive in Explorer, and there is no disc in the drive, Windows 7 is kind enough to open the tray for you.  I'm finding it hard to contain my rage over this idiotic design decision.  WTF?  According to , this behavior was apparently introduced in Vista.  The author posted a workaround, but I don't want a workaround.  I want it to stop doing this.  Like he, I have a case with a door that covers the drive bays.  If it's closed, and I accidentally click on that optical drive, it knocks on that door 10 or 12 times before giving up.  Can this behavior be turned off in Windows 7? Here are some options I thought of, not sure which is the right one.   There was an I/O error reading from the pipe. The process writing to the other end of the pipe died with a failure. All processes who could write to the pipe have closed it. The write buffer of the pipe is full. The peer has closed the other direction of the duplex pipe. Writing failed because there are no processes which could read from the pipe. A system call returned the EPIPE error, and there was no error handler installed. When to use (and not use) the rule of three How do I efficiently filter computed values within a Python list comprehension? The Python list comprehension syntax makes it easy to filter values within a comprehension.  For example:  result = [x**2 for x in mylist if type(x) is int]   Will return a list of the squares of integers in mylist.  However, what if the test involves some (costly) computation and you want to filter on the result?  One option is:  result = [expensive(x) for x in mylist if expensive(x)]   This will result in a list of non-"false" expensive(x) values, however expensive() is called twice for each x.  Is there a comprehension syntax that allows you to do this test while only calling expensive once per x? Remove duplicate fields in a given column (after ID check) I want to create a table like this using Latex        ---------------------------------       |               sets            |       ---------------------------------       | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | --------------------------------------- | I1  | * |   | * | * |   | * |   | * | ---------------------------------------   Here is what I wrote  \begin{table} \caption{Multiprogram sets} \label{multiprogram}  \begin{tabular}{| c | c | c | c | c | c | c | c | c |}   \cline{3-9}   \multicolumn{8}{}{}    &amp;   Sets  \\   \hline   \multicolumn{1}{}{}   &amp; 1 &amp; 2 &amp;  3 &amp; 4 &amp; 5 &amp;  6 &amp; 7  &amp; 8 \\   \hline    astar         &amp;  &amp; * &amp;  &amp; * &amp;  &amp;  &amp; * &amp;   \\   \hline  \end{tabular} \end{table}   But it doesn't work! The output look like            -----------------------------                                  sets | ---------------------------------------         1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | --------------------------------------- | I1  | * |   | * | * |   | * |   | * | ---------------------------------------   Any way to fix that? How to trim whitespace from a Bash variable? I have a shell script with this code:  var=`hg st -R "$path"` if [ -n "$var" ]; then     echo $var fi   But the conditional code always executes, because hg st always prints at least one newline character.   Is there a simple way to strip whitespace from $var (like trim() in )?   or   Is there a standard way of dealing with this issue?   I could use  or , but I'd like to think there is a more elegant solution to this problem. I am trying to follow the best practice design patterns for triggers but get the error Constructor not defined: [CaseTriggerHandler].(). What am I missing?  Trigger  trigger CaseTrigger on Case (before insert, before update, before delete, after insert, after update, after delete, after undelete) {      CaseTriggerHandler handler = new CaseTriggerHandler();      //Before Insert     if(Trigger.isInsert &amp;&amp; Trigger.isBefore){         handler.OnBeforeInsert(Trigger.new);     }     //After Insert     else if(Trigger.isInsert &amp;&amp; Trigger.isAfter){         handler.OnAfterInsert(Trigger.new);     }     //Before Update     else if(Trigger.isUpdate &amp;&amp; Trigger.isBefore){         handler.OnBeforeUpdate(Trigger.old, Trigger.new, Trigger.newMap);     }     //After Update     else if(Trigger.isUpdate &amp;&amp; Trigger.isAfter){         handler.OnAfterUpdate(Trigger.old, Trigger.new, Trigger.newMap);     }     //Before Delete     else if(Trigger.isDelete &amp;&amp; Trigger.isBefore){         handler.OnBeforeDelete(Trigger.old, Trigger.oldMap);     }     //After Delete     else if(Trigger.isDelete &amp;&amp; Trigger.isAfter){         handler.OnAfterDelete(Trigger.old, Trigger.oldMap);     }     //After Undelete     else if(Trigger.isUnDelete){         handler.OnUndelete(Trigger.new);     } }   Handler      public with sharing class CaseTriggerHandler {      private boolean isExecuting = false;      public CaseTriggerHandler(boolean isExecuting){         this.isExecuting = isExecuting;     }      public void OnBeforeInsert(List&lt;Case&gt; newCases){         //EXECUTE BEFORE INSERT LOGIC     }      public void OnAfterInsert(List&lt;Case&gt; newCases){         //EXECUTE AFTER INSERT LOGIC     }      public void OnBeforeUpdate(List&lt;Case&gt; oldCases, List&lt;Case&gt; updatedCases, Map&lt;Id, Case&gt; CaseMap){         //BEFORE UPDATE LOGIC     }      public void OnAfterUpdate(List&lt;Case&gt; oldCases, List&lt;Case&gt; updatedCases, Map&lt;Id, Case&gt; CaseMap){         //AFTER UPDATE LOGIC     }      public void OnBeforeDelete(List&lt;Case&gt; CasesToDelete, Map&lt;Id, Case&gt; CaseMap){         //BEFORE DELETE LOGIC     }      public void OnAfterDelete(List&lt;Case&gt; deletedCases, Map&lt;Id, Case&gt; CaseMap){         //AFTER DELETE LOGIC     }      public void OnUndelete(List&lt;Case&gt; restoredCases){         //AFTER UNDELETE LOGIC     }      public boolean IsTriggerContext{         get{ return isExecuting;}     } } I'm looking for several ways to prove that $$\int_{0}^{\infty }\sin(x)x^mdx=\cos\left(\frac{\pi m}{2}\right)\Gamma (m+1)$$  for $-2&lt; Re(m)&lt; 0$ iCloud has sucked up all my laptop's files - can you transfer files directly from iCloud to Google Drive? I'm trying to disconnect my macbook from iCloud, as it's been creating some problems.  I was told by an Apple Support employee that doing so is only recommended once you've backed up everything from your Mac somewhere, to ensure you don't lose any files - so my goal is to upload everything to Google Drive before messing with my laptop's iCloud settings. The problem is, almost none of the projects that I want to back up to Google Drive are truly on my laptop - instead I mostly just have folders full of file names, which are placeholders for the real files that have been sucked into iCloud. This means I have to re-download everything to my computer before uploading it all to Google Drive. Another crucial piece of information is that I only have 1 GB of storage left on my macbook, which prevents me from re-downloading any complete projects/folders at a time. So unfortunately my current method is this: downloading 1-5 files at a time, uploading these few things to Google Drive, deleting the copies from my laptop and trash, repeat (thousands of times). So, I was wondering if anyone could offer any alternative methods for uploading stuff to Google Drive in this situation - for example, is there a way to transfer files directly from iCloud to Google Drive without having to download them to my laptop first? I should probably mention that I've scoured my laptop for duplicated files and applications I no longer use, make sure to empty my trash regularly, etc (I also asked Apple Support to help me make sure I wasn't missing out on any other ways to maximize storage space). The most obvious culprit of my lack of space is the massive 150 GB iCloud folder on my laptop, which appears to contain duplicates of everything on my computer. I can't seem to do anything about it until I've disconnected from iCloud itself (its reasons for existence are unclear to me in the first place...but that's beside the point lol). How to tell Google that I have changed my website URLs? I have done major updates to my website, and renamed all my URLs.  How can I tell Google that I have renamed these URLs and let Google refresh its index?  My website URL: http://www.pndmasr.com/  My sitemap: http://www.pndmasr.com/sitemap.xml  I have uploaded my sitemap via Google Webmaster Tools many times.  However, every time I search Google for "pndmasr", I still get results with old pages. I have waited more than 3 days but the problem remains. Any suggestions?  Is there a problem with my sitemap? Why the electric potential of Earth is zero? For a localized charge distribution the potential is set to zero far away from the charge distribution (at infinity)  Now, when grounding a conductor, i.e. connecting it to Earth, it is said that we are setting its potential to zero.   Why Earth's potential is zero? And if it is zero, is it zero even if the potential is still zero at infinity?