I have the following problem in a test class.  Constructor not defined: [Soma_Dependentes_Update].&lt;Constructor&gt;()   Test class of the batch process:  @isTest public class Soma_Dependentes_UpdateTest {     @isTest     public static void testeit() {         Account acc = new Account(Name='Dependentes');         insert acc;          Test.startTest();         Soma_Dependentes_Update batch = new Soma_Dependentes_Update();         Id batchId = Database.executeBatch(batch);         Test.stopTest();     } }   Here's the Batch class:  global class Soma_Dependentes_Update implements Database.Batchable&lt;sObject&gt; {      global final String Query;     global final String Field;     global final Integer Value;      global Soma_Dependentes_Update(String q, String f, Integer v) {          Query = q; Field = f; Value = v;     }       global Database.QueryLocator start(Database.BatchableContext BC) {         return Database.getQueryLocator(query);     }       global void execute(Database.BatchableContext BC, List&lt;Account&gt; scope) {         for(Account acc : scope) {         acc.put(Field, Value);         }            update scope;     }      global void finish(Database.BatchableContext BC) {      } }   I use the following snippet parameters in Execute Anonymous window:  //Parametriza e executa a classe Soma_Dependentes_Update.  String q = 'SELECT SomaDependentes__c FROM Account WHERE Name LIKE \'%Dependentes%\''; String f = 'SomaDependentes__c'; public list&lt;AggregateResult&gt; countDep = new list&lt;AggregateResult&gt;(); countDep = [SELECT sum(Dependentes__c)am FROM Contact WHERE Account.Name LIKE '%Dependentes%']; String str = String.valueOf(countDep[0].get('am')); Integer v = Integer.valueOf(str);  //Executa o Job para atualizaçAo de SomaDependentes__c no objeto Conta. ID jobID = Database.ExecuteBatch(new Soma_Dependentes_Update(q, f, v));   Can anyone help to identify what I'm doing wrong with the code?
I am trying to follow the best practice design patterns for triggers but get the error Constructor not defined: [CaseTriggerHandler].(). What am I missing?  Trigger  trigger CaseTrigger on Case (before insert, before update, before delete, after insert, after update, after delete, after undelete) {      CaseTriggerHandler handler = new CaseTriggerHandler();      //Before Insert     if(Trigger.isInsert &amp;&amp; Trigger.isBefore){         handler.OnBeforeInsert(Trigger.new);     }     //After Insert     else if(Trigger.isInsert &amp;&amp; Trigger.isAfter){         handler.OnAfterInsert(Trigger.new);     }     //Before Update     else if(Trigger.isUpdate &amp;&amp; Trigger.isBefore){         handler.OnBeforeUpdate(Trigger.old, Trigger.new, Trigger.newMap);     }     //After Update     else if(Trigger.isUpdate &amp;&amp; Trigger.isAfter){         handler.OnAfterUpdate(Trigger.old, Trigger.new, Trigger.newMap);     }     //Before Delete     else if(Trigger.isDelete &amp;&amp; Trigger.isBefore){         handler.OnBeforeDelete(Trigger.old, Trigger.oldMap);     }     //After Delete     else if(Trigger.isDelete &amp;&amp; Trigger.isAfter){         handler.OnAfterDelete(Trigger.old, Trigger.oldMap);     }     //After Undelete     else if(Trigger.isUnDelete){         handler.OnUndelete(Trigger.new);     } }   Handler      public with sharing class CaseTriggerHandler {      private boolean isExecuting = false;      public CaseTriggerHandler(boolean isExecuting){         this.isExecuting = isExecuting;     }      public void OnBeforeInsert(List&lt;Case&gt; newCases){         //EXECUTE BEFORE INSERT LOGIC     }      public void OnAfterInsert(List&lt;Case&gt; newCases){         //EXECUTE AFTER INSERT LOGIC     }      public void OnBeforeUpdate(List&lt;Case&gt; oldCases, List&lt;Case&gt; updatedCases, Map&lt;Id, Case&gt; CaseMap){         //BEFORE UPDATE LOGIC     }      public void OnAfterUpdate(List&lt;Case&gt; oldCases, List&lt;Case&gt; updatedCases, Map&lt;Id, Case&gt; CaseMap){         //AFTER UPDATE LOGIC     }      public void OnBeforeDelete(List&lt;Case&gt; CasesToDelete, Map&lt;Id, Case&gt; CaseMap){         //BEFORE DELETE LOGIC     }      public void OnAfterDelete(List&lt;Case&gt; deletedCases, Map&lt;Id, Case&gt; CaseMap){         //AFTER DELETE LOGIC     }      public void OnUndelete(List&lt;Case&gt; restoredCases){         //AFTER UNDELETE LOGIC     }      public boolean IsTriggerContext{         get{ return isExecuting;}     } }
Cross product term in linear regression why is it zero I'm trying to see why this is the case. I have taken  the LHS and added $X\hat{\beta}$ and subtracted $X\hat{\beta}$.  From this I can get both terms on the right but I end up with a cross product term  $2(y-X\hat{\beta})^T(X\hat{\beta} - X\beta)$  that I can't prove equals to zero. I think there is some trick I'm missing, anybody remember it? How do I install Ubuntu to a USB key? (without using Startup Disk Creator) If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly. What insect is this? (India) Can anyone tell me what kind of insect (if it is one) is this...!! Or is it the pupa of some insect?  Well I don't think that the whole big thing is the insect itself, it appears to be just a kind of protection or shelter which moves along with the tiny little thing that keeps on popping out and going it so as to move. Location:  India I told my follower (Serana) to wait. But this is different. I told her to go somewhere and wait so it will activate the enemies. Well it did and I killed them. But Serana seems to be not following me anymore. I can't tell her to follow me. And she is constantly in a squatting position. The only thing I can do is tell her to wait somewhere else to move her. And I can't part ways because I'm doing a main quest and she has to be there. Can anybody give me a tip on what to do? Show sub reasons in close review queue Currently close vote review queue shows the top level close reason in the header, but some close reasons, for instance, off topic have very different sub reasons. For instance, "demonstrate minimal understanding" is different from "This question belongs on a different site in the stack exchange network".  It would be nice if sub close reasons were also shown. Can I use apt-get or aptitude to install software to non standard location? When I install a software using apt-get it installs to default locations i.e to /usr/bin, /usr/lib, /usr/share and etc. For example when I install "Meld Diff Viewer" using  sudo apt-get install meld   and use whereis command to find its location, I get the following output  adnan@adnan-laptop:~$ whereis meld meld: /usr/bin/meld /usr/lib/meld /usr/share/meld /usr/share/man/man1/meld.1.gz   Is there any way to change the install location. Lets say if I want to install it in /usr/local/ can I do it using apt-get or aptitude? I know I can compile it from source and specify prefix option to configure script or make install but it would be better (and really easier) if I could do it using apt-get as I would be able to use uninstall, upgrade and other stuff that apt-get offers How can I make hibernate my desktop in UEFI with Secure boot on.  I used command "sudo pm-hibernate" to make hibernate my desktop but my machine did nothing (my desktop is booted up on UEFI with Secure boot on). But, if I boot my desktop on UEFI with Secure boot off, Hibernation is normal.  Sorry for my English, thanks, I have noticed that some users have taken it upon themselves to create  that allow you to see a user's rank (percentile) among SO developers.  I like this.  I was wondering if the owners of the website are planning something like this in the future?  If so, are you planning on making this by tag?  (I care less about where I rank when compared to developers of a different language).  What I'm looking for is something like this:  C#:      User is ranked #XX (Top XX %) ASP.Net: User is ranked #YY (Top YY %) Please check the below  awk '/SOURCE/ {print $3}' /MAC/Delete_Name.txt |      while IFS= read -r file; do find /OS/ -iname "$file.pdf" ; done    This results in output like this:  /OS/001DAY/11file/cooke.pdf   We want it to only print the file's path, like this:    /OS/001DAY/11file/ Possible to have 2 unity launchers? Allow an edit to notify downvoters: "I think I've fixed the issue now - please check" To me, a downvote usually indicates a problem with an answer. When I downvote it's to mark the answer as having a problem, not the person. If the answer is fixed, I want to remove that downvote - but it's tricky to keep track of all the questions I've looked at over the last few hours.  I don't actually downvote very much, but it's very easy to forget what's going on.  It would be nice to have some way of indicating in an edit that you (the editor/answerer) believe the reason for the downvote has now been resolved, so that the downvoters could come and undo their downvotes or explain why it's still not fixed.  (Note: this isn't about rep-recovery, but quality control. I would feel a lot better about downvoting on "iffy" answers if I felt it was likely that the answer would be fixed and I could undo the vote. Whether or not I'd get back the cost of the downvote is somewhat immaterial.) Given  $$ y_n=\left(1+\frac{1}{n}\right)^{n+1}\hspace{-6mm},\qquad n \in \mathbb{N}, \quad n \geq 1. $$ Show that $\lbrace y_n \rbrace$ is a decreasing sequence. Anyone can help ?  I consider the ratio $\frac{y_{n+1}}{y_n}$ but I got stuck. What harm can be done with a copy of one's passport? Base-b Representation of an Integer: Why can I make the assumption about number of terms in expansions in uniqueness part?   Reading the book of Koshy I have come across the below theorem. It states that I can write any integer $N$ in a base $b\ge2$ representation $N=a_kb^k+...+a_1b+a_0$ such that $0\le a_i&lt;b$, $a_k \neq 0$ for some $k\ge0$.  In the uniqueness part, why can I assume the expansions contains the same number of terms ? I must prove that all expansions of $N$ equal the one in the theorem, but if I add terms to the expansion by zero coefficients, well, then the expansion is not in the proper form anymore ? (the greatest term in the expansion is $0$ if I add zero coefficients) .  Can someone help clear this out ?     Why can I assume the expansions contain the same number of terms ? If I add terms to the expansion, well then I've violated the form of the expansion ? Regular expression to match a line that doesn't contain a word This question dovetails with this post on .  I am familiar with some of larger, paid-for business registry's like  and .  While the detailed information their business listings database include (like # of employees, annual sales, industry code, etc) is fantastic, if you are on a limited budget, sometimes the cost of purchasing the data outweighs the value you can get from it.  If you have geocoding capabilities in house, one could potentially create a reasonable surrogate by spatially-enabling (geocoding) a publicly available business listing on your own.    If you were looking to take on this type of project, where would you start your research? Do you know of US agencies at a State or National level that maintain this type of information, AND are publicly available for download or minimal purchase? Why was Peeves in Hogwarts? Peeves was a poltergeist. It generally irritated people and rather then helping them as well as making fun of them.   Why was Peeves in the school? What is/was the job or work assigned to Peeves? Access to journals for individuals outside of an institution? For all that is said about the wealth of information that is freely available on the internet, the fact is that most of it is incomplete, dumbed down, lacking in context or downright wrong.   Individuals spend the best part of 20 years completely oblivious to the existence of journals and the process of peer review and even then we'd be lucky if 10% of those with access to journals (usually through an institution) actually bother to invest in them.   Granted that some journals will be totally inaccessible to those without a solid background in some particular field but by and large exposure is a good thing and there are many areas of research where individuals will benefit directly from having read these.  Where does this come from?  I decided I wanted to read Popular Politics in the Late Medieval City: York and Bruge in The English Historical Review today, mainly because it looks interesting and I'm hoping to invest more time into learning about British and European History. Incidentally I also wouldn't mind tucking into Super Stable Clocks, Nature 500, 505 (29 August 2013) and a number of data analysis and big data journals in order to advance my career.   Now, not being affiliated with an institution that subscribes to these journals means that I would typically have to pay between £5 ($10) and £15 ($25) per article that I read... I could probably spend £100 just to pass an hour by.  Question   What's being done to address the lockdown on 'higher' education material? I've noticed that the Directory of Open Access Journals publishes open articles and other firms are doing similar, mainly with journals in new fields? How could I, as an individual outside of an institution, gain journal access without it costing so much money? What inspired Tauriel's story arc? I know Tauriel is a Jackson created character, but I wondered if anywhere in the legendarium there was fodder for the story arc between her and Kili.  I do not have access to all my books for the time being and recall stories of love between men and elves in the Silmarillion and Appendices but don't remember any such stories between elves and dwarves and wondered if there was any basis of inspiration for this aspect of their relationship within Tolkien's works.   This movie, of course, departs even further from the original than those made before it, but as a story unto itself, I can still appreciate the ride, so if there is no Tolkien basis, what inspired Jackson, Boyens, and Walsh to create this particular arc?  Is there interview info or anything? How to turn particle emission on/off? Is there a way to animate whether or not a particle emitter is emitting particles at a given point in time?  I'm using the particle system to animate bullets, so basically I'm trying to find a way to say: at frame 150 the gun fires a burst until frame 170, at frame 240 it fires a burst until frame 265, and so on.  I've tried key framing the particle render setting between "object" and "none", but the problem with that is that the hidden particles are still there, so when the render setting switches to "object", the particles that were initially hidden suddenly appear.  I've also thought of putting a plane (not rendered) with a collision modifier in front of the emitter and then moving it when I want the emitter to start emitting particles.  Is there a better way?