I have an email template which is configured like this:  recipientType="Contact" relatedToType="Lead"   The email is sent using this:  mail.setWhatId(leadId); mail.setTargetObjectId(contactId); mail.setSaveAsActivity(true);   But I am getting this error:     INVALID_ID_FIELD, SaveAsActivity is not allowed with whatId that is not supported as a task whatId   Which seems to relate to the fact that Lead does not have Track Activities enabled.  Questions   How can I enable Track Activities on Lead? How can I send an email to the Contact about the Lead which is tracked in the activity timeline for both objects?
While trying to create a custom business rule using Apex I got the error:  INVALID_ID_FIELD, SaveAsActivity is not allowed with whatId that is not supported as a task whatId.  ...and found out that it was caused by the method setSaveAsActivity on my code, that was like:  msg.setSaveAsActivity(true); // "msg" is a SingleEmailMessage   What am I doing wrong here?
Before Voldemort, who was the last Horcrux creator? Horcruxes are rare (and then seven come along at once...) and only a few people know about them.  But when was the last Horcrux before Voldemort's? 50 years before him? Centuries? Millennia? Would this hypothetical rule change ever matter? One of  is     104.3f If a player would both win and lose the game simultaneously, he or she loses the game.   . However, it seems to me like it "ought to be" the case that if there are only 2 players and  [A loses] ​ [B loses] ​ [B wins]  would occur simultaneously, then B should win, since  win-and-lose-simultaneously should be better than just-lose.  For that reason, it seems like the     Proposed Alternative : ​ ​ ​ If, simultaneously, all players would lose the game and      some players would win the game, then the players who would not win the game      lose the game, and the game is a draw between the remaining players. ​ Otherwise,      if a player would both win and lose the game simultaneously, he or she loses the game.   would make more sense. ​ However, I can't think of any situations in which that would matter.  Are there any possible situations in which my proposed alternative  would yield a different result from the actual rule? How are virtual functions and vtable implemented? We all know what virtual functions are in C++, but how are they implemented at a deep level?  Can the vtable be modified or even directly accessed at runtime?  Does the vtable exist for all classes, or only those that have at least one virtual function?   Do abstract classes simply have a NULL for the function pointer of at least one entry?  Does having a single virtual function slow down the whole class? Or only the call to the function that is virtual?  And does the speed get affected if the virtual function is actually overwritten or not, or does this have no effect so long as it is virtual. Different results with Plot option "Evaluated" in V9 and V10 From command line open package installer Why are we scared of singularities? I often hear people say that general relativity predicted its own demise because of the singularities it predicts. If I'm not mistaken, this is also a problem in QFT. I wonder why singularities garner so much hate. To me, it seems like negative or complex numbers: we used to hate these things but now they are more generally accepted. Why can't it be that nature just has singularities? We might not get it, we might not like it, but it may be so. We are beginning to go down the path of mobile browser support for an enterprise e-commerce webapp (Java/Servlet based).  Of course there are many decisions to be made, but it seems to me the cornerstone is to be able to reliably detect mobile browsers, and make decisions on the content to be returned accordingly.  Is there a standard way to make this determination (quickly) based on the http request, and ideally glean more information about the given browser and device making the request (screen size, html capabilities, etc?).  I would also appreciate any supplemental information that would be of use from someone who has gone down this path of taking an existing large scale enterprise webapp and architect-ing out mobile browser support from the development side.  [edit] I certainly understand the request header and the information about a database of standard user agents is a great help.  For those talking about 'other' request header properties, if you could include similar standardized name / resource of values that would be a big help.  [edit] Several users have proposed solutions that involve a call over the wire to some web service that will do the detection.  While I'm sure this works, it is not a good solution for an enterprise e-commerce site for two reasons: 1) speed.  A call over the wire for every page request to a third party would have huge performance implications.  2) dependency/legal.  We'd tie our website response time and key functionality to their service, which is horrible for legal and risk reasons. I am a novice user and I am trying to install Oracle Java. The process calls for me to access /usr/local/java, but here is the problem. I get as far as /usr/local, then this is the message I get:  leonard@leonard-MT6452:/usr/local$ dir bin  etc  games  include  java  lib  man  sbin  share  src  leonard@leonard-MT6452:/usr/local$ cd /java/ bash: cd: /java/: No such file or directory  leonard@leonard-MT6452:/usr/local$ rm -r ~/java rm: cannot remove ‘/home/leonard/java’: No such file or directory   Help? Does $\sum\limits_{n=1}^\infty\frac{1}{\sqrt{n}+\sqrt{n+1}}$ converge? Does the following series converge or diverge? $$ \sum\limits_{n=1}^\infty\frac{1}{\sqrt{n}+\sqrt{n+1}} $$ The methods I have at my disposal are geometric and harmonic series, comparison test, limit comparison test, and the ratio test. Do "Best by: XX-XX-XX" foods have an expiration date? How long will foods that have "Best by: XX-XX-XX" on the product last past that date?  I have tried looking online, and all I can find is anecdotal evidence, which isn't very assuring for me since there seems to be no specific "x food will expire y weeks after its best by date".  Is there a rule of thumb or some guide out there that can tell me how long a "best by" food will last? Or is it safe to assume that they never expire, since it's not actually labelled on the product? Switches needed in an n-location multiway switching system we can construct a two location multiway switching system with two 3-way switches:    They also teach us how to perform three location multiway switching with two 3-way switches and one 4-way switch:    Is it possible to make a similar system (three locations, all able to switch the light in any situation) with only three 3-way switches?   What can be said in general about the switches needed to make an n-location multiway switching system? Only half of the display works, can I set to display only in that region? I have a Macbook with a cracked screen, only the top left half of the screen works, is there anyway to reduce the screen resolution, keep the DPI the same, and thus have the entire OS visible in the top left section of the screen which works?  The below photo demonstrates what I mean, with parts of the creen totally unusable, it would make sense to be able to display the whole screen in the remaining usable part. How to only append to clipboard (but not overwrite current data)? Decision on rejected edits should be displayed as a notification to the editor Update, April 2014: I fully support  of adding the message where it belongs—in the actual editing form. This is less intrusive than displaying it as a notification, but it serves the same purpose. Can has?     Background  When you suggest an edit, the outcome of whether it was approved or rejected is buried deep within your profile. You have to navigate to Profile » Activity » Suggestions to find a list of your recent edits, but even those do not say anything about the outcome:    waffles♦ introduced this , but what can I learn from this page? I have to manually click through the edits to see whether they were rejected or not. This is  time-consuming or inefficient at best. There's also no learning involved at all, since there is no active feedback.     Feature request #1  If an edit was rejected, there should be a notification message displayed, linking to the page of the suggested edit (which states the reject reason).    This kind of feedback would improve the editing behavior, since otherwise, inappropriate suggestions might just continue.    Feature request #2  If the above is too intrusive, the messages in the profile's Activity section should be clearer, for example like this (compare against the first screenshot in the question):        This is similar to:     Here's some more explanation:  Let's assume the case of a user suggesting lots of edits that are in some way harmful. Maybe they were too minor, like only changing keyboard shortcuts to use kbd markup instead of boldface.   Yes, we've already had this on Super User. Since it only takes one user to approve / reject there, some of these edits might even have been wrongfully accepted, others  rejected. While this is a problem of its own, the user suggesting these edits will have a hard time even getting any kind of feedback.  They would never see the rejection messages because they're buried somewhere, unless they critically checked each suggestion in their profile. I doubt anybody would do this. Even more so, they might only look at their steadily climbing reputation, not really noticing a rejected edit.  Another case is users learning how to edit. How are we  if they're not told what they did wrong? They will just continue suggesting edits until somebody actually pings them in chat or comments somewhere.  Here's an  of a user who was completely unaware that he could see feedback somewhere in a dark corner of his profile, until he was banned from editing because he'd repeated the same mistake over and over. Can we have a list of all the Stack Exchange domains somewhere, for firewall purposes? Are quotes needed for local variable assignment? Can I safely omit quotes on the right side of a local assignment?  function foo {     local myvar=${bar}     stuff() }   I'm mainly interested in bash, but any info on corner cases in other shells are welcome. Prove $\sum\limits_{i=2}^{n}\frac{1}{(i-1)i}$ = $\frac{(n-1)}{n}$ using induction. I need to prove $\sum\limits_{i=2}^{n}\frac{1}{(i-1)i}$ = $\frac{(n-1)}{n}$ using induction. I am getting stuck midway through the inductive step.   Here is what I have:  $\forall n\geq 2$, where $n\in\mathbb{N}, P(n)$ is the statement "$\sum\limits_{i=2}^{n}\frac{1}{(i-1)i}$ = $\frac{(n-1)}{n}$".  Base case:  $\sum\limits_{i=2}^{2}\frac{1}{(i-1)i}$ = $\frac{1}{2}$ = $\frac{(2-1)}{2}$ so $P(2)$ is true.  Inductive assumption: Assume $P(n)$ is true. Need to show $\sum\limits_{i=2}^{n+1}\frac{1}{(i-1)i}$ = $\frac{((n+1)-1)}{(n+1)}$.  $\sum\limits_{i=2}^{n}\frac{1}{(i-1)i}$ + $\frac{1}{n^{2}}$ = $\frac{(n-1)}{n}$ + $\frac{1}{n^{2}}$  = $\frac{n(n-1) + 1}{n^{2}}$ = $\frac{n^{2}-n+1}{n^{2}}$  I got stuck here and tried working backward from $\frac{((n+1)-1)}{(n+1)}$, which gives me:  $\frac{((n+1)-1)}{(n+1)}$ = $\frac{n}{(n+1)}$   Any suggestions on what to do next or where I may be going wrong? In a document I'm writing, I'm using the familiar  option for my floating tables, and I  them. I'd like to avoid repeating that every time I'm creating a table. I assume it's easy to add something in my preamble that makes sure that these two options are used every time I begin a new table environment?  \documentclass{article} \begin{document} \begin{table}[hbt] \centering \begin{tabular}{*3{l}} 1 &amp; 2 &amp; 3\\ a &amp; b &amp; c\\ \end{tabular} \end{table} \end{document} Prove that a topological space equipped with a delta-complex structure is Hausdorff I can't seem to figure out how to get past this step. Any suggestions?