I have been trying to get this trigger to work and it has been impossible... ugh... maybe you guys can help me.  I have created the following trigge with the help of some freinds under "Opporunity Products" triggers. The issue is that the second product is not being added automatically to the opportunity once the first product is added manually. I don't understand why it is not working. Can you guys help me please?  trigger Attempt1 on OpportunityLineItem (after insert) {     List&lt;OpportunityLineItem&gt; OpportunityLineItems = new List&lt;OpportunityLineItem&gt;();  for(OpportunityLineItem item: [    SELECT OpportunityId, Name     FROM OpportunityLineItem    WHERE Id = :Trigger.new AND Name = 'Car_Filter_Plus']) {         OpportunityLineItems.add(new OpportunityLineItem(             OpportunityId = item.OpportunityId,              PricebookEntryId ='01eE000000QopleIAD',             Quantity = 1,             UnitPrice = 25)         ); } }
I was trying to accomplish this through a trigger, but its not really working. Is there a way to get this done through Process Builder? If so, what is that process?  I'm trying to have ProductB being added to the opportunity automatically once ProductA is manually added to the opportunity.  Also, is there a way to have the $ amount of ProductB being 0.5% of ProductA?  Trigger that I have so far:  trigger Attempt1 on OpportunityLineItem (after insert) { List&lt;OpportunityLineItem&gt; oliList = new List&lt;OpportunityLineItem&gt;();  for( OpportunityLineItem item: [SELECT  OpportunityId,                                          Name                                  FROM    OpportunityLineItem                                 WHERE   Id = :Trigger.new AND                                          Name = 'NAME OF PRODUCTA'])  {   oliList.add(new OpportunityLineItem(     OpportunityId = item.OpportunityId,      PricebookEntryId ='01uA000000QPDldEAt',     Quantity = 1,     UnitPrice = 25)   );  }  Insert oliList; }
RegEx for Javascript to allow only alphanumeric I need to find a reg ex that only allows alphanumeric. So far, everyone I try only works if the string is alphanumeric, meaning contains both a letter and a number. I just want one what would allow either and not require both. Creating random numbers with no duplicates How to create an interactive bash script to collect arguments for a command in linux? I'm trying to create an interactive bash script where I can collect user input variables to be used as arguments in another command. Can someone provide me an example of this?  Currently i want to do:   what type of content you want to delete? what is the status?   then feed it into a mysql delete query command. Why does the find command blow up in /run/? I used the following command to check python versions as given by . It does work except for one error, shown below. Can any one explain why?  $ sudo find / -type f -executable -iname 'python*' -exec file -i '{}' \; \     | awk -F: '/x-executable; charset=binary/ {print $1}' \     | xargs readlink -f | sort -u | xargs -I % sh -c 'echo -n "%: "; % -V'   Error:  find: ‘/run/user/1000/gvfs’: Permission denied Omitting "is", like in "I think it strange" What is the grammar behind the construction "I think it strange/necessary that ...", and when can and cannot this apparent omission of the copula be used? Do we always need the "that" clause?  Also, this seems to be only allowed when the object is a pronoun (it in the above example). That is, we don't say "I think this method strange", correct? Galois Group of $\sqrt{2+\sqrt{2}}$ over $\mathbb{Q}$ So I want to show that $\mathbb{Q}(\sqrt{2+\sqrt{2}})$ is Galois over $\mathbb{Q}$ and determine its Galois group.   My thoughts are as follows:  Define $\alpha := \sqrt{2+\sqrt{2}}$. Then it is easily shown that $\alpha$ satisfies $\alpha^4-4\alpha^2+2=0$.  Define $f(x) := x^4-4x^2+2$. Then $f$ is irreducible over $\mathbb{Q}$ by Eisenstein with $p=2$.  So we have that $f$ is the irreducible polynomial for $\alpha$ over $\mathbb{Q}$.   Further $|\mathbb{Q}(\alpha):\mathbb{Q}|=4$.  For $\mathbb{Q}({\alpha})$ to be Galois, it must contain all roots of $f$.   Define $K=\mathbb{Q}(\alpha)$ for convenience.  Define $\alpha := \alpha_1$.  Since $f$ has only even powers, we know that $-\alpha := \alpha_2$ is a root, and therefore contained in $K$ since $K$ is a field.  We note that the other two roots are $\alpha_3=\sqrt{2-\sqrt{2}}$ and $\alpha_4=-\sqrt{2-\sqrt{2}}$.  So in order to show $K$ is Galois, it must be shown that $\alpha_3$ and $\alpha_4$ lie in $K$.  Now $\alpha_1^2=2+\sqrt2$ and so $\sqrt2 \in K$. Thus $-\sqrt2 \in K$ since $K$ is a field.  Can somebody explain why $\alpha_3$ and $\alpha_4$ lie in $K$?  Next we are to determine the Galois group of $K$.  Assuming $K$ is Galois, since it has degree $4$ over $\mathbb{Q}$ (shown earlier), we know that its Galois group has size $4$. There are only two groups of size $4$, namely $V_4$ and $C_4$, the Klein four group and the cyclic group of order $4$.  How do we determine which of these choice is in fact the Galois Group? Sometimes (old) comments break the parser, so it would be nice to view their code to check what was (actually) supposed to be there. Is there any way to view a comment's source just like the source link in a post's revision?  edit Another application for this would be the ability to better quote comments in an answer without having to re-markdown them. How to get the keyboard to input Japanese? Difference between Space Opera and Science Fiction? A while back a guy came into the place where I was working. He had a book (I don't remember the name). The book was, according to him, scifi. I told him, "Great! My favorite scifi is the Skylark Series by EE Doc Smith!" He sort of tsked this, saying, "Oh, that's only space opera." I really didn't know what to think of what he said. The funny thing was, I remembering looking at his book thinking, what makes his book scifi any more than mine.  I started thinking about this incident the other day and am once again curious:  What is the difference between space opera and science fiction? What identifies each genre specifically?    NOTE: I had originally asked this on meta due to the closed question:  which is very similar to my question. It was subsequently moved to the main site. What is the purpose of  in Python — especially with respect to when I would want to use it, and when not? app engine datastore auto-clears every time project runs How can I make schematic of this board? I want to make a schematic of this board. Can anyone tell me how? What are point objects? If $S_n$ has cyclic subgroups of these orders or not? This question was asked in my quiz and I am having difficulties in solving it .  Question : For a positive integer $n$ , let $S_n$ denote permutation group on $n$ symbols. Choose correct statements from below. (a) For a positive integer $n$ and for every $m$ with $1\leq m \leq n , S_n $ has a cyclic subgroup of order $m$; (b) For every positive integer $n$ and for every $m$ with $n&lt;m &lt;n!$, $S_n$ has a cyclic subgroup of order $m$; (c) There exists positive integers $n$ and $m$ with $n&lt;m&lt;n!$ such that $S_n$ has a cyclic subgroup of order $m$; (d) For every positive integer $n$ and for every group $G$ of order $n$, $G$ is isomorphic to a subgroup of order $S_n$ .  Attempt: (a) is true as I can choose an element of length $m$ which will generate cyclic subgroup of order $m$. (b) Choose $n=4$ and $m=19$ to contradict (b). (c) I dont know if there can be found any such case and if yes how to do so . (d) I dont know about it . kindly tell. Answer:   A,C,D are true How do you create a dropdownlist from an enum in ASP.NET MVC? Can I bind a (large) block of addresses to an interface? I know that the ip tool lets you bind multiple addresses to an interface (eg, ). Right now, though, I'm trying to build something on top of IPv6, and it would be really useful to have an entire block of addresses (say, a /64) available, so that programs could pick any address from the range and bind to that. Needless to say, attaching every IP from this range to an interface would take a while.  Does Linux support binding a whole block of addresses to an interface? I have an iPhone 6 128 GB which is not jailbroken. The current version of iOS on the phone is 8.1.3 and yesterday I wanted to update to iOS 8.2.  The download went through without any problem but while installing, it gave the error:     Unable to Install Update   An error occurred installing iOS 8.2   Tried installing after switching Off and ON and also tried Hard Reset (Holding Home button and On/off switch).  Same error displays every time.  Also the Touch ID has stopped working and I find that the Settings - Touch ID &amp; Passcode - iPhone Unlock is OFF.  When I try to switch it ON, the system displays the error     Failed   Unable to complete Touch ID setup. Please go back and try again.   Is anyone facing this problem?  I live in India. Java reading a file into an ArrayList? What is bracketing? I have seen this term a lot and I was wondering what, in basic terms, what bracketing/autobracketing is.  Also, why would one want to 'bracket'?  P.S. - there are other questions asking what DoF and WB bracketing is but none asking quite the same as this. I can intuitively understand that there are infinitely many irreducible polynomials in $\Bbb{F}_p[X]$, where $p$ is a prime number, but I'm having a hard time actually proving it. What proof strategy should I take for this?