I have an existing piece of code that looks for geolocation for existing leads.   for (Lead l : leads) {     System.debug(l.Id);     // Check if Lead was created or Updated for IC_Campaign_Eligible__c in last 24 Hours     List&lt;LeadHistory&gt; leadHistoryValues = IDtolhist.get(l.id);      if (!leadHistoryValues.isEmpty()) {         Double latitude = l.Latitude;         Double longitude = l.Longitude;         l.Status = 'ICReady';         if(l.MG__c == NULL || l.MG__c == ''){             List&lt;Account&gt; accounts = new List&lt;Account&gt;(                 [SELECT Id, Name, DISTANCE(ShippingAddress, GEOLOCATION(:latitude, :longitude), 'mi' ) Dist,                     (SELECT ContactId, Contact.Name, Contact.PCP_Counter__c,                              Contact.Gender__c                        FROM AccountContactRelations                        WHERE Contact.Include_in_IC_Campaign__c = TRUE                        ORDER BY Contact.PCP_Counter__c ASC NULLS FIRST)                     FROM Account                      WHERE ShippingLatitude != null                     ORDER BY DISTANCE(ShippingAddress, GEOLOCATION(:latitude, :longitude ),'mi')]);   This was written by someone else and yes - does contain a loop in a loop but...  We are getting an issue with the AccountContactRelation object reference.  This is the error:     Contact.PCP_Counter__c, Contact.Gender__c FROM AccountContactRelations   WHERE Contact.Include_in_IC_Campaign__c                                                  ^ ERROR at Row:2:Column:145 Didn't understand relationship   'AccountContactRelations' in FROM part of query call. If you are   attempting to use a custom relationship, be sure to append the '__r'   after the custom relationship name. Please reference your WSDL or the   describe call for the appropriate names.   This doesn't make sense. The Object is a standard object; I'm not adding __r in this case. Embedded soql queries work so --- but not in this case...  Can anyone give me a hint as to what may be wrong?  Edit: This is not a duplicate of the other post: This class has been working in production for over a year. It's a scheduled batch class and I was turning on the schedule in full sandbox to test a change in another class but the schedule wouldn't take because of issues in this class (which has not been modified since API V41)
I'm getting the following error message:     System.QueryException: Didn't understand relationship 'AccountContactRelation' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.   Select Email, Id, (Select ContactId, AccountId From AccountContactRelation) From Contact  In AccountContactRelation object there are two lookup fields for Account and for Contact.  Please advise how to avoid such error message?
\overline outside of math mode If I want to draw an overline over some text, not an equation, how can I do it? \overline seems to only work in math mode, and when used outside of math mode, it automatically says "Missing $ inserted". Swapping two variable value without using third variable How do I reset a sequence in Oracle? In , I can do something like this:  ALTER SEQUENCE serial RESTART WITH 0;   Is there an Oracle equivalent? What do you call a person who does/thinks the opposite of the crowd for just that reason? How do I update my graphics drivers? I am using a laptop and ubuntu 11.04. I would like the easiest way possible because I am new to linux.  here is my display information:  *-display              description: VGA compatible controller              product: Core Processor Integrated Graphics Controller              vendor: Intel Corporation              physical id: 2              bus info: pci@0000:00:02.0              version: 18              width: 64 bits              clock: 33MHz              capabilities: msi pm vga_controller bus_master cap_list rom              configuration: driver=i915 latency=0              resources: irq:41 memory:d0000000-d03fffff memory:c0000000-cfffffff ioport:e080(size=8)         *-communication UNCLAIMED              description: Communication controller How to use the Bradhley Hand font? I've checked the  that can be used through beamer class. I've successfully used most of the fonts, but when I tried to include the Bradhley Hand font, it did not work (it shows ordinary characters)?! How can I use it?  For example, when I use the following :  \documentclass[serif]{beamer}  \usepackage{mathpazo}  \renewcommand{\rmdefault}{ibh}  \begin{document} \begin{frame} $\frac{ \sqrt{ \mu(i)^{ \frac{3}{2}} (i^{2} -1) } } { \sqrt[3]{\rho(i) - 2} + \sqrt[3]{\rho(i) - 1} } $ \end{frame} \end{document}   it gives: It's not consistent to leave an edit pending for approval (thus not making available for everyone else and locking its state) after a user who has those privileges have given his endorsement.   You could say why don't I improve the edit, but that makes no sense for something that is correct and it would not follow the "keep it simple" policy.  Update:  This is the current time line:   Someone who doesn't know about formatting makes a question. It's not legible A user without edit privileges amends the formatting. The correction is not visible, still not legible. I see the question and the pending revision and then cast my approval. It doesn't take effect yet, still not legible. Even for me if I didn't take care of copying the question source because it disappears from my own revision page!   I might agree that one's approval is indicative of both revision's quality and editor's competence. But we should retain that the main objective is to ask and answer questions. So, I propose this model:   Someone who doesn't know about formatting makes a question. It's not legible A user without edit privileges amends the formatting. The correction is not visible, still not legible. A user with edit privileges cast his approval. Revision takes effect. Although it keeps the pending approval (the Edit (1) button). If a second user with edit privileges cast a rejection, it also takes effect as a rollback. It was nice to discover the option for a room owner to add any user to a room, even if their rep is too low.     ...so I notified the user in question, and as instructed on the next screen, I had them got to chat.stackoverflow.com so that I'd be able to add them.    ...but when they did their part, and I did my part, I got the message:    Obviously both frustrated, the user's next logical question was:  "So I just have ask a couple questions and get someone to upvote them, right?"    Needless to say, we don't want to encourage new users to post questions for the sole purpose of bypassing a frustrating, misdocumented rule.  I realize this will likely quickly get closed since it has at least one  - which hasn't been touched in 5½ years.  However it would be nice if the issue was revisited:  Ideally, it would be cool if RO's did have the option of deciding who had access to the room they "own", but short of that, is it possible to remove the 6 "misleading" words from that page? What spell almost killed Hermione in The Order of the Phoenix? The spell was cast without words, simply a flick of the Death Eater's wand, and a 'streak of purple flame' that lanced across her chest. It was later mentioned that the spell was weakened because of the lack of a verbal component, but still 'did enough damage as it was'. She was in the infirmary healing from the damage for some time. What spell was this? Proving a limit of a trigonometric function: $\lim_{x \to 2/\pi}\lfloor \sin \frac{1}{x} \rfloor=0$ How to know if something is a primitive concept, a law, a definition or a theorem Some basic Physics books are often misguiding in the sense that they don't make clear whether something is a primitive concept, a law, a definition or a theorem. This is often a little confusing. I've asked here some moments ago if there's a definition of force, and I've been redirected to a question about whether Newton's Laws are laws or definitions of mass and force.  This is just an example, but there are many others, like for instance, the conservation of energy, which some books present as a theorem, and some places says that this is a law of Physics. Time on the other hand, is something that according to Feynman's lectures on Physics, cannot be defined, so we just say how to measure it and leave it as a primitive concept.  In this context: how in general can we identify whether something is a primitive concept, a fundamental law of Physics, a definition or a theorem? Let $f$ be a differientable real function such that $$(b-a)f'(\tfrac{a+b}{2}) = f(b)- f(a)$$ for all reals $a,b$.     Is $f$ polynomial of degree $\leq 2$ ? Ratio of Boys and Girls In a country where everyone wants a boy, each family continues having babies till they have a boy. After some time, what is the proportion of boys to girls in the country? (Assuming probability of having a boy or a girl is the same) How to remove the left part of a string? I have some simple python code that searches files for a string e.g. path=c:\path, where the c:\path part may vary. The current code is:  def find_path(i_file):     lines = open(i_file).readlines()     for line in lines:         if line.startswith("Path="):             return # what to do here in order to get line content after "Path=" ?   What is a simple way to get the text after Path=? Let me start by explaining my particle physics background is very patchy, so this question may not be as coherent as  I would like it to be.   In general terms, what is the difference between a resonance found during a particle experiment and a particle?   From reading Wikipedia it seems to be mostly based on timescales. If a heavy particle decays quickly, how can we distinguish it from a resonance?  I would not be posting this question except for the fact that the Wikipedia page says "This page has some issues".        and I would be interested in knowing more about the subject. Print to standard printer from Python? Why do objects move when you apply a force that's equal in magnitude to the friction? If the friction on an object is 200 N and you apply 200 N, it seems, the forces should immediately cancel each other out since the friction and your applied force go in opposite directions, leaving you with an object that is motionless. Yet, from what I've read, that's not the case. I feel like I'm misunderstanding something. Could it be I'm wrong about needing to apply 200 N initially? Might the amount of force I actually need be greater, but instantaneously decrease to 200 N? SVD: How to find the columnvector of U corresponding to a singular value equal to zero Is there any way to run file explorer as administrator under Windows 10 After install Windows 10, it seems that I lost the ability to run explorer.exe as administrator with a user in administrator group.   The reason I want to do that is, in our team's development environment, we are using a C# exe to do some environment configuration which will start command prompt under administrator mode and subst a drive. As a result those substed drives are not visible within the file explorer since it is run not as administrator. That will be kind of inconvenience and sometimes make mistakes.   I was able to run explorer.exe from task manager with the option "create with privileges" checked and then I can see all the drives in explorer. But now this is not working anymore.   I knew there are other options to workaround this workflow, but just want to make sure that if it is now totally impossible under Windows 10?  Any comment is appreciated. Double dispatch in C#?