I have a requirement where I need to create two triggers inside a managed package. So, when the package is installed, the admin has a choice to either use the default objects available in the package or configure 2 different objects for further process. I have to create two triggers that will work on either case (either the admin chooses to go with default objects or admin chooses two of it's own SObjects). I want my trigger to work either way. How can I achieve this?
I have a requirement to create triggers dynamically after a managed package is installed. I have read that the tooling API can be used to create triggers dynamically however it cannot be used in production. Is it possible to create triggers from a managed package in an org? I want to be able to create the trigger based on some user inputs.
Why can charges outside be ignored in Gauss's Law? In MIT's 8.02 course, it is shown in lecture 3 that we can derive Gauss's Law from Coulomb's to get  $ \phi = \oint \vec{E} \cdot \vec{dA} = \frac{Q_{enc}}{\epsilon_{0}} $  However, in the lecture, it was assumed that there were no charges outside the surface. Later, Gauss's Law was used and the charges outside the sphere were ignored.  I've been thinking about it and came across .  The first answer by user levitopher helped a bit. I think that the lecture's argument still holds when there are charges outside because $ \vec{E} $ is added vectorially.  Suppose we have $ Q_{enc} $ in a sphere and $ Q_{out} $ outside the sphere. Then,  By definition, $ \phi = \oint (\vec{E_{Q_{enc}}} + \vec{E_{Q_{out}}}) \cdot \vec{dA} $ $ = \oint \vec{E_{Q_{enc}}} \cdot \vec{dA} + \oint \vec{E_{Q_{out}}} \cdot \vec{dA}$ $ = \oint \vec{E_{Q_{enc}}} \cdot \vec{dA} + 0 $ $ = \frac{Q_{enc}}{\epsilon_{0}} $  This assumes that $ \oint \vec{E_{Q_{out}}} \cdot \vec{dA} = 0 $ because any field lines that go in must come out (hand wavy but I'm just going to accept it for now).  I'd just like to know if this argument is sound. The  contains a link to the new code of conduct,  . As of 2018-08-07T05:27:38+00, . Also, I cannot find any other link to the conduct yet, neither in the help center, nor in the site navigation, which is a bummer, given that we're invited to read the new CoC:     Really, please, take a moment to read the new Code of Conduct now. It’s not long, it’s not wordy-and-legalese-y and in our long held tradition, we feel that it does a good job of assuming that the vast majority of folks that use our sites always have the best intentions at heart.    Is the code of conduct not yet published?  Edit: As mentioned in the comments,  announces the conduct and links to , so maybe it's not public yet? Analogue of spherical coordinates in $n$-dimensions What's the analogue to spherical coordinates in $n$-dimensions? For example, for $n=2$ the analogue are polar coordinates $r,\theta$, which are related to the Cartesian coordinates $x_1,x_2$ by  $$x_1=r \cos  \theta$$ $$x_2=r \sin  \theta$$  For $n=3$, the analogue would be the ordinary spherical coordinates $r,\theta ,\varphi$, related to the Cartesian coordinates $x_1,x_2,x_3$ by  $$x_1=r \sin  \theta  \cos  \varphi$$ $$x_2=r \sin  \theta  \sin  \varphi$$ $$x_3=r \cos  \theta$$  So these are my questions: Is there an analogue, or several, to spherical coordinates in $n$-dimensions for $n&gt;3$? If there are such analogues, what are they and how are they related to the Cartesian coordinates? Thanks. Equivalence Relation problem I was just thinking that maybe if we have more Stack&nbsp;Exchange websites then each person would be a member of more different sites on average. Since the time a person can spend online on average is limited it means he will be spending less time on each website. But would this affect the quality of these websites? I'm not talking only about the quality answers given but also the number of answers given, the promptness. Won't these things go down?  I think that the rate of questions won't go down much because you need to know what you need to know. However, the average time a person spends browsing through these websites (and chances upon a question he can answer) would decrease. So are we creating too many different Stack&nbsp;Exchange sites? In many C/C++ macros I'm seeing the code of the macro wrapped in what seems like a meaningless do while loop.  Here are examples.  #define FOO(X) do { f(X); g(X); } while (0) #define FOO(X) if (1) { f(X); g(X); } else   I can't see what the do while is doing.  Why not just write this without it?  #define FOO(X) f(X); g(X) I'm trying to create a join/relate in QGIS where I have a shapefile of buildings and to that I would like to join a non-spatial table (.csv-file) containing people who work in each building. So I have multiple records in my table that I would like to be able to join to my single features in my shapefile. I can only run a join in QGIS where the first record is joined to the shapefile feature (ie building) but subsequent records get removed. Could someone let me know how to complete this join/relate in QGIS? If $f$ is continuous, nonnegative on $[a, b]$, show that $\int_{a}^{b} f(x) dx = 0$ iff $f(x) = 0$  "$\Rightarrow$" Assume by contradiction that $f(x) \neq 0$ for some $x_0 \in [a, b]$. Without loss of generality, assume that $f(x_0) &gt; 0$. Since $f$ is continuous, $\exists \delta &gt; 0$ such that $f(x) &gt; 0,  \forall x \in (x_0 - \delta, x_0 + \delta)$. Since $f$ is continuous on $[a, b]$, then it is Riemann integrable. Therefore $\int_{a}^{b} f(x) dx = \sup L(f, p)$ for some partition $p$. Now what I want to do is to show that the lower sum, $L(f, p) &gt; 0$, in that case its supremum is $&gt;0$, and that contradicts the condition that $\int_{a}^{b} f(x) dx = 0$. However, I don't know how to articulate it.  "$\Leftarrow$" If $f(x) = 0, \forall x \in [a, b]$, then $\int_{a}^{b} f(x) dx = \int_{a}^{b} 0 dx = 0$ Images as Planes in Eevee having weird transparency Do adjustable length lightsabers exist in Star Wars universe? I always see blades of lightsabers have more or less the same length (dual blades are double). Why is that?  Can't a longer or shorter length be advantage in some case?    I am NOT expecting infinite length lightsabers (due to energy issues), but have we seen adjustable length blades in the Canon? SQL IN Clause 1000 item limit Kernel of injective group homomorphism If $\phi$ is a homomorphism from the group $G$ with identity $e$ to the group $G'$ with identity $e'$, then $\phi$ is injective if and only if $\ker\phi=$?  I think the $Ker\phi = \{x\in G:\phi(x)=1\}$  because you are looking at an identity then it is all reals $0$ does not work a because if $x=0, e'x=0$  but then i realize it is injective how does that affect the kernel? Can you negate the Frightened condition by not looking at the source of your fear? As the title says, if you cause a creature to be Frightened of you, as in the Frightened condition, but they can somehow manage to not see you, do they stop rolling with disadvantage to attacks/ability checks?  Below are scenarios to illustrate my question.  Scenarios:   If a creature is frightened of you, and they turn their back against you to hit someone else, would they no longer have disadvantage to attack rolls/ability checks? If a creature is frightened of you and they have Blindsight, can they close their eyes to stop seeing you, and hence stop rolling with disadvantage? If a creature has 60 ft of movement and is frightened of you, and there is a corner they can reach in 15 ft that will block you from sight, can they run to that corner to stop being frightened, then run back to attack without disadvantage? Assume they would not provoke OA to do this, although the OA is immaterial to the question. Creating an arbitrary state of the quantum simple harmonic oscillator For $f$ Riemann integrable prove $\lim_{n\to\infty} \int_0^1x^nf(x)dx=0.$ Suppose $f$ is a Riemann integrable function on $[0,1]$. Prove that $\lim_{n\to\infty} \int_0^1x^nf(x)dx=0.$   This is what I am thinking: Fix $n$. Then by Jensen's Inequality we have $$0\leq\left(\int_0^1x^nf(x)dx\right)^2 \leq \left(\int_0^1x^{2n}dx\right)\left(\int_0^1f^2(x)dx\right)=\left(\frac{1}{2n+1}\right)\left(\int_0^1f^2(x)dx\right).$$Thus, if $n\to\infty$ then $$0\leq \lim_{n\to \infty}\left(\int_0^1x^nf(x)dx\right)^2 \leq 0$$ and hence we get what we want. How correct (or incorrect) is this? One may not always know the Type of an object at compile-time, but may need to create an instance of the Type.    How do you get a new object instance from a Type? If so, what? If not, why not?  For a sample on the line, the median minimizes the total absolute deviation. It would seem natural to extend the definition to R2, etc., but I've never seen it. But then, I've been out in left field for a long time. Show that G is a group, if G is finite, the operation is associative, and cancellation law holds Previously, someone posted his/her proof of "every neighborhood is open" . I am focusing on the same statement, but it seems that my approach is different from his/hers. Could someone comment on my own proof? Here we go:  Let $X$ be a metric space and $p\in X$. Fix $r&gt;0$. Define a neighborhood around $p$ as $N_r (p)=\{q\in X| d(p, q)&lt;r\}$. Now, take $w = \frac{r}{2}$. Then, $N_w (p)\subset N_r(p)$. In other words, every point of $N_r(p)$ is interior. Therefore, $N_r (p)$ is open. Since $r$ is arbitrary, this proves every neighborhood is open.  Update:  Under my definition of "neighborhood," can I prove in this way instead: For all $m\in N_r(p)$, take $w=\frac{r−d(m,p)}{2}$. Then, $N_w(m)\subset N_r(p)$.   Update2  From the hints given in comments, I solve it:  Assume $m\in N_r(p)$ and $q\in N_w(m)$. Take $w=r-d(m, p)$. Then, $d(p, q)\leq d(p, m) + d(m, q)&lt; d(p, m) + r-d(m,p) =r$.   Thanks to @JoséCarlosSantos and @fleablood ! How do I install drivers for the Atheros AR8161 Ethernet controller?