How to get return values of Dialog input to the another funtion in PyQt5?
Python scope: "UnboundLocalError: local variable 'c' referenced before assignment"
When I use a multiclass move to choose Animal Companion, do I get Command for free? How can I make Firefox download different file types to different locations? 98% of what I download is music, so I set the download location to my music folder. However, the other 2% has no place there, so every time I download .doc files or PDF files I have to remove them. Is there a way to make Firefox change the download folder based on file extension? I'll settle for all non-MP3 files getting saved to the desktop.  I know I can right click, choose Save Link As and pick the download location myself, but it seems like there should be a better way. Can someone identify this book, where children are bred for specific jobs? Things I remember about this book:   Every child was selected for a certain job/career; If twins were born, one was always killed; Seeing colors for the first time (describing the color of an apple); Seeing war and death and poverty.   Does anyone have any idea what this book might be? Very hot network questions found For a command, if using - as an argument in place of a file name will mean STDIN or STDOUT.   But in this example, it creates a file with the name -:  echo hello &gt; -   How can I make - in this example mean STDOUT? Conversely, how can I make - mean a file named - in examples such as:  cat - Non-static variable cannot be referenced from a static context I am attempting to write a filter using something like sed or awk to do the following:   If a given pattern does not exist in the input, copy the entire input to the output If the pattern exists in the input, copy only the lines after the first occurrence to the output   This happens to be for a "git clean" filter, but that's probably not important. The important aspect is this needs to be implemented as a filter, because the input is provided on stdin.  I know how to use sed to delete lines up to a pattern, eg. 1,/pattern/d but that deletes the entire input if /pattern/ is not matched anywhere.  I can imagine writing a whole shell script that creates a temporary file, does a grep -q or something, and then decides how to process the input. I'd prefer to do this without messing around creating a temporary file, if possible. This needs to be efficient because git might call it frequently. Trigger to use HTTP callout and update record with the results I have been trying to integrate Google Shortener API into my salesforce org. I wrote a class to make the call out, but am having difficulty bringing the value back into the record. I have a custom object called "referral_advocate__c" with a field called "Short_URL__c". Anytime the field "unique_ID__c" has a value, I am wanting to send this value with a static URL to google shortener and then save the response value to "referral_advocate__c.short_URL__c" on the record. This is the class to make the call out:  public class URLshort {  final string urls = 'https://www.myurl.com'; referral_advocate__c adv = new referral_advocate__c();  @future(callout = true) public static void URLshortner() {      HttpRequest req = new HttpRequest();     HttpResponse res = new HttpResponse();     Http http = new Http();      req.setEndpoint('https://www.googleapis.com/urlshortener/v1/url?key=myapikey');     req.setMethod('POST');     req.setHeader('Content-Type','application/json');            req.setBody('{"longUrl":+urls + adv.unique_reference_number_c}');       try {         res = http.send(req);         System.debug(res.getBody());     } catch(System.CalloutException e) {         System.debug('Callout error: '+ e);         System.debug(res.toString());     }   }  }   The after insert trigger on "referral_advocate__c" I wrote is not firing correctly. How do I return the results from this class and update the field "short_URL__C" with the returned value from a trigger? I installed Linux Mint in 2 partitions: / and /home  Windows 8 is under UEFI boot mode.  How to hide those linux partitions in Explorer?    When I click on them: Escape velocity from a rotating black hole What will at actually execute? Fluent and Query Expression — Is there any benefit(s) of one over other? LINQ is one of the greatest improvements to .NET since generics and it saves me tons of time, and lines of code.  However, the fluent syntax seems to come much more natural to me than the query expression syntax.  var title = entries.Where(e =&gt; e.Approved)     .OrderBy(e =&gt; e.Rating).Select(e =&gt; e.Title)     .FirstOrDefault();  var query = (from e in entries              where e.Approved              orderby e.Rating              select e.Title).FirstOrDefault();   Is there any difference between the two or is there any particular benefit of one over other? is it possible to redefine { and } in C? System.currentTimeMillis() vs. new Date() vs. Calendar.getInstance().getTime() In Java, what are the performance and resource implications of using  System.currentTimeMillis()    vs.   new Date()    vs.   Calendar.getInstance().getTime()   As I understand it, System.currentTimeMillis() is the most efficient. However, in most applications, that long value would need to be converted to a Date or some similar object to do anything meaningful to humans. Let $\{a_n\}$ be an unbounded, strictly increasing sequence of positive real numbers and let $x_k=\frac{a_{k+1}-a_{k}}{a_{k+1}}$. Which of the following statements is/are correct? (CSIR NET December 2014)         For all $n\geq m, \sum\limits^{n}_{k=m}x_k&gt;1-\bf{\frac{a_m}{a_n}}$   There exist $n\geq m, \sum\limits^{n}_{k=m}x_k&gt;\frac{1}{2}$      My attempt:  Analysing question in light of $a_k=k\implies x_k=\frac{k+1-k}{k+1}=\frac1{k+1}$, I feel both are correct, I doubt if  I can generalise the result in light of this one example.   Any way to prove that this true for general case?    Note: Please do not confuse  with my question. The first two options are different, I've marked the difference in bold. Change Windows 7/8/10 system language - welcome screen, login, etc I'm having some problems with listings and UTF-8 in my document. Maybe someone can help me? Some characters work, like é and ó, but á and others appear at the beginning of words...  \documentclass[12pt,a4paper]{scrbook} \KOMAoptions{twoside=false,open=any,chapterprefix=on,parskip=full,fontsize=14pt}  \usepackage[portuguese]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{listingsutf8}  \usepackage{inconsolata} \lstset{     language=bash, %% Troque para PHP, C, Java, etc... bash é o padrão     basicstyle=\ttfamily\small,     numberstyle=\footnotesize,     numbers=left,     backgroundcolor=\color{gray!10},     frame=single,     tabsize=2,     rulecolor=\color{black!30},     title=\lstname,     escapeinside={\%*}{*)},     breaklines=true,     breakatwhitespace=true,     framextopmargin=2pt,     framexbottommargin=2pt,     extendedchars=false,     inputencoding=utf8 }  \begin{document} \begin{lstlisting} &lt;?php  echo 'Olá mundo!'; print 'Olá mundo!'; \end{lstlisting}  \end{document} \end{lstlisting} Question about arithmetic–geometric mean We have two sequences: $$a_{n+1}=\sqrt{a_nb_n}$$ $$b_{n+1}=\frac{a_n+b_n}{2}$$ I need to prove that those are making Cantor's Lemma.(At the end I shold get that: $\lim_{n\to \infty}a_n=\lim_{n\to \infty}b_n$ by Cantor's Lemma)  Any ideas how?  Thank you. Zero visitors? What happened to site analytics about a week ago? This is the views section of the site analytics visible to 25k users on one of my sites:    That's, uh, not correct.  Our site has had its usual activity level during this time.  I checked a couple other sites, and the pattern is consistent.  This looks like a problem in the analytics data that's coming in; did Google change their API?  Update: Same site a week later; note that in addition to the brief spike of accuracy, page views have dropped to (near-)zero for the whole period, unlike the earlier report.  (I know this question has been closed as a dupe, but I thought having the two screen shots together might help somebody.) Going through a text file line by line in C