I'm trying to enumerate my equations using this command:  \begin{equation}  w(H)\le (g^2-5g+10)/2  \end{equation}   I have this in the log:  ! Missing $ inserted. <inserted text> $ l.1026 \end{equation} I've inserted something that you may have forgotten. (See the <inserted text> above.) With luck, this will get me unwedged. But if you really didn't forget anything, try typing `2' now; then my insertion and my current dilemma will both disappear. ! Display math should end with $$. <to be read again> \endgroup l.1026 \end{equation} The `$' that I just saw supposedly matches a previous `$$'. So I shall assume that you typed `$$' both times. [21]...   I've already tried to put this $$ or $$$$ and nothing happens.  I need help.  Thanks


Upload Multiple Files With media_handle_upload

I have a WordPress form plugin and I use  to upload the files and get there ids directly and attached its ids to the post as a meta date, I used the following to did that:  The HTML of the form field is:  <input type="file" name="my_file_upload" id="my_file_upload">   And the php code was:  $attach_id = media_handle_upload( 'my_file_upload', $post_id ); if ( is_numeric( $attach_id ) ) {     update_post_meta( $post_id, '_my_file_upload', $attach_id ); }   And everything was work perfectly.  Now I am trying to upload multiple files my HTML code is:  <input type="file" name="my_file_upload[]" id="my_file_upload[]" multiple="multiple">   But I cant make the media_handle_upload function work with multiple files upload.  Any help will be appreciated.


I was at an interview for a C position in which they presented me with an idiom that I haven't previously encountered. This is a trick that simplifies implementation of various algorithms involving linked lists and I'm wondering if anybody else has encountered this.  Say we have a linked list record defined so:  typedef struct _record {     char* value;     struct _record* next; } record;   We need a function that inserts a new record so that the entire list remains sorted with respect to the value's in the records. The following implementation is simpler than anything I would have used, albeit less readable.  void insert_sorted(record** r, const char* value) {     record* newrec = NULL;     while(*r && strcmp(value, (*r)->value) > 0)         r = &((*r)->next); /* move r to point to the next field of the record */     newrec = malloc(sizeof(record));     newrec->value = strdup(value);     newrec->next = *r;     *r = newrec; }   When the function is called, r points to the head pointer of the list. During the while loop, r is updated to point to the next field of the record that comes just before the point where we want to put the new record in. The last line of the function either updates the head pointer of the list (if the insertion happens at the beginning) or the next field of the previous record, which is quite cool.  A couple of questions:   Does this idiom have a name or is it mentioned in any literature? Are there others like it in the C language?   I thought I knew C pretty well and had pointers and indirection pretty well figured out, but this one took me a while to fully understand.


Why can Bobbi and Hunter no longer work for S.H.I.E.L.D.?

I just watch S03E13 from Marvel's Agents of Shield, . Bobbi and Hunter were ultimately exonerated and released, but as a result of their sacrifice, they can no longer work for S.H.I.E.L.D. Bobbi say she doesn't want to be in a lab, so I guess they won't be able to do field work, but what is the logic for why they can't work with S.H.I.E.L.D. anymore? The only thing I can think is they blow his cover (even when they keep his vacation lie until the end), but worst case they can wear masks like the one Ward's girlfriend used to disguise as Melinda May.


If we have two circles in the plane described by $(x_1, y_1, r_1)$ and $(x_2, y_2, r_2)$ we can determine if they are completely disjoint by simply:  $$(x_1 - x_2)^2 + (y_1 - y_2)^2 < (r_1 + r_2)^2$$  Assume this is not the case, we now want to know if one completely overlaps the other.  (That is: if the second circles interior is a subset of the first circles interior.)  If $(x_1, y_1) = (x_2, y_2)$ than we can trivially compare radii, so lets assume their centers are distinct.  The way I have imagined is to create a parametric equation of the line that connects the two centers:  \begin{align} x_p(t) &= x_1 + t(x_2 - x_1) \\ y_p(t) &= y_1 + t(y_2 - y_1) \end{align}  Then we calculate the two line segments (represented as two pairs of t values) where the circles intersect this line.  One is a subset of the other if and only if the corresponding circles are subsets of each other.  Is there a simpler approach I am overlooking?


Users without commenting privilege can't select the "it doesn't belong here" flag reason; a "404" error box appears when they try

I attempted to flag ...        ...as "off topic". Although the initial flag dialog loads correctly, every time I selected the "it doesn't belong here, or is a duplicate" option, the next pane would fail to load:        Request URL:https://christianity.stackexchange.com/flags/questions/18136/close/popup?_=1375739403107 Request Method:GET Status Code:404 Not Found   The account had 46 reputation. I tested this on other sites, but found that it only occurred on Christianity.SE. This was my only account that has the for the  but not enough for the .     I have now earned the commenting privilege on Christianity and am no longer able to reproduce this error, confirming its cause.


What is the difference in the meaning of the following two sentences     I can't do the fourth and fifth questions but I have done all the others.      I can't do the fourth and the fifth questions but I have done all the others.   Is anyone of them ungrammatical?


How to write the introduction of a stapler PhD thesis?

It looks like I am going to have three articles (if all goes well) that are dealing with quite different fields (psycho-accoustics, time-series analysis and machine learning). I do not have a single clue on how to start writting the introduction for a thesis that should tie these together ... Do you have tips for writting introduction when dealing with "sandwitch"/"stapler" thesis ?


Need for using the article "the" before "United States of America"?

Usually, we do not use the definite article, the, before names of countries but we use the before "United States of America".   Is there a specific reason for using the article before the country "United States of America"?


C++ generic class, separate implementation?

I'm looking to write a generic class (like this: template <Class T>) in C++11 but I was told that the implementation could only be written in the .h file, why is that?  I wrote some code (1000 lines) and it's a complete mess, I don't know where some pieces of code went. Is there any way to separate implementation and declaration?


ssh not working after recent upgrade on Ubuntu

After a recent upgrade of Ubuntu 12.04, ssh isn't working. Machine is a VM on Linode.  I am getting this error:  $ ssh root@IP-ADDRESS ssh: connect to host IP-ADDRESS port 22: Connection refused   I have tried NMAP, and it's not showing port 22. At the moment, I have access to the vm, though Linode Lish, so I am able to run the server for now.. but need to fix ssh asap.  Any help or suggestion please?


Bash using curl to check headers and mailing me if there are any errors

I am trying to get the headers of few web sites with curl , and send mail when i get errors like 404,403,500,503 but i keep getting this error  Error:    line 7: [: -eq: unary operator expected   Code:  # !/bin/sh  NOW=$(date +"%H:%M_%m-%d-%Y")  web() {     res=$(curl -I -s "$1" -o test/"$1_log_$NOW" | grep HTTP/1.1 | awk {'print $2'})     if [ $res -eq 500 ]     then       echo "Error $res on $1" |mail -s "Error $res at $1 "mail@something.com      fi }   I manage to do what i wanted but i changed a lot of the script :  #!/bin/sh  NOW=$(date +"%H:%M_%m-%d-%Y")  web() {  res=$(curl -I -s $1  | grep HTTP/1.1 | awk {'print $2'}) if [[ "$res" == 500 ||"$res" == 403 || "$res" == 404 ||"$res" == 503 ]] then   echo "Error $res on $1" |mail -s "Error $res at $1 " somethng@domain.com   fi echo "$res" > /home/user/test/"$1_log_$NOW"  } web domain1.com


setting up apache2 webserver -- differences between behaviour within my intranet and outside

I am new to apache2. I have an ubuntu 12.04.4 LTS machine in my home, and just installed apache2 on it. I wanted to set up a webserver running on a port other than port 80 (my router uses port 80). Here's what I did:   Changed some lines at the beginning of /etc/apache2/ports.conf from  NameVirtualHost *:80 Listen 80   to  NameVirtualHost *:8041 Listen 8041  Changed the first line of /etc/apache2/sites-available/default from  <VirtualHost *:80>   to  <VirtualHost *:8041>  Restarted apache2   My ubuntu machine has local IP address 192.168.1.133, and from any computer on my home intranet if I point a web browser to http://192.168.1.133:8041 then I get the standard apache2 "It works!" web page. I also set up my router to port forward any incoming TCP  packets on port 8041 to the ubuntu machine (still on port 8041).   Let's say my ISP has given me the IP address 123.456.78.90. If I am outside my intranet and I point a web browser to http://123.456.78.90:8041 then again it works.  However, within my intranet (on the ubuntu machine itself or on other machines on the intranet), when I point a web browser to http://123.456.78.90:8041 I get an "unable to connect" error.   Where do I go from here? I am now unclear about whether this is an issue with my apache set-up or my router. I have now unfortunately realised though that it is probably not a question about Ubuntu :-/


I've finally put down the money to buy a quality knife and it's sharpness is amazing!  How do I take care of it so that the edge lasts and the knife stays sharp?


Need to move the last line of the file to second line of the same file

I have a file 'test' in linux with below data.  aaaaaa bbbbbb cccccc dddddd eeeeee   I need to cut the last line of this file and put it in the second position. It must look like below.  aaaaaa eeeeee bbbbbb cccccc dddddd


Is there a way to get the parameter names a function takes?  def foo(bar, buz):     pass  magical_way(foo) == ["bar", "buz"]


Suppose ${3^x} + {4^x} = {5^x}$. What is zero of this equation?


What does "in spades" mean, for example in the following sentence:     demand and love are both there in spades ...   I guess "in spades" means "on cards" or "on the table" or exist?


I am using Ubuntu 16.04 64-bit. I was trying to uninstall VirtualBox, but I got a lot of errors which ended with a warning telling me that my Software Centre has failed. I restarted the system and was going to try again. I ran: apt-get update and apt-get upgrade before trying anything else.   When I ran the upgrade command, the VirtualBox automatically got installed along with it, but after throwing a lot of warnings at me (I don't remember exactly what those were).   I think I should uninstall this and start fresh but when I try to uninstall using apt-get remove virtualbox* --purge, I got these results:  ananthan@ananthan-X556UQK~$ sudo apt-get remove virtualbox* --purge  Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'virtualbox-source' for glob 'virtualbox*'  Note, selecting 'virtualbox-guest-utils' for glob 'virtualbox*'  Note, selecting 'virtualbox-ose' for glob 'virtualbox*'  Note, selecting 'virtualbox-guest-modules' for glob 'virtualbox*'  Note, selecting 'virtualbox-guest-additions-iso' for glob 'virtualbox*'  Note, selecting 'virtualbox-guest-dkms' for glob 'virtualbox*'  Note, selecting 'virtualbox-dkms' for glob 'virtualbox*' Note, selecting 'virtualbox-ext-pack' for glob 'virtualbox*'  Note, selecting 'virtualbox' for glob 'virtualbox*'  Note, selecting 'virtualbox-guest-source' for glob 'virtualbox*'  Note, selecting 'virtualbox-ose-fuse' for glob 'virtualbox*'  Note, selecting 'virtualbox-qt' for glob 'virtualbox*'  Note, selecting 'virtualbox-2.0' for glob 'virtualbox*'  Note, selecting 'virtualbox-2.1' for glob 'virtualbox*'  Note, selecting 'virtualbox-2.2' for glob 'virtualbox*'  Note, selecting 'virtualbox-modules' for glob 'virtualbox*'  Note, selecting 'virtualbox-3.0' for glob 'virtualbox*'  Note, selecting 'virtualbox-3.1' for glob 'virtualbox*'  Note, selecting 'virtualbox-3.2' for glob 'virtualbox*'  Note, selecting 'virtualbox-4.0' for glob 'virtualbox*'  Note, selecting 'virtualbox-4.1' for glob 'virtualbox*'  Note, selecting 'virtualbox-4.2' for glob 'virtualbox*'  Note, selecting 'virtualbox-4.3' for glob 'virtualbox*'  Note, selecting 'virtualbox-5.0' for glob 'virtualbox*'  Note, selecting 'virtualbox-5.1' for glob 'virtualbox*'  Note, selecting 'virtualbox-dbg' for glob 'virtualbox*'  Note, selecting 'virtualbox-guest-X11' for glob 'virtualbox*'  Note, selecting 'virtualbox-guest-additions' for glob 'virtualbox*'  Package 'virtualbox-ose' is not installed, so not removed  Package 'virtualbox-ose-fuse' is not installed, so not removed  Note, selecting 'virtualbox-dkms' instead of 'virtualbox-modules'  Package 'virtualbox-2.0' is not installed, so not removed  Package 'virtualbox-2.1' is not installed, so not removed  Package 'virtualbox-2.2' is not installed, so not removed  Package 'virtualbox-3.0' is not installed, so not removed  Package 'virtualbox-3.1' is not installed, so not removed  Package 'virtualbox-3.2' is not installed, so not removed  Package 'virtualbox-4.0' is not installed, so not removed  Package 'virtualbox-4.1' is not installed, so not removed  Package 'virtualbox-4.2' is not installed, so not removed  Package 'virtualbox-4.3' is not installed, so not removed  Package 'virtualbox-5.0' is not installed, so not removed  Package 'virtualbox-guest-additions' is not installed, so not removed  Package 'virtualbox-5.1' is not installed, so not removed. Did you mean 'virtualbox-5.1:i386'?    Package 'virtualbox' is not installed, so not removed  Package 'virtualbox-dbg' is not installed, so not removed  Package 'virtualbox-dkms' is not installed, so not removed  Package 'virtualbox-ext-pack' is not installed, so not removed   It is telling me that it is unable to install anything because nothing has been installed, however I am able to open VirtualBox so it must be installed. I am apprehensive about trying it out in this form.  How do I uninstall this? Or should I try to use this as it is?


How can I pass a file argument to my bash script using a Terminal command in Linux?

So my question is how can I pass a file argument to my bash script using a Terminal command in Linux? At the moment I'm trying to make a program in bash that can take a file argument from the Terminal and use it as a variable in my program. For example I run myprogram --file=/path/to/file in Terminal. My Program #!/bin/bash     File=(the path from the argument)   externalprogram $File (other parameters)  How can I achieve this with my program?


Why app updates download entire app instead of only "updates"?

I find it rather strange that for updating an app in Android (or even iOS) the entire app is downloaded instead of only the actual "Updates".  The reason I find this strange is because in Windows while updating an app, only the update files are downloaded -- not the entire app -- which is more practical as it saves both time and data usage.  This would seem trivial to most, but when you need to download a huge app just for a tiny feature addition/bug fix it becomes a real PITA.  Does anyone have an explanation as to why this model was implemented?


I'm confused as to how I'm supposed to write the big bracket.


Is it okay to send a gentle reminder to professor

I sent an email to some professor about a month back for some research paper. He reply to me that he will scan the research paper and send me in few weeks. I think he has forget to send the scanned document. Should I send him a gentle reminder?


this is my code to check if the value of column is not null  if(!res.getString(res.getColumnIndex("answerquestionid")).trim().equals("")){  but I get this:     java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.trim()' on a null object reference   What is the proper way to check if value return by res is empty


How to evaluate $$\int_0^1\frac{\arctan x}{x\sqrt{1-x^2}}\,\mathrm dx\text{?}$$ The steps I can think of is integration by parts as $$\int_0^1\frac{\arctan x}{x\sqrt{1-x^2}}\,\mathrm dx=\int_0^1\frac{\arctan x}{x}\,\mathrm d(\arcsin x)$$ or integration by substitution using $x=\sin t$ as $$\int_0^1 \frac{\arctan x}{x\sqrt{1-x^2}}\,\mathrm dx = \int_0^{\frac{\pi}{2}}\frac{\arctan(\sin t)}{\sin t}\,\mathrm dt,$$ but both seems to make the problem more complicated.  Thanks a lot.


What is the largest $k$ such that $ \frac { k(abc) }{ a+b+c } \le \left( a+b \right) ^{ 2 }+\left( a+b+4c \right) ^{ 2 } $?

Find the largest value of $ k $ such that $$k \cdot \left(\frac { abc }{ a+b+c }\right) \le \left( a+b \right) ^{ 2 }+\left( a+b+4c \right) ^{ 2 }$$


I read some about red giants and so far I understand red giants become exhausted of burning hydrogen in the core, so then start hydrogen burning at shell and may or may not be burning helium in the core, in the meantime.   I know when stars start burning heavier atoms the nuclear energy against the gravitation becomes weaker and stars start to collapse. But why red giants get bigger while burning helium or just hydrogen burning shell ? If it was gaining energy it would not become red, what makes it to expand then ?


Problem with ubuntu 18 dual boot windows 10

I have just installed Ubuntu 18 on my Asus ROG I also have windows 10 on my hdd (and also had id before ubuntu). After installing ubuntu I had some problems getting grub to actually show up and let me choose which OS it should boot into.  Now, when I try to boot into windows I get a black screen with a blinking cursor. but fortunately I can still boot into ubuntu.   I could also mount the windows partition and see that is intact, so the OS still is there.   My question is how can I repair the windows bootmanager (i think this is the problem here) from ubuntu. Thank you!  I have also downloaded a windows 10 iso image and wrote it on a usb stick, but when I try to boot from the stick, it just freezes and the asus logo remains stuck on the screen.


Shamir Secret Sharing: Using $a_0 \ldots a_k$ to store secret?

Let's assume I have a truly random secret $s$ that is 256 bits long, and I want to use SSS with e.g. $(k=4,n=8)$. The normal approach is to set $a_0=s$ and choose $a_1 \ldots a_{k-1}$ randomly, resulting in 256 bit outputs for the points.  My question: Is there any loss in security by splitting $s$ into $k$ slices (in this example 4 slices holding 64 bits each), and using those slices as $a_0 \ldots a_{k-1}$ in the polynomial? I can then reduce p from e.g. 2^256-189 to 2^64-59 and have reduced the size of each point to about 64 bits.


How to align floating point variables in Latex3

I would like to have the variables (defined in Latex3) aligned in a table with the decimal point. Of course, without using the "trial and error" extra space ",". Is there any possibility? Thank you very much. \documentclass{article} \usepackage{xparse} \usepackage[version=4]{mhchem}  \usepackage{siunitx,booktabs}  % \ExplSyntaxOn \NewDocumentCommand{\calcnumd}{o m}   {\IfValueTF{#1}      {\num[round-mode = figures, round-precision = #1, round-integer-to-decimal]{\fp_to_decimal:n{#2}}}      {\num{\fp_to_decimal:n{#2}}}   } % data \fp_set:Nn \dhfbiox {33.18} \fp_set:Nn \dhftetrox {9.16} \fp_set:Nn \dgfbiox {51.31} \fp_set:Nn \dgftetrox {97.89} \fp_set:Nn \cpbiox {37.20} \fp_set:Nn \cptetrox {77.28} % calculations % \ExplSyntaxOff % \begin{document}  \begin{center} \begin{tabular}{l|ccc}    & $\Delta_f H^{\ominus}$ & $\Delta_f G^{\ominus}$ & $C_P$ \\    & \si{\kilo\joule\per\mole} & \si{\kilo\joule\per\mole} & \si{\joule\per\kelvin\per\mole} \\ \midrule \ce{NO2} & \calcnumd{\dhfbiox} & \calcnumd{\dgfbiox} & \calcnumd[4]{\cpbiox} \\ \ce{N2O4} & \,\,\,\calcnumd{\dhftetrox} & \calcnumd{\dgftetrox} & \calcnumd{\cptetrox} \\ \bottomrule \end{tabular} \end{center}  \end{document}


How fast can the Earth rotate without people on the equater falling off and how long would the day last with this speed?

This is the radius that was given to us r= 6400km What I've tried is figuring out what is the force that would push the people off the equator,and what is the force that would "pull" people in. The force that would be pushing people off the equator would be the centrifugal force. Now to calculate the force I'd use this $$ F = m * \frac {v^2} {r} $$ For the velocity I've simply calcuated the speed that the people at the equator feel when the earth is spinning (Note: I've taken the radius to be the given 6400 km) and it is about  v = 1674,6 km/h.Now I'm not sure what I should put in as my mass,since I'm not given a certain mass to calculate with.This is kind of a problem,since I cannot get the centrifugal force.What do I do here?Also after getting the centrifugal force I'm not quite sure what to do next. I'd pressume I'd have to calculate the gravity force that is keeping us in, but than how would I, from these two forces be able to determine what is my maximum speed that can still keep me on the earth? Thank you! EDIT: So after some more help this is what I've got, a suggestion said that I can use the mg formula where my g is this $$ g = \frac {G M} r^2 $$ where M is the mass of the earth. So I did that $$ g = 9,7 m/s^2 $$ Note(r was 6400 * 10^3 m and M was 5,972 *10^24 kg according to google) $$ m * \frac {v^2} {r} = m * g $$ If we neglect the mass $$ \frac {v^2} {r} = g $$ We multiply everything with r to get rid of the fraction $$ v^2 = g * r $$ $$ v = \sqrt {g *r} $$ v = 7897,08 m/s Thoughts?


We have the image below displaying the uniform velocity by time-distance graph. At every point velocity is constant but what if distance and time both become zero as at origin in the graph is? The velocity must become undefined as $\frac{0}{0}$ is undefined in mathematics or shall we call it zero? If zero then why?


Printing line with end='\r' on Windows doesn't seem to work?

I'm creating a prime number finding script, and I want to print what number is currently active.  def is_divisible(number: int, dividor: int) -> bool:     float_number = number / dividor     if float_number.is_integer():         return True     return False   def is_prime(number: int) -> bool:     """         Returns a bool, whether the a number is a prime.     :param number: number     :return: bool (True if it is a prime, False if it's not a prime)     """     tmp_numbers = set()      for i in range(2, number):         if any(is_divisible(i, n) for n in tmp_numbers):             continue          if is_divisible(number, i):             return False          tmp_numbers.add(i)      return True   number = 99999999 for i in range(2, 90000):     print("checking {}".format(i), end="\r")     if is_prime(i) and is_prime(i + 4) and is_prime(i + 8):         print(i)   When I terminate the script, I can see that line ("checking ...") but while it's executing I can't see it.


I am trying to use \pgfmathsetmacro inside a foreach loop to connect nodes which are adjacent and named according to position as follows:  \foreach \src in {0,...,\T}{     \pgfmathsetmacro{\dest}{\src+1};     \path (n-\src-1) edge[<-] (n-\dest-1); };   This however leads to the following error during compilation:  ./nn.tex:54: Package pgf Error: No shape named n-1 is known. [    }] ./nn.tex:54: Package pgf Error: No shape named n-2 is known. [    }] ./nn.tex:54: Package pgf Error: No shape named n-3 is known. [    }] ./nn.tex:54: Package pgf Error: No shape named n-4 is known. [    }]   which makes it seem as though the \dest value is not available. How do I get around this issue?  Thanks in advance!


SH/BASH: Store Command Parameter with Whitespace in Variable

I'm trying to store a command string in a variable for later execution. The problem is that the command includes a parameter argument with whitespace. When the command is executed, instead of seeing the argument as a single string, the shell interprets it as two, including the double-quote characters:  Example:  $ CMD_CMAKE="cmake -G \"MSYS Makefiles\" ../../source/poppler-0.79/"  $ ${CMD_CMAKE} CMake Error: Could not create named generator "MSYS   I need to pass -G "MSYS Makefiles" to the cmake command. Instead, -G \"MSYS and Makefiles\" are being passed.  I have tried all of the following with no success:  $ CMD_CMAKE='cmake -G "MSYS Makefiles" ../../source/poppler-0.79/'  $ CMD_CMAKE="cmake -G 'MSYS Makefiles' ../../source/poppler-0.79/"  $ CMD_CMAKE="cmake -G MSYS\ Makefiles ../../source/poppler-0.79/"  $ CMD_CMAKE="cmake -G MSYS\\ Makefiles ../../source/poppler-0.79/"  $ GEN="MSYS Makefiles" && CMD_CMAKE="cmake -G ${GEN} ../../source/poppler-0.79/"  $ GEN="MSYS Makefiles" && CMD_CMAKE="cmake -G \"${GEN}\" ../../source/poppler-0.79/"  $ CMD_CMAKE=$(echo "cmake -G \"MSYS Makefiles\" ../../source/poppler-0.79/")  $ CMD_CMAKE=$(echo 'cmake -G "MSYS Makefiles" ../../source/poppler-0.79/')   I have done some searching around on Google, but I am not finding any answers. Perhaps because I am not using the correct terminology.  Edit: I'm sorry, I think I should have posted this question on stackoverflow.com.


This is hypothetical in the spirit of a recent question about derailleur cables, but I've seen two bikes being pushed with broken rear derailleurs in the last few days.   What are likely causes of broken rear derailleurs (commuting /road especially; I assume that in MTB it's hitting stuff). Alternatively what can we do to avoid it? I've worn one out but never broken one.   Perhaps more importantly, if a rear derailleur breaks on the road, what can a rider do, and what tools would they need?


I am sorry that this is not a very specific question.  Since I updated to 2013 I haven't been able to compile a single document. To be honest, neither did I let one of the many compilation processes I started run through in its entirety -- after 3 hours I usually gave up enervated.  Before the update, compiling took between 3 and 10 minutes (my laptop is old, too). I use LuaLaTeX.  Some of the steps in the process that seem to take ages:   (/usr/local/texlive/2013/texmf-dist/tex/latex/euenc/eu2enc.def (/usr/local/texlive/2013/texmf-dist/tex/latex/base/fontenc.sty defining? redefining? saving? doing something with the font shapes (something containing: texlive/2013/texmf-var/luatex-cache/generic/fonts/otf/brill-roman-2.luc -- but I also tried to use standard fonts with no success)   Update:  I was just able to compile a document that was lacking \usepackage{fontspec}.


Split text into words ignoring the single quoted word in text in JavaScript

I am trying to split text into words on the basis of space but I don't want to split words in single quotes into different words.  Here if you can see word 'fd f df' is converted into three words 'fd , f , df' but I want to get this as single word like 'fd f df'. const str = `TEST = 'fd f df' AND Pitch = 444` str.split(/\s+/) // ["TEST", "=", "'fd", "f", "df'", "AND", "Pitch", "=", "444"]  Any help will be appreciated. P.S : this quoted words could be repeated in text many time in any position.


Function parameters: const matching declaration and definition

Found this by accident where a function declaration and definition may not agree on the constness of parameters.  I've found some information (links following), but my question is why is const matching optional for by-value parameters, but const matching is required for reference parameters?  Consider the following code available .  class MyClass {   int X;   int Y;   int Z;  public:   void DoSomething(int z, int y, const int& x);   int  SomethingElse(const int x);   void Another(int& x);   void YetAnother(const int& z); };  void MyClass::DoSomething(int z, const int y, const int& x) // const added on 2nd param {   Z = z;   Y = y;   X = x; }  int MyClass::SomethingElse(int x) // const removed from param {   X = x;   x = 3;   return x; }  void MyClass::Another(int& x) // const not allowed on param {   X = x; }  void MyClass::YetAnother(const int& z) // const required on param {   Z = z; }   I've found , but it is looking for explanation for name mangling.  I've also found  and , but they don't go into detail on why const matching is required for reference parameters.


Prove that every prime factor of $12x^2+1$ has the form $6n+1$

Let $n$ be an integer, prove that every prime factor of $12x^2+1$ has the form $6m+1$, where $m$ is an integer.  I've gone as far as knowing that all primes $p>3$ are either $6m+1$ or $6m-1$, how do I use this, not sure whether to even use that.  I know about the Legendre symbol and quadratic reciprocity


Let $A \in M_n(\Bbb R)$. How can I prove, that     1) if $ \forall {b \in \Bbb R^n}, b^{t}Ab>0$, then all eigenvalues $>0$.    2) if $A$ is orthogonal, then all eigenvalues are equal to $-1$ or $1$


Sorting table by multiple columns in QGIS

In 2012 the answer was NO!   My data is in a SHP file, I want to sort by 3 fields.  Has this changed in the last 4 years?  A solution like in ArcMap would be ideal -so it can be redone as required without hardcoding


why is there a difference if I add a class to a span tag as opposed to a div tag?

When I use a css class within a div tag it seems to ignore what is inside the css.    .centered {   background-color: red;   padding: 5px 20px 5px 20px; }
     I am centered with bg around me
   When is use the same class with a span tag nested within the div element it does what I want.
     I am centered with bg around me
   Why is this? What makes the difference?


UnicodeEncodeError while opening files in functions in Python 3.

I'm trying to display contents of text files using functions but am getting an error I don't know what to do about. I'm using Python 3.2.   Code:  from sys import argv from os.path import exists  script, input_file = argv  def print_all(foo):     print(foo.read())  def rewind(foo):     print("rewinding...")     foo.seek(0)  def print_line(n, foo):     print(n, foo.readline())  temp = open(input_file)  print_all(temp) rewind(temp) print_line(1, temp) print_line(2, temp)   Error report:   PS C:\Python32> python Sample1.py sample2.txt Traceback (most recent call last):   File "Sample1.py", line 18, in <module>     print_all(temp)   File "Sample1.py", line 7, in print_all     print(foo.read())   File "C:\Python32\lib\encodings\cp437.py", line 19, in encode     return codecs.charmap_encode(input,self.errors,encoding_map)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\xfe' in position 1: character maps to <undefined>   The contents of the text file sample2.txt are English alphabets only.


Why is $(e^{2πi})^i$ different from $(e^i)^{2πi}$

I'm a high school senior and this question has been on my mind since 8th grade, since I've learned Euler's formula but I've thought about it a lot more recently. According to Wolfram Alpha:   How is this possible?????? In other words, if $$ e^{iπ} = -1 $$ $$ e^{2iπ} = 1 $$ $$ (e^{2iπ})^i = 1^i $$ $$ e^{-2π} = 1 $$ Where is the error in this reasoning?


We run a fairly large game server hosting company with about 60 machines running Server 2008, and DDoS attacks something we have been dealing with for a long time. Unfortunately, due to the prices of the market, there is no way that us or any other company could feasibly put hardware firewalls in all of our datacenters.  Our course of action has always been to just contact the datacenter, and they null route the IP address/Port for 24 hours. This of course is a very unappealing way of dealing with the issue, especially for our clients.  From what I understand, a software Firewall will only complicate the issues of a DDoS attack. I have read some about hardening the TCP/IP stack, but it sounds like there isn't much that can be done from Server 2008 to help with this.  Is there anything we can do?


Google Earth Engine export for asset too large?

I am currently trying to export a rather large Sentinel-2 EVI raster of the northern coast of Cuba. The error that keeps getting returned is:     Failed to contact Earth Engine servers. Please check your connection,   firewall, or browser extension settings.   I've tried to alter the code as well as log out and log back in, check wifi, quit my browser etc. but something tells me this is likely a size issue.   Heres a link to the code:   Heres a link to my area of interest to use as an import (irma80Buff):


Applying for a different PhD, should I say I am already in one?

I am considering on applying for a different PhD position in a different university and even different country, but I don't know if I should mention I am already in one, and I'm planning to leave it, or just address that as a research assistant position, what should I do?


Unrendered Pixels (Holes) in Blender Internal Render

Here is my problem and I have never seen this before in Blender:  I'm making a Minecraft Animation and on multiple frames there are unrendered transparent pixels scattered across the image (resulting in black spots). I have googled around and only found answers related to Cycles render which doesn't apply to my situation as I use Blender Internal.  I made a video explanation to show in detail what is happening:    UPDATE: Thank's all those who helped me out. It turned out to be a problem with "Auto Ray Bias." This thread answered my problem.


I'm writing my thesis. I have several captions of tables like this:   \caption{Composição química média de folhosas, em percentagem ponderal (base seca) \citep{ferreira}.}   I use citep in caption. But I dont want this in my list of tables. It it possible ?


I have a machine with an Asrock q1900b-itx mobo and I'm experiencing random freezes of the system. By freeze I mean everything hangs and there is absolutely nothing that can be done except reset. I've read lots of threads, which date up to a year ago, about this problem , so this has been going for quite some time. The suggestion I found is to go to the BIOS and set C1 as the max state or to put some "intel_idle.max_cstate=1" line somewhere, which does the same thing.  The problem is that this is not a fix. Disabling CPU features isn't a way to solve problems. I bought this machine for a low power server and disabling power saving features is the last thing I would want to do. If a fix can't be made I suggest that BayTrail CPU's have to be labeled as "Not supported" and I would have to go to Windows, until a proper fix is made.


Does the vacuum in QFT have nonzero energy or not?

I have heard that in QFT, the vacuum has is postulated to have zero four-momentum, $$P^\mu |\Omega \rangle = 0.$$ However, I also know that it's supposed to have vacuum energy, $$ \langle \Omega | H | \Omega \rangle = E_0 \neq 0.$$ In textbooks, we patch up the latter equation by subtracting an infinite constant, and are told not to worry about it. In any case, the vacuum has to have zero four-momentum, as a fundamental axiom.   I am confused since  on this site talk about vacuum energy as a real thing that has a definite value. If it's real, then why can we subtract it off to get $P^\mu |\Omega \rangle = 0$? If it's not real, why do we talk about it as if it is?


Can anyone guide me how to install Tor in Ubuntu 14.04 LTS. I am new here and even dont have expertise in Linux, but very much willing and excited to learn Linux. I need to install Tor anyhow on my laptop (Ubuntu). Please any help and support from anyone shall be highly appreciated.


I was trying to color just first WORD of sentence
Title Of The Page
   CSS which am using is  .logoS{     padding: 0px;     float: left;     font-family: 'Open Sans', Helvetica, Arial, sans-serif;     color: white;     border:solid 1px black;     font-weight: bold;     font-size: 22px; }  .logoS::nth-word(1) {   margin-right: 20px; }   i just want to color "TITLE" not other words, any solution


Is there a way to compare two nucleotide sequences in Linux via command line tools such as diff

I have two genomic  sequences that I want to compare letter by letter. They share almost the same pattern but some nucleotide transitions occur.   For example  Sequence 1    ATGGCGATGAGCAGCGGCGGCAGTGGTGGCGGCGTCCCGGAGCAGGAGGATTCCGTGCTGTTCCGGCGCGGCACAGGCCAGAGCGATGATTCTGACATTTGGGATGATACAGCACTGATAAAAGCATATGATAAAGCTGTGGCTTCATTTAAGCATGCTCTAAAGAATGGTGACATTTGTGAAACTTCGGGTAAACCAAAAACCACACCTAAAAGAAAACCTGCTAAGAAGAATAAAAGCCAAAAGAAGAATACTGCAGCTTCCTTACAACAGTGGAAAGTTGGGGACAAATGTTCTGCCATTTGGTCAGAAGACGGTTGCATTTACCCAGCTACCATTGCTTCAATTGATTTTAAGAGAGAAACCTGTGTTGTGGTTTACACTGGATATGGAAATAGAGAGGAGCAAAATCTGTCCGATCTACTTTCCCCAATCTGTGAAGTAGCTAATAATATAGAACAAAATGCTCAAGAGAATGAAAATGAAAGCCAAGTTTCAACAGATGAAAGTGAGAACTCCAGGTCTCCTGGAAATAAATCAGATAACATCAAGCCCAAATCTGCTCCATGGAACTCTTTTCTCCCTCCACCACCCCCCATGCCAGGGCCAAGACTGGGACCAGGAAAGCCAGGTCTAAAATTCAATGGCCCACCACCGCCACCGCCACCACCACCACCCCACTTACTATCATGCTGGCTGCCTCCATTTCCTTCTGGACCACCAATAATTCCCCCACCACCTCCCATATGTCCAGATTCTCTTGATGATGCTGATGCTTTGGGAAGTATGTTAATTTCATGGTACATGAGTGGCTATCATACTGGCTATTATATGGGTTTCAGACAAAATCAAAAAGAAGGAAGGTGCTCACATTCCTTAAATTAA   Sequence 2   ATGGCGATGAGCAGCGGCGGCAGTGGTGGCGGCGTCCCGGAGCAGGAGGATTCCGTGCTGTTCCGGCGCGGCACAGGCCAGAGCGATGATTCTGACATTTGGGATGATACAGCACTGATAAAAGCATATGATAAAGCTGTGGCTTCATTTAAGCATGCTCTAAAGAATGGTGACATTTGTGAAACTTCGGGTAAACCAAAAACCACACCTAAAAGAAAACCTGCTAAGAAGAATAAAAGCCAAAAGAAGAATACTGCAGCTTCCTTACAACAGTGGAAAGTTGGGGACAAATGTTCTGCCATTTGGTCAGAAGACGGTTGCATTTACCCAGCTACCATTGCTTCAATTGATTTTAAGAGAGAAACCTGTGTTGTGGTTTACACTGGATATGGAAATAGAGAGGAGCAAAATCTGTCCGATCTACTTTCCCCAATCTGTGAAGTAGCTAATAATATAGAACAGAATGCTCAAGAGAATGAAAATGAAAGCCAAGTTTCAACAGATGAAAGTGAGAACTCCAGGTCTCCTGGAAATAAATCAGATAACATCAAGCCCAAATCTGCTCCATGGAACTCTTTTCTCCCTCCACCACCCCCCATGCCAGGGCCAAGACTGGGACCAGGAAAGCCAGGTCTAAAATTCAATGGCCCACCACCGCCACCGCCACCACCACCACCCCACTTACTATCATGCTGGCTGCCTCCATTTCCTTCTGGACCACCAATAATTCCCCCACCACCTCCCATATGTCCAGATTCTCTTGATGATGCTGATGCTTTGGGAAGTATGTTAATTTCATGGTACATGAGTGGCTATCATACTGGCTATTATATGGAAATGCTGGCATAG   Is there a bash way to compare the sequence and colorize or print the differences?  EDIT: I want to compare gene sequence by means of linux tools.   I need line by line comparison of letters and highlighting the differences. I think diff is not good at comparing single word which formed  of hundreds of letters.


This is the first week of fall semester in our university. It is still very hot and I understand everyone has right to wear what he/she wants to wear. But I my class one female student is wear too much revealing/short cloths. I found male students turning their neck to see her again and again.   What is the best way to handle such situation without hurting someone's feeling, and without creating controversy?   Can professor dictate dress code for class room?


Well, unfortunately the present my mom got me last Christmas turned out to be a pressure cooker and not a pressure canner.   I've read that it is unsafe to can low acid foods using a pressure cooker.    But is it safe to can high acid foods in a pressure cooker? I'd like to do this because it uses a lot less water and a lot less energy than boiling water canning.  Does a pressure cooker actually cook to a lower temperature than a pressure canner? (My pressure cooker just has two settings (high and low) and I don't know what the PSI is on them.


If G is a finite abelian group and $a_1,...,a_n$ are all its elements, show that $x=a_1a_2a_3...a_n$must satisfy $x^2=e$.

I have already tried with $S_3$, and indeed, the product is $(13)$, and $(13)^2=e$    But what about this: I define + in this way:$45=2$,$26=3$, $1$ is the identity. therefore, $123456=2326=233=3$, and as you can see from the picture, the inverse of $3$ is not itself, thus contradicts the statement.  My question: What is wrong with my argument?  And How do you prove the statement? it seems that my set of numbers perfectly forms a group under the operation I defined via the table above. first it's closed, second there is an identity, third every elements have an inverse. By the way it's commutitive. I tried (45)2=22=6=42=4(52), (45)6=26=3=43=4(56), so associativity seems to be satisfied.


Force drop db while others may be connected

I need to remove a database from a PostgreSQL DB cluster. How can I do it even if there are active connections? I need sort of a -force flag, that will drop all connections and then the DB.  How can I implement it?  I'm using dropdb currently, but other tools are possible.


Structure formation: Galaxies as different entities and stars as groups

Why do stars exist in groups like galaxies rather than individual stars, and why do galaxies exist as different entities without continuity and with large intergalactic spaces?


installation problem in VLC Media player

How to run media player in Ubuntu? Is it require any plug-in or any installer package?  Need step by step help , please help me.


How do I kill "Antimalware Service Executable"

I'm running Windows 10 and I I don't want an antimalware. I know what I'm doing and I'm not gonna be downloading torrents or random exe's from sites I don't know. So far I tried turning off Windows Defender, but the process is still running.  My last resort would be deleting MsMpEng.exe from C:\Program Files\Windows Defender.  If I try to end it from Task Manager, it says "The operation could not be completed... Access is denied"  And turning it off from the Windows Defender app did not work either, as it is not Windows 7 or Windows 8.1, and if I turn it off from there it kept running.


How to know number of cores of a system in Linux?

I wanted to find out how many cores my system has, so I searched the same question in Google. I got some commands such as the lscpu command. When I tried this command, it gave me the following result:  $ lscpu Architecture:          x86_64 CPU op-mode(s):        32-bit, 64-bit Byte Order:            Little Endian CPU(s):                4 On-line CPU(s) list:   0-3 Thread(s) per core:    1 Core(s) per socket:    4 Socket(s):             1 NUMA node(s):          1 Vendor ID:             GenuineIntel CPU family:            6 Model:                 23 Stepping:              10 CPU MHz:               1998.000 BogoMIPS:              5302.48 Virtualization:        VT-x L1d cache:             32K L1i cache:             32K L2 cache:              2048K NUMA node0 CPU(s):     0-3   In particular, this output shows:   CPU(s): 4 Core(s) per socket: 4 CPU family: 6   Which of those indicates cores of a Linux system?  Is there any other command to tell the number of cores, or am I assuming it is completely wrong?


How to enable iTerm 2's Option-Click feature? (Not duplicated)

In its document (), it reads "If enabled, option-click will move the cursor to where the mouse pointer is. If you install shell integration, this will be well-behaved at the shell prompt by not sending up and down arrow keys." But it seems like when I do Options-Click it just goes to last command (arrow up).  This answer here is no longer a solution - deprecated, and the source code is removed (), and the thread should be removed/archived.


Can't format / delete locked partition from GParted?

I can't format my hard disk for Ubuntu installation. It has Fedora installed in it. I wonder how to unlock the locked partition to delete and format it, since I am stuck at installing Ubuntu. I am now using a live CD to do the task. No options are available for me to use. Screenshot:


Installing Ubuntu onto laptop with no os via USB

My current laptop has no os installed and I would like to install Ubuntu onto it by tranferring a file/files from my android tablet and booting the setup off of the USB. Any help please?


Initialization order of static readonly field

I'm curious of the C# spec says anything about the order of initializing static field's in C# 5 (.net4).  For instance:  public class Test {    public static readonly string A = "hi";    public static readonly string B = "bye";    public static readonly string DEFAULT = A; }   In testing (Mono 2.x) they seem to be initialized in the order they appear in code.  eg. As is, DEFAULT will have the value "hi", but if I move the definition for DEFAULT above A and B, it will be assigned NULL because A hasn't been assigned yet.  Is there a guarantee that the variables are initialized in order? Or is it up to the compiler?  Thanks.


Why do we say " 'a' unit instead of 'an' unit

As title suggest, wondering what the literary rule is for "A unit." Unit being a noun would need an article. I have generally understood that the a/an decision is if the vowel sound if the lead sound ex: "an hourglass, but a glass".  it seems to me very clearly the "U" sound is the lead here, but for word that start with the 'you-enn' sound (unit, uniform, unabomber), we use "a".


How to correctly specify coordinate system?

Using QGIS v. 1.9 (1.7 does not seem to be available for Ubuntu Linux 12.04), do the following:   Create new project, specify coordinate system by clicking on button in bottom right hand corner, enable on the fly CRS transformation, set projection to WGS 84 / UTM Zone 18S. Pass mouse over project window and UTM coordinates appear in coordinates window in status bar at the bottom. Add delimited text layer in decimal degrees. When asked for projection, specify same projection as in (1). Points in the layer are plotted but, mousing over the map, the coordinates in the coordinates window are now in decimal degrees (even though the projection is set to UTM).   Is there something I am missing here? I have tried doing this in so many ways, so many times, but the result is always the same. I seem to be setting the projection correctly but only decimal degrees show in the coordinates window.  With thanks, Martin


Make accepted check more distinct from non-accepted check on own questions

I am viewing one of my own questions, which has an accepted answer, in the Android app.  The checkmark for the accepted answer could be more distinct from those in the non-accepted answers. The former is a green check in a white field, while the others are a white check in a field with the same shade of green. Here's a screenshot:    It was a bit confusing and I had to confirm on my PC which answer was the accepted one.  Could this distinction be more clear? Perhaps simply no checkmark for the non-accepted answers?


Unity animations not transitioning properly

I am currently trying to animate transitions between four different directions. I have four total animations for walking, and another four for the idle state. I cannot seem to figure out why when I try to transition from a walking state to another walking state in a different direction (not the direction I am idling in) it must wait for the walking animation to finish, and then play the walking animation in the new direction.    You can see my sprite begin to walk forward, and then when I attempt to turn south the animation it continually plays the north animation until the animation is finished. What I am trying to achieve is a smooth transition that switches immediately.   I know very little about animating and much more about programming. My list of attempted solutions is very short, and limited to only changing the length of each animation.


Let $f: X \rightarrow Y$ and $g: Y \rightarrow X$  If $f \circ g$ is injective and $g$ is surjective - is $f$ injective?  I am trying to learn the way of prooving things. So I'll give it a try and please correct at every wrong step.   I assume that the given statement ist true.   So first I give the condition that $g$ is surjective:  $\forall y \in Y : \exists x \in X:g(y)=x$  So two different $y$-values can point to the same $x$-value:  Let $y_1, y_2 \in Y, y_1 \neq y_2 : \exists x \in X : g (y_1)=x $ and $g (y_2)=x$  Next I want to connect the fact that $f \circ g$ is injective with the surjective condition of $g$:  Let $z_1, z_2 \in X \quad$ Because $z_1, z_2 \in X$ it is true that $z_1, z_2 \in g(y)$ thus: $$f \circ g(y_1) = f \circ g (y_2)$$ $$f(z_1) = f(z_2)$$ $$z_1 = z_2$$  So $f$ is injective.


Connect a set of nodes with another set of the same size without intersections

I am quite new to graphs (and could use some practice with math in general) and couldn't find a solution with zero intersections to this problem.  Assume you have two sets of 3 nodes (set H and set L) where each node (ex. h1, h2, h3) from one set should connect to every node on the other set (so l1, l2, l3). Is there any way you could arrange the connections so that there are no intersections?  Example of one edge intersection:


After installing Ubuntu 16.04 on desktop, I can't login anymore

After installing Ubuntu 16.04 on desktop, I'm able to see GRUB, I can select and enter into Ubuntu, but there is only a purple or black background with a cursor, and sometimes I can login.


find s string patterns in html code in c#

I want to create a robot to find news in my defined website, so my robot fetch the html code from the website and I should find the news part of the html code. For example one of the pattern that I should find is like this :
بازدید رئیس هیئت عامل صندوق نوآوری و شکوفایی از خبرگزاری مهر
   I want to know how can I find these pattern in the html code in C#. I googled it and i found something like regular expression. But in regular expression I can't define patterns. Can I define some pattern like this? With this complexity?


Why doesn't a short-circuit immediate consume all voltage?

If we assume a short circuit, with zero resistance (not even within the battery), would this 'infinite current' deplete all voltage within the battery? For example, if I "short" a 9V alkaline battery, it will run for about an hour (though the wire gets pretty hot, if not melts) until it depletes all its power. Is this only because the battery has internal resistance, or why does the battery 'keep running'? Additionally, does a battery ever give its Amp-hours or how long it can run?


Petrification and Animate object; Can you animate a petrified person?

I had a friend of mine asked me if someone could animate a creature that a gorgon or basilisk had turned to stone, and I couldn't answer. The Petrified status has one of the following as part of its rules.  A petrified creature is transformed, along with any nonmagical object it is wearing or carrying, into a solid inanimate substance (usually stone). Its weight increases by a factor of ten, and it ceases aging.  So, due to petrification, they are transferred into a solid, inanimate substance. Would that mean that a spell like animate object would be able to temporarily animate a petrified individual? Or does Petrification count as a magical condition and thus animate object cannot be used on the petrified individual? RAW, I'm guessing it can't be used as the Petrified individual is still considered a creature. Even without animate object, would you still be able to animate a petrified creature without removing the petrified status, or is it just impossible to animate petrified creatures?


How to make nonoverlapping polygons using QNEAT 3

I am doing a project in which I am determining which areas of New York City can be accessed within a five- or ten-minute walk of a subway entrance. I have done this in the past in ArcGIS, and am trying it out in QGIS. The goal of the project is to determine which areas of the city would become accessible within a five- or ten-minute walk if closed subway entrances, of which I have accumulated a list , were reopened. I used the  tool to first look at the service areas for open subway entrances, based on the city's . In ArcGIS, I could create non-overlapping service area polygons to allocate areas to the closest subway entrance. I have not seen any way of doing this in QGIS, so how do I do this using that software? When using QNEAT3, all the areas within, for example, five minutes of an entrance, are in a single layer, which is not very helpful, as can be seen in this screenshot below.


When using the "in" operator to check whether an element exist in a numpy array, is there any way to also get the index of that element? Thank you


hide a view field content for anonymous only?

How can I hide a field for the anonymous user in a view?  Logged in users should still be able to see the field.  (Drupal 8.3.0)


Difference between `dpkg -i` and `apt-get install`

From all the other Q&A (like: ) I understand that apt-get is a wrapper over dpkg and provides dependency management.  Assuming I'm installing something that doesn't have any dependencies (or they're also installed at the same time) would there be any difference between installing it using apt-get vs dpkg  E.g. (kinda concrete differences I'm looking for)   say dpkg can not download the pkg from somewhere, I must download before starting installation, whereas apt-get will do this on my behalf. dpkg won't configure pkg, it'll only copy files. apt-get will configure too.   ...


Sorting a list of dictionaries by a specific dictionary key

I have an array of dictionaries:  LeaderBoard = [{'Driver':'Sebastian Williams', 'Car':1, 'Team':'Red Drink','Grid':2, 'Fastest Lap':'1:37.481','Race Time':'2:27:45.958','Points':10},                    {'Driver':'Tom Hamilton' ,'Car':44 ,'Team':'Mercidas' ,'Grid':6 ,'Fastest Lap':'1:37.176' ,'Race Time':'2:26:52.094' ,'Points':25 },                    {'Driver':'Danny Ricardo' ,'Car':3 ,'Team':'Red Drink' ,'Grid':8 ,'Fastest Lap':'1:38.459' ,'Race Time':'2:27:38.589' ,'Points':15 },                    {'Driver':'Walter Borras' ,'Car':77 ,'Team':'Lewis' ,'Grid':14 ,'Fastest Lap':'1:38.264' ,'Race Time':'2:27:22.229' ,'Points':18 },                    {'Driver':'Fernando Sonal' ,'Car':14 ,'Team':'Farrori' ,'Grid':16 ,'Fastest Lap':'1:38.587' ,'Race Time':'2:27:52.040' ,'Points':8 },                    {'Driver':'Jeson Smith' ,'Car':22 ,'Team':'McMilan' ,'Grid':3 ,'Fastest Lap':'1:38.284' ,'Race Time':'2:27:39.484' ,'Points':12},]   How do I sort them in order of quickest 'Race Time'?  I have tried everything I can think of. I used replace and split to make the race times individual numbers that I could compare easily, but I couldn't get the loops working.   This is for homework, where we need to use a sorting algorithm we have learned.  Using Python's sort or sorted is not allowed.  No other restrictions --- any way of sorting that array of dictionaries will be fine.


What are the main problems that we need to solve to prove Laplace's determinism correct and overcome the Uncertainty principle?


The distance between two sets inside euclidean space

Let $A,B \subseteq \mathbb{R}^d$ be non-empty sets. Define their distance to be $$ d(A,B) = \inf \{ \|x-y\| : x \in A, \; \; y \in B \} $$ For any $A,B$, I want to prove that $d(A,B) = d( \overline{A}, \overline{B} )$. My Attempt Put $\alpha = d(A,B)$. Therefore, $\alpha = \|x_0 - y_0 \|$ for some $x_0 \in A$ and some $y_0 \in B$. But, notice $x_0 \in \overline{A}$ and $y_0 \in \overline{B}$ by definition. hence $$ \| x_0 - y_0\| \geq \inf\{ \|x' - y'\| : x' \in \overline{A}, \; \; y' \in \overline{B} \} =  d( \overline{A}, \overline{B} )$$ $$\therefore d(A,B) \geq d( \overline{A}, \overline{B} )$$ I am stuck trying to show the other direction: $d(A,B) \leq d( \overline{A}, \overline{B} )$ Can someone help me? thanks a lot


Suppose $X$ is a non-negative random variable satisfying  \begin{align*} P[0 \le X < \infty ]=1. \end{align*} Show   a)  \begin{align*} \lim_{n \to \infty} n E \left( \frac{1}{X}1_{[X>n]} \right) =0 \end{align*} b)  \begin{align*} \lim_{n \to \infty} n^{-1} E \left( \frac{1}{X}1_{[X>n^{-1}]} \right) =0 \end{align*}  What I did  I showed part a) already here is the proof:  \begin{align*} n E \left( \frac{1}{X}1_{[X>n]} \right) \le n E \left( \frac{1}{n}1_{[X>n]} \right)=n\cdot\frac{1}{n}P[X>n]=P[X>n] \end{align*} So $\lim_{n \to \infty} n E \left( \frac{1}{X}1_{[X>n]} \right) \le \lim_{n \to \infty} P[X>n]=0$.  What about part b)? The same techniques no longer works.  I was thinking that  \begin{align*} \lim_{n \to \infty} n E \left( \frac{1}{X}1_{[X>n]} \right) \le \lim_{n \to \infty} n E \left( \frac{1}{X} \right) \le 0 \end{align*} but I am not sure that $E \left( \frac{1}{X} \right) < \infty$


The product of the two roots of $\sqrt{2014}x^{\log_{2014} x}=x^{2014}$ is an integer. Find its units digit.   I'm quite unable to solve the problem given. I have no idea how to deal with that $\sqrt{2014}$ term nor the logarithms in the exponent. Is it even necessary to solve for each individual root or is there some other way to progress through the problem?  I'm really just a novice so I'd appreciate if anyone could show me the process or processes, if multiple. Thank you very much.


So i have a little bit problems proofing this.  |A| ≤ |B| iff |B| ≥ |A|   i know, that if |A| ≤ |B| => f: A => B, must be injective and likewise, that if |B| ≥ |A| => g: B => A, A = ø or it must be surjective. Good, but how do i exactly do this proof? I am a little bit lost on how to write it down in a mathematical accurate way. Would anyone be able to help me out? Thanks in advance


Complete mobile version especially the help center

Will there ever be a full mobile support for Stack Overflow ?   The main page is optimized which is perfect because it makes Asking / Answering easier. With the main page comes the Badges / Tags tabs which are less important pages IMO but anyway they come with it.   My point is the help section should be optimized for mobile too. It's one of the most important pages for new users and I'm sure many users like me use the mobile version all the time. It's painful to read the help section on the non-optimized version since you have to scroll left and right and zoom over and over again. Also, when in the help center, you have the old non-optimized tabs above (Questions, Tags, Users, Badgers, Unanswered) that will bring you to the selected pages on the mobile version which makes navigation in the mobile site pretty weird.  tl;dr  Is there a complete mobile version coming up? Or at least a mobile optimized help center?


Integral representation of the Beta function

How do I get from $ \int_{0}^{1}{t^{x-1} (1-t)^{y-1}\,\mathrm dt} $  to $ \displaystyle\int_{0}^{\infty}{ \frac{t^{x-1} + t^{y-1}}{(1+t)^{x+y}} \,\mathrm dt} $ ? I have tried different change of variables but without success.


Show that the norm of the multiplication operator $M_f$ on $L^2[0,1]$ is $\|f\|_\infty$

I'm having some (hopefully small) issues computing the norm of an operator. Firstly, the problem,     For $f\in L^\infty[0,1]$, define $M_f: L^2[0,1]\to L^2[0,1]$ by $M_f(g)(x) = f(x)g(x)$. Show that $M_f$ is a bounded linear operator and $\|M_f\| = \|f\|_\infty$.   What I've done so far:  To see that $M_f$ is linear, let $g_1,g_2\in L^2[0,1]$ and $\lambda\in\mathbb{R}$. Then $$ M_f(g_1 + \lambda g_2)(x) = f(x)(g_1(x) + \lambda g_2(x)) = f(x)g_1(x) + \lambda f(x)g_2(x) = M_f(g_1)(x) + \lambda M_f(g_2)(x).$$  As $f\in L^\infty$ we know there is some minimal $N\in \mathbb{R}$ such that $|f(x)| \leq N$ almost everywhere (i.e., $\|f\|_\infty = N \lt \infty$). The fact that $M_f$ is bounded comes straight this assupmtion, as $$ \|M_f\| = \sup \frac{\|fg\|_2}{\|g\|_2} \leq \sup \frac{\|Ng\|_2}{\|g\|_2} = N\sup \frac{\|g\|_2}{\|g\|_2} = N < \infty.$$ almost everywhere in $[0,1]$, for all non-zero $g\in L^2[0,1]$. So $M_f$ is a bounded linear operator on $L^2[0,1]$.  To prove equality, we must show there is some $g\in L^2[0,1]$ so that $\frac{\|fg\|_2}{\|g\|_2} = N$. Now I want to say something along the lines of pick $g = 1$, but this won't have $\|g\|_2 = 1$ for all measures, so this won't work. Is there any simple way of picking a $g$ that does what we want? Or am I farther off than I'm expecting?  Thanks!


How do gamma distributions add and what would that model?

Density distributions add by convolution, and the result is also a density distribution. So writing this in the time domain, w.l.o.g., the question becomes how do we take a faster gamma distribution:  ${\mathrm{GD_{fast}}}\left(\mathrm{a} ;\ \mathrm{b}; \tau \right)=\left\{\begin{array}{cc}\hfill \frac{{\mathrm{b}}^{\mathrm{a}}}{\Gamma \left(\mathrm{a}\right)}{\tau}^{\mathrm{a}-1}{e}^{-\mathrm{b}\kern0.1em \tau },\hfill & \hfill \tau\ \ge\ 0\hfill \\ {}\hfill \kern2.75em 0\kern1.5em ,\hfill & \hfill \tau <0\hfill \end{array}\right.,$  where $\tau $ is time, and add it to a slower one:  ${\mathrm{GD}}_{\mathrm{slow}}\left(\alpha; \beta; \tau \right)=\left\{\begin{array}{cc}\hfill \frac{\beta^{\kern0.1em \alpha }}{\Gamma \left(\alpha \right)}{\tau}^{\alpha -1}{e}^{-\beta\;\tau },\hfill & \hfill \tau \ge 0\hfill \\ {}\hfill \kern3em 0\kern1.2em ,\hfill & \hfill \kern1.4em \tau <0\hfill \end{array}\right.,$  The notation here assigns the rate scalar $\beta=\frac{1}{\theta}$, where $\theta$ is the time scalar. Both parameterizations are in . Thus, when we require $b>\beta$, we are requiring that $\text{GD(b)}$ to be faster (e.g., lighter right-tailed) than $\text{GD}(\beta)$. The solution is well known for the simpler case when $\mathrm{b}=\beta$; it is also a gamma distribution. But what we (Q1) want is a  general closed form convolution solution for the sum of two gamma distributions: a gamma distribution convolution of the type  $\mathrm{GDC}\left(\mathrm{a}\kern0.1em ,\mathrm{b},\alpha, \beta; \tau \right)={\mathrm{GD_{fast}}}\left(\mathrm{a},\mathrm{b};\;\tau \right)\otimes {\mathrm{GD_{slow}}}\left(\alpha, \beta; \tau \right),$  Finally, we (Q2) want some indication of whether this can be used to form reasonable models, and whether or not it has found practical applications.


Putting Figures Side-By-Side Using Minipage

I am trying to put two figures next to each other. However, it is not working. Here is my code:  \begin{figure}[h] \centering  \begin{minipage}{1.0\textwidth} \centering \includegraphics[width=0.3\linewidth, height=0.15\textheight]{prob1_6_2} \caption{$dt=0.1$} \label{fig:prob1_6_2} \end{minipage}  \begin{minipage}{1.0\textwidth} \centering \includegraphics[width=0.3\linewidth, height=0.15\textheight]{prob1_6_1} \caption{$dt =$} \label{fig:prob1_6_1} \end{minipage}  \end{figure}   In my preamble I have \usepackage{minipage}. But it hasn't worked. And yes, I have searched through other posts.


How would I go about finding the formula for the complex number representation (affix) of the circumcenter of $\triangle abc$ given the affixes $a,b,c$?


What advice would you give to an undergraduate research assistant?

I'm an undergraduate research assistant on an experimental physics project. I'm becoming aware that the skill set I learned from my classroom learning doesn't necessarily transfer over to the research world. My question is: how can I develop this new research skill set and become the best research assistant possible?  What are traits of exceptional researchers? What skills should I focus on developing early? What are common mistakes in mindset, time management, project choice, etc. that should be avoided?  What advice would you give to yourself at the start of your research career?  Please let me know if there is any literature out there on this topic.


I'm writing a thesis, and I want to insert images in the document. However, when I tried to use the command \includegraphics for the insertion of an image, the program gave me an error. I tried a lot of things, but all ended with an error. In particular, I tried the following test configuration. On the desktop I created a main folder called "TestLatex", inside of which I created a subfolder called "Figures" and where the image "Pencils.jpg" is located. Then I wrote the following code and saved it as "Test.tex" in the main folder: \documentclass[a4paper,10pt]{book}       \usepackage{graphicx} \graphicspath{ {./Figures/} } \begin{document} \includegraphics{Pencils} \end{document}  When I tried to compile the file, it gave me the following error: Undefined control sequence. \includegraphics{Pencils} ! LaTeX Error: File `Pencils' not found. See the LaTeX manual or LaTeX Companion for explanation. Type  H <return>  for immediate help. ...                                               l.5     \includegraphics{Pencils}                              I could not locate the file with any of these extensions: .pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPEG,.JBIG2,.JB2,.eps Try typing  <return>  to proceed. If that doesn't work, type  X <return>  to quit. [1{C:/Users/maxim/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map} ] (Test.aux) )  Here is how much of TeX's memory you used: 1443 strings out of 492895 20377 string characters out of 3133479 81682 words of memory out of 3000000 5366 multiletter control sequences out of 15000+200000 3993 words of font info for 15 fonts, out of 3000000 for 9000 1141 hyphenation exceptions out of 8191 41i,4n,25p,273b,141s stack positions out of 5000i,500n,10000p,200000b,50000s <C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb> Output written on Test.pdf (1 page, 12128 bytes). PDF statistics: 10 PDF objects out of 1000 (max. 8388607) 0 named destinations out of 1000 (max. 500000) 1 words of extra memory for PDF output out of 10000 (max. 10000000)  I tried also to copy-paste the image file from the subfolder to the main folder and the use the following code, but it resulted in the same error. \documentclass[a4paper,10pt]{book}       \usepackage{graphicx} \begin{document} \includegraphics{Pencils.jpg} \end{document}  Summary: From the conducted test, it seems that the original image inserting problem found in the thesis wasn't due to something related to the thesis document itself, but, from what I can deduce, to something strange in the program. Any ideas?


How did nested const in global scope change after be cloned using spread operator?

I got a weird problem on using spread operator to clone nested obj.  The constant of a local scope is copy from a const in global scope using spread operator. If I change a value of a property in 1 level deep. The change will appears on the global variables too.    const foo = {     a: {         a1: 'a1',         a2: 'a2',     },     b: 'b', };  (() => {     const bar1 = { ...foo };     bar1.a.a1 = 'changed'; })();  console.log(foo);     How could I prevent this behavior?


The replier's From email address is modified when Marketing Cloud RMM forwards an email to the routing address

We've set up RMM to forward replies to routing address and SFMC adds our subdomain to the replier's From email address (i.e. replier@gmail.com becomes replier.gmail.com@oursubdomain.com). However, their reply-to address remains the same.  It seems like DMARC Forward Reply Rewrite is enabled, but we were advised not to touch it as that may affect email deliverability.  Is there any workaround to this? And what will happen if we disable this feature?


Restoring previous Windows 7 data after a clean install of Ubuntu 14.04

Sorry if this has been asked before. Hope you'll bear with Linux newbie....   Fairly new to Ubuntu. Installed it on my desktop previously running win7. I backed up my data in the C partition and thought that would be sufficient if I did a clean install of Ubuntu 14.04 it would not touch the other partitions. Unfortunately that's not the case I guess. I guess I chose the wrong option while installing Ubuntu (erase hard disk or something like that). I thought it'd only format the c drive. Now I can't see any other mounted or unmounted partitions in file manager. The command 'sudo blkid' doesn't list any partitions with ntfs or fat file systems either. So just wanted to ask is there any way to get my data on other partitions back?


Should the cardinal directions be capitalized when used as an adjective? For example,     They sailed throughout the eastern Baltic.


Travelling to Germany with passport and 6 month rule

I am a US citizen and I am flying to Germany on September 6 2017. My passport expires on March 13 2018 which is not beyond the 6 month period by 7 days. However I keep reading about 6 months validity after my departure date. Is this my departure date coming back home. I leave Germany on September 22 2017. This would leave me 9 days short of the 6 month rule if this is interpreted by departure from Germany. Can someone clarify?


$a, z_1 \gt 0$ and $z_{n + 1} = (a + z_n)^{\frac 1 2}$ then $(z_n)$ is monotone and bounded?

Having trouble with the following exercise in Bartle's Elements of Real Analysis.      Let $a, z_1 \gt 0$. Define $z_{n + 1} = (a + z_n)^{\frac 1 2}$ for $n  \in \Bbb N$. Show that $(z_n)$ converges.   Now the hints section suggests $(z_n)$ is monotone and bounded. I disagree. If you pick $a = 100,00$ and $z_1 = 1$ this is apparent. But I think the sequence is monotone for $n \gt 1$. And I tried the following ugly argument (not even sure if I'm right):    If $z_1 \le (z_1 + a)^{\frac 1 2}$ then $(z_1 + a)^{\frac 1 2} \le \left({(z_1 + a)^{\frac 1 2} + a }\right)^{\frac 1 2} \implies z_2 \le z_3$. If $z_n \le z_{n + 1}$ for $n \gt 1$ then $(z_n + a )^{\frac 1 2} \le (z_{n+ 1} + a )^{\frac 1 2} \implies z_{n + 1} \le z_{n + 2} \implies z_n \le z_{n + 1} \;\; \forall n \in \Bbb N \setminus \{1\}$. So the sequence is monotone increasing. OR we have that $z_1 \gt (z_1 + a)^{\frac 1 2}$ and using pretty much the same argument we can show that the sequence is monotone decreasing. For the second case the bound is $0$.   But I am unable to find a bound when the sequence is monotone increasing.


Which anchor text variation provides the best experience?

Basically, my question is about where anchor tag links should be located.  In the specific sentence Click here to go to this site, what makes the most sense?  Click  to go to this site.  Click here to go to .  Click  to go to .      Which provides the best user experience?


Clicking on badge in achievements shows mobile web instead of badge profile page

I noticed a small bug when clicking on the badge in the achievements overview. Instead of taking you to the badge tab in your profile on the mobile web site or desktop web site, it shows the default page on the mobile web site:    Clicking on Copy Editor takes you here:    Expected to go  for me.


I have a citation in which the document is from government and some state corporations. The problem I get is that in the reference list, the name gets rearranged and loses meaning. I am using the APA format. I do not know how to fix this. Would be glad to get assisted. Here is my .bib entry.  @article{gokmtp2,     title={Second Medium Term Plan (2013-2017)},     author={Republic of X},     journal={City: Government Printer},     year={2013}  }   On the reference list, I see this:     of X, R. (2013). Second medium term plan (2013-2017). City:   Government Printer.   Instead of;     Republic of X. (2013). Second medium term plan (2013-2017). City:   Government Printer.


I do not know what happened. I do not know if it was an update, corruption of data, or whatever. I just cannot get my Pokemon Go to load with my google account any more. I was level 10, with a good collection of pokemon and items. Hatched a Staryu last night and that was an awesome feeling.  Here is the Rundown:  I start PokemonGO - It brings me to the sign in screen - I tap on "Sign in with Google Account" - Then loading screen pops up - Pauses and a black screen appears, and disappears in like a half a second - then goes back to the load screen with the spinning pokeball - then it says "GPS signal not found" for like a second, then goes away - continues loading FOREVER.  I cannot log in or get into the game no matter how long I let that screen load. I have created a PokemonGO account (the other option instead of google account), but I really hate starting from the bottom. I already had a good collection, some Pokecoins, and a reputation. If anyone can help, then please do.  Before commenting, this is what I have tried:   Resetting App Resetting Phone HARD Resetting Phone (taking out battery and holding power button) Clearing cache Clearing Data Turning off and on WiFi Turning off and on Airplane Mode Disabling App Keeping loading screen on for a LOOONG while.   I have done all of this, and a combination of a few of them together.


AGeV means GeV per nucleon. But why A letter is used for such a short cut? Why not NGeV, for example?


In the 24th lecture of Steven Smiths Political Philosophy class at Yale available on ItunesU, he says that Patriotism is unethical because it implies "a blind deference to tradition" and sums it up in the Phrase, "my country, right or wrong". This seems contradictory for people who live in modern democratic societies because patriotism is at the very heart of democracy as the incentive to vote, and people who don't vote are often met with disdain as it appears that they don't love or care about their country enough to vote.   It would seem that the conflict is, what is ethically the stronger drive in human nature, the love of ones wisdom (which is at times anti-patriotic) or the love of ones country? I am familiar with Plato's Crito and the Apology and am looking for an argument which is pro-patriotic that is equally or more compelling than Socrates argument for the love of ones own wisdom as being most ethically sound.


use VirtualHost *:443 as default for all unmatched ServerAlias

My apache is configured to use multiple VirtualHosts:    default-ssl.conf for mydomain.tld and www.mydomain.tld and subdomain-le-ssl.conf for subdomain.mydomain.tld   default-ssl.conf:  <IfModule mod_ssl.c>     <VirtualHost *:443>             ServerAdmin my@mail             ServerName mydomain.tld             ServerAlias www.mydomain.tld             DocumentRoot /var/www/html              <Directory /var/www/html>               # directory stuff             </Directory>              # ssl stuff     </VirtualHost> </IfModule>   Problem  If someone has a typo in subdomain (i.e. curl https://subdonain.mydomain.tld), he gets a 503 Service Unavailable which is confusing. I would like to serve the default-ssl.conf VirtualHost in this case.  In my VirtualHost config for *:80 i removed ServerName and ServerAlias to address this issue, and it works as intended. But when i do the same in default-ssl.conf i get error 503 for every https request.   How do i configure my *:443 Hosts to behave like the *:80 Hosts in that regard?  Second Thoughts  Accessing mydomain.tld with an unknown subdomain will result in HTTPS cert errors. But i like an cert error better than Service Unavailable.   In my environment i have to fall back to doing my http(s) requests via IP occansionally because there is no domain available. But this requires the server to respond even if the ServerAlias is not set, which does not work. Editing /etc/hosts on clients is not an option, because those may be iphones/windows pcs and most certainly not developers.  I could fall back to using http on *:80 again, but i don't want that, because it would mean disabling the rewrite rule to https - which is bad practice.   I tried setting the ServerAlias * in default-ssl.conf which redirects everything to default-ssl.conf, but this means i can't access subdomain.mydomain.tld anymore.


How do I make terrain that has not been placed by a player be immune to things? Example: TNT, mining. Also, how do I make blocks that have been placed by a player able to be mined/blown up?


Actually my touchpad was not working, so I installed and uninstalled some packages and I did not know what they were. Now I am now getting a login screen and after typing password, it is coming back to the login screen again and again. Help me to solve this problem.


Concatenate multiple columns into one column (,) separated

In SQL database that stores Images in a parcelImages table.Since each parcel can take part in multiple Images and each images can involve multiple parcels.    I want to get each parcel having Image value with comma separated values as shown above  I tried with this SQL Query   SELECT ParcelId,id,concat(ParcelId, ' ', id)  FROM ParcelImages  WHERE Id IN (43418,43464,43465,43466,43467,43470,43471,43482,43483)   but expected result not get. How can this be done?  I have also tried an INNER JOIN How can I achieve this, I'm kinda stuck at the early beginning.  If there is a table called STUDENTS  ID                     StudentName                                                       ----------             -------------                                                       1                      Mary                                                       1                      John                                                       1                      Sam                                                       2                      Alaina                                                       2                      Edward                                                           Result I expected was:  ID              StudentName                                                       ----------      -------------                                                       1               Mary, John, Sam                                                       2               Alaina, Edward


How to show that we can always choose a smaller number?

Suppose $A$ consists of all numbers $x \ge 0$ such that $x^2 \lt 2$. If the number $\sqrt{2}$ did not exist, there would not be a least number greater than all the numbers of $A$; for any $y > \sqrt{2}$ we chose, we could always choose a still smaller one.   I don't understand how we can choose a still smaller number than $y$.  If the number that could have been chosen is $c$, then to me this means:  $y>c>\sqrt{2}$  must be true.  But I am not sure why it must be true, because if we just select the next bigger number after $\sqrt{2}$ and call it $y$, how is it possible to select a number that is smaller than $y$ and not in $A$?  Thank you in advance for any help provided.


Linux meminfo "Buffers" takes more than 10% total memory?

I noticed that meminfo - Buffers occupies significant amount of RAM on some servers in my work environment.  I'd like to know what is exactly is "Buffers" and why it takes that much amount of RAM. Some quick googling indicate that "Buffers" are Cached equivalent of non-file-data, however it's difficult to explain why "Buffers" takes 10G RAM - while Cached takes less than 7X of that.  This example data is a build server. Several people use it to build some large projects, e.g. Android. There is no (non-trivial) service running on it. It's not heavily used. When taking /proc/meminfo data, it is idle.  lsb_release -a  LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch   Distributor ID: Ubuntu   Description:    Ubuntu 11.04   Release:    11.04   Codename:   natty     cat /proc/meminfo  MemTotal:       99166244 kB   MemFree:          468604 kB   Buffers:        10315020 kB   Cached:         68312620 kB   SwapCached:        41364 kB   Active:         42604444 kB   Inactive:       40784816 kB   Active(anon):    4424120 kB   Inactive(anon):   421392 kB   Active(file):   38180324 kB   Inactive(file): 40363424 kB   Unevictable:           0 kB   Mlocked:               0 kB   SwapTotal:       2008120 kB   SwapFree:        1120892 kB   Dirty:              4872 kB   Writeback:             0 kB   AnonPages:       4733328 kB   Mapped:           116032 kB   Shmem:             83812 kB   Slab:           13248832 kB   SReclaimable:   13047840 kB   SUnreclaim:       200992 kB   KernelStack:       14064 kB   PageTables:       147124 kB   NFS_Unstable:          0 kB   Bounce:                0 kB   WritebackTmp:          0 kB   CommitLimit:    51591240 kB   Committed_AS:   16135556 kB   VmallocTotal:   34359738367 kB   VmallocUsed:      535184 kB   VmallocChunk:   34359200236 kB   HardwareCorrupted:     0 kB   HugePages_Total:       0   HugePages_Free:        0   HugePages_Rsvd:        0   HugePages_Surp:        0   Hugepagesize:       2048 kB   DirectMap4k:      669696 kB   DirectMap2M:    24479744 kB   DirectMap1G:    75497472 kB


How to raise a number to a quaternion power

Now, I know that it's (relatively) easy to calculate, say, $r^{a+bi}$ (using the fact that, for  $z_1, z_2\in \mathbb{C}, {z_1}^{z_2}=e^{z_2\ln(z_1)}$ and $\ln(z_1$) can just be found using: $\ln(a+bi)=\ln[\sqrt{a^2+b^2}]+i \cdot \arctan(\frac{b}{a})$  ).  Anyway, how would I go about calculating, say, $i^j, k^i$ etc., or, more generally, $(a_1+b_1i+c_1j+d_1k)^{a_2+b_2i+c_2j+d_2k}$  (I know that exponentiating a complex number (to another non-real complex number) produces a non-unique result, so I assume the same would apply further up the hypercomplex ladder; if that's the case, I'm only concerned with the 'principal' value)?  I obviously don't want a general formula or anything like that; just some intuition and a method by which I could calculate such a thing.  And, finally (because I really like to push my luck), can this method for quaternions be extended to higher number systems (i.e. $\mathbb{O, S},$ etc.) to give an analogous result?   Thanks


Postfix: dynamically rewrite server name depended on senders domain

Im setting up postfix SMTP relay, that will be placed right after Exchange server.   Details: 1) postfix server name mail.server.com 2) we have several domains: a-domain.com, b-domain.com and etc..  I need to rewrite somehow emails headers. So recipient will not receive email like:  Received: from mail.server.com ([XX.XX.XX.X])  But will receive it from mail.a-domain.com ([XX.XX.XX.X]) if sender is user@a-domain.com OR from mail.b-domain.com ([XX.XX.XX.X]) if sender is user@b-domain.com  is this possible anyhow?


the determinant function is an open function?

The determinant function $\det:M(n,\mathbb R)\rightarrow \mathbb R$ is an open mapping or a closed mapping?  The determinant function $\det:M(n,\mathbb C)\rightarrow \mathbb C$ is an open mapping or a closed mapping?


Why doesn't hydrogen gas exist in Earth's atmosphere?

The root mean square velocity of hydrogen gas at room temperature is: Gas constant: $R=8.31\ \mathrm{J\ K^{-1}\ mol^{-1}}$ Molar mass of hydrogen gas: $M=2.02\times10^{-3}\ \mathrm{kg/mol}$ $$\begin{align} v &= \left(\frac{3\times8.31\ \mathrm{J\ K^{-1}\ mol^{-1}}\times300}{2.02\times10^{-3}\ \mathrm{kg/mol}}\right)^{\frac12}\\ &= 3356.8377\ \mathrm{m/s}\\ &= 3.356\ \mathrm{km/s} \end{align}$$ The escape speed of Earth is $11.2\ \mathrm{km/s}$, which is larger than the root mean square velocity of hydrogen gas. But still, hydrogen gas doesn't exist in Earth's atmosphere. Why? Have I made any mistakes in my calculations?


Do I need to place a comma before -but- in this sentence? I suppose not, because there is no independent clause after but. Or am I wrong? And which option is, stylistically, preferable?  According to the Explanatory Memorandum, the Act equips disputing parties with an auxiliary tool to refrain them from commencing legal proceedings on the merits of the case but instead helps them to negotiate an out-of-court settlement. According to the Explanatory Memorandum, the Act equips disputing parties with an auxiliary tool to refrain them from commencing legal proceedings on the merits of the case but helps them to negotiate an out-of-court settlement instead.


what is the meaning of it in the following sentence:      These feelings are, in all likelihood, the primordial constituents of mind, based on direct signaling from the body proper.


does unnamed namespace linkage is internal or external or a mix

I was reading a book and I have some ambiguities about linkage into namaspaces.   As far as I read,      When you are in   a situation where you need to declare global symbols   as     statics    to avoid linkage problems,  prefer to use unnamed   namespaces   Ok So inside an unnamed namespace what is defined will have internal linkage (like using static in global namespace).  Then the write added :     Template arguments cannot be names with internal linkage,   so using static variables is not possible.    Ok till now.     On the other hand, symbols in an unnamed namespace have external linkage and can be used as template arguments.    So here I am lost, is the content of an unnamed namespace will have internal or external linkage ?   #include <iostream> template <int const& Size> class test {};  static int Size1 = 10;  namespace {     int Size2 = 10; }    int main(void) {     test<Size1> t1; // said here gonna produce a compile error but was not the case     test<Size2> t2;      return 0; }   And what about the case of normale namespace (named namespace).  Thank you.


Let $G$ be a group and $a,b\in G$. Prove that $|a|=|a^{-1}|$ and that $|ab|=|ba|$.   I said that $|a|=n$ where $n$ is the smallest integer such that $a^n=e$ and $|a^{-1}|=m$ where $m$ is the smallest integer such that $(a^{-1})^{m}=a^{-m}=e$ but I don't know how to continue. Any suggest are appreciated.


The characteristic and minimal polynomial of a companion matrix

of a monic polynomial $f \in \mathbb F\left[x\right]$ in $1$ variable $x$ over a field $\mathbb F$ plays an important role in understanding the structure of finite dimensional $\mathbb F[x]$-modules.  It is an important fact that the characteristic polynomial and the minimal polynomial of $C(f)$ are both equal to $f$. This can be seen quite easily by induction on the degree of $f$.  Does anyone know a different proof of this fact? I would love to see a graph theoretic proof or a non inductive algebraic proof, but I would be happy with anything that makes it seem like more than a coincidence!


\def is sometimes used as an abbreviation of a box construction, then its output is sometimes the same as the output with a \box register instead of \def.   Here is the question. When should I use a \box register rather than \def? Is there any specific situation one is better than the other one?    EDITED (09/12/09 UTC 2:45)  Edited question  Is there any cases that \setbox and its output commands pair (not only \box0, but also \copy0, \unhbox0, and so on)  can be replaced a macro definition which is eventually expanded as a box?  If there was such a case, is there any specific situation one is better than the other one?  Examples I thought  Case 1:  \def\excuse{I should have made my question more clearer before the post.} \setbox0=\hbox{I should have made my question more clearer before the post.}   I think the above case is the same as long as I call the box register with \unhcopy0. However, I wonder whether first one is better than second one because it can save memory.   Case2:  \def\excuse{\hbox{I should have made my question more clearer before the post.}} \setbox0=\hbox{I should have made my question more clearer before the post.}   I think the above case is also the same as long as I call the box register with \copy0.  Case3:  \def\myhrulefill{\line{\leaders\hrule\hfill}} \setbox0=\line{\leaders\hrule\hfill}   in this case, \hbox contains commands and which I suspected whether I can say those are the same or not.   Unfortunatelly, I cannot show you a sufficientlly complex example which contains some commands. Parhaps, if above examples contained conditional syntax like \if, repetion syntax like \loop...\repeat, one cannot be an alternative of the other one. I especially like to know such a case.


We know that the cumulative distribution function (CDF) follows the $U[0,1]$ distribution. What is the distribution of (1-CDF)? Is it also follows the $U[0,1]$ ? (I believe it's true for the normal distribution, how about in general)  Thank you in advance.


Help, Creating a test class for an invocable method (code coverage @ 0%)

Help, I cannot make a test class run for the class I created below, kindly help: Apex Class global class ContactPostCode{    @InvocableMethod(label='ContactPostCodeOverWrite')      global static List<FlowParametersResult> cowM(List<FlowParametersRequest> requests){              List<FlowParametersResult> results = new List<FlowParametersResult>();                 FlowParametersResult result = new FlowParametersResult();                  for(FlowParametersRequest request : requests){              switch on request.leadPostCode{                      when ''{                  result.PostCode = request.contactPostCode;             }             when else{                                    result.PostCode = request.leadPostCode;             }                      }             result.leadPrimaryInvestmentGoal = request.leadPrimaryInvestmentGoal;            result.contactPrimaryInvestmentGoal = request.contactPrimaryInvestmentGoal;     }                  results.add(result);                return results;             }          global class FlowParametersRequest{                  @InvocableVariable         global String leadPostCode;                  @InvocableVariable         global String contactPostCode;                  @InvocableVariable         global String leadPrimaryInvestmentGoal;                  @InvocableVariable         global String contactPrimaryInvestmentGoal;                  }          global class FlowParametersResult{                  @InvocableVariable         global String PostCode;                  @InvocableVariable         global String leadPrimaryInvestmentGoal;                  @InvocableVariable         global String contactPrimaryInvestmentGoal;              }             }  ======================================================== Apex Test Class @isTest global class LeadHandlerTest{      global static void LeadHandlerTestM(){          //List<FlowParametersRequest> requests = new List<FlowParametersRequest>();          Contact contN = new Contact();         contN.FirstName = 'Test';         contN.LastName = 'Man';         contN.Email = 'test@test.com';         contN.MobilePhone = '61410777777';          contN.PostcodeTst__c = 'a0sD0000000Bxxx';         contN.Pingst__c = 'Test';         insert contN;                  Lead leadN = new Lead();         leadN.FirstName = 'Test';         leadN.LastName = 'Man';         leadN.Email = 'test@test.com';         leadN.MobilePhone = '61410777777';                 leadN.PostcodeTst__c = 'a0sD0000000Bxxx';         leadN.Pingst__c = 'Test';         insert leadN;                  List<FlowParametersRequest> requests = new List<FlowParametersRequest>();         FlowParametersRequest request = new FlowParametersRequest();         request.leadPostCode = leadN.PostcodeTst__c;         request.contactPostCode =  contN.PostcodeTst__c;         request.leadPrimaryInvestmentGoal =  leadN.Pingst__c;         request.contactPrimaryInvestmentGoal = contN.Pingst__c;                  requests.add(request);              }          global class FlowParametersRequest{         @InvocableVariable         global String leadPostCode;                  @InvocableVariable         global String contactPostCode;                  @InvocableVariable         global String leadPrimaryInvestmentGoal;                  @InvocableVariable         global String contactPrimaryInvestmentGoal;                  }                }  /* global String leadPostCode;                  @InvocableVariable         global String contactPostCode;                  @InvocableVariable         global String leadPrimaryInvestmentGoal;                  @InvocableVariable         global String contactPrimaryInvestmentGoal;   */


Make section links in the table of contents point to the top of section‘s page

When I click on 3.8 in the , I go to the top of the page where 3.8 is, whatever the zoom level I have. But the default hyperref behaviour is to link to the section name. How can I achieve the first one?  I would like also to configure that option only for \sections and not for \sub..., \subsub..., etc.  So in this MWE's ToC A and B should link to the same point.  \documentclass{article} \usepackage{hyperref}  \begin{document} \tableofcontents \clearpage \section{A} A is this. \subsection{A subsec} Text. \section{B} B is this. \end{document}    may be related.


Changed DOM element tag, script no longer works

I currently have a bit of code with displays a bit of text with an animation and when the user hovers over it audio will play.  However I am adding a feature which will allow the user to change the element type. The code below at the moment changes an element from H1 to P.  It all works except that the script which detects to see if the user has hovered over the element no long seems to work. Which I think is a bit off as the element still keeps the same ID.  Is there a JS reason why the audio script will no longer work or have I missed something obvious?  Thanks!    Before:  Detects change  $("#editTextTag").change(function(){         var id = "#"+$("#editTextId").val();         var iframe = $('#clientframe');          var tag = $("#editTextTag").val();          var element = $(id, iframe.contents());         var elementcopy = $(element).clone();           var attrs = { };          $.each($(element)[0].attributes, function(idx, attr) {             attrs[attr.nodeName] = attr.nodeValue;         });           $(element).replaceWith(function () {             return $("<p/>", attrs).append($(this).contents());         });      });   Currently changes h1 tag to p tag.


What is wrong with my setup of cloud chamber?

My setup:   plastic box (~1l) with the cover painted black mat the bottom of the box covered with sponges saturated with ethyl alcohol (90%) to the limit (all over sponge capacity poured back to bottle) turned upside down and placed on ~0.5kg of dry ice.   I can see a 'rain' of particles of alcohol, but no traces.  I disassembled smoke detector and attached the sample of americium to the box. No effect.  Here is the 'rain':   Here are some pictures of the setup:          Any help appreciated.


Signing out of Stack Exchange does not sign me out of my email provider

I have noticed that by signing on to Stack Overflow, I am also signed on to my email account. But when I log out, it only logs me out of the site without logging me out of my email. This means I am running around saying "hey, you should XSS me". Is this specific to the way OpenID behaves, or is it specific to the way Stack Overflow implemented it?


ArrayList#isEmpty() method throws NullPointerException

I'm creating a shopping cart using servlets. I've got a form in a .html file which send it to the post method of my servlet. Here's the form: .HTML File     <form action="Sess04" method="post">                      Nazwa:             <input type="text" name="name">
                      Ilość:             <input type="number" name="quantity" min="1">
                      Cena:             <input type="number" name="price" step="0.01" min="0">
                      <input type="submit" value="Dodaj do koszyka">              </form>  Here's my servlet (doPost method, doGet is empty for now):     HttpSession sess = request.getSession();         List<Item> itemsList = (List<Item>) sess.getAttribute("cart");         if (itemsList.isEmpty()) {                           ← Here NullPointException             itemsList = new ArrayList<>();         }         String name = request.getParameter("name");         int quantity = Integer.parseInt(request.getParameter("quantity"));         double price = Double.parseDouble(request.getParameter("price"));          Item item = new Item(name, quantity, price);         itemsList.add(item);         sess.setAttribute("cart", itemsList);          for (int i = 0; i <= itemsList.size(); i++) {             response.getWriter().append("Product " + i + " - " + quantity + " x " + " " + price + "USD" + " = " + quantity*price + "USD");         }  When I open the index in my browser, add the item and submit, it returns me the NullPointerException in the marked place (if). Why is that happening?


My proof that a harmonic series diverges..

Suppose $\sum_{n=1}^\infty \frac{1}{n} = S$ where $S$ is finite.  Then  $$S =\sum_{n=1}^\infty \frac{1}{n}= \sum_{n=1}^\infty \frac{1}{2n-1} + \frac{1}{2n} > \sum_{n=1}^\infty \frac{1}{2n} + \frac{1}{2n} = S$$  which is a contradiction.  Is this valid?


construct irreducible polynomials of degree 32 over $Z_2[x]$

I'm learning finite fields behind Advance Encryption Standard. As far as I know, the irreducible polynomial used in AES is $x^8+x^4+x^3+x+1$. This is because AES s-box is based on bytes(8bits). Now I am trying to enlarge the s-box to 4bytes(32bits), so I need to find a polynomials of degree 32 over $Z_2[x]$. So the question is How can i get a irreducible polynomials of degree 32 over $Z_2[x]$? I've searched for some approaches and not very familiar with trace most mentioned. What materials relating $Z_2[x]$ can I refer to? Besides, I would appreciate it if there is some constructed such polynomials for me to test! Thanks!


Python merge multiple dictionaries with keys and values into one

I have 8 dictionaries with a key, followed by a value. It looks like this (simplified):  dictionary1 = {1: '5', 2: '8', 3: '4'}  dictionary2 = {1: '3', 2: '5', 3: '7'} dictionary3 = {1: '1', 2: '2', 3: '3'}   I want to merge these into a dictionary that looks like this:  dictotal = {1: '5', '3', '1', 2: '8', '5', '2', 3: '4', '7', '3'}   How can I do this?


Im on Xbox, for any follower I have, Housecarl, Steward, no matter what I give them, they don't stay dressed, I made Uthgerd my house steward, and she wear's steel plate armor, so I give her Daedric armor, and they put it on for the moment, I let her leave my service, she still has it on, but whenever I leave the room, it seems something about a loading screen makers her go back to her other armor, and she doesn't put her better Daedric armor back on until I trade with her and take something or add something random to her inventory, then it "Refreshes" I guess you could say. I've been spending forever crafting Daedric and Dragon armor for my Housecarls and Stewards because I want awesome guards patrolling my house, but the fact they wont wear it once I leave, kinda ruins all my efforts, and is a complete waste of all the materials I've spent. Any weapon I give them stays on them, and they use it, I've even pick pocketed their default armor and it end up coming right back into their inventory.


Ubuntu Server 14.04 - 64 bit version OK for old AMD64 machine?

I've got an old AMD64 machine (AMD Athlon 64 3000) I'd like to run Ubuntu Server 14.04 on.  However, I see there's no longer an AMD64 version.  Will 14.04 be a problem, or should I just use v. 12.04 LTS AMD64 instead?  Thanks, Matt


I would like to make a very compact list (e.g., itemize) in Beamer.  has been asked for an article-type document class; the answer uses the enumitem package, known to be .  My question is: How do I make the same compact list in the Beamer document class? As in the above linked question, I would like the list to have   No whitespace before list No whitespace after list No whitespace between lines Less indent before the bullet points


My visa is expiring in May 2016 and I want to visit USA in March to 2 weeks on a business trip. Can I run into any troubles or there be any issues in getting I-94 upon reaching USA.