The task is to find out if this series is convergent or divergent.     $$ \sum _ { n = 1 } ^ { \infty } \frac { n ! n ^ { n } } { ( 2 n ) ! } $$   The solution uses the ratio test and says:     $ \left.\begin{aligned} \frac { a _ { n + 1 } } { a _ { n } } & = \frac { ( n + 1 ) ! ( n + 1 ) ^ { n + 1 } ( 2 n ) ! } { ( 2 ( n + 1 ) ) ! n ! n ^ { n } } = \frac { ( n + 1 ) n ! ( n + 1 ) ( n + 1 ) ^ { n } ( 2 n ) ! } { ( 2 n + 2 ) ( 2 n + 1 ) ( 2 n ) ! n ! n ^ { n } } \\ & = \frac { ( n + 1 ) ( n + 1 ) } { ( 2 n + 2 ) ( 2 n + 1 ) } \cdot \left( \frac { n + 1 } { n } \right) ^ { n } = \frac { \left( 1 + \frac { 1 } { n } \right) \left( 1 + \frac { 1 } { n } \right) } { \left( 2 + \frac { 2 } { n } \right) \left( 2 + \frac { 1 } { n } \right) } \cdot \left( \frac { n + 1 } { n } \right) ^ { n } \\ & \rightarrow \frac { 1 } { 4 } \cdot e < 1 \text { for } n \rightarrow \infty \end{aligned} \right. $   I understand every step until here     $$ \frac { \left( 1 + \frac { 1 } { n } \right) \left( 1 + \frac { 1 } { n } \right) } { \left( 2 + \frac { 2 } { n } \right) \left( 2 + \frac { 1 } { n } \right) } \cdot \left( \frac { n + 1 } { n } \right) ^ { n } $$   How can all n's on the left site become 1/n? And I understand how the left site can become $\frac{1}{4}$, but how can the right site become e in the last step?

I want to check, if this series is convergent or not:  $$\sum\limits_{n=1}^\infty  \frac{n^n(n!)}{(2n)!}$$  I tried with the ratio test: $$\frac{\frac{(n+1)^{n+1}(n+1)!}{(2n+2)!}}{\frac{n^n*n!}{(2n)!} } =\frac{(n+1)^{n+1}(n+1)!(2n)!}{(2n+2)!(n!)n^n}=\frac{(n+1)^{n+1}(n+1)}{n^n(2n+2)(2n+1)}$$ But how should I proceed?  Thank you for your help  queenD


The formal description I have is that this is this:  $f(n) = n^{O(n)}$ iff there exists some $h(n) = O(n)$ such that $f(n) = n^{h(n)}$.  I don't see how this can be applied to the problem to show that $3^n = 2^{O(n)}$. What function $h(n)$ can we have such that $3^n = n^{h(n)}$? Further, how is its existence shown, trial and error?

These are all from Sipser's book, second edition. I was just hoping someone could verify/explain those that are more difficult for me.  $2n = O(n)$: true  $n^2 = O(n)$: false  $n^2 = O(n\log^2 n)$: I say false, because $\log^2 n$ grows more slowly than $n$  $n\log n = O(n^2$): true because $n$ grows more quickly than $\log^2n$  $3^n = 2^{O(n)}$: I wasn't sure what this notation meant. Any clarification here?  $2^{2^n} = O(2^{2^n})$: I would say true, but I'm not entirely sure why.  $n = o(2n)$: false, because $o(2n) = o(n)$ and $n$ grows as quickly as itself.  $2n = o(n^2)$: true, $n^2$ is always more than $2n$ for some constant.  $2^n = o(3^n)$: true  $1 = o(n)$: I'm not really sure.  $n = o(\log n)$: false, $n$ is always larger.  $1 = o(1/n)$: true, because 1 is always larger.


I'm using the tikz2pdf script, which I think internally uses the standalone class, to compile my tikz and pgfplots figures.   Say, I have this simple example:  \begin{tikzpicture} \begin{scope}  \begin{axis}[   clip=true,   axis x line=middle, % use middle to have x-axis at y=0! (bottom is at ymin!)   axis y line=middle, % also use middle here (left rotates the label || y-axis!)   grid = major,     grid style={dashed}, ] \addplot[blue,domain=0:3.1] {sin(deg(x))}; \end{axis} \end{scope} \end{tikzpicture}   Here is the image of the PDF generated by tikz2pdf:    Now, the pdf reports this size:  $ pdfinfo test.pdf  | grep 'Page size' Page size:      217.165 x 184.36 pts   (.. or from evince: 77 × 65 mm) - what I don't understand is:   Where is this default size set? Is there a command/length I could \typeout to terminal, maybe after the \end{axis}, which will tell me what is the current page (or tikzpicture, or pgfplot graphic) size (width and/or height)?    The thing is - in the above image, I would like to keep y-axis as is (so, 65mm), and I'd like to "stretch" the x-axis to some 1.5 times the original (so, to 115.5mm); with otherwise the same ranges as shown on the image above. I'm aware I could use the key width to set a width (e.g. ), but I don't know what the initial/default width of the plot is (and the manual doesn't seem to mention that either).   Since I cannot see what is the default width - I'd either have to rely on a different program, say, evince to give me that number; or I'd have to blindly enter values until I see something that I like - both being approaches which I dislike. (I'd rather obtain the actual length that Latex/Tikz/Pgfplots see as width and \typeout it to terminal/log - and then specify the width key based on that value).

I'm trying to calculate the size of a tikzpicture using the current bounding box, but every time I try to extract the coordinates I get 0pt (for everything).    \documentclass{article} \usepackage{tikz}  \newlength{\mywidth} \newlength{\myheight}  % computes width and height of tikzpicture  \newcommand{\pgfsize}[2]{ % #1 = width, #2 = height  \pgfextractx{#1}{\pgfpointdiff{\pgfpointanchor{current bounding box}{south west}}  {\pgfpointanchor{current bounding box}{north east}}}  \pgfextracty{#2}{\pgfpointdiff{\pgfpointanchor{current bounding box}{south west}}  {\pgfpointanchor{current bounding box}{north east}}} }  \begin{document}  \noindent \begin{tikzpicture} \draw node[rotate=90]{  \framebox{  \begin{tabular}{c|c}  first column & second column\\  \hline  1 & A\\  2 & B\\  $\vdots$ & $\vdots$  \end{tabular} }}; \draw[color=red] (current bounding box.south west) -- (current bounding box.north east); \pgfsize{\mywidth}{\myheight} \end{tikzpicture}  \noindent Width = \the\mywidth \\ Height = \the\myheight \end{document}   As you can see, one can draw a line across the bounding box, so it exists and is non-trivial.  I'm thinking I may have to use \pgfgettransformentries, but when?


I've got the following list separated by new line characters (without bullet points yet):  aa bb cc dd ee   now I'm selecting these 5 lines and applying Bulleted List option in editor. This is what I've got:  - aa bb cc dd ee   I think Bulleted List and Numbered List should recognise new lines and create list with 5 items, not 1. This is especially trouble for longer lists.

Let's say I write up a bunch of rows and decide I want to make it a list:  Item 1 Another Item Something Else   When I mark each line and click the "List" button (doesn't matter which one), the Editor takes all three rows and makes one list item out of them, ignoring the line-breaks.  The output will simply be:  - Item 1 Another Item Something Else   It would be far more useful and less buggy if it would instead create one list item for each line:  - Item 1 - Another Item - Something Else


I would like to help newbies on a Stack Exchange site, by posting a link to a tutorial.  Can I do such a thing, and if so where can I put the link? Can I start a discussion for this, or something similar?

I would like to help my fellow Stackizens, using material from my blog or other website.  But external links are sometimes viewed as excessive promotion.  From the FAQ:     Be careful, because the community   frowns on overt self-promotion and   tends to vote it down and flag it as   spam. Post good, relevant answers, and   if they happen to be about your   product or website, so be it. However,   you must disclose your affiliation in   your answers. Also, if a huge   percentage of your posts include a   mention of your product or website,   you're probably here for the wrong   reasons.   I have tried posting answers that reference my blog, and I have followed the above rules, but my answers still get flagged as spam.  How can I craft an answer that references my blog, website or other resource, but is still acceptable to the community?


Recently I am worried about the functionality of my Pentax K-50, i.e. I am not able anymore to get real sharp images. Thus my question arose, what I should see as "sharp". So I took several pictures of a non-moving object (my alarm clock) and zoomed in at the focus point. But even there not everything is sharp when I get real close. Why? Should I check my camera, or is this normal? In the example picture, the focus point is exactly between the buttons in the middle.

I use a Canon EOS Rebel T3i (600D) with the kit lens. I have experimented a lot with different settings and modes, but I feel like I have wasted many good shots that could have looked amazing, if only they were a little bit sharper.  I use auto-focus on most of my pictures and make sure to choose the right focus point, but all of my photos are still a little bit out of focus. When I zoom in, I can see that the pixels are not very crisp or well-aligned.  I am not sure if this issue is caused by my equipment or skills.


Whenever I move around icons in Launchpad, then log out and back in, the layout resets to factory defaults. And for some reason, Launchpad doesn't create it's db file. Why?

I'm trying to use the Launchpad feature in Mac OS X, but my icons keep on getting rearranged.  I'll manually move icons around to my liking, but then after a restart, many of them are automatically rearranged to a different order than what I specified.  Note: It doesn't add an icon to a folder nor does it remove an icon from a folder. I've only seen it rearrange folders or icons which aren't in folders.  Why is this happening, and is there any way to fix it?


I tried to generate a pdf with two classes, but, I don't get the pdf because I have a NullPointerException in the line where I call the function  that generates the document in the second class. I separate the process to generate pdf´s, because the first class have many other necessary functions. I don't know what causes this problem.  package org.ors.osc;  import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream;  import org.ors.osc.Eml2Pdf2; import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException;  import com.itextpdf.text.Paragraph; import com.itextpdf.text.pdf.PdfWriter;  public class Managepdf {    private Eml2Pdf2 eml2Pdf2;    public publishPdf2()  {   Document doc = new Document();   File pdfFile = dataDir.resourcePdfFile(resource.getShortname());   OutputStream out = null;    try {       out = new FileOutputStream(pdfFile);       PdfWriter.getInstance(doc, out);       eml2Pdf2.writeEmlIntoPdf(doc); //In this part get null   } catch (Exception e) {         e.printStackTrace();   } finally {       if (out != null) {           try {                   out.close();                 } catch (IOException e) {                   e.printStackTrace();           }       }   }    }  }   This class call the function writeEmlIntoPdf  package org.ors.oscar;  import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream;   import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException;  import com.itextpdf.text.Paragraph; import com.itextpdf.text.pdf.PdfWriter;  public class Eml2Pdf2 {      public void writeEmlIntoPdf (Document doc) throws DocumentException, FileNotFoundException {          doc.open();         doc.add(new Paragraph("Hello World, iText!!"));         doc.add(new Paragraph(":D"));         doc.close();      }  }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I need to use the identity $\frac{1}{k^2-1}=\frac{1}{2}(\frac{1}{k-1}-\frac{1}{k+1})$ to evaluate $\sum_{k=2}^n \frac{1}{k^2-1}$.  I am confused about how to begin this proof.  Also, how am I supposed to use the identity here?  Do I need to use induction?

I have to find the formula for sum $$\sum_{i=2}^{n} \frac1{i^2-1}$$ I remember reading somewhere that $\displaystyle \frac1{i^2-1}$ can be shown as $\displaystyle\frac1{i+1}$ and $\displaystyle \frac1{i-1}$.  If I can express it as this, then I should be able to create a telescopic sum, and produce the formula easily.  But how can I get to those two fractions in the first place so that I can build the proof?


I want to get the "mean" value of all Orders from my sharepoint list.  How do i do this?  This is my code so far:  function VisaLista() {     namn = document.getElementById("txtNamn");     var camlQuery = new SP.CamlQuery();     camlQuery.set_viewXml(     "<View>" +     "<Query>" +     "<Where>" +     "<And>" +     "<Eq><FieldRef Name='Title'/><Value Type='Text'>" + namn + "</Value></Eq>" +     "<Or>" +     "<Eq><FieldRef Name='Prioritet'/><Value Type='Text'>Hög</Value></Eq>" +     "<Eq><FieldRef Name='Status'/><Value Type='Text'>Startad</Value></Eq>" +     "</Or>" +     "</And>" +     "</Where>" +     "</Query>" +     "</View>");     listItems1 = list.getItems(camlQuery);     clientContext.load(listItems1);     clientContext.executeQueryAsync(OnSuccessVisa, OnFail); } function OnSuccessVisa() {     var listEnumerator = listItems1.getEnumerator();      while (listEnumerator.moveNext()) {         var currentItem = listEnumerator.get_current();         $("#Kategori1").text(currentItem.get_item('_x0072_zb6'));      } }

So I'm getting my listItems with a Camlquery, but i want to calculate the avg of the "price" rows  This is the code I've used so far:  function VisaLista() {     namn = document.getElementById("txtNamn");     var camlQuery = new SP.CamlQuery();     camlQuery.set_viewXml(     "<Where>" +     "<And>" +     "<Eq><FieldRef Name='Title'/><Value Type='Text'>" + namn + "</Value></Eq>" +     "<Or>" +     "<Eq><FieldRef Name='Prioritet'/><Value Type='Text'>Hög</Value></Eq>" +     "<Eq><FieldRef Name='Status'/><Value Type='Text'>Startad</Value></Eq>" +     "</Or>" +     "</And>" +     "</Where>");     listItems1 = list.getItems(camlQuery);     clientContext.load(listItems1);     clientContext.executeQueryAsync(OnSuccessVisa, OnFail); } function OnSuccessVisa() {     var listEnumerator = listItems1.getEnumerator();     var elmt = 0;     while (listEnumerator.moveNext()) {         var currentItem = listEnumerator.get_current();         elmt = (currentItem.get_item('_x0072_zb6'));          var sum = 0;         for (var i = 0; i < elmt.length; i++) {             sum += parseInt(elmt[i], 10);         }          var avg = sum / elmt.length;          document.write("The sum of all the elements is: " + sum + " The average is: " + avg);     }     $("#Kategori1").text = "Medelvärdet för dessa ordrar: " + avg }   I am getting following error     "Cannot get the value length of null - at elmt, line 43


$ sudo apt-get install python3-aptdaemon Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies:  python3-aptdaemon.gtk3widgets :  Depends: python3-aptdaemon (= 1.1.1+bzr982-0ubuntu19) but 1.1.1+bzr982-0ubuntu19.1 is to be installed  E: Unmet dependencies.  Try 'apt --fix-broken install' with no packages (or specify a solution).

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


I have a general question. I have 2 cases (method Test1 and Test2, and I don't know what is the best approach (Performance, ignore case, all aspects):     public void Test1(object transcodingStatus)     {         string _transcodingStatus = transcodingStatus as string;         if (!string.IsNullOrEmpty(_transcodingStatus))         {             if (_transcodingStatus.ToUpper() == AWSTranscoderStatusBindingModel.COMPLETED.ToString())             {                 //DO LOGIC             }         }     }      public void Test2(object transcodingStatus)     {         if (transcodingStatus != null)         {             AWSTranscoderStatusBindingModel enumVale = AWSTranscoderStatusBindingModel.COMPLETED;             if (Enum.TryParse(transcodingStatus.ToString(), false, out enumVale))             {                 if (enumVale == AWSTranscoderStatusBindingModel.COMPLETED)                 {                     //DO LOGIC                 }             }         }     }  Thanks to all helpers :)

What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. In an ideal world, I could do something like this: StatusEnum MyStatus = StatusEnum.Parse("Active");  but that isn't a valid code.


Hi all,  This might be possibly the silliest question you have come across, but its bugging me out. Recently i have bought a 1Watt LED and when enquired with the vendor, he informed that the allowed max voltage is 3V.   So I was thinking that if I source three LED's in series from a 9V battery as shown in the above figure. Here the power source 9V is equal to the voltage dropped by LED's. So my question is   Do i really need to use a current limiting resistor for LED's in the above circuit? Is it safe to use this circuit without resistors?    Thanks in advance.   P.S: Apologies if it was too silly.

This isn't asking the equation to determine the necessary resistor for LEDs, but more asking the general practice for selecting them.   I've seen multiple circuits that have used much higher resistor values than what I would deem to be necessary. For example, I have seen a design that has used a \$330\Omega\$ resistor for a red LED with a forward voltage of \$2V\$, and forward current of \$20mA\$ on a circuit with \$5V\$ supply. By my calculations that's twice as high as it needs to be (\$150\Omega\$).   I've read else where that this resistor is the 'playing it safe' choice, in that they use that wherever and can be confident they wont blow the LED. But is there any other reason behind it? Other than purposely halving the LED brightness.   Perhaps this prolongs the life of the LED? In my circuit I've selected the theoretical correct resistor value for each LED, but want to know if there's a practical rule I'm missing as the resistor values are quite small at times.


Why is the toString method returning jibberish?  char[] arrays = {'a','b','c'};   { a, b, c } arrays.toString()   "[C@6519ceb1"

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


I just want to know after install  ubuntu newly it`s  need to install previous essential software again,That is really time consuming so is there any way that I write command and my essential software download and install automatically.

How do I make post-install scripts so when I reinstall ubuntu everything is as I want it?  Things I want to achive:   Installing PPA  installing my programs themes needs to be installed Settings needs to be changed (power management, short commands, startup applications, etc.) system reboots


Prove the convergence of the sequence $a_{1} = 4$, $a_{n + 1} = \frac{a_{n}}{2} + \frac{2}{a_{n}}$, $n = 1, 2, \ldots$  I'm pretty sure the way to do it is to show $a_{n} > 2$ for $n = 2, \ldots$ and then maybe use the Monotone Convergence Theorem to show it converges to $2$, but I think this also might be wrong. Can someone please help me with this problem? I don't know how to prove a bound for it.

How can I prove that this iterative sequence converges to $2$? Can I use the convergence definition?  $$a_{n+1} = \frac{a_n}{2} + \frac{2}{a_n},\qquad  a_0 = 4  $$  Thanks for the help.


The point of this program is to print "Hello World" 1000 at a certain speed.  The user can press 'f' key to speed up the print or 's' key to slow down the speed and 'x' key to end the program. I need to use getch() so that it does a non-blocking read form the keyboard. I've tried this, but I can't get my head around how getch() works...   #include<stdio.h> #include<ncurses.h>  int main() {     int speed = 5000000, i;     char keypress;     for (i=0; i<1000; i++)     {             printf("Hello World!\n");      keypress = getch();     switch(keypress)             {                     case 'f':                     speed+= 100000;                     break;                     case 's':                     speed-= 100000;                     break;                     case 'x':                     return;                     break;             }     usleep(speed);     printf("__________________________________");     }     return 0;   }

I'm trying to write a program in C (on Linux) that loops until the user presses a key, but shouldn't require a keypress to continue each loop.  Is there a simple way to do this? I figure I could possibly do it with select() but that seems like a lot of work.  Alternatively, is there a way to catch a ctrl-c keypress to do cleanup before the program closes instead of non-blocking io?


"It is imperative that he writes a letter to his sister as soon as possible."  In this case, is the correct form write? If so, why?

Why is this sentence correct?     She suggested that he go to the cinema.   I would definitely use goes instead of go.


Maybe because of the very long code snippet?     App Version: 1.6.6.2 Device: iPhone 6 OS Version: Version 10.3.3 (Build 14G60)

Whenever I attempt to open questions in the Stack Exchange iOS app with extremely large sections of formatted code (like  on Code Review), the app will crash.   Version information:   App Version: 1.6.2.5 Device: iPhone 6s Plus OS Version: Version 10.3.2 (Build 14F89)   After I updated the app to 1.6.6, it did not crash immediately upon opening an offending question, but if I scrolled down by any significant amount, the app would still crash.


I recently asked a question with title "python find the type of a function" and got very helpful answers. Here is a related question.  Suppose I import *.py files written by me, and these imports result in f being one of the functions defined by me. Now I write to my python interpreter x = f. Later, I want to see the full definition of f, preferably with comments still in place, knowing only x. Is this possible? Does python remember which file the definition was imported from, which is, of course, not enough to give the full definition of f, unless one can find the actual relevant definition?

Suppose I have a Python function as defined below:  def foo(arg1,arg2):     #do something with args     a = arg1 + arg2     return a   I can get the name of the function using foo.func_name. How can I programmatically get its source code, as I typed above?


I have this USB flash drive with a Linux partition that I use inside VirtualBox.  Each time I insert it into the USB port, windows keeps asking if it should format it.  Is there anyway to disable Windows from asking that?  Disabling auto-run has not resolved the problem unfortunately. Windows will still check if the disk contains a partition it knows about, and ask to format if it doesn't know it.    Really nice try though, any other ideas?

I've started using TrueCrypt to encrypt a partition on an external USB hard drive. I've opted for using a raw partition as opposed to a file container.  But here's the annoyance. Whenever I connect this drive to a computer running Vista or Windows 7, I get the message popup "You need to format the disk in drive J: before you can use it".   The default option is "Format disk", and I'm afraid one of these days I'll accidentally trigger it.  Is there any way to disable this message?


I want to restrict "rm" command to user who have a sudo access.  example: bob ALL=(ALL)   NOPASSWD:ALL  I have given SSH Access to"bob".  i want to restrict "bob" to run "rm" command. Even though if switched to root.  Any help!

We need to add few users to the sudoers file on Linux. They should be able to to anything root can except the following:   Should not modify, read, delete /nfsshare/config Should not modify, read, delete /etc/passwd Should not mount anything  Should not change root password Should not edit /etc/sudoers or run visudo to add other users   Is this possible?


I want to remove or greatly reduce the time for which the GRUB screen appears. I have used GRUB customizer and gedit. All the values are what they need to be, yet the screen remains for 30 seconds. Using Ubuntu 18.04.   What could be the problem, and how can I fix it?

First of all: Yes, I ran sudo update-grub after changing the value.  After a new install of Ubuntu 18.10 on an empty disk the wait time at the grub menu is of 30 seconds (half an eternity!).  The line GRUB_TIMEOUT in /etc/default/grub had a value of 0. Changing this to 10 did not change the wait time, it was still 30 seconds.  Any ideas?


I want to check the absence of the following sequence of characters $$$$$ (i.e., 5 dollar signs) in a json file using grep as it has been used instead of comma to separate fields and I need to make sure this did not cause conflicts with existing similar sequence.  However, when I grep $, I get similar number of lines. It seems that $ is a special character for end of line?   How can i search for $$$$$ using grep? Is $ a special character?

I want to know which files have the string $Id$.  grep \$Id\$  my_dir/mylist_of_files   returns 0 occurrences.  I discovered that I have to use  grep \$Id$ my_dir/mylist_of_files  Then I see that the $Id is colored in the output, i.e. it has been matched.  How could I match the second $ and why doesn't \$Id\$ work.  It doesn't matter if the second $ is the last character or not.  I use grep 2.9.    Before posting my question, I used google...       To search for a $ (dollar sign) in the file named test2, enter:      grep \\$ test2      The \\ (double backslash) characters are necessary in order   to force the shell to pass a \$ (single backslash, dollar sign) to the   grep command. The \ (single backslash) character tells the grep   command to treat the following character (in this example the $) as a   literal character rather than an expression character. Use the fgrep   command to avoid the necessity of using escape characters such as the   backslash.   but I don't understand why grep \$Id works and why grep \\$Id\\$ doesn't.  I'm a little bit confused...


Note that this is not a duplicate. I am asking about disabling the cache, not clearing it. If you have a cache to clear, then it is obviously not disabled.  On the rare occasions that I notice bash's cache of things that it has found in the path, it's not because it's helpful, it's because it's bloody annoying. An example:  ~ dc$ export PATH=$HOME/bin:$PATH ~ dc$ cat bin/which #!/bin/bash echo "my which" ~ dc$ which my which ~ dc$ rm bin/which ~ dc$ which which -bash: /Users/dc/bin/which: No such file or directory   In another shell ...  ~ dc$ which which /usr/bin/which   I'm sure that this caching made sense back in the good old days when disks were slow and memory was expensive and limited and so you couldn't cache much - caching a path is cheaper than caching all the disk blocks necessary to find a command. But these days it provides no noticeable benefit and causes more problems than it solves. It's a misfeature, verging on being a bug.  And I can't even find a way of disabling it. Any pointers?

When I execute a program without specifying the full path to the executable, and Bash must search the directories in $PATH to find the binary, it seems that Bash remembers the path in some sort of cache. For example, I installed a build of Subversion from source to /usr/local, then typed svnsync help at the Bash prompt. Bash located the binary /usr/local/bin/svnsync for "svnsync" and executed it. Then when I deleted the installation of Subversion in /usr/local and re-ran svnsync help, Bash responds:  bash: /usr/local/bin/svnsync: No such file or directory   But, when I start a new instance of Bash, it finds and executes /usr/bin/svnsync.  How do I clear the cache of paths to executables?


So I'm sending emails to professors right now (during summer break) to get letters. However, some just didn't reply at all, some replied to my previous saying "I don't know if my major is related to your field but you are welcome to ask me other questions" (Is this a no?)  So, what should I do next? Should I wait for them to reply to me? Should I resend? Should I draft another email?

I recently joined a research group as a postdoc. I wrote the professor an email to ask quick but important questions including asking him when when he wanted me to start. It's been over a week and I haven't received get an answer. Other emails I've sent previously have also gone unanswered for long periods as well.   With that background, my question is: do professors sometimes (intentionally or otherwise) not respond to emails in a timely manner?


I know from the website that greyhound just say that they don't guarantee the time of their bus and though luck if it happens:     The bus was late. Am I entitled to a refund?      No. While Greyhound makes every effort to provide on-time service, it   does not guarantee its departure and arrival times, which may be   affected by any number of factors including weather, traffic, or   mechanical problems. Greyhound is not liable for any inconvenience or   expense caused as a result of such a delay.   From their website.  I'm in a situation where they left me stranded in Toronto in the middle of the night and I'll miss the reason I'm travelling if I continue with the bus. Hence I'm going to take another mean of transportation. I've missed two connections along the way already and I feel like dropping people in the street at 1am should be illegal. However, I'm wondering if I do have any sort of recourse in this situation or if the fact that they say on their website that they won't assume any responsibility is enough for it to be true.

I'm buying a bus ticket to get to Boston 23 hours before my flight to ensure I reach my departure airport on time.  If I didn't arrange bus transport well in advance, what legal remedies would I have if a delayed bus caused me to miss my flight?


At first the question of what $\sqrt{x^2}$ is seems silly. It looks like $x$. And for $x \in \mathbb{R}^+$ it is.  However, for $\mathbb{R}$, I'm not sure. I can think of 3 answers:   $abs(x)$ $\{x,-x\}$ $x$   Which one is correct and why?

There is a formula given in my module:  $$ \sqrt[n]{a^n} = \begin{cases}  \, a  &\text{ if $n$ is odd } \\  |a| &\text{ if $n$ is even } \end{cases} $$  I don't really understand the differences between them, kindly explain with an example.


I have two installations of Ubuntu 15.10 on my laptop, and I want to get rid of one of them. How can I remove one of them? I've seen a lot of answers to related questions, but they all deal with how to install from a startup disk or something like that, and wipe the hard drive. I want to keep one installation of Ubuntu, and remove the other.

I've installed Ubuntu 13.04 two times on my PC. Each on a different partition. I would like to delete the one which I'm not using. How would I do that?


We know the color of both Harry's and Hermione's eyes but what color are Ron's eyes? Was it ever stated in the books?

The Avada Kedavra curse is recognisable by the flash of green light and the rushing noise emitted from the caster's wand.   -    I thought green was commonly one of the colors used by light side (the good side). Like in Star Wars, where Jedi light sabers are green or blue, but Sith light sabers are mostly red. But in Harry Potter the light emitted after casting the Killing Curse is green and the defensive spell (casted by Harry Potter) is red. Why the colors are switched in Harry Potter?


I've been using my MacBook air 2019 for quite some time now (9 months) and I've been getting 110 degrees fahrenheit on average with simple use like google chrome or safari. In fact, the highest I have gotten it to reach was 184 degrees fahrenheit. Is this normal? Does anyone else get this issue? Do you think a hard reset could solve this issue? I would like to mention that I have not downloaded any software that takes up much battery. Also, when I'm only using google chrome, my mac tends to only have 100 or fewer megabits of free ram. Another thing that I would like to mention is that my MacBook's REAL battery capacity has been going down by 2% every month. Does anyone know why I'm having all of these problems? Any response would be helpful! Thank you!

My Macbook Air 13", Mid 2011, got heated and is slow in working. I noticed that CPU Die temperature reaches 90° C, is that normal?  I've changed my fan recently but still get this issue.


Please specify about where to use full window modal over Modal popup. Refer attached images

What exactly is a modal dialog window and when should you use it? Are there certain cases where you should refrain from using one?


I am running discourse and I am trying to modify what happens when one clicks the logout link, I do not want to modify discourse stock javascript...   There is an element elem1 that when clicked inserts another html menu with the logout link. So is it not present when $(document).ready.. is called. I need to modify what happens on elem2.click which is where the logout link is.   I want to do this...  $("#elem1").click(function() {     console.log("step1")     $("#elem2").click(function () {         console.log("step2")         ..do my custom logout      }) })   but I think jquery is not finding it because it was not there when it first loaded.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


In  to a recent question on World Building, I suggested that quantum-entangled particles would be a good way for ships traveling at relativistic speeds to communicate. My understanding is that quantum-entanglement allows for instantaneous action at a distance.  Is this accurate? Do quantum-entangled particles, when flipped, effect an immediate/instantaneous flip on the other side? Do relativistic speeds affect quantum-entangled particles in their speed of "communication?"

As I understand it (from a lay physics perspective), quantum entanglement has been experimentally demonstrated - it is a reality. As I understand it, you can measure something like the spin of an electron and know that its entangled pair will, in that same instant, no matter where in the universe it is, have the opposite spin.   This would not seem to have any utility as the foundation of a superluminal communications device. Is this true, or has it been established that is there some aspect of quantum entanglement that can ultimately lead to the development of such a device.  In other words: is superluminal communication via quantum entanglement an open scientific question, has it been settled as an impossibility, or is it currently more of an engineering problem than a scientific one?


OSM has information about the levels of road segments for example road crossing railway.   It is possible to order layers dynamically from the level attribute?   I only found one possibility in QGIS to order layers, but they are fixed and only manually set.

Probably a very basic question here, I want to change the draw order of a shapefile in QGIS, how can this be done?  As you can see in the picture below, only the "10" layer is shown, the others are below it... However, since this is a depth map of Skagerrak, I would like the other layers to show up on top of it.


Show $f(x)=\sqrt{x}$ is uniformly continuous on $[0,\infty)$     Let $\epsilon>0$, then there exists a $\delta=\epsilon^2$ such that $|x_1-x_2|<\delta$ for all $x_1,x_2\in[0,\infty)$.  $\begin{align}|f(x_1)-f(x_2)|&=|\sqrt{x_1}-\sqrt{x_2}|\\&<\sqrt{|x_1-x_2|}\\&<\sqrt{\delta}\\&=\epsilon\end{align}$    Can someone tell me where I did wrong? I don't see where the error is. Thanks    EDIT  From comment, people said the argument I have is right, I want to know how to show $|\sqrt{x_1}-\sqrt {x_2} |\leq\sqrt {|x_1-x_2|} $ is true.

Prove that the function $\sqrt x$ is uniformly continuous on $\{x\in \mathbb{R} | x \ge 0\}$.  To show uniformly continuity I must show for a given $\epsilon > 0$ there exists a $\delta>0$ such that for all $x_1, x_2 \in \mathbb{R}$ we have $|x_1 - x_2| < \delta$ implies that $|f(x_1) - f(x_2)|< \epsilon.$  What I did was $\left|\sqrt x - \sqrt x_0\right| = \left|\frac{(\sqrt x - \sqrt x_0)(\sqrt x + \sqrt x_0)}{(\sqrt x + \sqrt x_0)}\right| = \left|\frac{x - x_0}{\sqrt x + \sqrt x_0}\right| < \frac{\delta}{\sqrt x + \sqrt x_0}$   but I found some proof online that made $\delta = \epsilon^2$ where I don't understand how they got? So, in order for $\delta =\epsilon^2$ then $\sqrt x + \sqrt x_0$ must $\le$ $\epsilon$ then $\frac{\delta}{\sqrt x + \sqrt x_0} \le \frac{\delta}{\epsilon} = \epsilon$. But then why would $\epsilon \le \sqrt x + \sqrt x_0? $ Ah, I think I understand it now just by typing this out and from an earlier hint by Michael Hardy .


I have a Dell 1564. I want to install back-box a Debian based flavor of Linux.  I don't really wish to dual boot like switching between operating systems, but I do wish to run either at choice from the hard drive. Can I partition the hard drives in two parts and install Linux on one and windows 7 on the other?  If so will, I get a choice when booting?

I'm about to purchase an Asus motherboard with EFI firmware and wanted to prepare myself for installing Windows and Debian once the hardware arrives. I was hoping that someone who has gone down this road could give me a few pointers.  What preparations should I make before attempting to install Windows 7 and Debian on a new UEFI based system?


The following problem is part of my Algebra problem set:  Let $\alpha= \sqrt[3]{2}+\omega$ ,where $\omega=e ^{2\pi i /3} = -\frac{1}{2} + \frac{\sqrt{-3}}{2}$ is a primitive cube root of $1$.   $\alpha$ is a zero of $f(x) = 9 + 9x +3x^3 + 6x^4 + 3x^5 + x^6$.  Show that $f(x)$ is irreducible.  ** Eisenstein's Criterion fails here I realize that Gauss's Lemma is the best method of proving this although I am unclear as to whether proving the irreducibility of a polynomial in a subfield is sufficient to prove that it is irreducible. **  Please Also note that we have not had any Galois Theory.  Show that $\mathbb{Q}(\alpha)$ is the smallest field which contains all three zeros of $x^3 -2 $ (this is called the splitting field of $x^3 -2$).  Thank you in advance for your help!

Given a polynomial $f(x)=9+9x+3x^3+6x^4+3x^5+x^6$ and one of its roots $\alpha=2^{1/3}+e^{2\pi i/3}$. Show that $f(x)$ is irreducible in $\mathbb Q[x]$.  Eisenstein's criterion fails, it also didn't use the fact that $\alpha$ is a root of $f(x)$. How should I approach? Thanks


I don't play any games online, I only play offline for passing the time, and I need to run in windowed mode to see the taskbar and chat and stuff.    I know I can just hit Esc it or Alt+Tab it or Alt+Enter or the Windows key, but I need to see my taskbar at all times and can only do that in windowed mode.   I've tried changing the shortcut path adding the -w or -windows, as well as Alt+Enter, d3d windower, dxwnd, and the option in 3dAnalyze to force windowed mode.  Is there a way to run Starcraft/Brood war in windowed mode offline?

I'm interested in livestreaming Brood War until I get StarCraft II. Kind of a kickoff event. It would be super helpful to get StarCraft into a window. I've tried a few things, but they all seem to not work, most likely because of how old BW is.  Suggestions?


Is it possible to query how many questions per day have been asked on a particular subject on Stackoverflow over a period of time?  For instance, I can use  to compare number of searches per unit time for different search terms, but often the results are skewed because I'm searching for a technology that shares the same name as something else. For instance, searching for 'java vs c#' on Google Web Trends would probably pick up quite a lot of noise as java is also a type of coffee, and c# is a musical note.  This could be a great way to look at what technologies are 'up and coming', and potentially what I should learn next.

This is the announcement post of the Stack Exchange Data Explorer. Its answers were meant to iron out the initial glitches 6 to 8 years ago.  If you have found a bug or need support  today with any of SEDEs features, please ask a new question and tag it with   What does it do? Allows you to run arbitrary SQL queries on the data dumps, and share those queries with your friends. Technical details It is hosted on the Stack Exchange infrastructure , the database is hosted on the same SQL Server version all other sites are hosted on. You can use most of the TSQL commands, even create temporary objects (but not User Defined Functions). The controls used are jQuery based, the grid is  . All query results are cached, so sharing a link to a query will not result in the server going in to a tailspin. The query edit control is a slightly modified  control, I also am considering bespin cause the inter iframe communication is nasty complicated. It gives up nice syntax highlighting for queries. Parameters There is support for parameterized queries, to get it to work name your params like ##this##. For example have a . Query name and description A query can have a name and description, to name it lead with a comment, to describe it continue commenting, for example: -- This is my query name  -- This is my description -- I can span multiple lines  SELECT 1  Anonymous users can initially name a query, but can not change the names of any existing queries. Tutorial There's a  which helps you getting started in writing your own SQL queries. Logging in You can use your openid provider to log in, at the moment once logged in we will track the list of queries you execute (giving you basic history support) Also if there are any params named UserId they will be populated automatically if your EmailHash matches the one on the site being queried. Magic columns If you alias an id column with as [Post Link] it will automatically create a link in the result set to the parent site. Similarly if you alias an id column with as [User Link] it will display a link to the user page. select top 10 * from Posts will show you how tags are done. (Magic columns for images is planned) example (most controversial posts:  ) So what are you waiting for, check it out at  Any feedback would be greatly appreciated. I hope to have the login section working fairly soon and allow voting on the best queries and commenting. Featured Queries At the moment, admins have permission to feature interesting queries on this page , I am looking for better ways to manage the huge query list that is building up.


I have an input called divisibleBy which is an integer. I want to get all the possible numbers that it is divisible with except itself.   For example:  var divisibleBy = 16;   the output should be "2,4,8". "16" was not included because it is equal to itself. Now i want it to be a list but without using for loop. It could be using a LINQ or whats your recommended. since there is a possibility that the divisbleBy can be greater than 1000 so looping would cause performance issue.  heres my current code using loop  var list = new List<int>(); for (var cols = divisibleBy - 1; cols > 0; cols--) {     if (divisibleBy % cols != 0) continue;      list.Add(cols); }

All numbers that divide evenly into x.  I put in 4 it returns: 4, 2, 1  edit: I know it sounds homeworky.  I'm writing a little app to populate some product tables with semi random test data.  Two of the properties are ItemMaximum and Item Multiplier.  I need to make sure that the multiplier does not create an illogical situation where buying 1 more item would put the order over the maximum allowed.  Thus the factors will give a list of valid values for my test data.  edit++: This is what I went with after all the help from everyone.  Thanks again!  edit#: I wrote 3 different versions to see which I liked better and tested them against factoring small numbers and very large numbers.  I'll paste the results.  static IEnumerable<int> GetFactors2(int n) {     return from a in Enumerable.Range(1, n)                   where n % a == 0                   select a;                       }  private IEnumerable<int> GetFactors3(int x) {                 for (int factor = 1; factor * factor <= x; factor++)     {         if (x % factor == 0)         {             yield return factor;             if (factor * factor != x)                 yield return x / factor;         }     } }  private IEnumerable<int> GetFactors1(int x) {     int max = (int)Math.Ceiling(Math.Sqrt(x));     for (int factor = 1; factor < max; factor++)     {         if(x % factor == 0)         {             yield return factor;             if(factor != max)                 yield return x / factor;         }     } }   In ticks. When factoring the number 20, 5 times each:   GetFactors1-5,445,881 GetFactors2-4,308,234 GetFactors3-2,913,659       When factoring the number 20000, 5 times each:   GetFactors1-5,644,457 GetFactors2-12,117,938 GetFactors3-3,108,182


I developed an Addin in AGP 2.5 where I am using connection files to open database connections at runtime. So far that worked perfect. The connection files are stored on a network drive, referenced in the Addin with absolute paths. DatabaseConnectionFile connectionFileValidering = new DatabaseConnectionFile(new Uri(AppSettings.Default.sde_validation)); Now that I am doing some maintenance on the Addin I am running into the following error when trying to open the enterprise database: Database test_db = new Database(connectionFileValidation); I am getting the following error. 'Database test_db = new Database(connectionFileValidation)' threw an exception of type 'ArcGIS.Core.Data.GeodatabaseException' Data: {System.Collections.ListDictionaryInternal} HResult: -2146233088 HelpLink: null InnerException: {"Error HRESULT E_FAIL has been returned from a call to a COM component."} Message: "A geodatabase exception has occurred." Source: "ArcGIS.Core" StackTrace: " at ArcGIS.Core.Data.Database..ctor(DatabaseConnectionFile databaseConnectionFile)" TargetSite: {Void .ctor(ArcGIS.Core.Data.DatabaseConnectionFile)} With respect to the error message I found some stuff that is not related to ArcGIS, but did not help either. Anybody here can point me the direction of a solution?


I was reading about the convex set and its various properties. I came up with a theorem but don't know how to prove it.  Theorem: A convex set has empty interior if and only if there is a hyperplane containing the set.  Someone please give an idea how to prove it.

In Section 2.5.2 of the book Convex Optimization by Boyd and Vandenberghe, the authors mentioned without proving that "a convex set in $\mathbb{R}^n$ with empty interior must lie in an affine set of dimension less than $n$." While I can intuitively understand this result, I was wondering how it can be proved formally?


I'll be flying from Malaysia to Canberra pretty soon. My flight from malaysia will reach Melbourne at 4.55am while my connecting flight from Melbourne to Canberra is at 7am. Both flights are in the same airport but different terminals (T2 to T3).  I was wondering if 2 hours and 5 mins sufficient for me to go through customs, collect my baggage and re-check-in for my connecting flight to canberra? Or do i need to re-book my flight?

I am flying from the U.K. to Melbourne, Australia. I then have to catch a flight to Sydney (a separate booking) but I'm worried about how long I need in between landing and the Sydney flight. I land at 18:55 and my Sydney flight is 20:45. I only have hand luggage.  Is this enough time?


Using Hensel's lemma is it true that $X^2-z$, for $z\in \mathbf Z$ any integer have no roots in 2-adics ?   Hensel's lemma only shows, if a root of a polynomial can be lifted to a root in $\mathbf Z_p$, so it doesn't say anything about the nonsolvability but if I look at the conditions:  If there is an $a$ s.t. $f(a)\equiv 0\mod p,\quad f'(a)\not\equiv 0\mod p$  If $p=2$, then the derivative is always zero for a polynomial of the form $X^2-z$, Is there still a root ?

Does anyone know an "elementary" proof of the following theorem?  Let $k \neq 0$ be a rational integer. Then $k$ admits a square root in $\mathbb{Z}_2$ if $k = 4^a (8b+1)$ for some $a \in \mathbb{N}$, $b \in \mathbb{Z}$.  About $p$-adic numbers I don't know anything more sophisticated than Hensel lemma. Thank you!


I have Postfix setup in a test environment, segregated from our LAN, and relaying for hosts in the test environment. Originally, I had all outbound email funneling through procmail and into a single account on the postfix box (accessed via Dovecot by the devs). This allows the developers to test production code which sends email notifications without having the email actually reach it's intended recipient.   Now I need to actually allow for one host to relay to the actual world and not the "funnel" account. I still need to "lie" and accept email from any sender to anywhere (in the test environment of course) and funnel it into the funneluser account. I'm not quite sure what to even google for as this isn't a typical postfix setup. How can I add an exception for a single sending host, given the config below?  UPDATE The noted "duplicate question" does not, at this time, contain a working example for postfix 2.9.6-1~12.04.  postconf: warning: /etc/postfix/master.cf: unused parameter: smtpd_client_restriction=check /usr/sbin/postconf: warning: /etc/postfix/master.cf: unused parameter: smtpd_client_restriction=check   Neither am I certain it's actually a duplicate as the answer appears to route mail based on user@domain pair. I want to route based on the connected host IP address or DNS hostname. I have posted a question to the linked "duplicate" in an attempt to resolve the issue.  My main.conf looks like this:  myhostname           = cliff.blah.net alias_database       = hash:/etc/aliases mydestination        = regexp:/etc/postfix/virtual_domains virtual_alias_maps   = regexp:/etc/postfix/virtual mynetworks           = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.2.1.0/24 mailbox_command      = /usr/bin/procmail relay_domains        = .blah.net smtpd_recipient_restrictions = permit_mynetworks, permit_auth_destination, reject local_recipient_maps         =   virtual and virtual_domains are here:  # cat virtual /@/     funnelmail  # cat virtual_domains /.*/ MATCH   UPDATE2  I cannot get the example at the link above working. Maybe there is a difference in postfix versions or too many typos I don't know. I did get multipole instances running with same server on different ports but cannot post my solution here because someone closed the thread so good luck.

I have 4 servers. prod1.example.com, prod2.example.com, dev1.example.com, and dev2.example.com. They all send their mails to smtp.example.com. This server does the relay. Now I want that dev1 and dev2 send all their e-mails to devbox@example.com except for the e-mails that are sent to admin@example.com. The e-mails from prod1 and prod2 are relayed without any restriction.  I read that in the access file you can define that a server must be handled by a filter instead of a simple RELAY (with FILTER foo:bar). I cannot find how and where I need to define this foo (transport) and bar (destination). Al these different parameters confuse me. Also in what order are the different files handled?  Can anybody help me out?


I currently have a machine running Windows 7 on it and would like to set up a dual boot with Ubuntu (14.03). The computer is an all-in-one and therefore came preassembled and preinstalled with the OS. It also has 4 partitions: 1 System partition (I think Windows creates this upon installation automatically), 1 Boot partition on which the main part of my OS resides, one Recover partition (20GB) and one OEM partition (I think this might have been created by the manuacturer of the HDD). I also shrunk my Boot partition and created some unallocated space to install Ubuntu in. Now as I understand it, I will not be able to install Ubuntu with 4 (primary?) partitions already on my system. I don't know if the OEM partition for example could be removed without causing damage so that I can install Ubuntu. Also one quick question to the installation itself: Should I choose install alongside Windows? Will Ubuntu automatically install in the unallocated space if I do that? Any advice is greatly appreciated!

I would like to install Ubuntu alongside Windows 7 on a HP G62 Notebook. Although I have installed  Ubuntu in a dual-boot many times before, I found out that this model has already four partitions.    Partitions:   SYSTEM (NTFS, 199MB, used 66.59MB) Partition without any tag: NTFS (579GM, used 129GB)  RECOVERY (NTFS 16.74 GB, used 2.42GB)  HP_TOOLS (FAT32, 103.34 MB, used 13.23MB)   Since I am not an expert with partitions I would like to get advice on how to do this.  My first idea is this one:   Free some space from /dev/sda2 (I don't know if could also free some other space) delete the HP_Tools partition (I have already created a backup) create an extended partition with the free space in #1 containing three parititions: swap (1gb); / (EXT4, 30GB);  /home (EXT4, 120GB)   Another option is to use wubi instead.  What do you think? Is there any other way to achieve this?  PS: I really think this HP policy of using 4 partitions is not a coincidence  PS: I tried using gparted from the live CD and I got a warning message saying that if I freed some space from /dev/sda2 I could create serious issues in the system


to bring  to the front, as it clearly got lost or was reintroduced to google-code-prettify  Still Literal Strings will highlight the rest of the code as String, see this screenshot:    in the question referenced there is the answer, that this should have been fixed with code-prettify upgrade, but as it is clearly still not that way, i hereby ask this question:  Why is the codeblock highlighted as Strign after the String Literal?

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


So I want to hide the listing of all files to a particular group, yet I want them to be able to create/read files in that same folder. The following permissions on the folder appears to work (write and execute for the group):  chown root:shareusers /home/share chmod 730 /home/share   Disabling read for the group prevents them from listing the contents (which is what I want).  "execute" against the directory then appears to permit the users to both read/write files in the folder (which is also what I want). Just attempting to understand why this works?

In my CMS, I noticed that directories need the executable bit (+x) set for the user to open them. Why is the execute permission required to read a directory, and how do directory permissions in Linux work?


When I play duo ranked, my partner always gets first pick, and I'm last pick.  Sometimes I do duo queue with another person, and that person goes third, and I'm second.  The position is determined by which variables? elo? playing behaviour? wins/loses? league points?

In ranked games when champion selection happens is the order you pick based on your Elo against your teammates?   For example if I am 2nd pick on my team. Does that mean I have second highest Elo on the team?


I just bought Outlook 2019 from Microsoft, downloaded it, and attempted to install it.  All of Office installed, which is not what I expect or want.  I tried to stop it while it was happening, but closing the window only minimized it (there was no cancel, or anything sensible like that).  The progress bar never budged from the left edge.  After waiting for a long time, I pulled up Outlook from the Start Menu and Uninstalled it.  I did the same from the Control Panel, then noticed that the system notification area still showed an icon for Office downloading.  I rebooted and found Word, Powerpoint, and Outlook installed.  I have four questions.  (1) How do I rein in this malware behaviour of the installer and just install what I bought?  (2) How do I go about uninstalling the suite of apps which were imposed upon me?  (3) Is there actually a way to install Outlook alone, or does buying Outlook mean installing all of Office and only enable Outlook?  That seems incredibly disrespectful and wasteful of user resources.  (4) When I eventually get to starting Outlook properly, is there a way to create a profile that doesn't connect to a Microsoft account?  I bought it (instead of Office 365) in order to manage my personal information locally, and avoid Microsoft's cloud.  With regard to #4, there was a point in the installation process where I was asked for my email address and there was one button  -- to connect.  I checked off a box to manage/setup my account/profile manually (something to that effect).  Nothing happened, but that might be due to my interruption of the unwanted Office setup.  It's never clear what state the installer is in.  The installer seemed to be designed to railroad you into the cloud, and to go sideways for anything else.  Also regarding #4, I saw this page on setting up Outlook as a PIM without email:    I can't follow it, as outlook.exe is not recognized.  Even though it shows up when I click Start, I can't right-click it to get it properties & location like in Windows 7.  Would anyone know how to get at this in Windows 10?  Thanks.  2nd attempt, 2 days later  I uninstalled all things Office and re-ran the installer *.exe file.  It did not ask for my key, so I assumed that the key was requested when I downloaded the installer. Most of the windows in the installation process referred to Office rather than Outlook:      I invoked Outlook in the Start menu, but quit when it didn't give me an option to manually set up my account:    This is in line with John's suggestion to set up accounts using Mail in the control panel.  Depending on where I look, however, I might have Outlook 2016 or Outlook 2019.    Now I'm more confused than before. I don't want to launch Outlook 2016 because that is not what I purchased.

I just started the Office 2016 Setup/Installation on my Windows 10 PC. The installation worked fine and started automatically showing only this dialog:    But there are no additional settings possible! I need to choose which programs I want to install and also add additional tools that are often missing when doing a default installation.  How can I change the Office Installation Settings?   Choose programs to install Add/Remove Office Tools (Maybe) Office installation directory   When I check after the installation in the the windows settings, the Office can only be uninstalled - no modifications available:


This is my JSON data that I have to get into my interface: {     "data": [{         "id": "1",         "ccode": "+256",         "status": "1"     }],     "ResponseCode": "200",     "Result": "true",     "ResponseMsg": "Country Code List Found!" }  Interface: @POST(APIClient.APPEND_URL+"code") Call<JsonObject> getCode(@Body JsonObject object);  This is where it is throwing the exception on result.toString(). Remember it is a callback, in this method callback(JsonObject result, String callNo) Gson gson = new Gson(); Country country = gson.fromJson(result.toString(), Country.class); cCodes = country.getData(); List<String> Arealist = new ArrayList<>(); for (int i = 0; i < cCodes.size(); i++) {     if (cCodes.get(i).getStatus().equalsIgnoreCase("1")) {         Arealist.add(cCodes.get(i).getCcode());     }  From the models below I am supposed to call data in the above callback public class Country {      @SerializedName("data")     private List<PhoneCodes> mData;      @SerializedName("ResponseCode")     private String mResponseCode;      @SerializedName("Result")     private String mResult;      @SerializedName("ResponseMsg")     private String mResponseMsg;      public List<PhoneCodes> getData() {         return mData;     }     public void setData(List<PhoneCodes> data) {         mData = data;     }     public String getResponseCode() {         return mResponseCode;     }     public void setResponseCode(String responseCode) {         mResponseCode = responseCode;     }     public String getResponseMsg() {         return mResponseMsg;     }     public void setResponseMsg(String responseMsg) {         mResponseMsg = responseMsg;     }     public String getResult() {         return mResult;     }     public void setResult(String result) { mResult = result; } }  public class PhoneCodes {      @SerializedName("ccode")     private String mCcode;      @SerializedName("id")     private String mId;      @SerializedName("status")     private String mStatus;      public String getCcode() { return mCcode; }     public void setCcode(String ccode) {         mCcode = ccode;     }     public String getId() {         return mId;     }     public void setId(String id) {         mId = id;     }     public String getStatus() { return mStatus; }     public void setStatus(String status) {         mStatus = status;     } }  How do I get round this?

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Can I upgrade my GCC compiler now in Ubuntu 14.04? Has the final usable version (4.9) been released?

How do I install the latest version of gcc and g++?  I am using a variety of C++11 and C++1y features; which is why I need this.


can you help me?...  Let X $\subseteq \mathbb{A}^n$ be an algebraic set, and $f, g:X\rightarrow k$ two regular functions. If $X$ is irreducible and an open $U \subseteq X$ exists such that $f_{|U} = g_{|U}$, prove that $f=g$.  I have been able to prove that:  Let E be the subset where $f = g$ so E is closed (Why? I know that $E = (f,g)^{-1}(\Delta_{k})$ but... why is $(\Delta_{k})$ closed?). So $U \subseteq E \Rightarrow \bar{U} \subseteq \bar{E}=E$ (beacuse E is closed) $\Rightarrow X \subseteq E$, because $\bar{U}=X \Rightarrow E = X$ and $f=g$ in X.

I've read this exercise on my book, but I don't know how to prove it... Can someone help me?  Let X $\subseteq \mathbb{A}^n$ be an algebraic set, and $f, g:X\rightarrow k$ two regular functions.  a) If we see $f$ as an application $X \rightarrow \mathbb{A}^1(k)$, prove that $f$ is continuous in the Zariski topology.  b) If $X$ is irreducible and an open $U \subseteq X$ exists such that $f_{|U} = g_{|U}$, prove that $f=g$.  c) Give an example of $X, f$ and $g$ such that $f \neq g$ but $f_{|U} = g_{|U}$ in an open $U \subseteq X$.  Thank you!  For b) I have been able to prove that:  Let E be the subset where $f = g$ so E is closed (Why? I know that $E = (f,g)^{-1}(\Delta_{k})$ but... why is $(\Delta_{k})$ closed?). So $U \subseteq E \Rightarrow \bar{U} \subseteq \bar{E}=E$ (beacuse E is closed) $\Rightarrow X \subseteq E$, because $\bar{U}=X \Rightarrow E = X$ and $f=g$ in X.


What command can you use to quickly find which file on your home folder containing the umask command?  $ grep -rnw "umask" ~

I want to find all files which contain a specific string of text. The grep command works, but I don't know how to use it for every directory (I can only do it for my current directory). I tried reading man grep, but it didn't yield any help.


I have  bash-script that uses sudo commands, but in the middle I need to stop sudo-influence and then later reinstate it.  Very simple version using Pseudo code  sudo apt-get install -y synaptic sudo ... // I need to suspend sudo here, otherwise the folder  // is created with root as the owner. mkdir ~/mystuff // then reinstate it here sudo apt-get install -y ssllib   Does sudo request the passphrase as soon as it starts to run a bash script - or- does it only ask when it encounters the first "sudo" line?  If so, then I think I may be able to move all the non-sudo stuff to the top. But, the problem there is I will have to wait until the first "sudo" line is encountered to then enter the passphrase.

I want to turn my system on automatically every day. So I use the below code in my Python script, but sudo asks me for a password every time:  os.system('sudo sh -c "echo date \'+%s\' -d \'+ \        24 hours\' > /sys/class/rtc/rtc0/wakealarm"')   How can I run this script without sudo asking for the password every time?


I have  an object "a" and would like to duplicate it to "b"  When I delete an element in "a" why is "b" also being affected?  var a  = {'apple':1,'orange':2,'grapes':3} var b = a   console.log(a,b) delete b.apple console.log(a,b)   Now a and b are the same. I only want the element in b to be deleted.  How can I do this

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


Here is a series, a friend of mine gave me.  Examine the convergence of the series  $$\sum_{n=1}^{\infty}\frac{\sin(\sqrt{n})}{n}.$$ It is from the book A Garden of Integrals, Frank E. Burk. It is given after the chapter "The Euler Summation Formula". So I am interested in a solution, which avoids this formula, and is, say, more elementary in terms of the tools it uses. Thank you!  EDIT. Thanks for pointing out the earlier question. Sorry that I did not look up. The solution there is very nice. If you find any other solutions, please post them.

This was asked at an oral examination.     Does the series  $\displaystyle \sum _{k\geq1}\frac{\sin\left(\sqrt{k}\right)}{k}$ converge ?   After playing with Mathematica, it's very likely it converges, but slowly (sort of oscillating).  To actually prove convergence, summation by part is useless since  $\displaystyle \sum _{k\geq1}\sin\left(\sqrt{k}\right)$ diverges.  Any suggestion is appreciated.


"X is a dependency of Y" means that Y depends on X (i.e. we have to import Y in X's  source code).  Is there a word that fits in "Y is a ??? of X", meaning X uses Y?

What is the correct word for "dependee"?    In other words, what is the word for something that is depended upon? The relationship here is in the context of software engineering


I want sublime text editor open via sublime command, i've all ok for install sublime text 2, but when type sublime in terminal then showing me error, see below, anyone know how i can fix this ?  root@tmdwc:~# sublime (sublime:22192): Gtk-WARNING **: cannot open display:

Possible Duplicate:          I am getting the following error message when using ssh to log into a remote machine:      gedit: cannot open display   I am using ssh in - Ubuntu 12.04.


I have observed this on  community, but this probably applies to all communities on .  On March 2, 2019, I scored 200 reputation and I did not receive the silver "Yearling" badge.  On March 4, 2019, , so now I have 202 reputation and I immediately got the "Yearling" badge.  My case shows that to get the silver "Yearling" badge we must have "over 200 reputation", not "at least 200 reputation", as it is written for example :  Is this what it should be like, or maybe I misunderstand something?

I just noticed that I've been a member for 1 year and 2+ days. I hovered over the 1 year text to see the date. I have exactly 200 rep.  I found multiple questions about the Yearling badge not being awarded, but the users hadn't quite reached the 1 year mark yet.  I thought maybe I needed more than 200 rep, but the badge description says at least 200.  So perhaps the association bonus doesn't count? Or perhaps the description is incorrect and should read more than 200. Or perhaps the badges aren't awarded in real time and I have to wait for some scheduled calculation?   says that rep > 200 is required. However,  says rep >= 200 is required. And  says the association bonus does count, but rep > 200 is required. A comment on  says the calculation is done nightly.  Just curious. Why haven't I received my Yearling badge for meta? If I need more than 200, the description should be corrected. And does that mean I have to wait another whole year?  Updated  If we consider the comment by Sha Wiz Dow Ard and take the definition of earn literally, we didn't earn our first rep point. But that is misleading because what about rep that you earned and then gave away as a bounty (or lost by other means)? You still earned it.  For reference, this is the description at time of writing.     Active member for a year, earning at least 200 reputation    It seems that it is calculated on how much you have and not how much you earned. So you need to have rep > 200. And thus, it should be explained that way.  I think the description on the  and the description in  should be updated. I know I can edit the answer, but while I now have anecdotal evidence, I am still not exactly sure how the calculation is done behind the scenes.  For reference, the wiki answer has this description at time of writing.     Have a reputation ≥ (number of years as an active user) × 200


My code works fine except for the part where I am supposed to ask the user if they would like to quit the program. It's a simple y/n that should trigger the entire program to repeat if 'n' is entered and terminates when 'y' is entered. I know i need to use a while loop but i just can't figure out exactly how I need to write it in code so that it works like expected.   import java.util.*;  public class MilitaryTime   {  public static void main (String [] args)     {              Scanner in = new Scanner(System.in);             int hour1, minute1, hour2, minute2;              System.out.print("Please enter the first time: ");             int time1 = in.nextInt();             System.out.println();             hour1 = time1 / 100;             minute1 = time1 % 100;              System.out.print("Please enter the second time: ");             int time2 = in.nextInt();             System.out.println();             hour2 = time2 / 100;             minute2 = time2 % 100;              System.out.println("Time elapsed: " + (Math.abs(hour1 - hour2) + " Hours, " + (Math.abs(minute1 - minute2) + " Minutes \n")));              System.out.print("Do you want to quit? (y/n): ");             String answer = in.next();              while (answer != "n")             {              }      }  }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


New to Automation , I am using selenium with JAVA.  I have come across a stumbling block our developers do not assign ID to our elements and JFS assigns it own ID , however the ID's are dynamic and keeps on changing.  Also the xpaths and css selectors also contains the dynamic id's.  I have seem some methods of using contains , starts with , however cannot seems to get it correct , when I inspect my element I get below   <button type="button" class="ui-datepicker-trigger ui-button ui-widget ui-  state-default ui-corner-all ui-button-icon-only" aria-label="Show Calendar"  aria-haspopup="true" role="button" aria-disabled="false">ui-button</button>   xpath - //[@id="j_idt67:j_idt69:j_idt70:j_idt100:j_idt101:calendar"]/button  css selector = #j_idt67\3a j_idt69\3a j_idt70\3a j_idt100\3a j_idt101\3a  calendar > button   I f anyone could assist and advise on how you would locate the element and insure that it would not change , would be of great assistance , if you require further info , let me know , like I said new to automation

How to Handle Dynamic Changing IDs In XPath? for example :   //div[@id='post-body-3647323225296998740']/div[1]/form[1]/input[1]   In this xpath id "3647323225296998740" is changing every time when reloading the page.   Is there any way to handle this type of situation in Selenium?


Prove that for given elements $a,b$ from group $G$, equation $(ab)^n = a^nb^n$ is fulfilled for all $n∈ {\displaystyle \mathbb {Z} }, $ if and only if equation is true for $ n=2 $.  I have no idea how to prove it. I would be gratefulfor any help.

Let $G$ be a group and $a,b\in G$.  Show $(ab)^n=a^nb^n$ for all $n\in\mathbb{Z}$ if and only if $ab=ba$.  I don't known where to start. It seems trivially.


I was seeing some facts about the arc length function for vector-valued functions of a real variable and I stood upon the fact that "If $\overrightarrow{v}(t) = \overrightarrow{r'}(t)$ is continuous on $t \in [a,b]$ then $\overrightarrow{r}(t)$ is rectifiable and we have $\Lambda(a,b)$ (arc length when $t$ goes from $a$ to $b$) is less than or equal to $\int^b_a||\overrightarrow{v}(t)||dt$" and that "If $||\overrightarrow{v}(t)|| = v(t)$ is continuous, then we have $\Lambda(a,b) = \int^b_av(t)dt$" by the additivity property and the former fact. Then it came to my mind the question "If $\overrightarrow{v}(t)$ is continuous, of course $v(t)$ is also continuous (since limits can "enter" into square roots and squares since they're both continuous)... but what if we only had $v(t)$ being continuous, would $\overrightarrow{v}(t)$ necessarily be continuous?" Intuitively, that converse seems to be wrong to me, since, in my head, I couldn't make a way to force each component to be equal to its limit at the point we're analysing, but I also don't know how to make a counter-example to make sure that my intuition is right (or see if it's actually wrong)... Any help on this approach would be very much appreciated! Edit: Mark S. made me see the other question, so if I define $\overrightarrow{v}(t)=f(t)(1,1,...,1)$ (in $R^n$) in such way that $f(t) = 1$ to $t \in Q$ and $f(t) = -1$ to $t \in R-Q$, we'd have $v(t) = |f(t)|\sqrt{n} = \sqrt{n}$ which is constant and, by such, is continuous in any interval, thanks so much for the answers!

If $|f(x)|$ is continuous at $a$, is $f(x)$ continuous at $a$?  I tried doing it using composite functions. If $g(x)= |x|$, then $g\circ f(x)= |f(x)|$. Since $g(x)$ and $g\circ f(x)$ are continuous, $f(x)$ is continuous.  I don't know if this is correct. Please help.


What are the dimensions of a common seat in a plane? I can only find info about the pitch and the width.

Found myself in two planes last week with the same seat-pillow width but the arm rests where almost three times thicker in one, making me feel cramped. Up to now, I've never been bothered by the width of the seat since I am below average width and height compared to a North American.  Should Seat Width be the size of the bottom cushion or the space between armrests?


Show that $\nabla \times (\nabla \times \vec A) = \nabla(\nabla \cdot \vec A) - \nabla^2\vec A$. For any vector function of $\vec A$.

I have faced difficulties while trying to prove that  $$\nabla\times(\nabla\times\vec{A}) = \nabla(\nabla\cdot\vec{A})-\Delta\vec{A}$$   I don't have any clue how can I start to work with it. Any hint will be helpful.


I have an FTP server (Debian) setup where users send JPG images.   I need a process running on the background that every time a picture is sent via FTP a bash script is executed for generating thumbnail files for each image uploaded.  I already have the script that generates the thumbnail, the problem is it needs to be executed manually, but what I want is the script to be executed each time an image file is uploaded.  How can this work?

There is a directory A whose contents are changed frequently by other people.  I have made a personal directory B where I keep all the files that have ever been in A.  Currently, I just occasionally run rsync to get the files to be backed up from A to B. However, I fear the possibility that some files will get added in A, and then removed from A before I get the chance to copy them over to B.  What is the best way to prevent this from occurring? Ideally, I'd like to have my current backup script run every time the contents of A get changed.


I have an equation defined as  $$m^*(E) \leq \sum_{k=1}^{\infty} l(I_k) < m^*(E) + \varepsilon \text{ and } E \subseteq \cup_{k=1}^{\infty} I_k.$$    but I am receiving an uncontrolled sequence error. Is there a special package I need to use \text{ and }? If me equation is   $$m^*(E) \leq \sum_{k=1}^{\infty} l(I_k) < m^*(E) + \varepsilon E \subseteq \cup_{k=1}^{\infty} I_k.$$    I do not receive an error.

I'm getting this error:  ! Undefined control sequence. l.64 ...p(- \frac{E_j - E_i}{k_B T}) & \quad \text                                                   {:  E_j > E_i}\\ ?  ! Undefined control sequence. l.65     1 & \quad \text                         {:  E_j<E_i}\\ ?    which is from this:  \begin{equation}\label{eq:hop} w_{i,j}=w_0 exp(-2 \gamma R_{i,j})\left\{    \begin{array}{l l}     exp(- \frac{E_j - E_i}{k_B T}) & \quad \text{:  E_j > E_i}\\     1 & \quad \text{:  E_j<E_i}\\   \end{array} \right. \end{equation}   But I don't understand why I get the error. This is my header:  \documentclass[11pt]{iopart} %\newcommand{\gguide}{{\it Preparing graphics for IOP journals}} %Uncomment next line if AMS fonts required \usepackage{iopams} \usepackage{graphicx, wrapfig} \usepackage{fixltx2e} \graphicspath{{images/}} \DeclareGraphicsExtensions{.pdf,.png,.jpg,.gif} \makeatletter \g@addto@macro\@floatboxreset\centering %\def\@cite#1{\textsuperscript{[#1]}} \makeatother   And my class file is the standard IoP one from   Can anyone help me get read of this error?


How do I show that the subgroup $H_2=\{\text{id}, (1\quad 2)(3\quad 4),(1\quad 3)(2\quad 4),(1\quad 4)(2\quad 3)\}$ is normal in $S_4$?  The tip that I got was to use the fact that for every $\tau\in S_4$ and every k-cycle $\sigma=(x_1\quad x_2\quad...\quad x_k)\in S_4$ we know that $\tau\sigma\tau^{-1}=(\tau(x_1)\quad\tau(x_2)\quad...\quad\tau(x_k))$. But I don't see how.

Can anyone tell me how to find all normal subgroups of the symmetric group $S_4$?  In particular are $H=\{e,(1 2)(3 4)\}$ and $K=\{e,(1 2)(3 4), (1 3)(2 4),(1 4)(2 3)\}$ normal subgroups?


I was surprised to discover yesterday that various summary statistics can be calculated on dates. Googling has found lots on syntax required to calculate summary statistics on dates, but very little on how calculations are done. How are summary statistics (mean, sd etc) calculated on dates?  Example R code:  myDates <- as.Date(paste0(sample(1:28, 100, replace=T), '/',                            sample(1:12, 100, replace=T), '/',                            2013),                     '%d/%m/%Y')  mean(myDates) median(myDates) sd(myDates) var(myDates)

According to Yale:     Categorical variables represent types of data which may be divided into groups       To me, dates do not fit this definition. They are ordinal, as one date is bigger than the date before it. It is also quantitative as it can added, subtracted...etc.  I am interested in correlating these observations to other variables in a sample, so I wanted to perform pre-modelling analysis.  Is my understanding correct?  EDIT:  Thank you for your replies. The general consensus is that dates can either be considered binomial or count data according to these data-type characterisations:   I tried to fit the explanations in the comments to the data-types in wikipedia, but, it doesn't seem to fit what people actually mean, is I'll reread.  EDIT 2: To give context for the question: I am trying to measure the effect of various processes over time, and these effects may not be linear, but cyclical (e.g. the seasons). The observations have dates (dd/mm/yyyy), but the dates are only significant in relation to the other dates.


I've set up a Minecraft server using the minecraft_server_1.12.2.jar file that can be found on the Minecraft website. I want to be able to have multiple worlds and the ability to switch between them in-game, so players of my server can have dedicated worlds for each minigame.   Is there a way to do this? I know about the plugin Multiverse, so is there a way to get this plugin with the normal Minecraft server jar file? Or will I have to download Bukkit and start a new server?

So recently I decided to make a server with a friend. I made the server successfully (I hosted it for free) but when it came to adding plugins... Well I couldn't find anything! So I don't know how to make my vanilla server into a bukkit server for free. I was wondering how to add plugins in a vanilla server, or if I could add bukkit for free, that would also work.    I am using a Mac book pro 2010 build.


Hello I want to move from my compact camera to a dslr. I am fan of landscape photos so I want to buy an ultra-zoom lens. My camera supports 14x optical zoom. I know that for compact cameras it's just a notation, so searching further from the official website:   focal-length = 5.0 – 70.0 mm (35 mm equivalent: 28 – 392 mm)   I cannot understand what 35mm equivalent means. I want to buy lens that has 55-200 focal length. So will the new lens have better zoom or not?  I don't provide any model because I believe it's better for the question not be a comparison between certain products.

What is the rule to convert the 'mm' notation to the 'optical zoom' notation? I searched a bit and found this one:  optical zoom = maximum focal length / minimum focal length   For example a 18-55mm lens would have a 3x optical zoom, and a 18-200mm lens would have a 11x optical zoom. Is that right?


I know I can test for an empty string in Bash with -z like so:  if [[ -z $myvar ]]; then do_stuff; fi   but I see a lot of code written like:  if [[ X"" = X"$myvar" ]]; then do_stuff; fi   Is that method more portable? Is it just historical cruft from before the days of -z? Is it for POSIX shells (even though I've seen it used in scripts targeting bash)? Ready for my history/portability lesson.    The same question was asked on Server Fault as  but no one offered an explanation as to why you see code with the X"" stuff.

I see this often in the build scripts of projects that use autotools (autoconf, automake).  When somebody wants to check the value of a shell variable, they frequently use this idiom:  if test "x$SHELL_VAR" = "xyes"; then ...   What is the advantage to this over simply checking the value like this:  if test $SHELL_VAR = "yes"; then ...   I figure there must be some reason that I see this so often, but I can't figure out what it is.


There's a series as following. $$ \sqrt{3}, \sqrt{3 + \sqrt{3}}, \sqrt{3 + \sqrt{3 + \sqrt{3}}} + \cdots $$ Is there any way I can find the upper bound to prove the limit exist? I've tried to write down the formula of this series as following: $$ x_n = \sqrt{3 + x_{n - 1}} $$ but still find no way to modify it to get to the upper bound.

(Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x > 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


I have an array of bytes that I would like to store as a string.  I can do this as follows:  byte[] array = new byte[] { 0x01, 0x02, 0x03, 0x04 }; string s = System.BitConverter.ToString(array);  // Result: s = "01-02-03-04"   So far so good.  Does anyone know how I get this back to an array?  There is no overload of BitConverter.GetBytes() that takes a string, and it seems like a nasty workaround to break the string into an array of strings and then convert each of them.  The array in question may be of variable length, probably about 20 bytes.

How can you convert a byte array to a hexadecimal string, and vice versa?


I currently have Ubuntu 10.04 server running on a portable HDD. Want to move it to internal sata HDD. I've got 3 partitions /, /home and swap. On the new HDD I plan to have different partition sizes. What's the correct way of doing these two things (move and resize)?

The HDD I have my Ubuntu installed is about to fail. I would rather not lose 3 years worth of data, customisation and apps. I am looking for a way to move the complete system (SWAP included, because I'm not sure if I can relink the system to a new SWAP partition) to another HDD. But not the complete HDD< only the partition containing Ubuntu, to a partition on a different HDD. Basically I'd like to do what I've been able to do with Norton Ghost for my Windows install. I thought about using Clonezilla but I think I would have issues with GRUB (Especially trying to boot from a different UUID than what is in the conf file). do you know of any way this could be done?  PS, my home directory is encrypted but that's not really an issue, because I can work around that.  EDIT: changed the explanation to make it clearer


This is kind of two questions(difference & compatibility), but since an extensive answer to the latter will probably include an answer to the former, I think it's okay.  Anyway, on to the question: I've made a certain device prototype on a solderless breadboard using an ATTiny13A-PU (the PDIP8 one) and would now like to make an actual PCB with the SMD (-SU/-SSU) version of it (since the device is supposed to be watch-sized). However, the place I usually order my parts from only has the SMD version of ATTiny13V in stock. So, I'd like to know how those two are different and whether my code (in C) for the former will be compatible with the latter and whether that's true for other AVRs as well (for example, '2313A vs '2313/'2313V).   As for my own research, the summary sections of the respective datasheets don't seem to reflect any major differences and I'm not inclined to scan and the whole thing. The other thing I noted is that avr-gcc does not consider the '13 & '13A the same MCU, so there definitely are some differences, I just can't figure out what they are. (while avrdude does, but AFAIK it only handles the uploading, not the code).  edit/clarification: This question is mostly about differences in and portability of code for the A vs. non-A series (which do exist, according to avr-gcc). Listing other differences is, of course, welcome, but secondary.

I have both on stock: ATtiny861A-SU and ATtiny861-20SU.  But I can not find out any difference between them except 'In-System Programmable via SPI Port' available for 'A' version.  Could anyone tell me what is the difference between those two devices?  Thanks!


I've noticed over the past year, more speakers are using the word 'so' to preface their answer, rather than the usual 'well' or even 'uh.' Where did this originate, and why is it happening?

This also came up on either a BBC or CBC science program, but not as a linguistically-oriented discussion.  Over the last two or three years I've noticed a lot more people starting a sentence with "so": "so when we take the ...", "so I have this ...", "so the basic idea ..." and (uh) so on.  What is "so" when a sentence begins with it? When did it start? Is it just a "pause" word (and is there a word for that)? Is it grammatically correct? Am I the only one that finds it annoying?  Edit: Much of its usage in scientific discussions is as a "therefore".


For spell casting classes like clerics, druids and wizards they can change their prepared spells following a long rest. Does this have to be immediately following a long rest with nothing in between or could a character cast some spells first?  For example, a wizard might cast mage armor on themselves following a long rest, but then prepare a new set of spells not including mage armor.  Also, are you restricted to preparing new spells only once per long rest? Or could a spell caster prepare spells, cast one or more of then, then prepare a new spell list?

In the section Preparing and Casting Spells (PHB 114) it is said (emphasis mine):     You can change your list of prepared spells when you finish a long rest.  Preparing a new list of wizard spells requires time spent studying your spell book and memorizing the incantations and gestures you must make to cast the spell: at least 1 minute per spell level for each spell on your list.   The first highlighted segment makes it so that a wizard is essentially preparing their spells for the day (or a very large portion of the day with a good nap).  However, the second highlighted segment indicates that the preparation for each individual spell is not that onerous (6 first level spells would take less than 10 minutes).  The wizard in my group has realized that he would like to have two sets of spells, one when combat was unlikely (5 non-combat spells and 1 combat spell) and one when combat was likely (5 combat spells and 1 non-combat spell).  Sometimes, the nature of role playing makes this impossible.  However, when the party walks up to the mouth of the cave or the entrance to the cobwebbed dungeon, it seems reasonable that he asks the party for a short rest so that he can memorize new spells (not a rest for him, as he would be spending the hour memorizing).  Assumptions I make about the wording:   It is designed to limit the Wizard class's flexibility, and thereby its power The game mechanic of a long rest is intended to represent the erasure of a wizard's spell specific memory - and thus it is free to receive new spells   Can a wizard partially switch out his spell list?  In other words, can he trade rest duration to replace a smaller number of spells during a short rest?  Note: I have asked several questions here that are at the limits of printed rules.  I understand that I can modify the rules as I see fit as the DM.  The point here is that I am working with several young people, and I don't want them walking into a AL or other 5e game and not understanding the nuances of the game based on learning house rules the first time.


Given that m,n are natural numbers, when can $3^m + 3^n +1$ be a perfect square?  This question was asked in today's exam. I am stuck. Can anyone help?

So, I decided to work with mod $8$ to help develop some intuition on how to generalize the proof. I noticed that taking $a^2$ to clearly be a perfect square, $a^2$ is always congruent to $0,1,-4,4 \mod 8$, at least for a good finite set of cases. Also, I played around with solutions to $3^m + 3^n + 1 = b$ and seen again for a finite set of cases with $m,n$ varying these were always, $b$ is congruent to $-1,5,-5,3$. Now, I see that well only perfect squares produce a set $\{0,1,-4,4\} \mod 8$ and none of the cases I tried to $m,n$ gave me any of the numbers in this set. And now I'm stuck.


I'm new to Ubuntu. I used Mint in the past ages ago. I decided to jump back to Linux and decided on Ubuntu because of newbie user friendly and support. Anyway, I'm currently dual booting macOS Big Sur and Ubuntu 20.04. I'm running a 2015 MBPro w/ AMD R9 390X.  My question is do I need to search and install AMD drivers? Or Ubuntu 20.04 has AMD drivers already installed? Thank you!

I have 14.04.5/16.04 or newer and an AMD GPU. I'm not getting the performance I want, and some programs say they need things like OpenCL.  I've heard about fglrx, but if I try to install it on my machine, it breaks and I have no GUI.  Is there anything I can do to get my AMD card working to its full potential?


Can A level 11 Fighter multiclass into a ranger and level up to level 6 to get the most extra attacks before level 20? I’m pretty sure when multiclassing doesn’t stack the extra attacks, but I just want to make sure. Then the character would be in total level 17, (6 Ranger levels and 11 Fighter levels) with 4 extra attacks, as well as any path you chose perks/upgrades, right?

The WotC article  creates the "Favored Soul" sorcerous origin, which grants the the sorcerer the Extra Attack feature at level 6. Say I made Favored Soul sorcerer go up to level 6, and then multiclassed into Ranger to get its Extra Attack at level 5. Would the two Extra Attack features stack so that I could get 3 or 4 attacks in a turn?


I am new to Ubuntu. I have Ubuntu 14 terminal installed on my Windows 10 laptop. I want to get Ubuntu 16 or 18. When I tried to uninstall the current Ubuntu 14 terminal, I couldn't find it in Programs and Features inside Control Panel. Or I can choose to update the current terminal, but I'm not sure how. Can anyone help please? Appreciated.

I found the Ubuntu app button in Microsoft App Store and attached it. There were limited instructions: I had Microsoft Windows help with their side. Ubuntu did not boot up as option. Windows 10 S booted again, but I had a Linux command window. That's it. Below are instructions from the official  website.  To launch, use "ubuntu 1804" on the command line prompt (cmd.exe), or click on the Ubuntu icon tile in the Windows 10 Start menu. To use this feature, one first needs to use "Turn Windows features on or off" and select "Windows Subsystem for Linux", click OK, reboot, and use this app.  Over 214MB of data was installed when I clicked on the Ubuntu icon. Then I opened the Windows command prompt window and typed ubuntu 1804, but nothing happened. My Windows Command Prompt results are shown below. C:\Users\phoebedavis>UBUNTU 1804 'UBUNTU' is not recognized as an internal or external command, operable program or batch file.  C:\Users\phoebedavis>  Can someone assist this totally new noob?  I want to run Ubuntu in Windows Subsystem for Linux in Windows 10 S before buying multiple single board computers and installing Ubuntu on them as workstations.


I need to remove this auto update notification dialog window which is very annoying and scary for public location where people is clicking the system and breaking it down to crash every day.  I tried to remove the Autoupdate notification window with following, but still every single day its showing in the screen and its very annoying like Ubuntu Virus, very disturbing and not respecting privacy, such as i do not want it to ever show, but it keeps showing by force.  Try: sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop  Try: apt-get install dconf-editor export DISPLAY=:0.0 && dconf-editor via GUI > go to com->ubuntu->update-notifer-> no-show-notifications and enable it  Try: Disable Auto uploader $ comment outall /etc/apt/apt.conf.d/50unattended-upgrades  $ add new line /etc/apt/apt.conf.d/10periodic APT::Periodic::Unattended-Upgrade "0";   But still the Auto-Update Notification Dialog window appears.  I am unable to remove it for completely.

In my KIOSK i have Ubuntu 13.10.  How to remove/suspend/blacklist/hide/disable completely from the Ubuntu 13.10 this following popup via command line? (even with GUI when i click settings and insert my password it still fails and keep repeating it)   this setup is running in a busy Railway, where passengers passing very busy place  every day almost every hour i have this strange popup "Software update"  even i do not want it   Please kindly anyone suggest how to remove this to stop disturbing? I have tried following but none works:  root@touch:~# vim /etc/default/grub  add GRUB_RECORDFAIL_TIMEOUT=0 root@touch:~# vim /etc/default/apport  put 0 root@touch:~# sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop root@touch:~#


What is the fastest and shortest method to turn this: ids = [1, 2, 3, 4, 5, 6, 7, 8, 9]  for example into this: ids = [[1, 2], [3, 4], [5, 6], [7, 8], [9]]  by giving the input 2 as the fixed length. Of course there are some easy ways to make this but none of them occur to me as fast or pretty.

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


When I'm using the svn client in my bash I have to set first the variable SVN_EDITOR like this:  export SVN_EDITOR=cat   So I thought it'd be easier for my if I set the environment variable at startup. I'm using Archlinux, so I referred to the ArchWiki, but there I found out there are .   Editing ~/.bashrc Editing ~/.config/systemd.user.conf Using systemctl --user set-environment Editing ~/.profile Editing ~/.pam_environment Editing ~/.bash_profile And even some more.   I'm the only user, so I don't care if the variable is set globally or per user.  Of all the ways to do it, what's the best? What's the "new standard"?  I'm using an up-to-date Archlinux with Gnome and budgie desktop.  Thank you very much.  EDIT: As @jasonwryan said, the question is similar to   But I'm also asking for what's the most "correct" way to do this, also I'm not sure if there's any new standard since that question (5 years ago). And for some things, Archlinux is quite special, not sure if there was any specific way to do this in it.

This is irritating me. I seen several suggestions (all using different files and syntax) and none of them worked.  How do I set an environment variable for a specific user? I am on debian squeeze. What is the exact syntax I should put in the file to make ABC = "123"?