When/why did Stack Overflow disallow anonymous questions?
Encouraging users to create an account (and keep it)
C++ single template specialisation with multiple template parameters gwt java.lang.ExceptionInInitializerError Attempt to de-reference a null object: Trigger There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was:      Apex trigger updatequotestatus caused an unexpected exception, contact your administrator: updatequotestatus: execution of AfterInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.updatequotestatus line 5, column 1.   Error Occured at Line:     if((t.what.getsobjecttype() == quote__c.sobjecttype) &amp;&amp; (t.subject.substring(0,5) == 'Email')  trigger updatequotestatus on task (after insert, after update){     Set&lt;Id&gt; quoteIds = new Set&lt;Id&gt;();     List&lt;quote__c&gt; quotes = new List&lt;quote__c&gt;();      for(task t:trigger.new){         if(t.whatId!=null){             if((t.what.getsobjecttype() == quote__c.sobjecttype) &amp;&amp; (t.subject.substring(0,5) == 'Email')){                 quoteIds.add(t.whatId);             }         }     }      for(quote__c q:[select StageName__c from quote__c where Id IN : quoteIds]){         quote__c qt = new quote__c();         qt.Id = q.Id;         qt.StageName__c = 'Proposal Sent';         quotes.add(qt);     }      if(quotes.size()&gt;0){         update quotes;     } } How to change background and maintain realistic effect? I have like 30 different photos to process like this, but I want to know key things to maintain realistic photo by changing it's background, or maybe just modify background so it would be more pleasing to eye.(If you know tutorial related to my problem, please do provide it to me)  Here is the photo:   Here is my step 2:   Here is background:   Here is the result:   As you can see, it isn't any close to realistic feel. I fooled around with levels, but all I got was this and still it doesn't feels right.  First try:   Second try:   Update  Different background: What do the plus and minus signs mean in Objective-C next to a method? bash prompt messed up on arrow up I have made some modification to my prompt with use of colors via tput.  It looks like now when I try to do an arrow up lookup after few moves up, the prompt is being cut into half, what I mean by this is:  From this:  PROD mysuer@server1.domain.com:~$ vim .bashrc   To this:  PROD mysuer@servegit rebase origin/add_pool   ctrl + c brings everything back to normal.  I have found some posts indicating that this may be due to the issue with missing escapes for [ however I don't see an issue here:  My code:  #red for prod, green for lab  COLOUR_RESET=$(tput sgr0) COLOUR_GREEN=$(tput setaf 2) COLOUR_BLUE=$(tput setaf 6) COLOUR_YELLOW=$(tput setaf 3) COLOUR_RED=$(tput setaf 1) BOLD=$(tput bold)  if [[ $HOSTNAME =~ .*\.domain.com$ ]]; then   COLOUR=$COLOUR_RED   PROMPT_TEXT="PROD" fi  if [[ $HOSTNAME =~ .*\.lab$ ]]; then   COLOUR=$COLOUR_BLUE   PROMPT_TEXT="LAB" fi   MYPROMPT="$COLOUR$BOLD$PROMPT_TEXT$COLOUR_RESET \[\u@$COLOUR$BOLD$(hostname -f)$COLOUR_RESET:\w\]\$ "  PS1=$MYPROMPT   UPDATE: @KamilMaciorowski has pointed out a similar question although it was not relating to a tput colors. VBA Hide Rows that contain N/A What is the optimal order of post-processing steps? How to use exclamation marks in Minecraft commands? I know that you can use exclamation marks in Minecraft commands to check for an entity that does not have a specific tag. For example, you can use /kill @e[type=!Player] to kill all entities except for the player. I have, however, encountered two problems with using exclamation marks that I can't find a solution for.  For my first problem, I've set up a series of command blocks to summon shootable fireballs above the player’s head when a certain item is being held;  /scoreboard players add @a Fireball 1 {SelectedItem:{tag:{display:{Name:"Summon Fireball"}}}} /execute @a[score_Fireball_min=1,score_Fireball=1] ~ ~ ~ /summon Fireball ~ ~2.5 ~ {direction:[0.0,0.0,0.0]} /scoreboard players set @a Fireball 0   I used a comparator and a redstone torch so that the last command would activate when the first command would deactivate, that is, when the player is not holding the item.  The problem is, that when I move far away from the setup, the redstone stops working, leaving me unable to summon any new fireballs. Instead, I'm trying to use a command block to check when anything except for item is being held;  /scoreboard players set @a Fireball 0 {SelectedItem:{tag:{display:{Name:!"Summon Fireball"}}}}   I’ve either put it at the wrong place, or you simply can’t use exclamation marks in NBT tags. Could someone tell me where I should put the exclamation mark, or in the latter case, how I can check for anything except for a specific item?  Further, I’ve tried using exclamation marks to set the score of all entities, including the ones with a blank score, but except for the ones with a score of 2 or higher, to 0;  /scoreboard players set @e[score_arrows_min!=2] Arrows 0 /scoreboard players set @a Arrows 1 {SelectedItem:{tag:{display:{Name:"Rain of Arrows"}}}} /scoreboard players set @e[type=Arrow] Arrows 2 {inGround:1b}   The code does change the scores of entities without scores to 0, but it doesn’t exclude the arrows with a score of 2. Could anyone tell me what I’m doing wrong here? How can I tell if sheet a exists in a workbook? I have the following code that's not working as expected:  If Sheets("a") &lt;&gt; "" Then MsgBox ("sheet a exists")   How can I tell if sheet a exists in the workbook? Creating and configuring .bash_profile I was setting path for anaconda. an answer to a question  has the following solution. I searched for .bash_profile, but I can't seem to find it. How do I setup this file and get it to run on startup? Don't impose delay loading Close dialog when you haven't just loaded it Book identification about boy who gets computer zapped into head What and with what was Luthor doing in the ship at the end of the movie? After Doomsday was defeated, a spec-ops team sent to the Kryptionian ship in Metropolis found Luthor submerged in water, in front of a... thing, which "held" three metal cubes. The thing looked up, roars, and dissipates into thin air.    What the hell was that all about? I am really confused. What was that creature and what was Luthor doing with it? What's the easiest way to install a missing Perl module? I get this error:  Can't locate Foo.pm in @INC  Is there an easier way to install it than downloading, untarring, making, etc? Change web folders names with uppercase to lowercase or not? I started by Time Series Analysis by Hamilton, but I am lost hopelessly. This book is really too theoretical for me to learn by myself.   Does anybody have a recommendation for a textbook on time series analysis that's suitable for self-study? How to turn off Facebook notifications on Mac OS X? How to turn off Facebook notifications on Mac OS X Mountain Lion? I want to have more than one user logged on at the same time, on the same computer. Each user should have a full X session. It is easy enough to log in to multiple concurrent non-X Linux terminals, but I want the X factor. Maybe I've missed something, but I only see a Main Menu option to Log out of the current user, and nothing for Switch User. Is there a simple way to do this? Last night I was updating my Ubuntu 10.04 to either 11.04 or 12.04 (I'm not entirely sure which one it was, but I think it was 11.04) and I left it overnight to finish. When I came down in the morning, I noticed that the computer hadn't barely begun installing the updates! The update thing said that my computer was on the installation step, but it was still preparing the libc bin (or whatever its called) . It's like the first part of the step installing the upgrades. So, I stupidly restarted the computer, and when it rebooted, I got five options on a purple screen:  Ubuntu, with Linux 3.0.0-28-generic Ubuntu, with Linux 3.0.0-28-generic (recovery mode) Previous Linux versions Memory test (memtest86+) Memory test (memtest86+, serial console 115200)   Long story short, not matter which way I enter Ubuntu to try and reinstall the updates using the root thing (it's like terminal) after I enter sudo apt-get update it basically said it failed to fetch every url link, and it then says:  W: Some index files have failed to download. They have been ignored, or old ones used instead. W: Not using locking for read only lock file /var/lib/dpkg/lock E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.   So, I entered sudo dpkg --configure -a, and it says:  dpkg: error: unable to access dpkg status area: Read-only file system"   I'm left like wtf, and I really just some guidance here. I just got this laptop, and I can not afford a new one if I broke this one.