I am trying to add a simple console as a panel, but I don't get it working (have a look at the end of the code):  super.setSize(600,4*46);     super.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); pane = super.getContentPane(); GridLayout flo = new GridLayout(4,1,20,2); pane.setLayout(flo); pane.setBackground(grey);  // 1: STOP button JPanel row_cmd = new JPanel(); FlowLayout flo_row_cmd =  new FlowLayout(FlowLayout.CENTER,10,1); row_cmd.setLayout(flo_row_cmd); row_cmd.setBackground(grey_pale); STOP.addActionListener(this); STOP.setBackground(red); STOP.setForeground(yellow); STOP.setFocusable(false); ft= STOP.getFont(); ft=new Font(ft.getFontName(),Font.BOLD,14);  STOP.setFont(ft); row_cmd.add(STOP); pane.add(row_cmd);  // 2: communication  // 3: progression  // 4: console Console console = System.console(); //FlowLayout flo_row_con =  new FlowLayout(FlowLayout.LEFT,10,10); //row_con.setLayout(flo_row_con); //row_con.setBackground(grey_pale);  frame.getContentPane().add(console); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  //pane.add(row_con); //pane.validate(); setVisible(true); ???   How could I do? I don't have much experience with GUI components. Thank you.
How can I create an instance of the Java console inside of a GUI panel?
What is the difference between re.search and re.match? I have the following recurrence that I've been pounding on:  $$ a(0)=1\\ a(1)=1\\ a(2)=2\\ a(2n)=a(n)+a(n+1)+n\ \ \ (\forall n&gt;1)\\ a(2n+1)=a(n)+a(n-1)+1\ \ \ (\forall n\ge 1) $$  I don't have much background in solving these things, so I've been googling around looking for different techniques. Unfortunately, I haven't been able to correctly apply them yet. So far I've tried:   Characteristic equations Generating functions Plugging it into Wolfram Alpha Telescoping Observation   I'm sure that one or more of these is the way to go, but my biggest problem right now is figuring out how to deal with the idea that there are different equations for odd and even values of $n$. I'm not necessarily looking for a solution (though it would be gratefully accepted), but any nudges in the right direction would be much appreciated.    To follow up, it turned out that the speed problem described in my comment, below was related to the Decimal implementation in Python 2.7. Switching to Python 3.3 (and Java) made everything many orders of magnitude better. Great Expectations [is written vs has been written] by Charles Dickens Problem with IMPORTRANGE function in Google Sheets I’m trying to get IMPORTRANGE to work for me with no success. I made two simple spreadsheets:  and . In the destination sheet I’m using the import range function:  =importrange(“1-5F1_zz0ZpGj7SfeQhewsCe0CsrA0eyPbjfmUrLBsyk”,”Sheet1!a1:a1”)   I tried already:   Replacing the , with ; Referencing just the key as well as the full URL in the first argument Switching from “ to ‘ With the sheet name and without it   Not sure what else to do.  Any ideas? Is there a Google Drive client available? I'd like to install a  client for Xubuntu (12.04).  I'm getting non-English Google results, and I didn't find  in the Xubuntu repositories.   Does anyone know of a client that works well for Ubuntu or it's supported derivates (or installation instructions for grive?) I'm trying to find the infinite sum that is defined by:  $$ 3 \cdot \frac{9}{11} + 4 \cdot \left(\frac{9}{11}\right)^2 + 5 \cdot \left(\frac{9}{11}\right)^3 + \cdots $$  However, I do not know of any known formula to do this. Am I missing something really simple? Thanks! Compare dates in query from IMPORTRANGE and cell for a few days I'm stuck at comparing two dates.  In a big table with dates as columns and products as rows, we want to display the amount of sales per day per product.  What the following query does:   Import our sales via IMPORTRANGE query the specific sales for a given day and product ID return 0 if there is an error (e.g. not found) count the result   This is a working query with the date 2018-03-26 hard coded:  =COUNTA(IFERROR(query(IMPORTRANGE("1OHR0nr_w3oFNNxtMxRwv65xncCBRpK-vV3vvqmHGFPo"; "Sales March!A:K"); "select Col6 where Col6 = '"&amp;$A95&amp;"' and todate(Col11) = date '2018-03-26'"; 0)))  It shows how many sales a specific product has on the specified date.  Now I want the date from a cell in the sheet:  =COUNTA(IFERROR(query(IMPORTRANGE("1OHR0nr_w3oFNNxtMxRwv65xncCBRpK-vV3vvqmHGFPo"; "Sales March!A:K"); "select Col6 where Col6 = '"&amp;$A95&amp;"' and todate(Col11) = date '"&amp;$AR3&amp;"'"; 0)))  But this doesn't work. I tried A LOT of things for the past 3 days but I have no idea if I did that wrong (I'm a beginner) so I'm turning to you. What might be wrong with the date comparison in this section?  "select Col6 where Col6 = '"&amp;$A95&amp;"' and todate(Col11) = date '"&amp;$AR3&amp;"'"  You can see it  in Column AR Row 95 but I can't give edit rights. Automate Fixed Width Page, length > some minimum length, but only as long as needed I am trying to automate the solution proposed by egreg to  by hooking into \begin{document} and \end{document}.  So, egreg's solution works fine:  \documentclass{article} \def\MinimumPaperHeight{12cm} \usepackage{geometry} \geometry{paperwidth=\MinimumPaperHeight,paperheight=\maxdimen,margin=1cm} \usepackage{lipsum}  \begin{document} \setbox0=\vbox{ \lipsum[1-6] } \dimen0=\dp0 \pdfpageheight=\dimexpr\ht0+2cm\relax \ifdim\pdfpageheight&lt;\MinimumPaperHeight \pdfpageheight=\MinimumPaperHeight \fi \unvbox0\kern-\dimen0 \end{document}   But can't seem to get this to work:  \documentclass{article} \def\MinimumPaperHeight{12cm} \usepackage{geometry} \geometry{paperwidth=\MinimumPaperHeight,paperheight=\maxdimen,margin=1cm} \usepackage{lipsum} \usepackage{environ}  \NewEnviron{MyBox}{     \setbox0=\vbox{\BODY}% }{%     \dimen0=\dp0%     \pdfpageheight=\dimexpr\ht0+2cm\relax%     \ifdim\pdfpageheight&lt;\MinimumPaperHeight \pdfpageheight=\MinimumPaperHeight \fi%     \unvbox0\kern-\dimen0% }  \AtBeginDocument{\begin{MyBox}} \AtEndDocument{\end{MyBox}}  \begin{document} \lipsum[1-6] \end{document}   Hooking into \AtBeginDocument is per this solution on . I just got an Android tablet and when I try to install an app on the Play store it says:      error retrieving information from server [RPC:S-3].   I've tried clearing the data for the Play Store app &amp; turning it off &amp; back on but it didn't work. A customer has a 6-screen setup for each workstation and would like various pages of a web app to be opened automatically in each of the screens on startup or invoking a shortcut. (The target web browser is likely to be Chrome).  I wondered whether it would be possible to use Javascript window.open to do this but one possible snag is the customer may wish to have tabbed browsing with popup blocker turned on. (OK, these could be overridden but such config is currently out of our control...)  So the question is: Could a script (e.g. batch file) be written to open multiple instances of the browser at specified coordinates within the 6 screens (each pointing to different URLs)?  [This is basically the same question as  but for Windows instead of Ubuntu.] I'm using 3d to speed up production of 2d graphics of machines and structures (which have a lot of straight lines, objects and little details repeated all over the place).  The goal is to have an isometric background image that repeats seamless. I set the camera with orthographic projection and 45° of rotation.    And manually cut the vertical borders in an image editor in the position where it repeats. Then I can do something like this:    Instead of cutting it manually every time I do a test, I would like to set the camera view position and height from Blender. Then I can render an already seamless repeated image.  Those two Empty objects in the boundaries are where the camera borders should be. However I have no clue how to accurately set up the camera in this case. How can I do this? Is there a rule to know when to pronounce letter c as a "soft c" (s) or "hard c" (k)? Is it correct to use "their" instead of "his or her"? Sylvester's theorem states that the product of $k$ consecutive integers $&gt;k$ has a prime factor $p&gt;k$. Erdős gave a short proof for it, but I can't find Erdős's proof online. Can anyone give a sketch of the proof? Thanks. Julian day of the year in Java X,Y,Z missing in F3 I remember very little but enough... I know that there were 3 worlds, a real one, a mid-world kind of with a teleporter, and the world with all the creatures. The first episode was in the desert and there was a good monster that saved the main guys from a bad one. Before he saved them he said every end is a beginning and every beginning is an end.   Please help me; I've tried everything. I saw it on , I think it was not Japanese. I live in Croatia, so I saw it there. It was aimed at kids, but not younger kids. The main characters were human, around 15 years old. The teleporter was in the middle of a big structure. It was a 6 piece tp, so every circle was one, and it was shaped like a star. There were robots working there; they carried food and other things.  I remember that all the creatures thought that the humans are evil, all but the one, the "lord" of all of them. And yes, the main character got to the world by some sort of a device that he found and it belonged to another kid who lost it and they were able to transform in the creatures from the world by it. When they are in the "other world", their body stays in the real world and acts normally but their soul gets transported to the mid-world I know you can export the asset as a PSD and open it in Photoshop. Is there a more seamless way?  Update:  I'm an idiot.  Someone else created the logo, and the shadow was it's own layer on multiply and not a normal drop shadow effect. Where's the summary of your own suggested edits? Roman numerals become “too wide” in table of contents Following minimal document:  \documentclass{report}  \begin{document} \renewcommand*\thechapter{\Roman{chapter}} \tableofcontents \setcounter{chapter}{6} % Problem starts at chapter 7 \chapter{Seven} \chapter{Eight} \section{Eight-one} \section{Eight-two} \end{document}   yields this output (cut to size for your convenience):    Clearly, the chapter (and section) headings hang into the chapter (section) numbers. For the previous chapter numbers, this isn’t a problem since all chapter titles are aligned to the same column and the numbers I–VI are sufficiently narrow.  (The same happens regardless of document type, I’m actually using scrreprt with the same result.)  How can I prevent this?