I have encountered a strange issue with calling my @AuraEnabled method from Lightning.  The second parameter (which is a method overload) is consistently null when called from Lightning - but is never null when called via executeAnonymous()  Here is the first method definition:  @AuraEnabled public static ReportSummary getReportSummary(String reportName) {   Id userId = UserInfo.getUserId();   return getReportSummary(reportName,userId); }   Here is the second definition (overload):  @AuraEnabled public static ReportSummary getReportSummary(String reportName, Id userId){   System.debug(LoggingLevel.DEBUG, 'USER ID: ' + userId);   ReportSummary summary = new ReportSummary(userId, '');   //ect ect...   //the above system.debug prints out 'USER ID: null'   I call first (single parameter) method from Lightning.  If anyone can shed some light on this, it would be appreciated.
I have a lightning component that displays Knowledge Articles based on Topic IDs that it is configured for. This works great so I went to create my test coverage for it and discovered that the inserted test Knowledge Articles can only ever be 'Draft' making my tests fail since the apex class only looks for 'Online'. Instead of rewriting my component I decided to overload the apex method so that when called without the status parameter it passes in 'Online' allowing my tests to pass in 'Draft' instead. However, the first method signature does not get called from the component resulting in null for the status parameter.  Here is the component controller:  ({     "retrieveArticles" : function(component, event, helper) {         var action = component.get("c.returnArticlesWithTwoTopicIds");         action.setParams({             mainTopicId : component.get("v.mainTopicId"),             secondaryTopicId : component.get("v.secondaryTopicId"),             limitAmount : component.get("v.limitAmount")         });          action.setCallback(this, function(response) {             var state = response.getState();             if (component.isValid() &amp;&amp; state === "SUCCESS") {                 // handle SUCCESS             }             else if (component.isValid() &amp;&amp; state === "ERROR") {                 // handle ERROR             }         });         $A.enqueueAction(action);     } })   Here is the apex class:  public with sharing class KnowledgeArticleVersionCtrl {     @AuraEnabled     public static List&lt;KnowledgeArticleVersion&gt; returnArticlesWithTwoTopicIds(String mainTopicId, String secondaryTopicId, Integer limitAmount) {         return returnArticlesWithTwoTopicIds(mainTopicId, secondaryTopicId, limitAmount, 'Online');     }      @AuraEnabled     public static List&lt;KnowledgeArticleVersion&gt; returnArticlesWithTwoTopicIds(String mainTopicId, String secondaryTopicId, Integer limitAmount, String status) {         // build query string         List&lt;KnowledgeArticleVersion&gt; articles = Database.query(query);         return articles;     } }   Is there something about the component that would cause it to not use the first signature, the one it should match, in place of the second one, which it shouldn't match?
How is offside determined in football? The offside rule on the pitch is often unclear and called suddenly. How do I know if a player is offside? Django template how to look up a dictionary value with a variable I'm in the following situation: In 3 months, I'll finish my PhD in theoretical physics, and I'm certain that I want to pursue an academic career. However, I'm just as certain that my PhD research is a dead end. (My advisor doesn't think so, but I disagree with him.) Thus, I seek to change the direction of my research, but I need a few months to obtain the necessary skills. Anyway, I missed the main application period for post-doc positions (in the US).  Given the following options (feel free to expand this list), which do you think provides the best perspective of leading me to a interesting post-doc position?   Finish my PhD. Get any post-doc position. Do the work I'm required to do there. Work hard in my spare time to teach myself the stuff I want to. After 1-2 years, find a post-doc position I'm really interested in. Finish my PhD. Get a well-paying job in the software industry. Do the work I'm required to do there. Work hard in my spare time to teach myself the stuff I want to. Work harder to keep publishing papers. After one year, find a post-doc position I'm really interested in. Abort my current work. Find a new subject and a new PhD advisor. Live on unemployment money as long as possible. Work hard in my spare time to teach myself the stuff I want to. Work harder to keep publishing papers. After one year, find a post-doc position I'm really interested in.   Pros:   Get the PhD title sooner. Stay in the scientific community. Get the PhD title sooner. Earn lots of money (6 figure). In a 9-to-5 job, have more spare time for private research than on a post-doc position, where work is never finished. Go to a foreign country. It's what I should've done 2 years ago. I'll have the education I want when I finish my PhD, not later (but be older anyway). No immediate advantages over the other options.   Cons:   If a logical continuation of my PhD work, I'll suffer from demotivation. My next advisor will not want me to work on other topics that I'm not paid for. Might have to stay for 2 years. I'll move out of the scientific community for some time. I know it's hard to get back in. I'll be even older when I finally get my PhD. Not sure if I would find another advisor. Open fight with my current advisor. I don't want to live on unemployment money for long.   A particular question concerning the options above: Does being out of academia for a year kill your prospects of obtaining a postdoc position later?  I do have some collaborators who will help me to keep publishing, provided that I put enough work into my research. Also, I'm willing to familiarize myself with other topics on my own (a prerequisite for an academic career anyway).  The next application period will be from October to December 2013, which isn't far away. I'm sure I'll have most of the skills I want by then (and a paper published proving that), but still would have to work until summer 2014 wherever I am applying now.  Please give me honest answers, even if they hurt. I'll provide more information as soon as possible, if anyone has questions. $24\mid n(n^{2}-1)(3n+2)$ for all $n$ natural problems in the statement. How to prove a total order has a unique minimal element Let $R$ be a total order on set $S$. Prove that if $S$ has a minimal element, than the minimum element is unique.  I have difficulties with proofs. I know any graph of a total order is a straight line, which clearly has a minimal element. How doI tell when something is mathematically proven?  EDIT: this is how I would prove it  Let $x, y \in S$ such that x and y are minimal. Since S is a total order $x$ and $y$ are comparable and either    case 1: one comes after the other and therefore one isn't the minimal case 2: both are the same and $x=y$  I know this isn't a mathy argument and could use help making it more presentable. At this moment there are 4 meta-site questions on the HNQ list:    (World Building Meta)  (Meta StackOverflow)  (Workplace Meta)  (Mathematica Meta)   When I first saw it, I only saw the SO Moderator question, so I assumed that this was a one-off special thing for the election; but now we've got four questions crept in. Was this an intentional change, or a bug? Is there a documentclass that produces 'endless' pages? Does anybody know of a documentclass that produces a page that has a fixed width and a variable length, depending on the actual content that needs to fit on the sheet? I'm trying to get something like a kind of scroll if possible. Understanding Euclid's proof that the number of primes is infinite. In Euclid's proof, if $p_1, p_2, \dots, p_n$ are the only primes then $p_1 \times p_2 \times \dots \times p_n + 1$ is not divisible by any of $p_1, p_2, \dots, p_n$ (because of some algebraic facts), which makes another prime and is a contradiction.   The proof makes sense logically, and I tried some numerical examples to "feel" the proof better but...  $2 \times 3 \times 5\times 7\times 11\times 13+1$ is not a prime! $2 \times 3 \times 5\times 7\times 11\times 13 \times 17+1$ is also not prime! Why is the general case proof is not working for these examples? If $x_1,x_2,\ldots,x_n$ are the roots for $1+x+x^2+\ldots+x^n=0$, find the value of $\frac{1}{x_1-1}+\frac{1}{x_2-1}+\ldots+\frac{1}{x_n-1}$ Here is the problem: From any IP address not belonging to your mail server:  telnet me.myemailserver.com 25    helo me.someserver.com mail from: &lt;yourusername@mydomain.com&gt; rcpt to: &lt;yourusername@mydomain.com&gt; data This is spam.  Buy my stuff. .   I'm using Postfix.  I'm having a problem finding a solution to requiring SMTP-AUTH for email claiming to be from mydomain.com.  Googling around, this guy has identified the same problem (where I cut-n-paste with some modifications) the above example from:   This link   gets close to a solution but it has a side effect of requiring SMTP-AUTH for mail not from mydomain.com.  For mail not claiming to be from mydomain.com, I would do the usual RBL and Spam filtering.  In short, I want to reject mail to local domains (mydomain.com) from outside/unauthenticated clients claiming to be from local domains (mydomain.com).  This is what I tried: I've tried both permit and reject as the default.  Here is exact excerpt from my main.cf:  smtpd_recipient_restrictions = reject_unauth_pipelining,                            permit_sasl_authenticated,                            check_recipient_access pgsql:/etc/postfix/pgsql-recipient.cf,                            reject_unauthenticated_sender_login_mismatch,                            reject_unauth_destination,                            reject_unlisted_recipient,                            check_sender_access pgsql:/etc/postfix/pgsql-sender.cf,                            reject_unlisted_sender,                            reject_invalid_hostname,                            reject_non_fqdn_hostname,                            reject_non_fqdn_sender,                            reject_non_fqdn_recipient,                            reject_unknown_sender_domain,                            reject_unknown_recipient_domain,                            reject_rbl_client cbl.abuseat.org,                            reject_rbl_client sbl.spamhaus.org,                            reject_rbl_client sbl-xbl.spamhaus.org,                            reject_rbl_client bl.spamcop.net,                            reject_rbl_client dnsbl.njabl.org,                            reject_rbl_client blackholes.wirehub.net,                            reject_rbl_client relays.mail-abuse.org,                            reject_rbl_client dialups.mail-abuse.org,                            reject_rbl_client blackholes.mail-abuse.org,                            reject_rhsbl_sender dsn.rfc-ignorant.org,                            (reject and permit both tried here) I have a 3D truck model already textured and properly imported into Blender. This is a game model and I need to "re-paint" with design from other transport companies. The problem is that I don't have a UV layout (skin template) to serve as a guide for future paintings.  Is there a way to "extract" an UV Layout to .JPG or .PNG to serve as guide for .DDS texture editing?  Please note that I don't want to remap the model. I still want to use the actual UV Mapping and just need to edit the actual textures. Is there a privacy setting on Facebook that will stop the posting that is made on your friend's wall when you make a new friend?  I do not want this to appear on my friend's wall when I make a new friend Vector Applications in Euclidean Geometry What would be the right position of "substantially" in the following:     1). Before verb: These optimal values substantially contribute to the success of the methodology.      2). After verb: These optimal values contribute substantially to the success of the methodology.   Here is my issue:  Fact1: When I use Google Ngram, I get , 0 occurrence of option 1.  Fact2: I found an excellent Grammar book that discusses Adverbs, their types and prefered positions. The author defines some rules that I'll summarize as follows:   Connecting adverbs, eg: however, then,..., Position: Beginning of clause. Indefinite frequency, eg: always, usually,..., Position: Mid position (after auxilary verb, before other verbs) sometimes beginning of clause. Focusing adverbs, eg: mainly, only,..., Position: Mid position. Adverb of certainty, eg: clearly, obviously, Position: Mid position. Adverb of completeness, eg: almost, nearly,..., Position: Mid position. Adverb of manner, eg: fast, slowly, nicely,..., Position: End clause, mid and beginning. Adverb of place, eg: upstairs, around, Position: End clause, sometimes beginning. Adverb of time, eg: daily, weekly, ... Position: Mostly end clause, sometimes beginning and mid position.   I think that "substantially" is an adverb of completeness. Therefore, the right position is before the verb "contribute" (option 1). However, Google Ngam indicates that option 1 is not widely used.  What do you think? Any suggestions? Ubuntu 17.10 windows' menu in panel I installed the latest version of Ubuntu (17.10) , but the problem is, I can't find the menu bars of applications in the GNOME panel. For instance, the Chrome menu bar doesn't appear on the panel like in Ubuntu 17.04 and earlier versions. Why do I get "Required key not available" when install 3rd party kernel modules or after a kernel upgrade? Add transparency to an existing PNG I'd like to use this image on a web site.    What I need to do is change the background from black to transparent, so I can use the arrow on my site maintaining the page background.  I used Gimp to convert the image to .png, but how do I proceed now? Here's a screen capture from a site where I can view /site-analytics:    The orange "all posts" curve should be strictly larger than the blue "questions" curve, but they are mistakenly displaying the same data. Do tag edits count for Archaeologist? I know tag-edits do not count towards the 500 edits required for the Copy Editor badge. Do they count to the 100 for the Archaeologist badge? It seems they should because you are making a 6-month-inactive post active again. Effective way to find any file's Encoding