I have 2 objects Case &amp; Level agreement ( Don't have any relationship between both objects) I want to compare Task Category value for both objects ...When I write below query on Apex class getting the error:     An Apex error occurred: System.QueryException: List has more than 1   row for assignment to SObject   Queries in Apex class:  Case c = [select id,Task_Category__c,CaseNumber from Case where id IN:CaseId];  Level_Agreement__c sla = [select id,Task_Category__c,Process_Approver_email__c from Level_Agreement__c where Task_Category__c =:c.Task_Category__c];     pls, let me know is there anything missing from my side... Thanks Ram
I am trying to write a VF page to list all the id and name columns from a custom object but found an error "List has more than 1 row" in the VF page.  Can anyone tell me what have I done wrong?  VF Page:  &lt;apex:page Controller="MP_controller" showHeader="false" sidebar="false"&gt;   &lt;apex:pageBlock&gt;      &lt;apex:pageBlockTable value="{! mp}" var="item"&gt;         &lt;apex:column value="{! item.id}"/&gt;         &lt;apex:column value="{! item.name}"/&gt;       &lt;/apex:pageBlockTable&gt;   &lt;/apex:pageBlock&gt; &lt;/apex:page&gt;   Apex controller  global with sharing class MP_controller {     public Merchant_Profile__c mp{get;set;}     public MP_controller(){         mp = [SELECT                  ID, name, Profile_account_name__c, Merchant_ID__c, Bank_Code__c, Country_Code__c,                 Currency_Code__c, Merchant_Level__c, Merchant_Type__c, MSO__c, Region__c,                 Retail_Products__c, Transaction_Mode__c, Created_Date__c, Date_Disabled__c, Date_Live__c,                 Merchant_Category_Code__c                FROM Merchant_Profile__c               WHERE Profile_Account_Name__c = '001O000000bQFnyIAG'];     } }
PS1='$(pwd)' why this works and why is this different from PS1=$(pwd) Why when I enter this command the prompt changes to my directory?  PS1='$(pwd)'   I am using single quotes, which means no interpolation , a.k.a echo '$(pwd)' ——→ $(pwd)  Furthermore, say that we clarified why this works... why is it functioning differently from PS1=$(pwd) ? (no quotes at all)  By different I mean that if I use the quotes then the prompt will keep changing to my current directory as I navigate through the terminal. But if I don't use quotes, then the prompt will always remain the directory that I was in when I first entered the command PS1=$(pwd)  why? Pacman option to assume "yes" to every question? When installing software in debian systems we can put something like this:   sudo apt-get install -y chromium-browser  that way the installation occurs automatically, whitout asking to confirm installation [Y/n]. Can i do the same with pacman? How do I manage how many revisions snapd keeps of an application? Is there a formula for $(1+i)^n+(1-i)^n$? I'm wondering if there is a formula for the value of $(1+i)^n+(1-i)^n$?  I calculated the first terms starting with $n=1$ to be, in order, $2$, $0$, $-4$, $-8$, $-8$, $0$, $16$, $\dots$  So it seems to be some sequence of positive and negative powers of $2$ with $0$s thrown in. Is there a more explicit formulation of what $(1+i)^n+(1-i)^n$ is, based on $n$?   With the binomial theorem, I get it equal to $$ \sum_{k=0}^n\binom{n}{k}i^{n-k}(1+(-1)^{n-k}). $$ Can this be made nicer? Thanks. When should you push variables in quotes in boolean conditions? Are the following two boolean expressions the same?  if [ -n $1 ] ; then  if [ -n "$1" ] ; then   If not - When should you put a variable in quotes? Getting coordinates by clicking on QGIS Canvas with PyQGIS? How do I boot from ISO file stored on hard disk? Examples  I've recently found examples of using pairs of enclosing braces {}, with nothing in between the opening and closing braces, as arguments to commands and even to their options:  cat foo | xargs -I{} echo {}  find . -size 0 -exec rm -i {} \;  No Documentation  My problem is that I cannot find a documentation in the  that describes the usage of {} in such context as in the examples above.  I do not think it is a , because a dollar sign must precede the enclosing braces in a parameter expansion as in ${}.  It cannot be a  either, because it takes the form of {x..y[..incr]}, where x and y are not optional.  It also cannot be a  either, because {} is used as arguments.  Questions   What does a pair of enclosing braces {} even mean, in general, as an argument to any command that accepts it? Where can I find a documentation that describes the usage of {} as arguments? Let $f(z)=\sum_{n=0}^{\infty}a_nz^n$ be a holomophic function in the unit disc. Show that if $$\sum_{n=2}^{\infty} n\vert a_n \vert &lt;\vert a_1\vert$$ and $a_1\not = 0$, then $f$ is injective.   I am able to show that $f'$ never vanishes by showing that $\vert f'-a_1\vert &lt;\vert a_1\vert$, but that doesn't imply that $f$ is injective. For example, $e^z$ is not inejective but its derivative never vanishes. What is required to prove that $f$ is injective? How do you show $f$ is injective on any set? Let $R$ be a ring such that $x^4=x$ for every $x\in R$. Is this ring commutative? Is Dragonstone unoccupied after Stannis Baratheon's defeat? Is anything known about Dragonstone after:      Stannis Baratheon is killed in his bid for the Iron Throne?   As the seat of the naval defense of King's Landing and the birthplace of Daenerys Targaryen, she has a vested interest in taking it.   At the conclusion of Season 6 Episode 10, is Dragonstone unoccupied? Why is there a clear mirror image off a rough surface at shallow angles? The mirrors we use everyday have a highly reflective smooth surface, so that we can see a clear image.  But I found the same happens on a rough (not so smooth) surface, though only at shallow angles.  For example    this is the logo of physics stackexchange, reflected from the back of an ipad.  Considering that aluminum may contributed to reflection, I tried a different material:    this time a piece of printer paper.  Though not as clear, there is still some visible pattern resembling the logo.  The same effect can be observed on highways, where distant vehicles have a mirror image off the road; I do not have a picture at hand however.  So, why is this happening, and why only on shallow angles? When you watch a video in YouTube, you can seek it with the thumbnail preview. Many Windows' and MacOS' video players have this feature, but what about Linux's? I've already read , but the information in it seems out-of-date.  is still alive but the project is neglected (see ), and actually the player doesn't work on the latest Ubuntu or Linux Mint.  Is there any video player which has the feature and works on the latest linux distributions? Or must I use Windows' one with VirtualBox? If only VLC would implement this feature, but it seems that won't happen as far as I read .  YouTube's seek preview: How do I run 32-bit programs on a 64-bit Debian/Ubuntu? I have a 64-bit (amd64 a.k.a. x86_64) Debian or Ubuntu installation. I need to run 32-bit (i386/i686) programs occasionally, or to compile programs for a 32-bit system. How can I do this with a minimum of fuss?  Bonus: what if I want to run or test with an older or newer release of the distribution? How do I easily rename multiple files using command line? One of the ways I quickly rename files in Windows is   F2 &gt; Rename &gt; Tab (to next file) &gt; Rename ...   But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must be a command line alternative.  However, sometimes, I may want more control over how to rename specific files. In that case, perhaps its better to be able to tab to the next file Loading a .X model in DirectX 9 Is there a dollar amount that, when adding Massachusetts Sales Tax, precisely equals $200? Ubuntu 14.04 System Logging TeXLive Pretest 2018: beamer and subfig collide \documentclass{beamer}  \usepackage{subfig}  \begin{document}  test  \end{document}   returns undefined control sequence \@@magyar@captionfix  (It was not so in January; I am on fully updated pretest) Difference between $(this) and event.target?