I have a class marked 'With Sharing' and a simple method to get all org wide emails to populate in a picklist on my page:  public String getOrgEmails(){     List&lt;OrgWideEmailAddress&gt; orgWideEmails = new List&lt;OrgWideEmailAddress&gt;();      orgWideEmails = [SELECT Id, Address, DisplayName FROM OrgWideEmailAddress LIMIT 50000];      return JSON.serialize(orgWideEmails); }   I had thought that when users set up org wide emails, and specified profiles who could access them, the query would only return org wide emails a user was profiled to have access to.   This is not the case. The query just returns all org wide emails. But, the org wide email address object is very limited and doesn't tell you what profiles have access to it.   Is there any way to actually limit the org wide emails returned by if the executing user has access to it based on profile permissions on the org wide email.   Salesforce is obviously capable of doing this check, which is why they let you set that up. But I cannot see how we are able to do this check in apex.
I'd like to create a popup list on one of my Visualforce pages, for a user to select from a list of OrgWideEmailAddress records.  My goal is to limit the list to only those records that they're allowed to use.  I'm going to save the selection for use in later automatic emails.  Based on what I've read, I won't be able to send emails to certain OrgWideEmailAddresses:   The address hasn't been verified yet.  I don't see any fields in the schema that appear to show verification state. The address is only available to profiles that the user isn't a member of.  I don't see where the profile list is stored for each record.   Some of my problem could just be due to not understanding the standard objects so well, and perhaps there's a way to get at this through UserInfo, or by making my query on the User object which may have a child relationship to OrgWideEmailAddress since it's listed in the schema viewer of the Force.com IDE.  Here's the test code I'm working with:  for (OrgWideEmailAddress addr : [SELECT DisplayName, Address          FROM OrgWideEmailAddress ORDER BY DisplayName]) {     System.debug( addr.DisplayName + ' &lt;' + addr.Address + '&gt;'); }   I tried creating a new Messaging.SingleEmailMessage and then calling setOrgWideEmailAddressId() on it with each OrgWideEmailAddress Id, in hopes that invalid Ids would throw an exception, but to no avail.  My goal is to modify the test code to provide just the subset of records that the current user will be able to use.
Proving a relation between inradius ,circumradius and exradii in a triangle Prove that in a triangle $$r^2+r_1^2+r_2^2+r_3^2=16R^2-(a^2+b^2+c^2)$$ where the symbols have their usual meanings. I am looking for a smaller or elegant proof using trigonometry. A geometric proof would be super cool. I did prove it but it took me ages to do the calculation. Thanks. Supremum of a Continuous Function is Continuous Can Debian identify rarely used packages? I'd like to find a tool that could tell me which Debian packages on my system have been rarely or never used, perhaps by looking at file lists and access times.  This is to find candidates for deletion from my nearly full hard drive.  I'm not very well informed about the rich ecosystem of desktop GUI tools (I use aptitude); does anyone know if one of those tools, or any other tool, can identify how recently a package has been used? Tangent lines to ellipse from external point Children's bike problem with back wheel My daughter has sparkle and glitz 12 inch bike with stabilizers (training wheels). Since we purchased the bike every now and again the back wheel keeps spinning when she is pedaling. This seems to happen more when there is a bit of an incline.  Any suggestions what problem could be? How to boot from iso with Grub2/Burg boot loader I'm using Ubuntu as my primary OS and alternative is Windows 7 for gaming, and another stuffs. I want to have menu to boot some live CD ISO. Is there anyway to make menu entry in Grub2/Burg to boot ISO file like the CD way?  I see there are some ways to make it possible but almost method need specified boot arguments (kernel parameters). But I have mixed kind of Live OS wan to boot up using boot loader included: Linux, Unix, DOS (for recovery purpose)...   I'm looking for more generic way to make it easy to discover and add to the menu config file. Let $P$ denote the quotient space obtained by the action of $\mathbb{Z}\backslash2\mathbb{Z}$ by the antipodal map $z\mapsto\frac{1}{z}$ on the riemann sphere $\hat{\mathbb{C}}$ (identified here with $\mathbb{C}\cup\left\{\infty\right\}$). I identify $P$ with the set:  $\left\{ z\in\mathbb{C}:\left|z\right|&lt;1\right\} \cup\left\{ e^{it}:0\leq t\leq\pi\right\} $   that is to say, I use elements of the above set as the representatives for the equivalence classes in $P$. I am looking for formula for a function $f:P\times P\rightarrow[0,\infty)$ such that $f$ is a metric on $P$. Specifically, I would like a formula for $f$ that I can evaluate by plugging in representative elements in the above set (or something like that, more or less).  Thanks in advance.  Edit: forgive me for sounding desperate, but I cannot make due with an explanation of how to obtain such a formula. I want the formula.   An analogy for you if I have yet to make myself clear: suppose I was asking for the area of a square with side length $s$. The answers I have received so far for my question are akin to saying "multiply $s$ by itself" or "use the area formula for a square". The answer I am looking for is akin to saying "$s^{2}$". I need the formula. And please, no expressions with differentials, nor matrices, or any of that. I need to know how to compute the metric by using the complex numbers in the indicated set that I have identified with $P$. How does electricity propagate in a conductor? Motivated by , can one prove that the order of an element in a finite group divides the order of the group without using Lagrange's theorem? (Or, equivalently, that the order of the group is an exponent for every element in the group?)  The simplest proof I can think of uses the coset proof of Lagrange's theorem in disguise and goes like this: take $a \in G$ and consider the map $f\colon G \to G$ given by $f(x)=ax$. Consider now the orbits of $f$, that is, the sets $\mathcal{O}(x)=\{ x, f(x), f(f(x)), \dots \}$. Now all orbits have the same number of elements and $|\mathcal{O}(e)| = o(a)$. Hence $o(a)$ divides $|G|$.  This proof has perhaps some pedagogical value in introductory courses because it can be generalized in a natural way to non-cyclic subgroups by introducing cosets, leading to the canonical proof of Lagrange's theorem.   Has anyone seen a different approach to this result that avoids using Lagrange's theorem? Or is Lagrange's theorem really the most basic result in finite group theory? How to enable virtualization on booting? (Ubuntu 13.10) Given that there is no logically default animal from the list of animals below, what should be the "Default Value" below, according to best practice?  &lt;label for="animal"&gt;Animal (required):&lt;/label&gt; &lt;select name="animal"&gt;   &lt;option value=""&gt;Default Value&lt;/option&gt;   &lt;option value="0"&gt;Cat&lt;/option&gt;   &lt;option value="1"&gt;Dog&lt;/option&gt;   &lt;option value="2"&gt;Horse&lt;/option&gt;   &lt;option value="3"&gt;Pig&lt;/option&gt;   &lt;option value="4"&gt;Sheep&lt;/option&gt; &lt;/select&gt;   A blank value, &lt;option value=""&gt;&lt;/option&gt;?  Something visually irritating, &lt;option value=""&gt;***CHOOSE ANIMAL***&lt;/option&gt;?  Something which blends in but provides instruction, &lt;option value=""&gt;Select an Animal&lt;/option&gt;?  Something else entirely? What is the best introductory Bayesian statistics textbook? Which is the best introductory textbook for Bayesian statistics?  One book per answer, please. Pagination returns 404 after page 20 I got a paged loop that pulls in 4 posts per page from custom post type. It works great, with the only downside that the pagination wont go over the page/20 everything after that is 404, and the posts_nav_link won't show the next arrow at all. Like the pages just aren't there.  In total there are 119 published posts in the custom post type. If I change posts_per_page to, say 6, then I get access to more of the posts from the end, but it also stops at the page/20.  On the production site the pagination stops at 21, I guess because the live database has more entries.  I got the "Blog pages show at most" setting set to 6.  Here's the loop I'm using:  &lt;?php $paged = get_query_var('paged') ? get_query_var('paged') : 1; $args  = array(     'posts_per_page' =&gt; 4,     'orderby'        =&gt; 'modified',     'post_type'      =&gt; "projekte",     'paged'          =&gt; $paged ); $custom_query = new WP_Query($args); $c = 0; while($custom_query-&gt;have_posts()) :     $custom_query-&gt;the_post();     ?&gt;     &lt;article&gt;...&lt;/article&gt;     &lt;?php endwhile; wp_reset_postdata(); // reset the query ?&gt;   I've gone through the functions.php a million times looking for a some limiting get_pre_posts filter but there's nothing I can see.  I also got an error log setup and nothing is returned there, I've tested it that it works.  Any suggestions? I've always enjoyed solving problems in the complex numbers during my undergrad. However, I've always wondered where are they used and for what? In my domain (computer science) I've rarely seen it be used/applied and hence am curious.  So what practical applications of complex numbers exist and what are the ways in which complex  transformation helps address the problem that wasn't immediately addressable?  Way back in undergrad when I asked my professor this he mentioned that "the folks in mechanical and aerospace engineering use it a lot" but for what? (Don't other domains use it too?). I'm well aware of its use in Fourier analysis but that's the farthest I got to a 'real world application'. I'm sure that's not it.  PS: I'm not looking for the ability to make one problem easier to solve, but a bigger picture where the result of the complex analysis is used for something meaningful in the real world. A naive analogy is deciding the height of tower based on trigonometry. That's going from paper to the real world. Similarly, what is it that is analyzed in the complex world and the result is used in the real world without imaginaries clouding the problem?  The question:  is nice but covers a more mathematical perspective on interim results that make solving a problem easier. It covers different ground IMHO. How to add System.Windows.Interactivity to project? First chapter appearing before first line in table of contents I noticed something strange recently when trying to use rounded corners in pgfplots: it totally ruins the plot. See below without rounded corners:    and then with rounded corners:    Here is a minimal example:  \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest}  \begin{document}  \begin{tikzpicture}[scale=0.8,trim axis left, trim axis right] \tikzset{every mark/.append style={scale=0.6}} \pgfplotsset{legend style={font=\footnotesize}}  \begin{axis}[   grid=both,             rounded corners,             ]     \addplot[samples=100,color=blue,very thick,smooth,domain=-10:10] {cos(x^(3))}; \end{axis} \end{tikzpicture}  \end{document}   Thanks in advance for your ideas ! How do the bonus perks from the Advanced Warfare Center work? I need a number of different full-page DOM samples for my qUnit test suite Is it required for panel data to use dummy variables? I am doing research considering seven countries and I have panel data. My question is: do I need to include dummy variables every time I use panel data in regression, or is enough to do it as a fixed effect in Stata, without dummy variables?