How do I set the grub timeout and the grub default boot entry?

In Ubuntu 12.04 (or above), how do I set the GRUB time and the default OS (that I see at boot time) as I'm dual-booting Windows (7/8) and Ubuntu (12.04 or above)?


So the weapon that was used against the fleeing transports when      Admiral Holdo used the hyperspace ramming to destroy Snoke's ship?   The weapon fired a green laser beam and it arched. What's the weapon called?


How can I stop a currently active DDoS attack?

My VPS is under a DDoS attack.  I cannot access RDP, and I cannot take it offline, or access it in any way at all.  What can I do?  They are not trying to bruteforce, just trying to stop access to the VPS.  I don't know if maybe the datacenter messed up or something, but the VPS is online and denying all requests as is normal when under DDoS.  Is there anything that I or my dedicated hosting provider can look at in the logs?  How should I approach forensics after the fact?  I don't know much about DDoS attacks, do they usually stop after a few days?  Is there an existing anti-ddos program or something?


How to put filename with whitespace in awk

In a bash file test.sh, I put #!/bin/bash  dirpath="/home/dir" myfile="$dirpath/file with white space"   awk '{print "firstcolumn"$1":"$4,$2}' ${myfile}.bim >file2  When I run the script sh test.sh, I receive an error saying awk: fatal: cannot open file '/home/dir/file' for reading (No such file or directory). How do I make awk to deal with file with whitespaces? I tried file\ with\ white\ space as well but doesn't work.


Problem on inequality about $x_1, x_2, x_3, . . ., x_n$ real numbers without using set theory.

Suppose that $x_1, x_2, x_3, . . . x_n$ are real numbers between 0 and 1 with sum $s$.  Prove that   $$\sum_{i=1}^n \frac{x_i}{s+1-x_i} + \prod_{i=1}^n (1-x_i) \leq 1$$  Is there any method without using set theory to solve this problem?  I tried to prove by induction .     n=1 is true (trivial) Assume n=k is true and $s= x_1+ x_2+ x_3 . . . +x_k$ Consider n=k+1, $$\sum_{i=1}^{k+1} \frac{x_i}{s+x_{k+1}+1-x_i} + \prod_{i=1}^{k+1} (1-x_i)$$ $$=\sum_{i=1}^k \frac{x_i}{s+x_{k+1}+1-x_i}+\frac{x_{k+1}}{s+1} + (1-x_{k+1})\prod_{i=1}^{k} (1-x_i)$$ $$\leq \sum_{i=1}^k \frac{x_i}{s+1-x_i}+\frac{x_{k+1}}{s+1} + \prod_{i=1}^{k} (1-x_i)$$ I don't know how to proceed....


No. of positive eigen values of $3\times 3$ real matrix

Suppose $A$ is a $3\times 3$ symmetric matrix such that  :  $$\begin{pmatrix} a & b & 1   \end{pmatrix} A  \begin{pmatrix} a  \\  b\\ 1\end{pmatrix}  = ab -1$$ for all $a,b\in \mathbb{R}$  Question is to find no. of positive eigen values of $A$. and rank of $A$.  What i have observed so far is  :   As $A$ is symmetric matrix, it should have real eigen values. item As $x^TAx$ is not positive, for $x= \begin{pmatrix} a  \\  b\\ 1\end{pmatrix}$, ($a=b=\frac{1}{2}$) we see that not  all eigen values of $A$ are positive As $x^TAx$ is not negative, for $x= \begin{pmatrix} a  \\  b\\ 1\end{pmatrix}$, ($a=2,b=1$) we see that not  all eigen values of $A$ are Negative   So, $A$ does have positive eigen values and also negative eigen values.  Now, I have little less clarity particularly here :  If i take $a=b=1$ the, I have  $$\begin{pmatrix} 1 & 1 & 1   \end{pmatrix} A  \begin{pmatrix} 1  \\  1\\ 1\end{pmatrix}  = 1 -1=0$$  I want to conlcude from this that $$ A  \begin{pmatrix} 1  \\  1\\ 1\end{pmatrix}  =0\begin{pmatrix} 1  \\  1\\ 1\end{pmatrix}$$ somehow converting row marrix in one side to column matrix in other side.  If this is true, then i would have $0$ as one eigen value.  So, I have one positive, one negative, one $0$ eigen value.  So, Rank of $A$ should be $2$ and no. of positive eigen values is $1$.  Please help me to sort out some mistakes (if there are any) and help me to make this answer a little messier than what i have written.  This problem is already asked some time ago but, the answer for that was "to try with a  brute force" which i thought is not the only way to go.  I had some start up but that is not entire answer, so i can not post that as an answer there..   So, I thought i should ask here at the risk of getting negative votes.  P.S : Here is the link for a copy of this


I found a lot of ways to get the name from a number but now I need it the other way around.   If the string equals April, I want to convert it to int "4".  Does anyone know the best way to accomplish this server side?


I am trying to share folder via network. I was able to connect to that folder remotely as long as it was not restricted to valid users. Content of my smb.conf file :  [sdilena] path = /sdilena available = yes read only = no browsable = yes writable = yes public = yes valid users = samba   I am trying to connect to it using folowing command :  mount -t cifs -o username=samba //192.168.0.103/sdilena /folder   After I enter the password, it always return an error "Permision Denied"  Where could be the problem ?


I have a stupidly long email address on Gmail and would like to get it changed, or even just get a new one, but I can't see how. As soon as I log in on Google it knows who I am and signing up for a new email doesn't work.  Is there a way to get my email address changed or get a new one that I can then switch to?  Edit 2 July 2010:  I need to clarify the question because I haven't had an answer to what I want to achieve. I want to change the primary address on my Google account (). When I click the link to edit "Email addresses", the primary email is shown without an option to switch/change it. When I try add a new Gmail email address, it says     "You cannot associate a Gmail address with your Google Account."   I want the primary email address on my Google account to be a shorter Gmail email address so that I can eventually retire the existing email address.


I'm new here and got a question. We are currently programming a litte MP3 Player as a practical training at University but currently I'm not the best programmer (starts some months ago).  I used Scanner and got Problem:  java.lang.NullPointerException     at java.io.StringReader.<init>(StringReader.java:50)     at java.util.Scanner.<init>(Scanner.java:702)     at PlayList.loadFromM3U(PlayList.java:89)     at PlayList.<init>(PlayList.java:19)     at PlayListTest.testSaveAndLoadM3U(PlayListTest.java:202)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.Collections; import java.util.LinkedList; import java.util.Scanner;  public class PlayList<T> extends LinkedList<AudioFile> {      private boolean tp_playMode;     private int tp_PlayPosition;      public PlayList() {         super();     }      public PlayList(String pathname){         super();         this.loadFromM3U(pathname);     }      public int getCurrent() {         return tp_PlayPosition;     }      public void setCurrent(int tp_PlayPosition) {          this.tp_PlayPosition = tp_PlayPosition;     }      public AudioFile getCurrentAudioFile() {         try {             return this.get(getCurrent());         } catch (Exception e) {             return null;         }     }      public void changeCurrent(){         int listLength = this.size() - 1;         if (getCurrent() >= listLength){             if (tp_playMode){                 Collections.shuffle(this);             }             tp_PlayPosition = 0;         }         else{             tp_PlayPosition++;         }     }      public void setRandomOrder(boolean order) {         if (order){             Collections.shuffle(this);         }         this.tp_playMode = order;     }      public void saveAsM3U(String pathname){         FileWriter writer = null;         try {             String newLine = "\n";             writer = new FileWriter(pathname);             writer.write("My best Songs TP" + newLine + newLine);             for (AudioFile file : this) {                 if (file instanceof TaggedFile){                     writer.write(((TaggedFile)file).getPathname() + newLine);                     break;                 }                 if (file instanceof WavFile){                     writer.write(((WavFile)file).getPathname() + newLine);                     break;                 }             }         } catch (IOException e) {             throw new RuntimeException();         } finally {             try {                 writer.close();             } catch (IOException e) {                 e.printStackTrace();             }         }     }      public void loadFromM3U(String pathname){         this.clear();         Scanner scan = null;         String line;         try {             scan = new Scanner(new File(pathname));             while (scan.hasNextLine()){                 line = scan.nextLine().trim();                 if (!line.isEmpty() && !line.startsWith("#")){                     try{                     this.add(AudioFileFactory.getInstance(line));                 } catch (Exception e) {                         e.printStackTrace();                     }                  }             }         } catch (IOException e) {             throw new RuntimeException();         } finally {             try {                 scan.close();             } catch (Exception e) {                 e.printStackTrace();             }         }     }   }   Can someone help me ? It would be great. :)


, a question exists regarding the usage of the word "that" in the following sentences:   Assume that A = B. Assume A = B.   A well-known author suggests that users elect Option 1 in mathematical writing.  A discussion arose whether or not Option 1 is perfectly acceptable usage of the subjunctive, with a caveat: that the glyph "=" be read "equal" and not "equals."  The author of the book in question also further suggested that the word "that" be used only if it helps parse a sentence, "Assume that A is a group" vs. "Assume A is a group." This point was less contended, but in the subjunctive discussion, contrary concerns also arose whether the usage "Assume A be a group" is correct archaically, is correct presently, or has never been correct at all.  First question: given that "Assume..." is functionally equivalent to necessity in mathematical writing, is the sentence "Assume that A equal B" a proper use of the subjunctive?  Second question: Is, or has ever been, the usage "Assume that A be a group" been proper conjugation of "is" in a properly-used subjunctive?  Third question: Is there anything structurally unsavory about the use of the conjunction "that" in the form "Assume that A equals B" (note the s)?


What does this "\" mathematics symbol mean?

I am reading a paper which has a mathematical argument: $X \subset V \setminus \{0\}$.  Can anyone explain this statement to me? Especially the "$\setminus \{0\}$".  Many thanks in advance!


How to insert unicode text in IEEE paper?

I am writing a paper for IEEE conference. I would like to know how to insert some unicode text into the paper. The primary language of the paper is English.


What do multiple emitters/collectors imply in a BJT schematics symbol?

I sometimes come across with BJT symbols from which multiple lines come out of emitter or collector. Are such BJTs different kind of devices? What does it mean in solid-state level?


Why need synchronizedMap() if there is ConcurrentHashMap?

I read an article about thread safe maps and got a question. Collections.synchronizedMap() proxies underlying map with adding synchronized blocks on each method. On the other hand ConcurrentHashMap doesn't lock the whole map on read/write operations. Which means all operations in multi thread system are faster.  So what are the benefits of using synchronizedMap() nowadays? I see the only:   it's available since java 1.2 (vs java 1.5 for ConcurrentHashMap) can store nullable values (if underlying map can do it)   Are there any other situations when synchronizedMap() is better?


Connecting to IP 0.0.0.0 succeeds. How? Why?

We are serving a port on localhost and want to check in another process if the port is available. Due to a bug in our code, it is actually trying to connect to the IP 0.0.0.0:<port>, and for some reason it succeeds -- as strace proves:  [...] connect(3, {sa_family=AF_INET, sin_port=htons(10002), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 [...]   What does it mean? Why does it work?


Indicating current step in progress bars

We're planning on integrating some kind of progress bar in a multi-step process.   Our developers figured it would make sense that on step 4 of 9, 3/9ths of the  bar would be filled in to show how many steps were actually completed:    However, a few regular people I showed the examples to were initially confused and thought since you're on step 4, 4/9ths should be filled in.   So I was thinking of doing something like this as a compromise but I don't really like it:    My question: Are there any related best practices/research on whether to show in the progress bar how much has been completed vs what step they are currently on?


Unity How do you rotate an object with a rigidbody so it's facing the it is traveling

I would like to know how i can rotate an object with an rigidbody so it's facing the way it's traveling.


Number we know all prime numbers less than

We already know some very big prime numbers. ($2^{257,885,161} − 1$ as of time of writing is the largest known)  It is my understanding, that we know it is a prime number but we don't know all prime numbers smaller than it.  An equivalent of this is it is like if we know 7, 3 and 2 are prime numbers though we still haven't found 5.  My question is this, what is the largest prime number that we know all prime numbers smaller than it?  A link to a list of said prime numbers would also be heavily appreciated.


Oracle Search all tables all columns for string

I need to search our oracle database for a string in all tables and columns. I have the below query I found online but when I execute it I get the following error  Any help is appreciated  ORA-06550: line 6, column 31: PL/SQL: ORA-00904: "COLUMN_NAME": invalid identifier ORA-06550: line 6, column 12: PL/SQL: SQL Statement ignored ORA-06550: line 8, column 30: PLS-00364: loop index variable 'T' use is invalid ORA-06550: line 7, column 4: PL/SQL: Statement ignored ORA-06550: line 12, column 38: PLS-00364: loop index variable 'T' use is invalid ORA-06550: line 12, column 16: PL/SQL: Statement ignored  BEGIN     FOR t IN (SELECT table_name, column_name FROM all_tables) LOOP       EXECUTE IMMEDIATE         'SELECT COUNT(*) FROM '||t.table_name||' WHERE '||t.column_name||' = :1'         INTO match_count          USING v_search_string;            IF match_count > 0 THEN                 dbms_output.put_line( t.table_name ||' '||t.column_name||' '||match_count );            END IF;    END LOOP; END; /


Give an example of $2\times2$ matrix $A$ such that $A$ has one independent eigenvector while $A^{2}$ has two independent eigenvectors.  I would like to know a systematic answer of how to get this. My guess was that any matrix that has 1 independent eigenvector will have the same number of independent eigenvector for the squared matrix. I have tried random selections but obviously couldn't come up with one. What's more useful will be to get the intuition behind this problem.


Show larger images for high DPI displays

Some of the newer tablets and also Notebooks (notably the iPad, Macbook Pro and the Nexus 10 tablet) use displays with ultra-high resolutions at around 300 dpi. This makes text look very, very good, but it also means that images that are not adapted to that resolution can look rather bad in comparison.  Here are some crops from a screenshot from my Nexus 10:    and    These show that the StackExchange button and the logo, which contain text and hard edges, looks noticeably softer on a high-resolution display. This is of course no big deal, but it is very noticeable.  It would be nice if at some point some of the common images on SE sites that contain text or other hard edges would be served as high-resolution versions to devices with such high-resolution displays. This is obviously not a critical issue, but it would be nice if it could be tackled at some point.


java uses unchecked or unsafe operations recompile with xlint error?

I'm getting a message that says I have unchecked and unsafe operations when I try to compile this binary search program. I looked at other posts on stackoverflow, but I couldn't figure out how to fix my code. Thanks!  public binarySearch() {     ArrayList<Integer> list = new ArrayList<Integer>();     for (int i=0;i<10;i++)     {         int rand = (int)(Math.random()*10);         list.add(rand);         System.out.print(list.get(i)+"\t");         if ((i+1)%10==0) System.out.println();     }        System.out.println("\n"+search(sort(list),0)); }  public ArrayList sort(ArrayList<Integer> listNum) {     for (int i=0;i<listNum.size()-1;i++)     {         int min=10000;         int index=0;         for (int j=i;j<listNum.size();j++)             if (listNum.get(j)<min)              {                 min=listNum.get(j);                 index=j;             }         int temp = listNum.get(i);         listNum.set(i,listNum.get(index));         listNum.set(index,temp);     }     return listNum; }     public boolean search(ArrayList<Integer> listNum, int num) {     //need to sort list     int low = 0;     int high = listNum.size()-1;     while (low<=high)     {         int mid = (low+high)/2;         int midValue = listNum.get(mid);         if (num<midValue)             high = mid-1;         if (num>midValue)             low = mid+1;         if (num==midValue)             return true;     }     return false; }  public static void main (String args[]) {     binarySearch app = new binarySearch(); }


Linux - Protection from ourselves (Root)

I love Linux and everything she stands for; however, unfortunately I grew up with Windows. Thusly so I have learned very bad practices (such as NT Authority will protect me). I have several Linux VPS's for personal and educational uses and I manage all of them from the command line. Through the management of these servers I have learned very painful lessons of the power of the Root user. Such as:   rm -d -R /* chown www-user:www-user -R /* Etc.    I've only removed my root directory twice, but just last week I changed the permission of the whole drive - effectively locking the Root out.   Now I know that I should never be logged in as Root, but most of the time I have to deal with files that only the Root owns so I sudo and run the command.   So my question is, is there a way to prompt the user (who is root, or sudo'ed) when a potentially hazardous command is executed, so the user may rethink their decision? Possibly through scripts in Bash, or a different sudo wrapper.   Or (I ask this hopefully, and very simplified) is there a way to set up permissions where instead of a two tier user system (Root user, regular user) there is a three tier system like in Windows (NT Authority, Administrator, other User). Basically is there a way to keep the ability of System administration, but restrict access to some system files.


Should papers peer reviews be done publicly?

Three reviewers assessed my paper and all of them rejected it (weak reject), and to be honest I am not so mad about the rejection. One of the reviewers gave really good feedback and his arguments about rejecting it were correct.  But: The other two reviewers gave comments that were really wrong. For example one of them said that my paper was short, but my paper had exactly the maximum allowed number of pages. Also his English was terrible and he was saying that the paper was written in bad English. I am not a native English speaker but my supervisor is, and he corrected all of my mistakes before submitting the paper.  Also the third reviewer made some claims (referring to my citations) that were wrong (so he didn't even read the papers that "supported" his arguments). I took the time and reread all of the papers that he referred to and all of his claims are false.  Lastly all of the reviewers gave completely different reasons for rejecting the paper which also seemed really weird to me.  I was thinking to complain to the conference but my supervisor suggested we shouldn't because we would just waste our time.  So my question is shouldn't peer reviews were public and is there any good reason that they are not?


How do I do a not equal in Django queryset filtering?

In Django model QuerySets, I see that there is a __gt and __lt for comparative values, but is there a __ne or != (not equals)? I want to filter out using a not equals. For example, for Model:     bool a;     int x;  I want to do results = Model.objects.exclude(a=True, x!=5)  The != is not correct syntax. I also tried __ne. I ended up using: results = Model.objects.exclude(a=True, x__lt=5).exclude(a=True, x__gt=5)


I'm surprised that I haven't seen anything about this on here (or maybe I missed it). When parsing a CSV file, if there are rows with no data, how can/should that be handled? I'm not talking about blank rows, but empty rows, for example:  ID,Name,Quantity,Price 1,Stuff,2,5 2,Things,1,2.5 ,,, ,,, ,,,   I am using TextFieldParser to handle commas in data, multiple delimiters, etc. The two solutions I've thought of is to either use ReadLine instead of ReadFields, but that would remove the benefits of using the TextFieldParser, I'd assume, because then I'd have to handle commas a different way. The other option would be to iterate through the fields and drop the row if all of the fields are empty. Here's what I have:  dttExcelTable = new DataTable();  using (TextFieldParser parser = new TextFieldParser(fileName)) {     parser.Delimiters = new string[] { ",", "|" };      string[] fields = parser.ReadFields();     if (fields == null)     {        return null;     }     foreach (string columnHeader in fields)     {        dttExcelTable.Columns.Add(columnHeader);     }      while (true)     {         DataRow importedRow = dttExcelTable.NewRow();         fields = parser.ReadFields();         if (fields == null)         {             break;         }         for (int i = 0; i < fields.Length; i++)         {             importedRow[i] = fields[i];         }          foreach (var field in importedRow.ItemArray)         {             if (!string.IsNullOrEmpty(field.ToString()))             {                 dttExcelTable.Rows.Add(importedRow);                 break;             }         }      } }


I've been looking, but I have not come across this 'whom' related question anywhere.  Specifically in this circumstance, I feel 'with whom' flows more naturally but I remember someone suggested that 'whom with' is actually the proper order since it is referencing 'the people'     I am looking to find a friendly environment where I can enjoy my work and the people whom with I work.   Or     I am looking to find a friendly environment where I can enjoy my work and the people with whom I work.


Why use GeoServer or Tegola to generate vector tiles from PostGIS rather than ST_AsMVT?

I don't have much experience generating vector tiles dynamically. Instead I use Tippecanoe.  I'm looking at generating tiles from PostGIS and see at least three options:   PostGIS + Geoserver (with vector tiles extension) PostGIS + Tegola PostGIS, using its own native  function.   So: What is the benefit of using an additional layer on top of PostGIS rather than its own direct support for vector tile generation?


How would I solve the following problem involving elementary matrices?

Let $A=\begin{pmatrix}0&5\\ 7&4\end{pmatrix}$.      1) Write $A$ as a product of $4$ elementary matrices.      2) Write $A^{-1}$ as a product of $4$ elementary matrices.   My work. I have managed to find $A^{-1}$, which came out to be this:  \begin{pmatrix}-\frac{4}{35}&\frac{1}{7}\\ \frac{1}{5}&0\end{pmatrix}  However, I am struggling to figure out how I would split each of these matrices into $4$ elementary matrices. Any help?


Can't pass parameters to find from function execution

I have the need to pass multiple parameters to find dynamically. I'm doing that using this function:  GEN_FIND_PARAMS() {     PARAM=""      for WORD in $1; do         ADD=""          if [ X"$PARAM" != "X" ]; then             ADD="-o"         fi         ADD="-name '$WORD' $ADD"          PARAM="$ADD $PARAM"     done      echo $PARAM }   If I run the function by itself, I get correct results:  SHD_FILES="*.rev *.db *.cdb" GEN_FIND_PARAMS "$SHD_FILES"   Outputs correctly  -name '*.rev' -o -name '*.db' -o -name '*.cdb'   However, when I using it fully, it just doesn't find anything:  find /dev/shm $(GEN_FIND_PARAMS "$SHD_FILES")   Outputs nothing, even though I know the files are there, because running it plainly works:  find /dev/shm -name '*.rev' -o -name '*.db' -o -name '*.cdb'   Is there something wrong in the value substitution? I'm also open to other ways to do this (there must be a better one)


What are the pros and cons of having two supervisors for my Ph.D. thesis?

I am going to be taking a Ph.D. program in statistics, and I kind of want to have two people for my supervisor (for my Ph.D. research), but I don't know if this would be a good or bad idea. I have two questions:   What are the pros and cons of having two supervisors for my PhD research?  In case of having two supervisors, would I be expected to choose the one of the two professors who will act as my "main supervisor" (can both supervisors be my "main supervisor")?   I have never taken a Ph.D. program before, so any answers would be appreciated.


Could someone please explain the differences between the 3 fitting methods, method = c("CSS-ML", "ML", "CSS"), in Arima?  If I run the code below I get an error message, but if I specify method="ML" in Arima it runs fine.  So I was curious what the difference was between the 3 fitting methods.  Code with error:  library("fpp")  tsTrain <- window(hsales,end=1989.99)  pvar<-1:10 dvar<-1:2 qvar<-1:7  OrderGrid<-expand.grid(pvar,dvar,qvar)  n <- function(a,b,c) {Arima(tsTrain, order=c(a,b,c))} ModFit <- do.call(Vectorize(n, SIMPLIFY=FALSE), unname(OrderGrid))   Fixed Code:  library("fpp")  tsTrain <- window(hsales,end=1989.99)  pvar<-1:10 dvar<-1:2 qvar<-1:7  OrderGrid<-expand.grid(pvar,dvar,qvar)  n <- function(a,b,c) {Arima(tsTrain, order=c(a,b,c),method="ML")} ModFit <- do.call(Vectorize(n, SIMPLIFY=FALSE), unname(OrderGrid))


I have a question that is giving me several problems, which emerged in an online land, a play by chat. In D&D an Antimagic Field says:  An antimagic field suppresses any spell or magical effect used within, brought into, or cast into the area, but does not dispel it. Time spent within an antimagic field counts against the suppressed spell’s duration. Summoned creatures of any type and incorporeal undead wink out if they enter an antimagic field. They reappear in the same spot once the field goes away. Time spent winked out counts normally against the duration of the conjuration that is maintaining the creature. If you cast antimagic field in an area occupied by a summoned creature that has spell resistance, you must make a caster level check (1d20 + caster level) against the creature’s spell resistance to make it wink out. (The effects of instantaneous conjurations are not affected by an antimagic field because the conjuration itself is no longer in effect, only its result.)  Thus a summoned creature does not disappear but continues to exist even if it cannot appear in the area of the antimagical field and, therefore, the rounds continue to be counted. It can only reappear if the MFA moves or ceases and the duration of the summon has not ended. How do Orb of fire / cold / acid / force / electricity / sound behave?  do they cross the antimagic field without hitting the caster and proceed further? do they cancel as soon as they hit the antimagical field? hit and therefore penetrate the MFA injuring the caster?  My doubts arise because even though it is a Creation, and moreover Instantaneous, they are still a magical effect that is not permanent, unlike the Stone Wall, for example. They are not a "natural" energetic effect like a fire set by a Flaming Sphere (2nd level wizards / sorcerers), nor do they create a real puddle of acid in which one falls or lowers the temperature in the area. They are a magical attack, but not a magical effect like a crack in the ground, created with Earthquake, in which the caster would fall even if protected by AMF. So how do these orb spells interact with an Antimagic Field?


I've got this:  Selector selector = Selector.open(); ServerSocketChannel listenChannel = ServerSocketChannel.open(); listenChannel.socket().bind(new InetSocketAddress(12112)); listenChannel.register(selector, SelectionKey.OP_ACCEPT);   Just 4 lines of code inside main(), and the last line throws out exception:  java.nio.channels.IllegalBlockingModeException at java.nio.channels.spi.AbstractSelectableChannel.register(AbstractSelectableChannel.java:201) at java.nio.channels.SelectableChannel.register(SelectableChannel.java:280) at myServer.main(myServer.java:18)   I just wish to create a ServerSocketChannel and register it to a Selector. What's wrong here, how to fix?  Thanks.


Two variables seem to point to the same list, even though they should be unique

I was using lists in a program, but I don't understand this following behavior. I have begun to understand mutability and how it affects variable assignment, but I do not see the problem here:  class Test:     def __init__(self, list_n):         list_a = list_n[:]         list_b = list_n[:]         print(list_a is list_b) # Prints False         print(list_a is list_n) # Prints False         print(list_b is list_n) # Prints False          list_a[0][0] = 1         print(list_a) # Both of these print [[1,0,0][0,0,0][0,0,0]]         print(list_b)  def main():     list_n = [[0,0,0],[0,0,0],[0,0,0]]     test = Test(list_n)        if __name__ == '__main__': main()   Both list_a and list_b seem to still point to the same list, even though I thought I took the necessary measures to prevent that from happening.


I am currently running Ubuntu 10.10 and I would lie to update.  For some reason my computer will not let get into the BiOs setup to install from the DVD of Ubuntu.  Please help


Can someone suggest what keywords I should use to search online for "Using SSH folders as a directory for my local system?"?  I want some files on my system to interact with files on a SSH server I have access to.


Use black and white image for printing, color image for viewing

I have a color figure (image1.pdf) in a document which conveys some information nicely; however, when I print the document on a black and white printer, most of the information is lost. I have created a black and white version in Illustrator (image2.pdf, using patterns instead of colors) to replace it. I was wondering if it is possible to show the color figure, image1.pdf, while someone is viewing the document on a computer but replace it with a black and white figure, image2.pdf, when someone wants to print it?


How can I disable the mouse scroll wheel in Windows Vista

In Windows Vista, I have tried to set the setting 'the following number of lines at a time' to zero. I assumed my scroll wheel would not scroll anymore. But it still works.  I'm trying to disable the wheel because my RSI complaints worsen when using the scroll wheel often.  Does anyone have an idea on how to achieve this?


How do I disable iOS home screen "swipe-down search bar" gesture?

Basically if you use an iPhone or iPod touch, if you swipe down from your home screen, the home screen will fade, and a search bar appears on the top (for spotlight search, I guess). If Siri suggestion is on, you also see suggested apps there.  I would like to disable the feature completely, so that swiping down from home screen does not trigger any action.  Reason: I found it very often that when I swipe home screen pages left and right, it is detected as a down-swipe and triggers the search bar --  especially often on a bigger screen like iPhone 6 and iPhone 6s. This is very annoying and disturbing. Also, it could be very laggish on an old device.   I did not see any related option in Settings. I could turn of Siri suggestions and spotlight search contents for each application, but there does not seem to be a way to disable this gesture action. Is there anything in Accessibility that could help?


How to show: $\psi^{(0)}\left(\frac{1}{n}\right) - \psi^{(0)}\left(1 - \frac{1}{n}\right) = -\pi\cot\left(\frac{\pi}{n}\right)$

Based on a result  and in conjunction with methods I've observed on MSE I was able to show that:  \begin{equation}  \int_0^\infty \frac{ \ln(t)}{t^n + 1}\:dt = -\frac{\pi^2}{n^2} \operatorname{cosec}\left(\frac{\pi}{n} \right)\cot\left(\frac{\pi}{n}\right) \end{equation}  This is achieved through a simple use of Feynman's Trick. Here we  consider the case when $x \rightarrow \infty$ and $a = 1$: \begin{equation} \int_0^\infty \frac{t^k}{\left(t^n + 1\right)^m}\:dt = \frac{1}{n} B\left(m - \frac{k + 1}{n}, \frac{k + 1}{n}\right)  \end{equation} We see that: \begin{align} \frac{d}{dk}\left[ \int_0^\infty \frac{t^k}{\left(t^n + 1\right)^m}\:dt \right]&= \frac{d}{dk}\left[\frac{1}{n}B\left(m - \frac{k + 1}{n}, \frac{k + 1}{n} \right)\right] \\  \int_0^\infty \frac{t^k \ln(t)}{\left(t^n + 1\right)^m}\:dt &= \frac{1}{n^2}B\left(m - \frac{k + 1}{n}, \frac{k + 1}{n} \right)\left[\psi^{(0)}\left(\frac{k + 1}{n}\right) - \psi^{(0)}\left(m - \frac{k + 1}{n}\right) \right] \end{align}  Thus,  \begin{equation} \lim_{k \rightarrow 0} \int_0^\infty \frac{t^k \ln(t)}{\left(t^n + 1\right)^m}\:dt = \lim_{k \rightarrow 0}\frac{1}{n^2}B\left(m - \frac{k + 1}{n}, \frac{k + 1}{n} \right)\left[\psi^{(0)}\left(\frac{k + 1}{n}\right) - \psi^{(0)}\left(m - \frac{k + 1}{n}\right) \right] \end{equation}  And finally:  \begin{equation}  \int_0^\infty \frac{ \ln(t)}{\left(t^n + 1\right)^m}\:dt = \frac{1}{n^2}B\left(m - \frac{1}{n}, \frac{1}{n} \right)\left[\psi^{(0)}\left(\frac{1}{n}\right) - \psi^{(0)}\left(m - \frac{1}{n}\right) \right] \end{equation}  Note: In the case where $m = 1$ we arrive:  \begin{align}  \int_0^\infty \frac{ \ln(t)}{\left(t^n + 1\right)^1}\:dt &= \frac{1}{n^2}B\left(1 - \frac{1}{n}, \frac{1}{n} \right)\left[\psi^{(0)}\left(\frac{1}{n}\right) - \psi^{(0)}\left(1 - \frac{1}{n}\right) \right] \\ &= \frac{1}{n^2} \Gamma\left(\frac{1}{n} \right)\Gamma\left(1 - \frac{1}{n} \right) \cdot -\pi\cot\left(\frac{\pi}{n}\right) \\ &= \frac{1}{n^2} \frac{\pi}{\sin\left(\frac{\pi}{n}\right)}\cdot -\pi\cot\left(\frac{\pi}{n}\right) \end{align}  Thus: \begin{equation}  \int_0^\infty \frac{ \ln(t)}{t^n + 1}\:dt = -\frac{\pi^2}{n^2} \operatorname{cosec}\left(\frac{\pi}{n} \right)\cot\left(\frac{\pi}{n}\right) \end{equation}  Now for the final line I employed  formula:  \begin{equation} \Gamma\left(\frac{1}{n} \right)\Gamma\left(1 - \frac{1}{n} \right) = \frac{\pi}{\sin\left(\frac{\pi}{n}\right)} \end{equation}   The result for the  expression: \begin{equation} \psi^{(0)}\left(\frac{1}{n}\right) - \psi^{(0)}\left(1 - \frac{1}{n}\right) = -\pi\cot\left(\frac{\pi}{n}\right) \end{equation} This was found simply from . I did not derive this myself and this is where my question is founded in. I have no idea how to approach this identity. Does anyone have any starting points? and/or solutions?


Use combinatorics to prove $L\left(n,k\right)=\sum_{j=0}^{n}{ n\brack j}{j\brace k}$

How to combinatorially prove $$L\left(n,k\right)=\sum_{j=0}^{n}{ n\brack j}{j\brace k}$$ Where $L\left(n,k\right),{ n\brack j},{j\brace k}$ denote , ,  respectively.  One may use the following explicit formula to derive the relation: $${j\brace k}=\frac{1}{k!}\sum_{i=0}^{k}\binom{k}{i}\left(-1\right)^{i}\left(k-i\right)^{j}$$ However, I don't know how to prove such a relation using combinatorics.


I'm quite new at calculus, how could I prove:  $$2xy ≤ x^2 + y^2$$  I just can end up in $(xy)^{1/2} ≤ (x+y)/2$. And even though I know that this is true too, I don't know how to prove it either. Thank you in advance :D


What is causing this java.lang.NullPointerException error?

I am fairly new to Java, I've looked all over the Internet and stackoverflow itself to understand what I am doing wrong to no luck. Can someone please tell me why I get this error? I think I've initialized the array the right way and I think I've instantiated it right as well.  public class Grid {   private Slot[][] array = new Slot[12][12];   public Grid(){};    public void printarray(){         for(int i = 1 ; i <= 10 ; i++){         System.out.print(i + "|" + "");         for(int j = 1 ; j <= 10 ; j++){                   System.out.print(array[i][j].getStatus());          }//end inner for                  System.out.print("\n");     }//end outer for      System.out.print("\n");  };  }//end of class     public class Slot {       public Slot(){};       public int getStatus() {         return status;     }     public void setStatus(int status) {         this.status = status;     }       public int getId() {         return id;     }       public void setId(int id) {         this.id = id;     }       private int status = 0 ;     private int id = 0 ;  }//end of slot  public static void main(String[] args) {     Grid myGrid = new Grid();     myGrid.printarray(); }//end of main


Group and phase velocity - why can the latter be faster than light?

The phase velocity can be faster than light. Some argue that the phase velocity doesn't convey information, but this doesn't convince me.   We can emit a wave of a single one frequency. Then it will move in the space, but the group velocity will be 0. We can convey information in the following way: 2Hz means 1, 1 Hz means 0. We emit single-frequency wave for a second. Then we don't emit anything for a second. And so on.


Movie in which two men ask a dragon three questions

I'm trying to remember the name of a movie in which two young men ask a dragon three questions.  I remember that one of the men asks the dragon, "Don't we get three questions?"  The dragon responds, "Yes, but now you have only two remaining."  Or something along those lines. What movie was this from?


$\mathbb Z_{mn}$ isomorphic to $\mathbb Z_m\times\mathbb Z_n$ whenever $m$ and $n$ are coprime

How to show that $\mathbb Z_{mn}$ is isomorphic to $\mathbb Z_m \times\mathbb Z_n$ when $m$ and $n$ are coprime? It is easy to show that the natural map from $\mathbb Z_{mn}$ to $\mathbb Z_m \times\mathbb Z_n$ is a ring homomorphism. How to show that it is bijective?


I installed winedit 3 and miktex and whenever I run the program there is  undefined control sequence    <argument> \g__prg_map_int"    error. What should I do? the line causing the error is:   \MakeSPathList{calligraphy pen copperplate}{\l__cal_tmpa_tl}


I want to study the classroom and the school effect/result on the pupil's success (or not) at school. I also want to know the effect of the age, the gender (of the pupils) and if the pupils have or not repeated 1 year school on the pupil's success (or not).  The pupil's variables are :  - the age, (11 or 12) - the gender, (male or female) - if they have repeated one year, (yes or not) - the success, (yes or not)  The other variables are :  - the classroom they belong to, (A or B) - the school they belong to, (C or D)  I would like to proceed by GLMM, more precisely a multilevel (hierarchical) model using R on my dataset knowing that firstly I am looking for the effect of the classroom and the effect of the school on the pupil's success (or not) and secondly I want to know the effect of the age, the gender and if the pupils have (or not) repeated one year ?  Many thanks for your help !


Running Firefox in an Ubuntu VM over SSH opens host machine's Firefox

I'm using Slackware. Firefox is running. I also have a virtual machine running Ubuntu 16.04 using VirtualBox.  I've installed Firefox on the virtual machine, and Firefox is installed on the host computer.  I opened an SSH session in the virtual machine and ran Firefox. It opened a new window of my host computer's Firefox.  Why did it do this? I was expecting two running instances of Firefox: one on my host computer and one on the virtual machine.


Are threads implemented as processes on Linux?

I'm going through , Advanced Linux Programming by Mark Mitchell, Jeffrey Oldham, and Alex Samuel. It's from 2001, so a bit old. But I find it quite good anyhow.  However, I got to a point when it diverges from what my Linux produces in the shell output. On page 92 (116 in the viewer), the chapter 4.5 GNU/Linux Thread Implementation begins with the paragraph containing this statement:     The implementation of POSIX threads on GNU/Linux differs from the   thread implementation on many other UNIX-like systems in an important   way: on GNU/Linux, threads are implemented as processes.   This seems like a key point and is later illustrated with a C code. The output in the book is:  main thread pid is 14608 child thread pid is 14610   And in my Ubuntu 16.04 it is:  main thread pid is 3615 child thread pid is 3615   ps output supports this.  I guess something must have changed between 2001 and now.  The next subchapter on the next page, 4.5.1 Signal Handling, builds up on the previous statement:     The behavior of the interaction between signals and threads varies   from one UNIX-like system to another. In GNU/Linux, the behavior is   dictated by the fact that threads are implemented as processes.   And it looks like this will be even more important later on in the book. Could someone explain what's going on here?  I've seen this one , but it doesn't help much. I'm confused.  This is the C code:  #include <pthread.h> #include <stdio.h> #include <unistd.h>  void* thread_function (void* arg) {     fprintf (stderr, "child thread pid is %d\n", (int) getpid ());     /* Spin forever. */     while (1);     return NULL; }  int main () {     pthread_t thread;     fprintf (stderr, "main thread pid is %d\n", (int) getpid ());     pthread_create (&thread, NULL, &thread_function, NULL);     /* Spin forever. */     while (1);     return 0; }


Intuition of why $\gcd(a,b) = \gcd(b, a \pmod b)$?

Does anyone have a intuition or argument or sketch proof of why $\gcd(a,b) = \gcd(b, a \pmod b)$?  I do have a proof and I understand it, so an intuition would be more helpful.    The proof that I already have:  I show $\gcd(a,b) \mid \gcd(b, a \pmod b)$ and $\gcd(b, a \pmod b) \mid \gcd(a, b)$ which implies $\gcd(a,b) = \gcd(b, a \pmod b)$ and stuff is non-negative.  WLOG $a \geq b$  $\gcd(a,b) \mid a$  $\gcd(a,b) \mid b$  so it divides any linear combination of a and b  Since $a \pmod b = a - qb$ then:  $\gcd(b, a - qb) = bx + (a-qb)y$  $\gcd(b, a - qb) = bx + ay - qby $  $\gcd(b, a \pmod b) = b(x-qy) + ay$  which is a LC of $a$ and $b$.  So $\gcd(a,b) \mid \gcd(b, a \pmod b)$.  Other direction is nearly identical.


Issue Android Studio 2.1.2: Fatal Exception: main Process java.lang.NullPointerException

So, I am doing this project that includes an intro activity that switches to a menu activity with navigation drawer. Couple of days ago, I had an issue switching from intro to menu (Android Studio 1.0.2: java.lang.RuntimeException: Unable to start activity ComponentInfo: java.lang.NullPointerException) and it was solved by changing name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar" to name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" thanks to goonerdroid's suggestion in my previous link.   The issue that I have now is that I am trying to add a search action on the top right corner of the action bar alongside the navigation drawer so it can search on different future activities and javas that I will be adding. When I run the program, it enters the intro activity with no problems. When I click on the button to take me to the menuactivity, it displays the following error:  07-21 07:00:53.450 2775-2775/com.plateformeressources E/AndroidRuntime: FATAL EXCEPTION: main   Process: com.plateformeressources, PID: 2775   java.lang.NullPointerException     at com.plateformeressources.activity.LoginActivity$2.onClick(LoginActivity.java:87)     at android.view.View.performClick(View.java:4438)     at android.view.View$PerformClick.run(View.java:18422)     at android.os.Handler.handleCallback(Handler.java:733)     at android.os.Handler.dispatchMessage(Handler.java:95)     at android.os.Looper.loop(Looper.java:136)     at android.app.ActivityThread.main(ActivityThread.java:5017)     at java.lang.reflect.Method.invokeNative(Native Method)     at java.lang.reflect.Method.invoke(Method.java:515)     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)     at dalvik.system.NativeStart.main(Native Method)


Gained access to private beta without committing

I was just able to access the new Joomla private beta, but I never committed to the proposal (though I did followed it).  Here's my  showing I never committed, and here's my .  The steps I used to gain access were something like this. I can't remember exactly, and there are no other private betas to test the process on.   Visit the  Click on the  link in the message/alert banner at the top. The meta and all of it's questions were visible without signing up. Do something (can't remember exactly) to get to the signup page for the meta. Switch to the login tab. Log in with my existing Stack Exchange account. Watch as I am redirected to the Joomla SE home page and can view everything. ????? Profit   I confirmed that I was able to vote and make comments, since I immediately received an association bonus. It was my understanding that private betas were only to be accessible by those who committed, but until this is fixed, everyone enjoy unauthorized access to private betas.  Oh, don't feel that I'm asking for my ill-gotten Joomla SE account to be deleted. I'd love to be the only participant in the private beta that didn't commit.


Output of rfkill list:  0: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no 1: brcmwl-0: Wireless LAN     Soft blocked: no     Hard blocked: yes   What is the work around available?


Why I get -1 returned? For sure the name is in stadiumSeats[i][j].  `public int searchForGuest(final String name){            for(int i=0; i<stadiumSeats.length; i++){         for(int j=0; j<stadiumSeats.length; j++){             if(stadiumSeats[i][j] == name){                 return i;             }         }     }     return -1; }`


I have a folder which contain .srt and .txt files inside /var/www/myvideo folder with filename like this:  /var/www/myvideo/course1/module1/dasa22.en.srt    /var/www/myvideo/course1/module1/dasa22.en.txt    /var/www/myvideo/course1/module1/dasa22.de.txt    /var/www/myvideo/course1/module1/dasa22.de.srt    /var/www/myvideo/course1/module1/asda2.ja.txt    /var/www/myvideo/course1/module1/asda2.ja.srt    /var/www/myvideo/course1/module1/dasa22.en.srt    /var/www/myvideo/course1/module1/dasa22.en.txt    /var/www/myvideo/course1/module1/dasa22.de.txt    /var/www/myvideo/course1/module1/dasa22.de.srt    /var/www/myvideo/course1/module1/asda2.ja.txt    /var/www/myvideo/course1/module1/asda2.ja.srt    /var/www/myvideo/course2/module3/cccaa.end.txt    /var/www/myvideo/course2/module3/vvv.en.srt    /var/www/myvideo/course2/module3/vvv.ja.txt    /var/www/myvideo/course2/module3/aaa.ja.srt    ...   the .srt and .txt file will be inside the subfolders of /var/ww/myvideo, but i want to delete the file that has de.txt de.srt ja.txt ja.srt postfix, how can i achieve this?


Is there a way to set particle size equal to a texture or vertex map?

Is there a way I can set particle size equal to a texture map in Blender? I can't find any setting to do it in the particles tab. Maybe this is a feature that could be added to Blender?


Is it a good idea to cite paper from publisher listed in Beall’s list

While writing the literature review for my paper, I found another paper which is closely related to my research. Unfortunately, the paper’s publisher is on . Hence, I wonder if citing the paper will have any negative impact on my paper.


Tag badges are being awarded incorrectly

On Stack Overflow, I have 428  questions answered with a total score of 775 as of the writing of this post.     It seems that this is happening to a lot more people than just me.       (Only possibly related)?


Virtualbox Windows 10 Guest installation is freezing up in 14.04

I've installed VirtualBox using the Software Centre and I'm running a system on Ubuntu 14.04 with 8gb RAM, 64-bit dual core processor.  I want to run Windows 10, I've tried both 64 and 32 bit versions, in virtualbox. However, every time I start up windows 10 it gets to the point where the dots go round in a circle, then it freezes up and crashes back to the virtualbox manager. The only information it gives me is that the virtual machine was aborted.  I've changed the settings around a lot and nothing is working.  Any help would be appreciated.  Oh, and I've run Windows 10 technical preview on this machine before, a while ago  Thanks for any help in advance.


What's the conception of "linear" in linear models? Is it the same as in mathematics?

I've been noticing that statisticians might be using the term "linear" in a bit sloppy way.  A linear model is a model of the form:  $$Y = \beta_1X_1+\beta_2 X_2 + \cdot \cdot \cdot+ \beta_nX_n$$  Which in mathematical terms, is a linear combination (betas are scalars, $X$s are vectors).  However, statisticians allow a linear model to have other than $\le 1$ order polynomial terms. Such as quadratic terms $X_i^2$. In mathematics, polynomials of order $> 1$ are not linear functions. To me this sounds like the statistics concept of a linear model is a bit sloppy.  What do you think of the terms and how do you interpret "linearity" in linear models? Is it the same as in mathematics?


How can one show that a coefficient of $\lambda^{n-2k}$ in characteristic polynomial of the tree is a number of matchings of size k in this tree. $n$ is a number of vertexes in the tree.


What is it called when your first and last name begin with the same sound/letter?

I believe there is a term for your first and last name beginning with the same sound/letter, but I don't know what it is. Example: Bobby Brown; Cindy Cinnamon; Graham Gusto.


I got a samsung galaxy note 8, and it came with an app called browser and also Chrome. Obviously Chrome is better, so how can I remove the generic browser app (or at least hide it)?  The same goes for apps like Email and Gmail.


What is an adjective to describe someone who constructs their moral views based on convenience?

Until recently I believed that "self-righteous" describes someone whose ideas of right and wrong are conveniently aligned with their own situation, in a way that does not require them to put much effort into doing what is right or avoiding what is wrong and allows them to judge others while being immune or resistant to the same judgement themselves. Apparently this is not what self-righteous means. So what word could be used to describe this? Compound words are fine, obviously. Examples:  Someone who was born rich saying that people living in poverty are simply lacking ambition. Someone who cannot afford a plane ticket or car bragging about saving the environment by not using fossil fuel. Being quick to judge other people's misbehavior but blaming your own misbehavior on something beyond your control.  Example sentence:  Being mad at Laura for keeping a minor secret from you when you've cheated on her is very ______ of you.


Does there exist any surjective group homomorphism from $(\mathbb R^* , .)$ onto $(\mathbb Q^* , .)$?

Does there exist any surjective group homomorphism from $(\mathbb R^* , .)$ (the multiplicative group of non-zero real numbers) onto $(\mathbb Q^* , .)$ (the multiplicative group of non-zero rational numbers)?


One word for 'automatic nature' of doing certain things?

I am a chess player. Quite often, when I am in a familiar position, I automatically reach out to move a certain piece to a certain square without thinking too much. That's usually the first move that I see and I make it rather "automatically" in a blitz game. But sometimes this automatic way of moving pieces causes me to make mistakes. I need to break this "automaticity", if that is even the right word? Looking up the Oxford Reference-      The ability to perform a task by automatic processing, independent of   conscious control and attention. Strong automaticity is almost   entirely automatic and can be carried out without attention. Partial   automaticity refers to processing that can be performed without   conscious control, but which is performed better with attention.   However, this isn't exactly the sense in which I want to use a word to describe the automatic way I do things. In my case, sometimes the "automaticity" can be a bad and undesired thing and not an "ability". So is there a word for this?


Python if else condition in one line syntax

I know this question has been asked lots of times but I still cannot get the syntax right to get it to one line:  string = 'abcdea' ab = []  for c in list(string):     if c in ['a','b']:         ab.append(c)    One line (does not work):  ab.append(c) if c in ['a','b'] for c in list(string)


What's the value of this Viète-style product involving the golden ratio?

One way of looking at the Viète (Viete?) product $${2\over\pi} = {\sqrt{2}\over 2}\times{\sqrt{2+\sqrt{2}}\over 2}\times{\sqrt{2+\sqrt{2+\sqrt{2}}}\over 2}\times\dots$$ is as the infinite product of a series of successive 'approximations' to 2, defined by $a_0 = \sqrt{2}$, $a_{i+1} = \sqrt{2+a_i}$ (or more accurately, their ratio to their limit 2).  This allows one to see that the product converges; if $|a_i-2|=\epsilon$, then $|a_{i+1}-2|\approx\epsilon/2$ and so the terms of the product go as roughly $(1+2^{-i})$.  Now, the sequence of infinite radicals $a_0=1$, $a_{i+1} = \sqrt{1+a_i}$ converges exponentially to the golden ratio $\phi$, and so the same sort of infinite product can be formed: $$\Phi = {\sqrt{1}\over\phi}\times{\sqrt{1+\sqrt{1}}\over\phi}\times{\sqrt{1+\sqrt{1+\sqrt{1}}}\over\phi}\times\dots$$ and an equivalent proof of convergence goes through.  The question is, what's the value of $\Phi$?  The usual proof of Viète's product by way of the double-angle formula for sin doesn't translate over, and from what I know of the logistic map it seems immensely unlikely that there's any function conjugate to the iteration map here in the same way that the trig functions are suitably conjugate to the version in the Viète product.  Is there any other approach that's likely to work, or is $\Phi$ just unlikely to have any formula more explicit than its infinite product?


numpy round doesn't produce the required answer

I have the following:  variable1 34.30338950876217  import numpy as np np.round(variable1, decimals=2) 34.29999999999995   Why am I not getting the desired answer of 34.30?


How to automatically create faces between a set of vertices

I have the following object with an inner screw-like cylinder, and an outer hexagonal prism:    I am trying to close this shape up by adding faces between the screw and the hexagon, to create a nut for 3d printing, essentially. But, as you can see, there are almost a hundred vertices on the screw. Is there any way to close this shape up automatically? I don't care about the topology of the model too much, as this will be 3d printed.


What effect does head tube angle have on a bicycle?

My girlfriend and I are looking at a new bike for her. The one we're looking at has a 70 degree head tube angle while her current bike has a 70.5 degree head tube angle. Unfortunately, none of the local shops has one in stock for her to try out. So my question is:  How much does the head tube angle affect the fit and feel of a bicycle? I'm sure that it has at least some effect over the fit of the bicycle, but how much? And I'm guessing it has an even bigger effect on the steering, but again, how much?


Abstract algebra introductory book with lots of problems

I am self studying abstract algebra and i am looking for a introductory book with lots of problems ranging from lower level to higher level of difficulty. Also book should be intuitively explain concepts.   Thanks


Automatically explain what downvotes on Meta mean

Inspired  and at the risk of being downvoted to oblivion, I'd like to propose a feature request.  Can we automatically explain to people what downvotes mean on Meta?  I am getting tired of seeing people on Meta ask about why they were downvoted with no comment, whine and complain and boo hoo hoo. Votes on meta are different!  I understand, I was new to Meta once too...  Can we somehow show   automatically when someone tries to ask why they were downvoted on Meta?  Here's some freehand circles to help you guys know how serious I am:    (Yes I am pretty well aware this will just be another  question)


I read that permanent magnetism is caused by electrons orbiting in a way which produces a net magnetic field. but how can a particle with no dimensions have a magnetic dipole? also I read that photons are the fundamental carriers of electromagnetism. where does that come in here?


Why can lstlisting not be saved in a command?

This code fails with Emergency stop:  \documentclass{scrbook} \usepackage{listings} \newcommand{\demo}{% \begin{lstlisting} foobar \end{lstlisting} }  \begin{document} \demo \end{document}   Why?


Children's fantasy series with a symbol consisting of a circle divided into quarters

I read this book series as a kid back in the late 1970s, so it's an old series - and my memories are similarly old, and vague.   I know it's a fantasy series. I think there are 4 books in the series. Or perhaps 7.  There's a central boy character who has to get a collection of magical objects (every fantasy needs a quest!), each of which represents a different magical 'element': wood, stone, fire, etc. I definitely remember there was a wooden object. He lives in our normal world. The whole series takes place "here & now". I have a feeling he's a "chosen" person of some kind... But, the strongest memory I have is of a symbol: a circle which is divided into quarters (a vertical bar and a horizontal bar).  I know it's vague, but does anyone recognise this?


Error message on login form uses browser default font

When you login to a StackExchange site (in this case, SO) and make a mistake with your login details, an error message appears.   However, it looks like the proper styling has not been applied to the font, and it instead uses the browser default font (in this case, Times New Roman):


$$\int \frac{1}{(x^2+1)^2}\mathrm dx$$ Look simple, but I stuck a little bit. What method is better in this situation? Please, help.


How to schedule jobs in Sql server 2008 for less than 10 sec?

I want to run a job every 3 seconds, however in SQL Server 2008 we cannot define an interval of less than 10 seconds.  The job is used to insert/update visitor information, and segmentation information into a database which is tracked by google search.   There are up to about 100 rows inserted in a 2 or 3 seconds. That job inserts and update the table in a database. Is there any way to schedule it using sp job scheduling configuration?


Is the spell combo Booming Blade into a quickened Thunderwave legal?

I'm sure this topic has been beaten to death, but I can't seem to find the answer I'm looking for. That being said, maybe I'm just not seeing the answer for what it is and I just want to feel special by having my specific question answered. In either case, if the question doesn't say it all, basically level 3 sorcerers have access to both Thunderwave (1st level spell) and Booming Blade (cantrip.) Bonus action spells don't let you cast anything that isn't a cantrip afterwards so:  Healing Word into Firebolt in one turn is allowed but, Shillelagh into Cure Wound in one turn is not allowed.  That means Bonus Action Leveled Spell casted first, then Action Cantrip in one turn is ok to do,but Bonus Action Cantrip casted first, then Action Leveled Spell in one turn is not ok to do.   I ask about case 3, Action Cantrip casted first, then Bonus Action Leveled Spell in one turn, is this ok?  No question I've seen specifically says whether or not casting a 1 action cantrip disqualifies your character from casting 1 bonus action, level 1+ spell in cases where action order matters.     If the quickened Thunderwave comes first, then the monster will be too far away to hit it with Booming Blade: so, is the Thunderwave allowed to come second?


Why didn't the other White Walkers hear or see that character approaching the Night King?

In Game of Thrones S08E03 "The Long Night", Arya is a skilled assassin, master of stealth and whatnot.  However, the area around Bran is mostly clear, as shown in earlier scenes, how did they not see or hear that character approaching the Night King? Or did they notice and not warned it (as unlikely as it may sound)?


How to solve the java.lang.NullPointerException Problem

I am beginner in using JSP and have a problem with the java.lang.NullPointerException. The problem occurs if I use the following part (the full source is below). If i delete the source the page is loading without any returns. I would be happy if anyone helped me to run the code.  Background information. What should the application do:  This code should perform a SQL SELECT Statement and provide the information which is stored in the MySQL Database.  { <%@page import="java.sql.*"%> <% Class.forName("com.mysql.jdbc.Driver");%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html>       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">     <title>JSP Page</title>
Hello World!
      <%!      public class Actor{          String URL = "jdbc:mysql://localhost:3306/sakila";         String USERNAME = "root";         String PASSWORD = "admin";          Connection connection = null;         PreparedStatement selectActors = null;         ResultSet resultSet = null;          public Actor(){                             try{                                     connection = DriverManager.getConnection(       "jdbc:mysql://localhost:3306/sakila", "root", "MySQL2019.");                  selectActors = connection.prepareStatement(                     "SELECT actor_id, first_name, last_name FROM actor");                                 }catch (SQLException e){                                     e.printStackTrace();             }                         }             public ResultSet getActors(){                                     try{                                             resultSet = selectActors.executeQuery();                                         }catch (SQLException e){                     e.printStackTrace();                 }                 return resultSet;             }         }     %>      <%     Actor actor = new Actor();     ResultSet actors = actor.getActors();    %>

 Actor ID	 First Name	 Last Name

 <% while (actors.next()) {%>  <%= actors.getInt("actor_id")%>   	 <%= actors.getString("first_name")%> 	 <%= actors.getString("last_name")%>
 <%}%>

    }   Problem code:  {<%     Actor actor = new Actor(); ResultSet actors = actor.getActors(); %> }


Bash tab completion fails inside of command substitution

I've been using kill $(pidof ) to terminate programs for a while, and since last night, every time I try to use tab completion inside the $() it throws an error,   bash: unexpected EOF while looking for matching `)' bash: syntax error: unexpected end of file   Tab-completion works fine outside of command substitution.  I guess my question is where are the configuration files for tab-completion located on an Ubuntu system? If anyone has had this specific problem, or can see plainly what I cannot, how to fix this, and/or why this would occur? (I always want to know why.)  and if not that, even where and how I should begin my investigation into this problem, would be greatly appreciated.  UPDATE  tab completion following $(pidof is no longer throwing an error, but is now not working at all. I've never really messed with any bash internals before, but am not afraid to get my hands dirty. Any guidance greatly appreciated.


Map on canvas renders after image saving

I'm a beginner to Qgis and Python; i need a script (don't need it to be a plugin) to get maps of selected features from a layer satisfying certain conditions; Here is my code:  from qgis.gui import * from PyQt4.QtCore import * from PyQt4.QtGui import * import time fnam ='C:/Users/User/.qgis2/Test/Output/' canvas = qgis.utils.iface.mapCanvas() #print canvas.size() Nom =QInputDialog.getText(None,"Value", "Enter text",0) fnam2 = fnam + Nom[0] + '.txt' #print fnam2 outfile = open (fnam2, 'w') layer = iface.activeLayer() layer.setSelectedFeatures([]) #provider =layer.dataProvider() selection=[] for f in layer.getFeatures():     n1 = f['Comune_1']      n2 = f['Comune_2']      n3 = f['Comune_3']      n4 = f['Comune_4']      n5 = f['Comune_5']      if (n1 == Nom[0]) or (n2 == Nom[0]) or (n3 == Nom[0]) or (n4 == Nom[0]) or (n5 == Nom[0]) :         selection.append(f.id())         line = '%s\n' % (f['link'])         unicode_line = line.encode('utf-8')         outfile.write(unicode_line) layer.setSelectedFeatures(selection) #provider.select() outfile.close() mnam ='C:/Users/User/.qgis2/Test/Output/' + Nom[0] + '.tif' mnam2 ='C:/Users/User/.qgis2/Test/Output/' + Nom[0] + '.png' #print mnam canvas.zoomToSelected() canvas.refresh() canvas.update() canvas.saveAsImage(mnam,None,'tif') #time.sleep(3) canvas.saveAsImage(mnam2,None,"PNG") #print 'Finished'   My problem is that saved image(s) show the map at the moment i press "run" button in Python console, not the actual map based on the last selection; i tried to insert a time.sleep() call to delay saving, hoping it could help waiting rendering to complete before saving, but it doesn't work; i also tried recursing the whole process with a for loop, neither working; any tips on what am i doing wrong?    I'll try to explain in a better way: in this project i have two layers/shapefiles: one shows villages in my region with their boundaries; the second one shows the arrangment of orthophotos in a 1:5000 scale of the territory (img1)  now professionals or village administrators may ask for orthophotos of a specific village; running my script i wish: - have a list of orthophotos of that specific village (this works fine with txt file i create); - give a map showing the arrangement of requested orthophotos as a complementary aid. Now, if i run the script selecting, say, "Potenza", i eventually can see in Qgis the updated map with desired selection, but saved images show the whole region:(I mean "Potenza.png" is identical to above image while it should be like the one below); only now i noticed there are selections, so the problem seems to be in zoomToSelected command.  if i rerun the script and i select another village, say "Maratea", this is what i'll find as Maratea.png     (tif images are identical to png);    (When i'll have a working script selected "rectangles" will show image name, and i won't use inputdialog but i'll get village names from the first shapefile and run it only once for all villages).


Is there an obvious reason why $4^n+n^4$ cannot be prime for $n\ge 2$?

I searched a prime of the form $4^n+n^4$ with $n\ge 2$ and did not find one with  $n\le 12\ 000$.    If $n$ is even, then $4^n+n^4$ is even, so it cannot be prime. If $n$ is odd and not divisible by $5$ , then $4^n+n^4\equiv (-1)+1\equiv 0 \pmod 5$.  So, $n$ must have the form $10k+5$.  For $n=35$ and $n=55$, the number $4^n+n^4$ splits into two primes with almost the same size.  So, is there an obvious reason (like algebraic factors) that there is no prime I am looking for ?


I want to prove the following question but I have no idea to start!  let $A$ be a $3\times2$ matrix and $B$ be a $2\times3$ one. if $AB=\begin{bmatrix}8 & 2 &-2 \\2 & 5 & 4 \\-2 & 4 & 5 \end{bmatrix}$ then prove that $BA=\begin{bmatrix}9 & 0\\ 0 & 9\end{bmatrix}$. [ hint:if $AB=I$ then we have $BA=I$]


Remove dynamically added LI list item with jQuery

I am trying to dynamically add a list item to a list and then remove it by clicking on that item.  The remove event never seems to fire.  However if I use the same code on a static list it works fine.  I've seen similar solutions but they do not work.  See jsFiddle:   <input id="status" type="text" placeholder="Status (tab or enter)">
 Dynamic List:

    $('#status').keydown(function (e) {     if (e.which == 9 || e.which == 13) {         $('#statusList').html($('#statusList').html() + formatNewStatus(this.value));         this.value = "";         this.focus();         e.preventDefault();     } });  $(function () {     $('#statusList li').click(function () {         alert('dynamicList');         $(this).remove();     }) });


How does this circuit work with a transitor?

If the current flows from the left side of the circuit namely positive side Why doesnt the led burn as the resistor is placed after the LED or if flows from the negative side.Where does the base of thw transistor get current?


so it seems like there are others with the same problem, but I couldn't find the right solution for myself. What I want to do: Rsync all files with pattern .log. but exclude a directory  Here is my rsync command:  rsync --include=*/ --include=*.log.*  --exclude=* --exclude=folder1/ -armte "ssh -o StrictHostKeyChecking=no" user@server:/path/log/ /tmp/rsynctest/   So in /path/log are multiple subfolders. /path/log/folder0 /path/log/folder1 /path/log/folder2  etc.   And I want to exclude one of them (folder1). But rsync is still syncing this folder. I'm not really sure what I'm doing wrong.


60s/70s science fiction novel where a man (after years of trying) finally succeeds to make a coin levitate by sheer concentration

I am looking for an old (about sixties or seventies I believe) science fiction novel beginning with a man that after a lot of time trying finally succeeds in levitating a coin or some other small object that starts upwards and disappears through the ceiling.   I read the novel in an italian translation, in a paperback series very well known in the sixties, "Urania".    I believe this was just the beginning of a whole complex plot, and the man unraveled the secret of antigravity, at least I think this was his purpose. Certainly the novel went on with other characters.  At the moment this is all I can tell.


#include<stdio.h>  int main(void) {     int i=(1,2,3,4);     printf("%d",i);     return 0; }   When I'm given an online technical mock test I came to this question. Firstly I think there is an compilation error in line int i=(1,2,3,4); but I was wrong. I don't know why the output of this question is 4.


Difference between Smoke Testing and Sanity Testing

I am new to "Manual Testing". Just wanted to know the difference between Smoke Testing and Sanity Testing with software examples for better understanding.


Is there anything I can add to homemade bread to preserve it?

I love making our own bread - we rarely buy shop bought, but it tends to go off very quickly. Part of the appeal is that it doesn't have any "junk" in it - artificial preservatives - which I'm sure contributes to the lovely flavor. Is there anything natural I can add to it to stop it going moldy so fast?


If I cast Flicker on an unearthed creature, does it remain exiled?

The rules for the Unearth ability are as follows:     702.82a Unearth is an activated ability that functions while the card with unearth is in a graveyard. Unearth [cost] means [Cost]: Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step. If it would leave the battlefield, exile it instead of putting it anywhere else. Activate this ability only any time you could cast a sorcery.   If I unearth a creature, and then cast  to exile and return it, does the replacement effect cause Flicker to lose track of it, or is Flicker still able to see the exiled card and return it to the battlefield?  (Are there similar combinations of spells or abilities that would result in a different outcome?)


Why can't I scale or rotate objects in the viewport?

While it was working a while ago, scale and rotate is not working in the 3d View anymore, grab is working though. I'm allowed to scale the objects manually using the N-key but the shortcuts are not working, no matter how much I press S and R:  Did I press a key or something?


I am a new with Linux, having years experience with Windows servers/desktops and am having issues setting a static IP. I am using a method used for previous versions of Ubuntu, which doesn't seem to work with 16.04  I have used the command sudo nano /etc/network/interface and added the following  iface enp0s25 inet static address 10.10.8.2 netmask 255.255.0.0 gateway 10.10.1.1 dns-nameservers 8.8.8.8 8.8.4.4   I have rebooted the system and the Ethernet is pretty much dead, ping doesn't work at all. I have tried to modify /etc/NetworkManager/NetworkManager.conf and made the following changes  #dns=dnsmasq (comment out the dnsmasq) [ifupdown] managed=true (changed from false)   With this I can get Ethernet to work sporadically, however it eventually fails.  I have tried this configuration on two other machines plus a virtual machine as well and all have the same results. I can confirm these settings work fine when I install Windows on any of these machines. As well when I let DHCP auto configure, everything works fine no issues.  I figure I am missing something here, setting up a static IP should not be difficult at all.


Suppose that G is a group and N < G a normal subgroup. Prove G/N is simple

Suppose that G is a group and N < G a normal subgroup. Assume that there is no normal subgroup M < G with N < M. Prove that G/N is simple.  This problem is really throwing me for a loop. The concept of quotient groups and how they relate to simple subgroups is confusing me, and so I am not really sure how to begin. If a simple subgroup's only normal subgroup is itself (and the trivial group), then G/N being simple would be proving that when multiplying the entire subgroup N by an element g for all g in G, that the collection of those sets cannot be broken into smaller normal subgroups?


Question pointing to wrong question when not logged in

I found this really weird bug just now... In here the question link is redirected to wrong question when you  are not logged-in, but when you log in again everything seems fine...  take a look here...  Steps:-   Visit  in logged off condition Find a question  Q:Review queue in the topbar makes a man sad when he can't act upon it [duplicate] Click on that question.. It redirects to  Now loggin again.. you are then redirected to correct question.


Pointwise convergent and total variation

I'm preparing for a test for real analysis and I came across this problem in Royden's book:  Let $\{f_n\}$ be a sequence of real valued functions on $[a,b]$ that converges pointwisely on $[a,b]$ to the real valued function $f$. Show that $TV(f) \leq \liminf  ~TV(f_n)?$  This looks quite similar in form to Fatou's Lemma to me, but can't find any way to establish TV with integration, can anybody please help?  (TV is short for total variation)


Sorry, may be this question is stupid, but I need to know this.  Can my provider detect p2p traffic if I use OpenVPN or some other VPN protocols?


When I click on the li I got a new li created. However clicking I want the same event on the new list items so I used:  $('ul').on( 'click', $this, function(){   But now the content is duplicated!

1

2

   JS:  (function(){     $('li').each(function(){         var $this = $(this);         $('ul').on( 'click', $this, function(){             $('ul').append('
new
');         });     }); })(jQuery)     I just want when you click on the existing or new list items you got 1 new created list item. Thank you.


Will an iOS reinstall make a jailbroken iOS device "unjailbroken" and “supported by Apple” again?

Will an    Work on any jailbroken-iPhone and Make a jailbroken-iPhone "unjailbroken"? Make a jailbroken-iPhone "supported by Apple"?   Similarly, does such an iOS reinstall reset the iPhone (jailbroken or not) back to a "clean, factory default" state?  My near-term purpose: I have an iPhone 4S running iOS 5.1 I'd like to jailbreak to at least install better Google Voice integration like .


Generic Method in Java - How to return the param class type as return type

How to return the same classType (2nd param) as return type? public Object getJsonPojo(String fileName, Class classType) {     try {         return objectMapper.readValue(new File(classLoader.getResource(fileName).getFile()), classType);     } catch (IOException e) {         e.printStackTrace();     }     return null; }  Now I can call like below only A obj = (A) getJsonPojo("filePath", A.class);   I want to have something like below, for example (without casting): A obj = getJsonPojo("filePath", A.class);


Let's say I have  on my side of the field, and my friend plays . Would Progenitus still be on the field after Worldfire resolves or is he also exiled since he has "Protection from everything?"


can one say "unpolite"? As in the following sentence: "it's hard for me to be unpolite." I was in class today and my teacher asked me to give him an example of an infinite sentence and that came out of my mouth just because, but my teacher corrected me. And told me to say "impolite" instead, but I found acouple of threads on the internet with opposed ideas. So please help me with this one.


What is the best way to convert an array to a hash in Ruby

In Ruby, given an array in one of the following forms...  [apple, 1, banana, 2] [[apple, 1], [banana, 2]]   ...what is the best way to convert this into a hash in the form of...  {apple => 1, banana => 2}


I'm using these two tags on a website, but they doesn't seem to work anymore?  Indexed by Google <!--googleoff: index--> Not indexed by Google <!--googleon: index--> Indexed by Google   When I search a page on Google and view the Cached version I can still see whats inside the tags?  Ealier when I was viewing a cached website the text inside the tags was not cached/indexed by Google..  Are the tags deprecated?


I want to limit the internet bandwidth to avoid causing a bad ping for other users in the same network.  I used to use wondershaper but it doesn't seem work on Ubuntu 17.04 (kernel 4.10, 64bit):  sudo wondershaper enp2s0 2000 200  RTNETLINK answers: Invalid argument We have an error talking to the kernel   I tried trickle, but it didn't work (unchanged bandwidth and only single application). I read that maybe tc could help me, but I failed at finding a way to get it to work.  Any ideas / solutions for my problem?  Edit:   and  don't help, cause wondershaper sadly doesn't seem to work on 17.04, trickle didn't really work too and doesn't really fit my needs, and tc isn't explained in those answers.


Who/whom question: "I have no idea whom he was speaking about." The subject of the phrase, "was speaking about" is, he, hence "whom" is correct (flip it around, "about whom he was speaking'). But it doesn't sound correct.


What does it mean "Everything in the Linux is file"

I just read the post . It just said.      This statement is true because there are special files that are more   than just files (named pipes and sockets, for instance), but to keep   things simple, saying that everything is a file is an acceptable   generalization. A Linux system, just like UNIX, makes no difference   between a file and a directory, since a directory is just a file   containing names of other files. Programs, services, texts, images,   and so forth, are all files. Input and output devices, and generally   all devices, are considered to be files, according to the system.   I think I just didn't understand it enough and well. and I didn't know how to understant it. How all the things in Linux(like device, process,net connection, program etc) are treated as a file? Could anyone ptell me more about this issue?


Having a base object that Interacts with copies in Illustrator

For Illustrator, is there a easy way to have copies of an object reference back to the original? For example, if I changed the color of the original then all the copies' color will change also.


I have a customer who wants salesforce package(Appexchange listed) to be installed on Community Cloud.I have no access of community cloud. Can anybody tell that is it possible to install salesforce package on community cloud?.What are the steps to follow to install salesforce package  Any help would be appreciated!!  Thanks


So if Harry is descended from Ignotus and Voltemort from Peverrels, does that make them long lost cousins?


Create strings using .reduce() in Javascript

I need to be able to take a list of strings, and come up with a list of all possible combinations of those strings combined.  ["asdf", "ghj","ew","ptum"]   It should get a list something like this, up to n  ["agep", "aget", "ageu", ... "fjwm"]   What would I do to get these?


How can I install  on Ubuntu using apt-get utilities?


Safari does not load any site but there is Internet connection

A friend of mine asked me to help with his MacBook as Safari didn't load any site.  I connected to his computer using TeamViewer (so internet is basically working), and then did a ping on Google.com, which worked. His Mac runs on OSX 10.6.x (Snow Leopard) with Safari 5.x.  I've tried a few things including:   PRAM reset Delete cookies and browser cache DNS flush Delete cookies/cache/plist in Library Delete and reinstall Safari.app   Non working. I tried downloading Firefox using curl but that seems also not to work.  Any idea what could be wrong?  edit: No proxys active


How to show that $\mathbb Q(\sqrt 2)$ and $\mathbb Q(\sqrt 5)$ are non-isomorphic?

How to show that $\mathbb Q(\sqrt 2)$ and $\mathbb Q(\sqrt 5)$ are non-isomorphic as a ring?  All I could manage to  show is that,  for any isomorphism $\phi:\mathbb(\sqrt 2)\to\mathbb(\sqrt 5),$ $\phi(1)=1.$   Since $\phi$ is a homomorphism, $\phi(a+b\sqrt 2)=\phi(a)+\phi(b)\phi(\sqrt 2)=a+b.\phi(\sqrt 2)$ (Since $\phi(\dfrac{p}{q})=\dfrac{p}{q}\phi(1)$ for $p,q(\neq 0)\in\mathbb Z$) $\forall~a,b\in\mathbb Q.$


I was just browsing a forum and someone asked about a PHP file they had found on the web.  It has several spots like this in the code:  if ($REMOTE_ADDR == "") $ip = "no ip"; else $ip = getHostByAddr($REMOTE_ADDR);  I have always thought brackets are needed to enclose what you want to do if the condition is true.  Is there some other alternative, such as if it is on the same line you don't?  There is also another line like this: if ($action != ""): mail("$adminaddress","Visitor Comment from YOUR SITE",  My instinct is to say this wouldn't work, but I also don't know if it is an outdated PHP file and it used to work?


Which of the two is more correct, when one wants to make sure whether he/she is a subject of the statement (ex. the sentence is addressed at two people, and one of those two people wants to make sure, whether the sentence is addressed at him/her).  You have beautiful eyes. Me?  or  You have beautiful eyes. I?


How do I stop having the same "community members have suggested a similar question" pop-up?

I have posted a question here:  and every time I come back to this page I have a     Some community members have suggested a similar question that may solve your problem       Does this answer your question?       How to change Power button shutdown action to run a script under systemd (2 answers)       🔘 Yes 🔘 No       (Private feedback)   That I answered "no" several times but keep popping up again and again, it there a way to get definitively rid of it ?  To be frank this is not really a big issue but it is quite frustrating answering the same question again and again.


When is the Evade chance calculated for enemy ships?

When firing a multi-shot weapon in FTL: Faster than Light, such as the Burst Laser Mk II, Each shot has a separate chance to hit or miss it's target.   Say I'm firing at an Engine Bay on an Automated Scout with no shields. For the purposes of this example, lets say that the ship's current evade chance is 20%, and the Engine Bay is fully powered and has 2 hitpoints.  I fire my lazor Burst Laser Mk II, and the first shot hits the Engine, taking one hitpoint and dropping the Evade chance to 15%. Are the subsequent shots (that the weapon fired before the Evade chance dropped) calculated against the original 20% chance, or the new 15% chance? When does the enemy ship's evade chance get calculated?


What is the difference between the memory usage report in System Monitor and the one by free?

I am using System Monitor 2.28.0.  When I look in the Resources tab, I see a nice graph with for memory and swap.  Memory is about 60% 2.3 GiB of 3.8.  When I type the command free, I got :               total       used       free     shared    buffers     cached Mem:       3994908    3962396      32512          0     100852    1477032 -/+ buffers/cache:    2384512    1610396 Swap:      8000328      28468    7971860   cat /proc/meminfo | grep MemFree give  MemFree:           34536 kB   The situation has remained the save for several minute.  I started a lot of process with a script and the script is waiting for the free memory to get lower.  According to what I am seeing in the Process tab (or with top), the number in System Monitor seem a lot closed to the total of the memory of the process that the one reported by free.   Thanks


I read this sentence: "It was school holidays, and they were going to spend a whole week there." I cannot understand why it is "It was school holidays..." Why not "It were school holidays..."? Is it because "it" is singular and takes singular verb "was"?


How to add an empty folder inside an already existing repository? Github

In GitHub, I already have an Automata repository with 1 project in it. I just want to add more projects in this repository. I wish to create different folders inside the Automata repository so I can better organize my projects. In other words, my question is "how to add a folder inside a repository?"


Has the Time Machine option to ""Delete all backups of" disappeared in Big Sur?

I have a folder that gets filled with large files that I want Time Machine to remember while retaining the option of regularly forgetting these large files. For this and up until Catalina I would regularly enter Time machine, go to this folder and use the command Delete all backups of... (see for instance the screen capture of @Inder 's answer in ). As of my recent upgrade to Big Sur I no longer see this contextual menu option. Is it gone from MacOS for good? Is there an alternative that does not involve under-the-hood sudo-type terminal surgery? Thanks! PS. I had a look at  but the issue, as I understand it, is different. I am looking for a way to delete all backups of a given folder, not a single backup (snapshot) of the whole system. Answers that call for bypass look a bit too scary for my taste.


I am trying to learn about optics and I am having a hard time understanding the meaning of "real" vs "virtual" image.  My understanding is that for a concave mirror, the image focuses on the same side as the object so it is a real image.  For a convex mirror, the image focuses on the opposite side of the object from the mirror so it is a virtual image.  However, we can both see either real or virtual images, so how are we seeing something that focuses on the other side of the mirror in the convex case ?  I am very confused.


How to solve the system of linear differential equation of the form $$x' = Ax + b$$ I can solve the homogeneous form by finding the eigenvalues and respective eigenvectors, but how to find the particular solution part. Also is there any limitation from getting eigenvalues positive, negative or complex. Any other different method involving matrix algebra is also welcome. Thank you.


Problem with adding references to my thesis

I am writing my thesis in Overleaf and on compilation it gives me a warning, which says: Using fall-back BibTeX(8) backend: functionality may be reduced/unavailable. I understand it is because I am using BibTex as my backend instead of Biber. However, my problem is that after the file is complied, it only shows me one of my references and not the other one.  Example of my document is below:  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[backend=bibtex,style=authoryear,natbib=true]{biblatex} \addbibresource{References.bib} \title{problem with references} \author{abc } \date{August 2019} \begin{document} \maketitle \section{Introduction} \printbibliography[heading=bibintoc,title={References}] \end{document}   Is there any way I can use to show all the references? Note: In particular, my file does not show any references with a template of @misc  Edit: I forgot to add the \addbibresource{} to my example here. But it is there in my file. I didn't have any resources cited in my main.tex file. When I compile the file, it generates one of the resources on its own. However, when I add \cite{Reference1} \cite{Reference2} at the end on my main file it prints both of my resources. But it prints both of my references twice. First with their whole description and then just their title. I'm not sure how can I solve it.


Internal pullup for input in PIC microcontroller

Im new in PIC world. I want to ask:  Do I need external pullup resistor for switches and encoders?  When I was using Atmel microcontrollers - I was just turning on internal pullup resistors in software.  In PIC18F25k50 datasheet I found information, that RB port pins are:  "Digital Output or Input with internal pull-up option"  So I assume that some ports may have internal pullups and I have to check datasheet. However I don't know what resistance is there and I can't find it in datasheet.  I'm asking because in many tutorials I see external pullups, so there must be some reason...


How do you change the default shell for ALL USERS to bash?

I want every new user from now on to have bash as their shell by default.    I know that to change your own shell to bash, you would use the command "chsh -s /bin/bash", but how do I automatically set all future users' shell to bash by default?


Python: to check if a point in space is exactly on the surface of any mesh

I am wondering if there is a way to check if a give point (x y z) in a scene lies on the surface of any mesh object in that scene using Python script?  I mean, the point should lie on the mesh surface, not inside (maybe not exactly should be close enough if exact accuracy is impossible). So if the scene contains 1 cylinder of radius 1 centered at the origin, then the origin is not counted, but the points (1, 0, 0) or (0, 1, 0) are.


An activated ability of a card that affects that card

If you have a  that is enchanted by , and you pay to activate the ability Monstrosity 1, then would the creature fail to become monstorous and would not receive it's +1/+1?


Installing multiple packages at the same time

How do I install multiple packages?   For example, I want to install both package X and Package Y, I know that this is not possible by default but is there any alternate way of doing this or Can I atleast queue them for installation?


Well, in the proof of the following lemma suppose $G$ is a finite abelian $p$-group, and let $C$ a cyclic subgroup of maximal order, then $G=C\oplus H$ for some subgroup $H$ at , They say that since $H\cap(C+K)= K$, we have $H\cap C=\{e\}$. But how do they have that this part $H\cap(C+K)= K$? Can someone prove that please is because I don't see why is that true with the arguments presented in that proof. I have the following attempt : We know that $G/K=(C+K)/K \cong H' \Rightarrow H \cap (C+K)=K$ If there is $x \in H \cap C, x \neq e,$ then $H \cap (C + K) = K \Rightarrow x \in K.$ But by your assumption $C\cap K = \{e\}$ more precisely : I want to prove (convincing myself), why is this rght. In the proof of the lemma suppose $G$ is a finite abelian $p$-group, and let $C$ a cyclic subgroup of maximal order, then $G=C\oplus H$ for some subgroup $H$ at  they have that since $H\cap(C+K)= K$, we have $H\cap C=\{e\}$. But how do they have the part of $H\cap(C+K)= K$? is because they say that $H'$ is the preimage of a certain map, then they can do the following: $G/K= (C+K)/K \oplus H/K$ but I do not know if that is enough to justificate that step, or how can they have the conclusion that  $H\cap(C+K)= K$,and well the part that $H\cap C=\{e\}$ is obvious from here, and in the proof of the same lemma they say that because $K$ has prime order then $K\cap C=\{e\}$,  is that the only reason? Can someone prove those things please is because I don't see why is that true with the arguments presented in that proof. Thanks in advance. I am back in the discussion and I have edited my post to be clearler :)


How can I improve my pregame introduction?

I've been running a game for three sessions now, and each time I feel uncertain as to how to raise the curtains, so to speak, to let everyone know that we're entering the  and it's time for me to be the dungeon master and them to be the players, as opposed to us  being just friends sitting in a circle. I can of course do something like say "Okay guys we're starting now, time to get serious", but this feels to me a bit heavy-handed, and I'm not sure it would help us all get to the place we're aiming for.  This is especially important as I'm going to be moving to a new place in a few days, and any players I find in the new game I want to run then might not be experienced players and have the presence of mind to consciously put themselves in that roleplaying state of mind.  What techniques can I make use of to put everyone in the right mindset at the start of a session and to provide that rigid turning point beyond which everyone knows the game is really on?


There doesn't appear to be a Meta for  so I'm asking this here. The recommended next badge for me is "Informed", but when I click on "Go get it" I'm taken to , which does not appear to award the informed badge for reading.    So how does one get the Informed badge on Stack Apps?


Would a pendulum swing indefinitely in a frictionless vacuum?

I am attempting to settle a friendly bet.  Would a pendulum swing indefinitely in a hypothetical vacuum (i.e. no air resistance) having a hypothetical frictionless bearing (i.e. no energy lost due to friction) assuming the following   The frictionless vacuum is on Earth (9.8 m/s^2). The pendulum is already in motion and no other external forces other than gravity act on the pendulum.


Develop into Laurent series around $-i$: $\frac{z +1}{(z-i)^2} .$

Develop into Laurent series around $-i$:  $$\frac{z +1}{(z-i)^2} .$$  I don't even know how to start. Any hint helps! Thanks.


How to estimate coefficients of logistic model

Consider model $logit(p)=a+bx$. I would like to get an analytic formula of $a$ and $b$ like in linear regression. In linear regression, we can get a formula of estimates of $a$ and $b$.  I tried using MLE. But it is too complicated for me.  I am doing research about the statistical genetics. Here $p$ is penetrance and $x$ is genotype. In linear regression, we can use the coefficient $b$ to represent the covariance matrix of $x$ and trait $y$ (both of them should be standardized). I am thinking whether we can use the $b$ in logistic model to recover the information about the covariance matrix of $x$ and $y$ (binary trait) in meta-analysis (they do not provide individual level data). But some cohort will prove the odds ratio and coefficient t-statistic. I do not know how to use it to recover the covariance matrix of $x$ and $y$.   But some summary statistics will be provided like estimated odds ratio, Coefficient t-statistic.


order of execution in case of multiple inheritance

class A: public B, public C { };   In this case order of execution is:    B(); // base(first)   C(); // base(second)   A(); // derived     class A: public B, virtual public C { };    But in this case,when i write virtual with class c while inheriting,order of  // execution becomes:   C(); // virtual base   B(); // ordinary base   A(); // derived   i have read somewhere that order of calling constructor depends on the order of declaration while inheriting multiple classes but how does the order of execution gets changed on writing virtual with a class.I am not able to get why i am getting such result.


I would like to run  something > file   on a remote system through ssh, but if I run  ssh host something > file   the redirection is executed locally as ssh etc > file  I've tried it with ' or '' or dd or with a pipe | instead, but I can't get it to work. How can this be done?


Converting a varchar date into a date (dd/mm/yy)

I have a CSV file that has dates written like this: 250909,240909 and they get stored in a SQL Server database as varchars.  How do I get it to convert them into dates so that it gets displayed like this: 25/09/09, using the dd/mm/yyyy format?  At the moment I can get it to convert, but it converts it like this: 2025/09/09, meaning it is using the yyyy/mm/dd format which is wrong, seeing that the first column is the day and second the month and third the year.


Let $A$ be a $227\times227$ matrix with entries in $\mathbb{Z}_{227}$, such that all the eigenvalues are distinct. What is the trace of $A$?


Are there any official guidelines for Shadowrun payouts?

I'm trying to figure out how much to pay Shadowrunners for a job, and how to balance the NPCs. I couldn't find anything in SR4A (though I could've missed something).  I've only played in a couple of other tabletop SR games, and I honestly can't remember how much other GMs paid for runs.  On the Awakened Worlds MUD (), SR3, a typical job pays out somewhere in the vicinity of 2500-5000 'yen. Tougher jobs involving a lot of wetwork go up to about 12,000. These are normally solo jobs. The MUD is purposely designed to lowball players (I think), because it's much easier to accumulate cash when the runs are automated.  I figured that 4,000 per player was a pretty good payout - more than you usually get on the MUD, but not excessive. I got a couple of complaints when I offered 4K per PC in the runs I hosted at Dreamation, so I'm going to bump up the payouts for next time.  The two canned examples on the official site that are fleshed out (both 3E) pay 50k each and 10k each, respectively.  Is there any rhyme or reason to determining pay for a Shadowrun job? If anyone has a system for it, particularly an official one, please share. =)


I have to replace a wifi/bluetooth/isight cable on my mid-2009 MacBook Pro 13".  I have seen resources and vids that show how to essentially replace the cable up to the card and including the card but there is the other long end of the cable that feeds and connects too?  How do I replace this without causing damage.  Help!