I don't use linux very often, but I need to for this particular python project. Because of that, I'm trying to make an installer for my program using this shell script:  SETUP.sh  #!/bin/bash  apt-get update apt-get install python3-pip -y apt-get install python3-tk -y pip3 install -r requirements.txt   after chmodding it to be executable, and running sudo sh SETUP.sh I get this output:  : notfound: SETUP.sh: E: Invalid operation update ] is not known. option ' ] is not known. option ' SETUP.sh: 6: SETUP.sh: pip3: not found   The weirdest part is all those commands work on their own if I just manually put them into the command line. What am I doing wrong?

Trying to get casperjs running on Ubuntu 12.04. After installing it when I run I get:   09:20 $ ll /usr/local/bin/casperjs lrwxrwxrwx 1 root root 26 Nov  6 16:49 /usr/local/bin/casperjs -> /opt/casperjs/bin/casperjs  09:20 $ /usr/bin/env python --version Python 2.7.3  09:20 $ cat /opt/casperjs/bin/casperjs | head -4  #!/usr/bin/env python  import os import sys  09:20 $ casperjs : No such file or directory  09: 22 $ python Python 2.7.3 (default, Sep 26 2013, 20:03:06)  [GCC 4.6.3] on linux2   So Python is present and runnable, casperjs is pointing to the right place and it is a python script. But when I run it I get "No such file".   I can fix it by changing the first line of the casperjs python file from:    #!/usr/bin/env python   to:   #!/usr/bin/python   Result:   $ casperjs --version 1.1.0-DEV   I managed to fix it, but I'm wondering why it didn't work with #!/usr/bin/env python, since that seems to be a normal interpreter line. Do I have something configured wrong?   Here are the steps to get casperjs:   $ git clone git://github.com/n1k0/casperjs.git $ cd casperjs $ ln -sf `pwd`/bin/casperjs /usr/local/bin/casperjs $ casperjs : No such file or directory


For all the days between 2003-04-01 and 2003-04-07 find the number of trips from town Rostov. Result set: date, number of trips.  Here is the database schema:   query and result set:  SELECT MyDates.d as Dt,         count(distinct trip.trip_no) as Qty FROM   trip   JOIN pass_in_trip           ON trip.trip_no = pass_in_trip.trip_no  FULL OUTER JOIN (select cast(cast(x.yr as varchar)+'-'+cast(y.mo as varchar)+'-'+cast(z.dy as varchar) as datetime) d from (select 2003 yr) x CROSS JOIN (SELECT 4 mo) y CROSS JOIN (select 1 dy UNION ALL select 2 UNION ALL select 3 UNION ALL select 4 UNION ALL select 5 UNION ALL select 6 UNION ALL select 7) z where dy<=7) MyDates ON Mydates.d = pass_in_trip.date WHERE  trip.town_from = 'Rostov'  GROUP BY MyDates.d, pass_in_trip.date, trip.trip_no  +-------------------------+-----+ |           Dt            | Qty | +-------------------------+-----+ | NULL                    |   1 | | NULL                    |   1 | | NULL                    |   1 | | NULL                    |   1 | | 2003-04-01 00:00:00.000 |   1 | | 2003-04-05 00:00:00.000 |   1 | +-------------------------+-----+   Here is the result set I want  +-------------------------+-----+ |           Dt            | Qty | +-------------------------+-----+ | 2003-04-01 00:00:00.000 |   1 | | 2003-04-02 00:00:00.000 |   0 | | 2003-04-03 00:00:00.000 |   0 | | 2003-04-04 00:00:00.000 |   0 | | 2003-04-05 00:00:00.000 |   1 | | 2003-04-06 00:00:00.000 |   0 | | 2003-04-07 00:00:00.000 |   0 | +-------------------------+-----+   FYI - I think this is using MySQL or sql server, it's a bit unclear to me.

I'm building a quick csv from a mysql table with a query like:  select DATE(date),count(date) from table group by DATE(date) order by date asc;   and just dumping them to a file in perl over a:  while(my($date,$sum) = $sth->fetchrow) {     print CSV "$date,$sum\n" }   There are date gaps in the data, though:  | 2008-08-05 |           4 |  | 2008-08-07 |          23 |    I would like to pad the data to fill in the missing days with zero-count entries to end up with:  | 2008-08-05 |           4 |  | 2008-08-06 |           0 |  | 2008-08-07 |          23 |    I slapped together a really awkward (and almost certainly buggy) workaround with an array of days-per-month and some math, but there has to be something more straightforward either on the mysql or perl side.   Any genius ideas/slaps in the face for why me am being so dumb?    I ended up going with a stored procedure which generated a temp table for the date range in question for a couple of reasons:   I know the date range I'll be looking for every time The server in question unfortunately was not one that I can install perl modules on atm, and the state of it was decrepit enough that it didn't have anything remotely Date::-y installed   The perl Date/DateTime-iterating answers were also very good, I wish I could select multiple answers!


In the book which I'm reading now, the author says, in an arbitrary Unique Factorization Domain $R$, $(a_0, a_1, ..., a_d) = (1)$ and $\gcd(a_0, a_1, ..., a_d) = 1$, where each $a_i \in R $, is not necessarily equivalent. I know the first one implies the seconed one, but in my native thought, the second one is seemed to imply the first one. To disprove this, I'd like to see some example that in some UFD $R$, $(a_0, a_1, ..., a_d) \neq (1)$ but $\gcd(a_0, a_1, ..., a_d) = 1$. But I can't come up with such domain $ R$. Could you give me such example? Thank you for kind answer in advance.

We know that if $A$ is a PID, then we can guarantee the existence of a $\gcd$ between two elements. My question is, does the converse hold? If I know that every two elements have a $\gcd$, do I know that the ring is a PID? My intuition says no, in that case I would like a counter-example.  Thanks.


So today I asked if there's something like Protected member class in Python where many people said there's no something like lik Public Protected or Private . But I made the following code to test this:  class Vehiculo():      def __init__(self, peso):         self.__peso = peso   and from an outer class I did:  car = Vehiculo(10) car.__peso = 20   and what it printed was still 10, so this is like Private, however when I changed the class variable with just one underline:  class Vehiculo():          def __init__(self, peso):             self._peso = peso   it printed 20 instead. Can someone clearly explain this to me? I've read a very similar post (that many consider as duplicate) but I DON'T UNDERSTAND what they say. This is exactly the Public Private behavior. And I'd like to know how to do a Protected behavior or if it's even possible.  Thanks and regads.

Python gives us the ability to create 'private' methods and variables within a class by prepending double underscores to the name, like this: __myPrivateMethod(). How, then, can one explain this  >>> class MyClass: ...     def myPublicMethod(self): ...             print 'public method' ...     def __myPrivateMethod(self): ...             print 'this is private!!' ...  >>> obj = MyClass() >>> obj.myPublicMethod() public method >>> obj.__myPrivateMethod() Traceback (most recent call last):   File "", line 1, in  AttributeError: MyClass instance has no attribute '__myPrivateMethod' >>> dir(obj) ['_MyClass__myPrivateMethod', '__doc__', '__module__', 'myPublicMethod'] >>> obj._MyClass__myPrivateMethod() this is private!!   What's the deal?!  I'll explain this a little for those who didn't quite get that.  >>> class MyClass: ...     def myPublicMethod(self): ...             print 'public method' ...     def __myPrivateMethod(self): ...             print 'this is private!!' ...  >>> obj = MyClass()   What I did there is create a class with a public method and a private method and instantiate it.  Next, I call its public method.  >>> obj.myPublicMethod() public method   Next, I try and call its private method.  >>> obj.__myPrivateMethod() Traceback (most recent call last):   File "", line 1, in  AttributeError: MyClass instance has no attribute '__myPrivateMethod'   Everything looks good here; we're unable to call it. It is, in fact, 'private'. Well, actually it isn't. Running dir() on the object reveals a new magical method that python creates magically for all of your 'private' methods.  >>> dir(obj) ['_MyClass__myPrivateMethod', '__doc__', '__module__', 'myPublicMethod']   This new method's name is always an underscore, followed by the class name, followed by the method name.  >>> obj._MyClass__myPrivateMethod() this is private!!   So much for encapsulation, eh?  In any case, I'd always heard Python doesn't support encapsulation, so why even try? What gives?


Do there exist any 3-regular graphs with an odd number of vertices? I'm starting a delve into graph theory and can prove the existence of a 3-regular graph for any even number of vertices 4 or greater, but can't find any odd ones.

I'm having a bit of a trouble with the below question     Given $G$ is an undirected graph, the degree of a vertex $v$, denoted by $\mathrm{deg}(v)$, in graph $G$ is the number of neighbors of $v$.   Prove that the number of vertices of odd degree in any graph $G$ is even.


I am wondering how to prove that the supremum of the following sequence is 1 $$a_n=\sin (n)$$

how to prove  $\sup \{ \sin n \mid n\in \mathbb N \} =1$


Are the "If you be my everything..." and "If I be wrong" structures correct? Thank you for the answers!

Possible Duplicate:          2 examples first:  1.It is announced that the accounting class of the 3rd and 4th hours on the morning of this Wednesday be cancelled  2.It is expected that everybody and each household be on guard  Someone told me this kind of examples above appears in the textbook as strict sentences to be taught in the classroom, so is that right for the usage of be  Meantime I looked up the word be at thefreedictionary.com and found one piece of interpretation says :      Archaic Used with the past participle of certain intransitive verbs to   form the perfect tense: "Where be those roses gone which sweetened so   our eyes?" (Philip Sidney).   So is there any connection between the archaic usage & the examples above? BTW, how to understand the short phrase "the 3rd and 4th hours". Many thanks!


I know that the reason why 0.999 recurring equals to one because it's goes on forever, and the difference between 0.999 recurring and 1 is 0 since it's infinite. But is it possibly to prove otherwise? I read online articles about surreal numbers and hyper real numbers, but does it help in proving 0.99 recurring bit equal to 1?

I've just happened to read this  on MO (that of course has been closed) and some of the answers to a similar  on MSE.   I know almost nothing of nonstandard analysis and was asking myself if something like the sentence « $1- 0.999 \dots$ is a nonzero positive infinitesimal» could be easily expressed and proved in nonstandard analysis.  First of all, what is 0.999... ? If we take the usual definition as a series or as a limit of a sequence of rationals, then it will still be a real number and equal to $1$ (I guess by "transfer principle", but please correct me if I'm wrong).  Instead, let's define  $$0.9_N:=\sum_{i=1}^N 9\cdot 10^{-i} $$  where $N\in{}^*\mathbb{N}\setminus\mathbb{N}$ is an infinite nonstandard natural number. This $0.9_N$ is a legitimate element of ${}^*\mathbb{R}$, expressed as $0.$ followed by an infinite number of "$9$" digits.  What can be said about $\epsilon_N:=1-0.9_N$ ? Is there an elementary proof that $\epsilon_N$ is a positive infinitesimal of ${}^*\mathbb{R}$ ? (by "elementary" I mean just order and field axioms and the intuitive facts about infinitesimals, like that for $x$ infinite $1/x$ is infinitesimal etc.; no nonprincipal ultrafilters & C).


One of my students refuses to split infinitives. His solution is to put the adverb directly before the infinitive, without fail, five times in two pages of writing. Telling him to split the infinitive will go nowhere.   Examples: I need carefully to consider. . .  I need intentionally to direct . . .  Another post discussed the meaning change between "I decided to go quickly" and "I quickly decided to go." In the student's examples, it is doubtful that clarity is at stake, but the order still feels unnatural to me. I've told him before that the adverb appears roughly connected to the main verb. What else can I say? This student knows grammar well and turns in otherwise immaculate work.  Or do his sentences sound natural to you?

Mark's generosity in this crisis seems to more than make up for his earlier stinginess.   Should those sentences always be avoided, or are there cases where they are valid?


I found an old brew mp flip phone and want to install android on it. There are multiple guides on how to install an os onto an android phone but I haven't seen anything on brew mp.

Many people want to try/use Android without buying a new Android phone.  How can I install Android on my current phone or device running Nokia Symbian, Maemo, or MeeGo; Microsoft Windows Mobile or Windows Phone 7/8/10; Apple iOS (iPhone); RIM's BlackBerry OS; Palm's WebOS; Samsung's Bada; HP's WebOS; Mozilla's Firefox OS; or other phone / operating system?


If I type the following command in Bash:  echo "dog!!"   I don't get the string dog!!. Instead I get something else.  I tried to echo the string "dog!!" by echoing "dog\!\!, but it doesn’t work either.  How can I use command arguments when there are two exclamation marks?  I want these exclamation marks to be treated as exclamation marks without any special function.  Two exclamation marks "!!" seem to be the last command.

Today, I was caught redhanded while attempting to code golf a password generator for Twitter.  import string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))   90 chars. Since that is a lot of spare space, I decided to raise the bar and make it executable too.  echo -e "#!/usr/bin/python\nimport string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))">pg;chmod +x pg;./pg   139 chars. Nice, except obviously bash chokes on the exclamation point.  badp@delta:~$ echo -e "#!/usr/bin/python\nimport string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))">pg;chmod +x pg;./pg bash: !/usr/bin/python\nimport: event not found   Pesky exclamation point. "Let's escape it," I thought! I do have one spare character after all.  echo -e "#\!/usr/bin/python\nimport string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))">pg;chmod +x pg;./pg   Obviously...  badp@delta:~$ echo -e "#\!/usr/bin/python\nimport string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))">pg;chmod +x pg;./pg ./pg: line 2: syntax error near unexpected token `(' ./pg: line 2: `import string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))' badp@delta:~$ cat pg #\!/usr/bin/python import string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))   Leaving my asinine code golfing aside -- I can't explain this.  With \!, the exclamation point was escaped, except it really wasn't, because the \! was left as-is for echo to pick up.  One solution could have been using \x21 instead, but I'm not convinced that's the proper way of escaping an exclamation point in a bash command.  tl;dr: How do you properly escape an exclamation point in a bash command?


public class Main {      public static void main(String[] args) {         generateRandomNumber();      }      public static void generateRandomNumber(){          double[] insideArray = new double[5];          for(int i=0; i<insideArray.length; i++) {             double value = (Math.random()+1)*10;             insideArray[i] = value;             String.format("%.2f", insideArray[i]);         }         System.out.println("Displaying random generated Array: " + Arrays.toString(insideArray));      }  }  I am trying to generate 5 random numbers and store to an Array.  And I would like to format decimals up to 2 numbers. I tried "String.format()" method but didn't work. Still I am getting double like: 10.xxxxxxxxxxx. How can I format it such as ex: 10.xx ?

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


I have a file that contains phone numbers of the following formats:   (xxx) xxx.xxxx (xxx).xxx.xxxx (xxx) xxx-xxxx (xxx)-xxx-xxxx xxx.xxx.xxxx xxx-xxx-xxxx xxx xxx-xxxx xxx xxx.xxxx   I must parse the file for phone numbers of those and ONLY those formats, and output them to a separate file. I'm using perl, and so far I have what I think is a valid regex for two of these numbers   my $phone_regex = qr/^(\d{3}\-)?(\(\d{3}\))?\d{3}\-\d{4}$/;   But I'm not sure if this is correct, or how to do the rest all in one regex. Thank you!

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


I am trying to implement the craps game in C++, rules are given below. So I created a function which will generate two numbers for me, sometime this function needs to be called twice, but when it is called for the second time its giving me the same random number it gave me the first time.  I want to randomize the numbers I get in the the second call to rollDice() function. How do I do that?  Example output 1: Player rolled 3 + 4 = 7 Player won!  Example output 2: Player rolled 2 + 2 = 4  Point is 4 Player rolled 2 + 2 = 4 Player won!  Example output 3: Player rolled 1 + 5 = 6 Point is 6 Player rolled 1 + 5 = 6 Player won!  Game rules: Rule: A player throws two 6 face dice, if their sum is 7 or 11, they Win. if the sum is 2,3 or 12 they loose. if it's 4,5,6,8,9,10,12 it becomes a "point" and the player has to roll again. The player then keeps rolling until he hit the "point"  again and he wins  and loose if he hits a 7.  Code:  #include<iostream> #include<ctime> #include <cstdlib>  using namespace std;  //Generating two rand numbers from 1 to 6 int rollDice() {     srand(time(0));     int face1 = 1 + rand()%6;     int face2 = 1 + rand()%6;     int sum = face1 + face2;      cout << "Player rolled " << face1 << " + " << face2 << " = " << sum << endl;     return sum; }  string gameStatus; //Hold status of game; WIN, CONTINUE, LOST int sumOfDice = rollDice(); int point = 0; //This will hold sum of dice if it's default case defined below in Switch.  int main() {      switch(sumOfDice)      {          case 7:         case 11:             gameStatus = "WIN";             break;          case 2:         case 3:         case 12:             gameStatus = "LOST";             break;          default:             gameStatus = "CONTINUE";             point = sumOfDice;             cout << "Point is " << point << endl;      }       while (gameStatus == "CONTINUE")      {          int rollAgain = rollDice();          if (rollAgain == point)             gameStatus = "WIN";          else if (rollAgain == 7)             gameStatus = "LOST";      }      if (gameStatus == "WIN")         cout << "Player won!";      if (gameStatus == "LOST")         cout << "Player lost!"; }

I need a 'good' way to initialize the pseudo-random number generator in C++. I've found  that states:     In order to generate random-like   numbers, srand is usually initialized   to some distinctive value, like those   related with the execution time. For   example, the value returned by the   function time (declared in header   ctime) is different each second, which   is distinctive enough for most   randoming needs.   Unixtime isn't distinctive enough for my application. What's a better way to initialize this? Bonus points if it's portable, but the code will primarily be running on Linux hosts.  I was thinking of doing some pid/unixtime math to get an int, or possibly reading data from /dev/urandom.  Thanks!  EDIT  Yes, I am actually starting my application multiple times a second and I've run into collisions.


If you sequentially subtract a number from row to row, sometimes excel will get close to, but not 0, even though 0 is the right answer?  For example, if you start out with 1 and subtract 0.05 sequentially from the previous answer, you should eventually get to 0, but excel does not.  Sometimes this poses a problem in doing financial calculations.  Is there a setting that will convert these numbers to exact 0?  I am reluctant to use round() in that it may adversely impact the other numbers that I would like to have the appropriate level of precision.

It's supposed to be zero but for some reason the result produces a peculiar series of digits at the end.  Also, here's the .xlsx of it: http://83.212.111.36/Book1.xlsx


Is there a way to avoid this error java.lang.NullPointerException in array?  I create an array with allocated size. But sometimes it doesn't fill up. And I get the error. How to avoid it?  The code:  public static produktas[] surasti (produktas G[], int n){     try{     int x = 0;     BufferedReader in = new BufferedReader (new InputStreamReader (System.in));     produktas A[] = new produktas[5]; // size of array, but sometimes it may be 1 element, or two, or etc.     for (int j=0; j<5; j++){     System.out.println("Kokio produkto ieskosime?");     String found = in.readLine();     for (int i=0; i<n; i++){         if (found.equals(G[i].gautiPav())){              A[x] = G[i];             x = x + 1;         }     } }  return A;  } catch(IOException ie){         ie.printStackTrace();     }     return null; }   And I'm asking about how to make dynamical array or smth, so it's not related to that topic.

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


I am FAR from any sort of expert in any type of Linux development.  I am looking to get an INEXPENSIVE and refurbished PC to run the latest release, but DO NOT want to cripple myself too much. It would be used mainly for browsing, word processing, audio listening, and video viewing. If there was some sort of Agent release I could run, I'd use it for that too.  Can someone help this self-diagnosed hardware moron to understand what processor (Core Duo 2?), etc. would give me a DECENT (not "stellar")Linux experience?  I'd appreciate any help VERY MUCH!!! :)  Sorry for all the caps... having a bad day, and why should you suffer?

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I'm using Jupyter Notebook and python 3.8. Depending on other variables, I will generate a txt file with the command that must be entered (literally) on the command line. For example: topup --imain potato.  This command is in the txt file as a line. I want to run this command as if in the cmd. I also want to do all of this from Jupyter Notebook and have some output to know what is going on.  Is it possible?  I also accept other ways to do this (I'm trying to automate an FSL procedure).

How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?


$$∫(2x+10)^{-1}dx$$ $$=\frac{1}{2}∫(x+5)^{-1}dx$$ $$=\frac{1}{2}\ln|x+5|+C$$ but here is the same integral, yet different answer $$∫(2x+10)^{-1}dx$$ Let $u = 2x+10\implies \frac{du}{dx} = 2 \implies dx = du/2$ $$\implies \frac{1}{2}∫u^{-1}du$$ $$=\frac{1}{2}\ln|u| + C$$ $$=\frac{1}{2}\ln|2x+10| + C$$ Yet, $\frac{1}{2}\ln|2x+10|$ does not equal $\frac{1}{2}\ln|x+5|$ Please let me know if I made any mistakes. I have been seeing this over and over in my DE class and it keeps bugging me

Question:  Is it possible to get multiple correct results when evaluating an indefinite integral?  If I use two different techniques to evaluate an integral, and I get two different answers, have I necessarily done something wrong?    Often, an indefinite integral can be evaluated using different techniques.  For example, an integrand might be simplified via partial fractions or other algebraic techniques before integration, or it might be amenable to a clever substitution.  These techniques give different results.  For example, looking over a few other questions on MSE:      From : evaluate $$ \int x(x^2+2)^4\,\mathrm{d}x. $$    Via the substitution $u = x^2+2$, this becomes $$ \int x(x^2+2)^4\,\mathrm{d}x       = \frac{1}{10}x^{10} + x^8 + 4x^6 + 8x^4 + 8x^2 + \frac{32}{5} + C.     $$ However, multiplying out the polynomial and integrating using the power rule gives $$ \int x(x^2+2)^4\,\mathrm{d}x       = \frac{1}{10}x^{10} + x^8 + 4x^6 + 8x^4 + 8x^2 + C    $$     From :  evaluate   $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x. $$    Simplifying the integrand using partial fractions then integrating gives $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x       = \frac{-2}{(x+1)} - \ln|x+1| + C.    $$ Via integration by parts, we get $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x       = \frac{x-1}{(x+1)} - \ln|x+1| + C.    $$     From : evaluate   $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x. $$    Using the substitution $u = \sec(\pi x)$, this becomes $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x       = \frac {\sec^2(\pi x)}{4\pi} + C.    $$ Using the substitution $u = \tan(\pi x)$, this becomes $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x       = \frac {\tan^2(\pi x)}{4\pi} + C.    $$


I have made a few attempts to begin writing with TEX or LATEX on a couple of MS Windows machines and one Ubuntu box I no longer own. ( I currently have Mint, though, and MS Windows, and I'm thinking of getting a Mac.) Those last few times, I was recommended to install a variety of programs, and they did not seem to work well with each other.   Each time, after about a week of work, I would end up with a saved document that had one line on it that didn't look like what I wanted. To make a long question short(er), out of all the options, is there anything close to my hopes of finding the following: about half an hour to install not too many executables, and with which I can get to writing some equations within 24 hours? (Also, on a crappy old machine, what's the way to go?)

I am doing summer project in maths and I have to type my report. I am good with the latex I write on mathstack that I have learned through experience but when it comes to softwares, I do not know anything like those commands \begin \end does not make sense to me.   Is there any software which can automatically put these commands in, so that in b/w we can type whatever stuff we want?  Also if not, at least you guys can tell me if there is any latex software which shows the output on half of screen(right half), as I type on left half and compile, (I saw it somewhere).  Anyways, I have to download a software and will have to go through some you tube videos, so please suggest me relatively easy Latex software.  Thanks!  P.S. Please edit the tags as you wish, I did not understand many tags here.


I think the equation above is false, but I cannot find a counterexample.  Also, I think that the implication is true when $a_n^2 \to 1$ is also required.  Suppose we have $a_n\in\mathbb{C}\ \forall n\in\mathbb{N}$.  Can you help me?

Just thinking about it in terms of logic, shouldn't the series of a sequence whose limit as $n$ approaches infinity is 0 converge?  I know that the $n$th term test for divergence says that if a series is convergent, then the limit of its sequence is 0 and I also know there are some sequences for which it has been "proven" that their series does not converge even though the sequence converges to 0, but I just don't believe these tests. If we stretch $n$ out to infinity and the terms are approaching 0, then how is it possible for the sum of the terms to "overflow" and diverge if the terms are becoming negligibly small?


In my assignment I have to prove that:  Let $P(x)=x^4+a_{3}x^3+a_{2}x^2+a_{1}x+a_{0}$. Prove that if P has a root in $x_{0}$ and $P'(x_{0})\ne0$ then P has a least two roots.  My solution has a problem in it, and I wondered if you can help me with it. Since the functoin is a polynomial then it is differentiable always. If we calculate the limit: $$\lim _{x\to \infty}P(x)=\lim_{x\to-\infty}P(x)=\infty$$ I  tried to solve is by showing through Rolle's theorem by contradiction that the derivative is always $\ne0$ but no one told me that $a_{i}\ne0$ so I'm stuck. I know I should you IVT but I'm pretty much stuck. Your help is appriciated.

Let $$P(x) = x^4+a_3x^3+a_2x^2+a_1x+a_0$$   $$P(x_0) = 0$$   $$P'(x_0) \not= 0$$   with $x_0$ and each $a_i$ real. Prove that $P(x)$ has a at least two real roots.   I can't figure why this is true.


Soldering in a RoHS-compliant way normally means using a solder that does not contain lead - the metal that made up most part of common solder before.  Handsoldering using lead-free solder seems to be harder. Possibly it also makes industrial soldering methods "harder" (as opposed to just different)?   What are the practical difficulties that arrise in comparison to using "classic" solder?   What causes these difficulties? How can they be handeled or worked around?

I'm thinking of changing to lead-free solder. I've heard some people prefer a traditional Pb/Sn solder, but haven't heard any specific reasons why.  I'm mostly doing through-hole work, and I have a decent temperature-controlled iron.  So, are there any issues I might encounter with changing over? And are there any situations where I'd want to use a particular type?


Supposedly in order to complete the theory of everything needed to master gravity, the physicists needed some data that could only be obtained from a black hole. What was it that they needed?

In Interstellar, the team hopes that data collected from the inside of a black hole will solve “the gravity problem” (presumably the question of how to get a massive space station to escape the Earth’s atmosphere, explained in more detail ).  Two related questions on this:   How can “data” alone solve this scientific problem? Is it that they have too many possibilities to manually test, and their question is just “which is the right one?” Are there any real-world historical examples of good data leading to a breakthrough on achieving what was previously thought to be impossible? Why does the data have to come from a black hole? Isn’t this counter-intuitive, because a black hole is the one place where gravity doesn’t behave as it does on Earth, which is where the problem applies?


Compiling (C++): prod/coretech/hub/compression/lz4_compressor.os prod/coretech/hub/compression/lz4_compressor.cc:31:17: fatal error: lz4.h: No such file or directory  #include "lz4.h"                  ^ compilation terminated. scons: *** [prod/coretech/hub/compression/lz4_compressor.os] Error 1 scons: building terminated because of errors.

Simple enough question: is there some shell command (or GUI method) I can use that, given the path to a file on my system, tells me what package put it there? Assuming the file did in fact come from a package, that is.  Bonus question: what if it's a file that isn't installed on my system? Is there, say, a website that will let me look up a file and see what packages, if any, provide it?


Has anyone been able to evolve Eevee to more than one type of evolution? My first Eevee evolved to Vaporeon, so did my second. My friend now has 3 Jolteons. Is whatever evolves first the only evolution you can get?

So I just caught an Eevee. Now, I need 25 candies to evolve it. The fact is that in the GameBoy color versions, that Pokémon needed a stone to evolve instead of experience. Depending of the stone he was fed with (thunder, water or fire), he was evolving in a different Pokémon.   Is the stone feature also in Pokémon Go? If not, what decide the evolution of this Pokémon?   Bonus point : If it's possible, how can I get a stone?


I need to use some unicode glyphs relating to greek metric, namely ⎯ ⏑  ⏒   ⏓   ⏔   ⏕   ⏖, but I can't make them display on the document.  I've got  \documentclass{beamer}  \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc}  \usepackage{fontspec} \setmainfont{Symbola}  \begin{document}     \begin{frame}         \begin{description}             \item[test] ⎯⏔⎯⏔⎯⏔⎯⏔⎯⏔⎯             \item          \end{description}     \end{frame} \end{document}   But on the pdf it's missing

i want to set the main font in my beamer as "Consolas" i do like this :  \documentclass{beamer} \usepackage{fontspec} \usetheme{Warsaw} \begin{document} \setmainfont{Consolas} \begin{frame} we discuss the ambiguities of existing security definitions and then provide a general framework for defining AKE security when involve strong adversary capabilities \end{frame} \end{document}   but after compile it , the font doesn't change, it is the same with that before the main font was set. what's the reason?


Black holes pull anything and everything that enters past the event horizon into the singularity. What if the current unknown output where all of this infinitely condensed matter goes to is the creation of new universes through 'Big Bang' events? What if that matter eventually once again expands outward after the compression caused by the black hole no longer has such a great effect on matter in the singularity, possibly caused by an eventual large span of distance? Could this be the beginnings of additional universes, i.e. new 'Big Bangs?' Could our universe be tied to a black hole (or multiple black holes) whose output from its originating universe is the matter we have around us in our own universe? How large would a black hole have to be in order to collect enough matter for additional universes that they feed to have enough mass to grow, particularly to our own universe's current and expanding size?

As discussed in , as far back as the 1960s it was suggested that the Schwarzschild metric can be smoothly joined to a de Sitter metric. For example the idea has been used by Lee Smolin in his ideas idea for black hole evolution.  If the suggestion is true it means that matter falling into a black hole would emerge into a de Sitter spacetime arguably comparable to our own.  So has the universe we live in started as a black hole of this type?  Is it possible to prove that the big bang was a black hole of this type?


This edit  was apparently done by a moderator user named  and appears to be robot vandalism.     I can T written ints 1 documentcomplete handler am   What is it?  comment says "this is easy to do on linux"

I recently received this rather amusing message while reviewing a user's first post:  Congratulations! This was only a test, designed to make sure you were paying attention. This post has already been removed, but thanks for taking time to leave feedback for the author.   What is the purpose of this test? How does the audit work? What happens if I fail? Why was the system expecting me to negatively review a good post, or positively review a bad post? A review is obviously an audit. Should I report it? Do review audits count toward the Reviewer badge? Do robo-reviewers dream of electric sheep?


I am trying to figure out how to send a user to another page I design after they have input the correct password. I don't know how to load the page with a JavaScript Command. How could i use the code below to open a new page titled insideVault.html?   I have tried many google searches, but cant find any resources to help me out with this.  // login code //

             <form id="login" onsubmit="return passCheck()" method="get">
 Enter Password
             <input type="password" name="password" id = "password">             <input type="submit">             </form>

How can I redirect the user from one page to another using jQuery or pure JavaScript?


I have an array:    arr[0]="a"   arr[1]="b"   arr[2]="a"     I want to remove only arr[0], and keep arr[1] and arr[2]. I was using:    arr= arr.Where(w => w != arr[0]).ToArray();     Since arr[0] and arr[2] have the same value ("a"), the result I'm getting is only arr[1].    How can I return both arr[1] and arr[2], and only remove arr[0]?

I have an array of Foo objects. How do I remove the second element of the array?  I need something similar to RemoveAt() but for a regular array.


I need to know when the user clicks on the button that triggers window.open if there is stable API/way to know beforehand if the user actively has a pop-up blocker?  In some cases the user doesn't know/pay attention that they have pop-up blocker (that block the new window). I would like to inform them by some dialog/or something to authorize a new window by clicking on allow.

Occasionally, I've come across a webpage that tries to pop open a new window (for user input, or something important), but the popup blocker prevents this from happening.  What methods can the calling window use to make sure the new window launched properly?


Is it better to keep a laptop or smartphone battery always at 100% or to let it discharging before recharging ?

10 years ago when I was doing hardware support it was best practice to fully drain a laptop battery prior to recharging in order to maximize its life.  Is this still the case or can a battery now be recharged at any point without worrying about shortening the lifespan?


So I'm using the testfor command to find near players with a item with a custom name and a specific amount. The issues I'm having is how to search for more than 1 stack of items like 100 items total.  Here is what I've got for the command so far  testfor @p {Inventory:[{id:"minecraft:paper",tag:{display:{Name:"$1"}}}]}   I just don't know how to put "count:100" in there

I am using the AmazingKit plugin on my Minecraft server to make inventory kits for players. In a command block I have the following command:  /tellraw @p ["",{"text":"Iron","clickEvent":{"action":"run_command","value":"_____"}},{"text":" / "},{"text":"Gold","clickEvent":{"action":"run_command","value":"_____"}}]   Which prints the following result: Iron / Gold.  When a player clicks on Iron, what command should I write where the empty space is _____ in order to check if the player has at least (>=) 20 iron ingots in his inventory and if he/she does, remove 20 iron ingots and execute /kit Basic. If the player has less than 20 iron ingots in inventory, the command won't be executed. Instead, Insufficient amount of iron ingots will be printed out.   Same applies when a player clicks on "Gold".  I'm on 1.14 version


Humans migrated from Africa about 60000 years. And in these years humans physical features undergone significantly in terms of skin color, hair, eye color and facial features.   So, with this we can say that given 10000 years of span we can see a significant noticeable new changes in physical features of humans? like some humans with new skin color (apart from today's white, black and brown), new color eye balls, big heads etc.?

Reading this  of the stack exchange got me thinking. I believe human evolution is an ongoing process and will not stop. Are there any predictions/theories about the phenotypes and genotypes of humans in the future? and how they may differ in a few thousand years compared to present day?  I remember watching a youtube video and in the video the user predicts that there will be two branches of human species; a short dwarf like species and a much taller species. I'm still skeptical about this claim. Is there any evidence to back it up?  One could argue that modern medicine is preventing natural selection. How will this effect human evolution?


Let $p$ be a real polynomial of the real variable $x$ of the form $$p(x)=x^n+a_{n-1}x^{n-1}+...+a_1x-1$$Suppose that $p$ has no roots in the open unit disc and $p(-1)=0$.Then which is/are true?   $1$.$p(1)=0$.  $2$.$\displaystyle{\lim_{x\to \infty}}p(x)=\infty$     $3$.$p(2)>0$     $4$.$p(3)=0$    product of the roots of the polynomial is $-1$. and it is a monic polynomial.If it has a root whose modulus is greater than one then it must have a root whose modulus is less than one which gives a contradicton. So it has roots $1$ or $-1$. since one root is $-1$ and product of the roots is $-1$ then it has a root $-1$.So 1 is true and 4 is false.obviously 2 is true. I am not sure about 3. since p has no root outside $[-1,1]$ so it does not change sign in $[1,\infty)$.So $p(2)>0$ or $p(2)<0$.But then I can not proceed.can I get some help?

Consider the root of the polynomial $p(x) = x^n+a_{n-1}x^{n-1}+a_{n-2}x^{n-2}+\dots+a_1x -1$.    Suppose that $p(x)$ has no roots in the open unit disc in a complex plane and $p(-1)=0$. Show that $p(1)= 0$.


In my node editor I have a small movie clip with a green screen. I keyframed it to get rid of the green screen and I am using a transparent background image. I have realized that most of the video formats don't support transparent backgrounds, so I am trying to just render it frame by frame. However, when I use a format that should support transparency, like png, the pictures just come out with a brown or black background. My goal is to overdrop the clip on another video I have. How do I export this clip with a transparent background? Thanks for any help!

I would like to render an animation as a series of .png images with transparent backgrounds for use in a video. Is this possible?


I work with a team, and we tried to build a an error correcting code. After going through some algorithm, we decided to start with the Reed-Muller code.   The coding is not complex, and we have managed to decode using MLD (majority logic decoding). Then we had a new constraint that the code must be systematic (the original message must be visible in the coded message). I transformed the generator matrix of Reed-Muller into systematic form.   I ran into difficulties when decoding.   My question is: can you use majorty logic decoding for systematic Reed-Muller? If yes, then how?  Second: is it worth going with the Reed-Muller algorithm for systematic codes or are there better systematic block codes (that are easy to decode).

Reed–Muller codes are a family of linear error-correcting codes used in communications. The code of $RM(2,3)$ could be generated with matrix: \begin{pmatrix} 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 \\ 1 & 1 & 0 & 0 & 1 & 1 & 0 & 0 \\ 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ \end{pmatrix} In several sources I have read there is a way to build systematic Reed-Muller code which keeps recieved signal of length $n$ in first $n$ bits of output signal. But I couldn't find how to do it.   Any ideas?


I am new on ubuntu and i use xubuntu 16.04 my graphic card is AMD and Radeon HD 8670A/8670M/8690M / R5 M330 how i can install this driver ?

I have an MSI Radeon HD 7850 card. MSI provide no Linux support, and the AMD driver gives me an Unsupported Hardware watermark that does not show up in screenshots.  I uninstalled the proprietary driver and found that Unity 3D no longer works, and I really only picked Ubuntu because of the excellent shortcuts provided in the recent versions.   Trying to locate the open source driver has been a pain for me. According to the documentation I have read it is pre-included in Ubuntu 12.04, yet there is no Unity 3D support. I tried using the newest drivers from AMD's website, but that also had the watermark.  Does anyone know how I can get the open source driver? If not, does anyone know how to remove the watermark. I'm on the verge of going back to Windows.


For the $n=3$ and $n \geq 5$, $A_n$ is simple, and suppose for a contradiction $H\leq S_n$ has index 2 and $H\neq A_n$, then since $H\cap A_n \unlhd A_n$ and $A_n$ is simple, $H \cap A_n$ must be trivial.   Since $H$ has order equal to that of $A_n$ and $|A_n|>3$, there must exist at least two non-identity elements in $H$. Let $h_1 \neq h_2 \in H$ be non-identity elements of $H$. Then $h_1$ and $h_2$ must be odd permutations, hence $h_1 h_2 \neq h_1^2$. But the product of two odd permutations is even, so $h_1h_2 \in A_n$, so $h_1h_2 \in H\cap A_n = 1$, so $h_1h_2=h_1^2=1$, which is a contradiction.   Therefore $A_n$ is the only subgroup of $S_n$ with index 2 for $n=3$ and $n\geq 5$.  Also note that $A_1$ and $A_2$ are trivial, so we only have to prove the case for $A_4$. But then I'm stuck.

How to prove that the only subgroup of the symmetric group $S_n$ of order $n!/2$ is $A_n$?  Why isn't there other possibility?  Thanks :)


Revising to the exam again...  In a chapter dedicated to something else, in the answers to an exercise, there was such a sentence:     Yesterday I met Susan at the grocer's. / I met Susan at the grocer's yesterday.   Problem is, when I was doing this exercise, I wrote this sentence in this way:     Yesterday, I met Susan at the greengrocer's.   I'm very doubtful about this comma.  I must confess: I don't know (or remember) any rule that would say if the comma here is necessary? acceptable? Incorrect? I must confess: When I was learning English in school, I consciously skipped learning all those comma rules and instead I was relying on my intuition, which, I think, was becoming better and better the more English texts I was reading and the more commas my teacher was crossing out or putting in my tests with her red pen.  And now, my intuition strongly tells me that the natural order of words in English, in case of this sentence, is:     I met Susan at the grocer's yesterday.   So, if I put "yesterday" at the beginning of this sentence, I'm inverting the usual order of words, thus necessitating a comma. (In a manner similar to conditional sentences: The usual order is "blah1 if blah2", so if I'm inverting it, I must put a comma: "if blah2, (then) blah1" but not "if blah2 (then) blah1".)  Is my intuition correct here? (I suppose it's not, since this would imply this book has another error, and while that's not impossible, I find it more likely that I'm wrong.) Which rule is appropriate here?  EDIT: Since someone marked my question a dupe of a couple of other questions that deal with possessive forms of store names: To make it clear: My question has NOTHING to do with store names and possessives! It is all about the comma after "yesterday" - this "grocer's" part is just to provide a full sentence example of my concern.

Here, Cambridge doesn't use a comma.  I am confused. Example in Cambridge Dictionary: Unfortunately we can't come this evening after all.    On different pages i found some rules telling there needs to be a comma. Examples follow:  We do usually put a comma after adverbs like 'unfortunately'. They are called 'sentence adverbs' because they modify the whole sentence and often give the opinion of the speaker/writer.  A parenthetical phrase adding detail to the main clause. Initially placed parentheticals are normally set off by a comma.  Cause I'm studying for my Level 2 graduation, i want going crazy reading here and there comma rules followed by looking in the Cambridge Dictionary without finding them there.   HELP me out please !


I am trying to re design a plugin to run multiple iterations of data loaded from a file. I am using QT creator to develop the GUI. How would I design a load data input box so users can select a data file and then run the plugin.   The plugin initially uses single coordinate inputs i wish to use multiple.

I am in the process of developing a plugin for QGIS using Python. Note that this is my first plugin, so the query could be quite basic...   I have used  to create the basic plugin, and (quite surprisingly found it easy) created the plugin files.   I am stuck at a very basic concept. Previously, while using Python IDLE, using   QtCore.QObject.connect(self.Input, QtCore.SIGNAL("clicked()"), self.OpenBrowse)   to signal a click and writing a function OpenBrowse      def OpenBrowse(self):         self.Input_TB.setText(filename1)   I was able to open the Windows File Browse window on click and set the File location to an adjoining text box.   How do I do this while developing the plugin in the Python file that is created by Plugin Builder.? I am very confused about where should the code be written? Because if I place the 'clicked()' actions, etc. in the Python file generated from the UI file, it is not recognizing the variables as they are not global (obviously).   I am using QGIS 2.4, on a Windows 32-bit system.


When inspecting a PCB earlier today it occurred to me that all traces you find on modern PCB's are confined to 45 degree increments with respect to the (typically square) board edges.   What is the rationale for this?  Is this a fabrication consideration or something electrically inspired?

I've always wondered this: every single modern PCB is routed at 45 degree angle increments. Why does the industry prefer this so much? Doesn't any-angle routing offer more flexibility?  One plausible theory would be that the existing tools only support 45 degree increments and that there isn't much pressure to move away from this.  But having just researched this topic on google, I stumbled across  - which does away with the 45 degree increments, and according to their marketing materials it does a considerably better job than the 45-degree-limited competitors.  What gives? What would it take for you personally to start routing arbitrary angles? Is it all about support in your favourite software, or are there more fundamental reasons?  Example of non-45-degree routing:   P.S. I also wondered the same about component placement, but it turns out that many pick & place machines are designed such that they can't place at arbitrary angles - which seems fair enough.


I really wish there were better ways to browse the questions on SO (and the like).  The Unanswered -> My Tags page is close to what I often want, but not always, and it often still gives me many questions I don't care about.  I'd like to be able to filter by (at least):   Accepted/Unanswered/No Answers Tags to include, defaulting to letting the user select tags marked as interesting, but able to specify any tags Tags to exclude - starts with ignored tags, but again user selectable, this one's critical, and lacking from the current power-searches   I imagine a new button at the top, or maybe replacing 'Unanswered' called 'Custom' or 'Filters' - what's currently in 'Unanswered' could go inside this page - which would allow you to browse by pre-defined filters and by custom made filters, and also let you select which filter would be your default - what you see when you first hit SO.com.  The questions would be ordered like usual - in terms of last update - though I wouldn't be opposed to allowing other orderings, I don't see that as critical to this feature.  This would address several other requests/questions, including , , and .  I realize the  provide a fair bit of this functionality, but non of the user friendly interface that I imagine.  This would be a huge boon for the usefulness of SO and would help prevent questions going unanswered and disappearing too quickly for those interested in answering to notice.  I believe the default view of the home page is crippling to the distributed knowledge of SO, and as the site grows it becomes imperative for power users to browse their own way.

I realize that this may be a big request, but...  I think that instead of tabs on the recent question activity pages, or more likely as a new tab, adding a more advanced filtering option.  For instance, being allowed to exclude tags, filter by accepted answers or not, and, most importantly, being able to combine multiple filters!  E.g.: Filtering posts with tag Javascript without tags Jquery and AngularJS with no accepted answers and a score >= 0.  I feel like this is a biggish change that, if implemented as a new tab, wouldn't be that hard to implement, but would be very useful.


Is there a keyboard shortcut for maximizing the current window on Lubuntu 16.04?

In lubuntu-rc.xml Lubuntu doesn't have a hotkey to maximize the current window.


Recently I am stubborn enough to simply delete stuff that was in my mac. When I open up terminal, this pops up: (a screenshot of terminal with the code: Login incorrect login:)    I am not sure if I have accidentally deleted one of the supporting files for Terminal in my mac (this is just a guess)?  I've tried changing the shells. Typing in my username or even the correct password but it won't work at ALL. If there is no solution is a way to delete and reinstall Terminal?  Someone suggested I reinstall the OS. If that is the easiest solution, how do I do it? (sorry I am an IT noob)

I've been having this issue for a while where I come to open the Terminal and I'm met with this:  Login incorrect login: _   I've already deleted the com.apple.terminal.plist to no avail. The really interesting thing is that sometimes it works, maybe 1 in 50 times. I literally have no idea what might be causing it and after searching the web for the better part of half a day it seems everyone else's issues are fixed when they delete the plist file.  How do I sort this out? I've tried running different shells (bash and zsh), but I still get this log in screen.  Also when I use Activity Monitor, I can see there is no shell running just the login.


I've spent hours trying to understand the following error.  My Script  CMD="sh -c 'echo \"a\"'" $CMD   Error:  "a"': 1: "a"': Syntax error: Unterminated quoted string   of course when I do echo $CMD and paste the result, it works as expected...  What is the cause of the error?  Edit:   I'm asking for an explanation not only a workaround.  Therefore, I think the following link doesn't answer my question:

How should I write the command variable to get the expected behavior?  #!/bin/bash  function f ( ) {     echo "$2" } command="f --option=\"One Two Three\" --another_option=\"Four Five Six\"" $command  f --option="One Two Three" --another_option="Four Five Six"   First calling is wrong, second - right  $> ./test.sh  Two --another_option=Four Five Six


I am trying to restart my network on my CentOS server on a Raspberry PI 3 with      systemctl restart network   However, I am getting this     Job for network.service failed because the control process exited with   error code. See "systemctl status network.service" and "journalctl   -xe" for details.   [root@rpiserver ~]# systemctl status network.service network.service - LSB: Bring up/down networking    Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)    Active: failed (Result: exit-code) since Sun 2017-07-02 21:08:50 UTC; 2min 46s ago      Docs: man:systemd-sysv-generator(8)   Process: 1002 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=6)  Jul 02 21:08:50 rpiserver systemd[1]: Starting LSB: Bring up/down networking... Jul 02 21:08:50 rpiserver systemd[1]: network.service: control process exit...=6 Jul 02 21:08:50 rpiserver systemd[1]: Failed to start LSB: Bring up/down ne...g. Jul 02 21:08:50 rpiserver systemd[1]: Unit network.service entered failed state. Jul 02 21:08:50 rpiserver systemd[1]: network.service failed. Hint: Some lines were ellipsized, use -l to show in full.   This is my ifcfg-eth0  DEVICE=eth0 BOOTPROTO=static ONBOOT=yes IPADDR=192.168.1.200 NETMASK=255.255.255.0 GATEWAY=192.168.1.1

I am experiencing an issue on Centos7 when attempting to start the network service. I receive the below error message.  Failed to start LSB: Bring up/down networking   The issue arised when I realised it wasn't taking my static IP address from the /etc/sysconfig/network-scripts/ifcfg-eth0 file (found below).  DEVICE=eth0 BOOTPROTO=static IPADDR=192.168.0.16 NETMASK=255.255.255.0 HWADDR=B8:27:EB:C3:1E:EC NM_CONTROLLED=no ONBOOT=yes TYPE=Ethernet   On reboot, the device would load with IP address of 192.168.0.7, clearly not that static IP address assigned, and not sure how it is getting information of a DHCP server (which I do have, my router)  I attempted to disable the NetworkManager, as this might have been causing havoc with the network service by issuing the below command.  systemctl stop NetworkManager   and then enable network  systemctl start network   again the same error came up, I then killed the dhclient process, and attempted to start network service once more and again got the same error.  Losing patience, since I did have connectivity to the internet at the time on the server through the DHCP IP, performed a "yum remove Network Manager" and tried a reboot, again to no avail. I'm not sure if that was a good idea or not, but hey it wasn't working anyway.  I seem to have exhausted suggestions I could find on the internet. Wondering if anybody else has any idea what might be going on.   edit: one more note, this is not a VM or related to Virtualisation in any way. This is simply a RaspberryPI 3  Many thanks.  Edit: Log entries:  Jan 01 00:00:06 <hostname> systemd[1]: Starting LSB: Bring up/down networking...  Jan 01 00:00:06 <hostname> systemd[1]: network.service: control process exited, code=exited status=6  Jan 01 00:00:06 <hostname> systemd[1]: Failed to start LSB: Bring up/down networking  Jan 01 00:00:06 <hostname> systemd[1]: Unit network.service entered failed state  Jan 01 00:00:06 <hostname> systemd[1]: network.service failed


If the number of arrangements of the letters of the word "MISSISSIPPI" if all the S's and P's are separated is $K\cdot\dfrac{10!}{4!\cdot4!}$ then $K$ equals  My attempt is as follows:-  Assuming question is asking to separate all instances of S and all instances of P but S and P can be together  First arrange $M,I,I,I,I$, they can be arranged in $\dfrac{5!}{4!}=5$ ways  $5$ characters will give $6$ gaps, so choose any $4$ gaps out of $6$ and insert $S's$ over there $\implies \displaystyle{6\choose 4}$  Now we have $5\cdot\displaystyle{6\choose 4}$ arrangements containing $9$ characters and all $S's$ are separated. Now its time to push $P's$  $9$ characters will give $10$ gaps, so choose any $2$ gaps out of $10$ and insert $P's$ over there $\implies \displaystyle{10\choose 2}$  So total arrangements will be $5\displaystyle{6\choose 4}{10\choose 2}=5\cdot\dfrac{6!}{4!\cdot 2!}\cdot\dfrac{10!}{2!\cdot 8!}=\left(\dfrac{5\cdot 4!}{2!\cdot 2!\cdot 8\cdot7}\right)\dfrac{10!}{4!\cdot 4!}$  $$K=\dfrac{15}{28}$$, but actual answer is $K=1$  What mistake am I doing here?

If the all S,P are separated in the word MISSISSIPPI then the total possible arrangements are $k\frac {10!}{4!.4!} $ then value of k is? Now all S,P are separated so we can have slash method. Thus they can be placed alternatively in $6! $ ways and rest 5 can be placed in $5! $ ways. Thus we equate to get $$6!.5!=k\frac {10!}{4!.4!} $$  to get $k=13.7$ while $k=4/3$ .Where is my mistake Thanks


We live at elevation 7000 ft up. How long should I cook swiss steak for tender thin sliced beef? I have never used a slow cooker in this altitude.

I live at a high altitude and love to use my slow cooker, but I don't think the meals are coming out as expected when I follow the recipes. Do I need to adjust the recipes for high altitudes?


I'm developing an add-on, that sits in the graph editor. I've just upgraded to Blender 2.78 and saw that the panel is divided into different tabs (View, Modifiers, F-Curve, etc.). My add-on is placed in its own tab (mmvt). How can I change the currently open tab to be my tab (in code)?

How can I detect and/or change the active tab in the current editor via Python?   Is this doable? I have been digging through bpy.context.region/screen and not yet found a way to list the active tab.


I have many  tags in my visualforce page, and am attempting to translate it to a lightning component. My  tags are necessary because I need Kendo templates wrapped in script tags.   I got an error saying I can't have script tags in the component, so I moved all of my javascript to the Controller, and it says invalid character '<', which is referencing the '<' on .  Am I not able to just throw all of my Javascript (there is a lot......) into the controller and have it function correctly? If not, how do you include  tags in a lightning component? Where do you put them?

I am able to include a JS file as static resource in my lightning component. But when I add "<<'script'>>" tag in the JS file it gives an error.  I want script tag as i need to use src attribute in the JS file and then call it through static resource in my lightning component      JS Code


I am making a text based calculator that can do addition, subtraction, division, multiplication and powers. The code I have written so far seems to work, but when it reaches the section where it determines if the inputed text is a +, -, /, *, or a ^, it endlessly loops and doesn't recognize the input.       double inputX;  // Used for input 2     double inputY;  // Used for input 1     double output;  // Used for math purposes      String inputS;  // Used for string input      String subt;   // Store the - in a string     subt = "-";      boolean corrInput = true;     boolean repeat = true;      while (repeat == true){          System.out.print("Please enter a number: ");          inputX = TextIO.getlnDouble();  // Retrieves inputX          System.out.println("x: " + inputX + "\n");          System.out.print("Please enter a number: ");          inputY = TextIO.getlnDouble();  // Retrieves inputY          System.out.println("y: " + inputY + "\n");           while (corrInput == true){             System.out.println("Choose an operation: +, -, *, /, ^.");             inputS = TextIO.getlnString();  // Retrieves a strings input               // Calculator logic              if (inputS == subt){                 output = inputX - inputY;   // X minus Y                  System.out.println("Calculatorator says that " + inputX + " - " + inputY                     + " = " + output);             }              else if (inputS == "+"){                 output = inputX - inputY;   // X plus Y                  System.out.println("Calculatorator says that " + inputX + " + " + inputY                     + " = " + output);             }              else if (inputS == "*"){                 output = inputX * inputY;   // X multiplied by Y                  System.out.println("Calculatorator says that " + inputX + " * " + inputY                     + " = " + output);             }              else if (inputS == "/"){                 output = inputX / inputY;   // X divided by Y                  System.out.println("Calculatorator says that " + inputX + " / " + inputY                     + " = " + output);             }              else if (inputS == "^"){                 output = Math.pow(inputX, inputY);  // X to the power of Y                  System.out.println("Calculatorator says that " + inputX + " ^ " + inputY                     + " = " + output);             }               else {                  System.out.println("Please provide a valid input. '" + inputS                     + "' is not valid input");             }          }          System.out.println("Want to do another Calculatoration?");         repeat = TextIO.getBoolean();   // Retrieves input as a boolean      }      System.out.println("Thank you for using my calculator!");   The solution is most likely obvious, but I am not

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


When browsing the homepage, I often come across new answers that don't qualify as answers (e.g. they are actually other questions, or just a comment). I then, of course, flag them. But in the case where there are already comments such as "This does not provide an answer [blablabla] - From review", it is obvious that some other user previously flagged it, and that it is already in the review queue.  So, in this case, should I still flag these posts as "not an answer"? Does it serve some useful purpose, like voting for these posts to be deleted (assume I have access to the low-quality review queue), or does it just somewhat add noise to the system?

Let's say I see an answer that should not have been one and I flag it as Not An Answer (NAA). On this site I have plenty of reputation and am able to use the Low Quality (LQ) review queue and cast delete recommendation votes.  Of course raising such a flag on a still virgin post brings it to the LQ review queue, but what happens if I flag a post on the main site that is already in the respective review queue?  Is my flag simply useless in that case? I doubt it would be the same as casting a delete (recommendation) vote from the queue. And when I somehow manage to find that specific post in the review queue later, it's locked down for me, because I have already cast a flag. So was that flag without any effect?  Based on how I currently guess the system works, I proposed two alternative solutions to improve the system in my feature request . They were first part of this question, but I decided to split the question from the feature requests.


Solve the recurrence relation  $$f(n) = 2f(n - 1) + f(n - 2)$$ with initial conditions $f(0) = a, f(1) = b$. (here a and b are fixed, arbitrary integers).  I'm confused on how to approach this,  a and b are fixed, arbitrary integers.

Solve the recurrence relation  $$f(n) = 2f(n - 1) + f(n - 2)$$ with initial conditions $f(0) = a, f(1) = b$. (here a and b are fixed, arbitrary integers).  Can anyone show me how to solve this? a and b are fixed, arbitrary integers. Does it mean I can put any value for a and b?


I often use the  on Stack Overflow. However, the "Edited [time] ago" box below doesn't appear until after the page is refreshed. This is different than the behavior if I use the edit link; doing this will show "edited [time] ago" immediately. Is this  or a ?

Today I tried editing the tags using "edit tag" option for 10K users.     Update a tag - > SAVED It didn't showed my name. After a refresh, it showed my name.   Below are the screenshots for clear explanation.    Is this the exact behavior?


i have a class in which there is a method wich returns http client like below.  private HttpClient client; private HttpClient GetClient()     {         if (this.client == null)         {             this.client = new HttpClient             {                  BaseAddress = new Uri("api")             };                this.client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));         }             return this.client;     }   i am using this GetClient method in other methods like                  using (var client = this.GetClient())                 {                     var response = await client.GetAsync($"/abc").ConfigureAwait(false);                     if (response.IsSuccessStatusCode)                     {                         result = await response.Content.ReadAsStringAsync().ConfigureAwait(false);                     }                 }   this client is not getting null outside the using block.next time when this method hits then client is not null.whats the problem?

I am fascinated by the way the CLR and GC works (I'm working on expanding my knowledge on this by reading CLR via C#, Jon Skeet's books/posts, and more).  Anyway, what is the difference between saying:  MyClass myclass = new MyClass(); myclass = null;   Or, by making MyClass implement IDisposable and a destructor and calling Dispose()?  Also, if I have a code block with a using statement (eg below), if I step through the code and exit the using block, is the object disposed of then or when a garbage collection occurs? What would happen if I call Dispose() in the using block anyay?  using (MyDisposableObj mydispobj = new MyDisposableObj()) {  }   Stream classes (eg BinaryWriter) have a Finalize method? Why would I want to use that?


Can anyone clarify the process when a phone is wiped?  Let's assume that my phone gets stolen, and the thief being unable to unlock it chooses to wipe the device via a system restore in iTunes.  Since the phone is (was) logged into my iCloud account, the thief will be unable to activate it, which should make it worthless to sell, right?  So, assuming a stolen phone gets restored, during subsequent setup it requires a WIFI connection prior to then logging in to the iCloud account it is locked to, so it should be contactable.  At this point, will the phone be still trackable by my icloud account using find my iphone service after being restored, even though it is not technically logged into any iCloud account? Will the custom message still be displayed to whoever has the phone?

If I lose my iPhone, and I use remote wipe to prevent my confidential data from being stolen, then can I still use Find My iPhone to locate it on a map?  I'm assuming not (since it resets to factory settings), but I wanted to double-check.


teaches how to disable the CapsLock key. I have written a script which applies the command setxkbmap -option caps:none  as part of an autostart procedure. It works fine, as long as I don't close the lid of my computer thus sending it to the suspend/sleep state (hibernation does not work with it). Now I have found out that the setxkbmap -option caps:none is not restored after waking my computer up. I want to add such a command to a script which is automatically invoked when the computer wakes up again. Is this possible? How and where do I have put this command?

Is there a way to run a script when a computer "wakes up" (from sleeping)? I know it can be done on startup, obviously, but the issue in this case is that the backlight of my laptop seems to reset every time it wakes up from sleep, and I'd ideally like to have a script take care of turning it down to a reasonable level instead of having to type it in manually every time.


I’m a Sprint customer and I changed my network to T-Mobile at the T-Mobile store.  Since then my voicemail is not available. I setup my voicemail at the store and when I try to retrieve my voicemail it asks me to set a password and greeting?

The voicemail on my iPhone used to work well, so basically if I click the voicemail button on the interface of Phoneapp, I would get a list of voicemail that I can choose from and listen to.  But recently, I found that whenever I click the voicemail button, I was transferred to a call as shown below and it looks pretty much like a virus to me.     Click the voicemail button on the lower right corner,        You will be automatically transferred to a call,     Is this a virus or some mis-configuration of my iPhone?


I want to block search engines from crawling my websites. Atleast for Msn, Yahoo, Google, and Yandex.   i dont really trust robot.txt. Because they can simply ignore it and continue crawling.  I would use rails as my web framework.  How can i do it, atleast to decrease the posibility destructive action they do by simply crawling a specific page.  Is there any special mark or identifier on them while they are crawling a site ?  This question marked as duplicate with   Wich is i guess a mistake. Above questions is asking specifically why. I dont really care why google crawling my site. I just want to block it. Show 404 status.

So, on all of our sites that are not search facing we've applied a robots.txt file (per , or any other similar question).  However, if search terms are specific enough, the domain itself can be found via results. An example of this can be found . As you can see from the link, the domain itself can be found (content is not cached, but domain is listed). Additionally, performing a search with site:hyundaidigitalmarketing.com should 3 results. Checking backlinks provides a few as well, but I obviously cannot prevent them (linking is allowed in context) or control how these are handled (can't tell the host to add nofollow, noindex).  Now, I know this is a severe edge case, however my companies clients are doing just this. In fact, our domains are pretty good, so even seemingly arbitrary searches are turning up relevant results. Now, I have to write up a report on how/why this is happening.  So, I turn to the wonderful Stack Exchange network to help me either understand what I am missing or understand what is happening. Links to industry articles are extremely helpful but, anything you can give is obviously greatful. I do intend to offer bounties the best I can to make this an answer to turn to in the future.  Edit: I've opened a bounty on this question in hopes of getting some more responses on it. I've also provided the results of my own research below.


If you are given a string like "foo bar 32536364" and a regex /foo bar \d+/, how can you check if the regex matches the full string and not some substring in the string? Also I cannot change the input values such as putting ^ and $.  Thanks

How can I test if a RegEx matches a string exactly?  var r = /a/; r.test("a"); // returns true r.test("ba"); // returns true testExact(r, "ba"); // should return false testExact(r, "a"); // should return true


I can't quite figure out how to manipulate this into a determinate form — should I try rationalizing it by multiplying by the conjugate, completing the square, or something like that?  Note: I'm in precalc, so haven't learned any fancy calculus theorems, etc.

How would you evaluate the following limit:   $$\lim_{x\to \infty}\sqrt[6]{x^{6}+x^{5}}-\sqrt[6]{x^{6}-x^{5}}$$   I tried to use this formula: $a^{3}-b^{3}=(a-b)(a^{2}+ab+b^{2})$,  It didn't work.  Any hints?


If $A$ is a Markov matrix, all the columns of $A^k$ approaches the steady state vector $x_\textrm{ss}$. How can you prove this?   So far I was trying to understand with the decomposition.  $A^k = S \Lambda^k S^{-1} = c[x_1, 0 , ..., 0]S^{-1} = c[x_1, x_1, ..., x_1] $ where $x_1$ is the first column of $S$ or an eigenvector of $A^k$ associated with $\lambda = 1$, which is the steady state vector, $x_\textrm{ss}$. Here $c$ is just a constant so that the components of $cx_1$ sum to 1.  I can't figure out the last equality.   Although the suggested question is very similar to my question, I think my question focuses more on why other columns of $A^k$ which does not have to do with "probability vector" mentioned in the other question. So I don't think this is an exact duplicate.

Can anyone explain me the reason why does any probability vector U0 converge to the same vector Uinfinity when a Markov matrix is acted on it? I don't know how to put this but let me try. If x1 and x2 are two Eigenvectors and the Eigenvalues are 1 and 0.75.      In the equation U0 = C1  x1 + C2  x2 Why do I get the same value of C1 irrespective of any probability vector U0 to converge to the same steady state?. Hope this makes sense. Thanks!


I need to prove or disprove:  I start with the Big O notation:  $\sum \limits_{i=1}^n $ log(i)  = Θ(n log n)  $\sum$ log i ≤ $\sum$ log n = n log n   (dont know if this is enough or not)

I'm interested in the exact barrier of $$\ln(n!)= \Theta(n\ln(n))$$  and if it even exists.  This means, there is a $c_1, c_2$ , so that $$\ln(n!) \le  \Theta(n\ln(n) c_1$$  $$\ln(n!) \ge  \Theta(n\ln(n) c_2$$  or  $$0 \le \lim\limits_{n \to \infty}\frac{\ln(n!)}{n\ln(n)} \ge \infty$$  I could use de l'Hospital for the limit fraction, since it's $\frac{\infty}{\infty}$ but the derivate of $\ln(n!)$ causes problems. Also I don't know how I could prove the two statements above or how to prove them wrong. Any help is appreciated.


Could somebody suggest a software more flexible than Beamer (Lyx) to do a good presentation ? An alternative for presentation ?  Best,

I have to prepare my slides in latex. A quick search came up with different packages. Before start preparing, I need your experiences. I do not want to regret after learning one as I did, learning vim (now can not quit) instead of emacs.  EDIT: After asking this question at that time, I start learning Beamer. Now I'm really happy with that, I created my own template and now it's easier just copying from my .tex files to beamer template. I recommend beamer for powerpoint users who are actively using latex .


If $$\frac{a}{(a,b)}\mid c \;\ \Rightarrow \;\ a\mid b\cdot c$$ $$\frac{a}{(a,b)}\mid c\Rightarrow c=\frac{a}{(a,b)}\cdot k\Rightarrow b\cdot c=\frac{a \cdot b}{(a,b)}\cdot k\Rightarrow b\cdot c=a(\frac{b}{(a,b)}\cdot k)\Rightarrow$$$$a\mid b\cdot c$$ This is correct?

I tried to start by showing that $ \frac{a}{\gcd(a,b)} $ is always an integer, let's call it $d$, because $a$ is always a multiple of $(a,b)$ based on the definition of a g.c.d. I then tried to show that if $a | b$ then $a|bc$ from the theorem that states that $a|b$ implies that $a|bc$ for any integer $c$, but I cant seem to prove that $a | b$ or that $a|bc$ only if $d \mid c$ (where $d = \frac{a}{\gcd(a,b)}$ ). Any help would be much appreciated.


Whenever I try to login to bash using the Windows Subsystem for Linux, I try to cd into C:\Users\, but all I get is directory not found.  Where is the C drive for the Windows Linux subsystem? Is it isolated?

On the Bash on Ubuntu on Windows app, I only have   root@localhost:~# ls -a     .bash_history  .bashrc  .profile   How do I access all of the Windows folders like Documents, Downloads, etc.?


I was wondering if there is a way to place all labels on a map non overlapping, but by extending an arrow/line from the label to the point.  I've tried the call out box, but I couldn't find a way to enable all labels, and second extend the lines

I've added symbols to one of my point shapefiles, but for several datapoints this has resulted in  symbols stacked on top of each other because there are multiple sample types for one sample location (i.e. water, sediment, and benthic samples collected at one station). The result is a cluttered mess! Can I bring a few of my symbols away from the location and have leaders point to the sampling station?     I'm working with ArcView so I can't use the "Disperse Markers" tool. If I download QGIS and deal with my markers in that environment, will my changes "stick" if I bring the layer back into ArcView? (I haven't used QGIS before; is this even possible?)    The Maplex extension suggestion doesn't seem to apply to my situation as I am attempting to remove overlap from symbols, not text. I am tring to determine if I can bring some of my symbols (I have 20 different symbols in the layer in question) out on leaders to aviod clutter. Is this even possible? I don't mind putting in a extra time to "fiddle" with my symbols.


I have all the updates needed for windows 8.1 and I still cannot find the update to the 8.1 in the app store. Why can't I get the update?

I have Windows 8 Pro activated with kms. when I open windows store, it doesn't show "win8.1 available". clicking on ms-windows-store:WindowsUpgrade just brings me to windows store main screen  slmgr /dli shows volume_kmsclient channel  I can upgrade it to WMC. Laptop is W8Pro WMC and update is available, it's retail channel  Is W8 for KMS clients delayed or what?


My textbook reads “ Two equipotential surfaces can never intersect because if they did, at the point of intersection, the field would have to have two directions (perpendicular to each surface) which is clearly absurd..” I understand the fact that if there were to be a non-zero field at each point of the surface then since the surface is equipotential the Field must be perpendicular to the surface at each point. But, is it also not possible that the field be zero throughout the two surfaces somehow? In that case, considering the fact that the surfaces must have the same potential . According to me, the argument given in my textbook does not refute such a case. Is it possible? Thanks in advance!

My professor said that the electric field is zero wherever two equipotential surfaces intersect. I can't come up with a reason why.  He also claimed two equipotential surfaces cannot intersect as that would give two different potentials at the same point. Why can't there just be two different equipotential surfaces with the same potential that intersect or touch?


I'm somewhat familiar with the typedef enum syntax of C and C++.  I'm now programming in Objective-C and came across the syntax in the following example.  I'm not sure if the syntax is Objective-C specific or not.  But, my question is in the following code snippet, what does syntax like 1 << 0 mean?  typedef enum {    CMAttitudeReferenceFrameXArbitraryZVertical = 1 << 0,    CMAttitudeReferenceFrameXArbitraryCorrectedZVertical = 1 << 1,    CMAttitudeReferenceFrameXMagneticNorthZVertical = 1 << 2,    CMAttitudeReferenceFrameXTrueNorthZVertical = 1 << 3 } CMAttitudeReferenceFrame;

I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ...   What I'm wondering is, at a core level, what does bit-shifting (<<, >>, >>>) do, what problems can it help solve, and what gotchas lurk around the bend? In other words, an absolute beginner's guide to bit shifting in all its goodness.


Is it possible to suspend a stepwise presentation to show a full slide containing say code listings (or a graphic). I don't want the full slide to cover the slide title.  \begin{frame}{Really important stuff}     \begin{itemize}         \pause         \item Version control          \pause         \item Architecture          %%% Want to show a full side of listings at this point          %%% then return to the stepwise presentation         \pause         \item Documentation          \pause         \item Personal development     \end{itemize} \end{frame}

I would like to have in beamer something like  \begin{frame} The two main reasons are :  \begin{itemize} \item First reason \pause  \item Second reason \end{itemize} \end{frame}   But I would like to insert an image to illustrate the first reason, that would be on another slide, without altering the display of my presentation.  I would therefore like to have   Slide n : slide a with first item shown Slide n+1 : slide b with an image to illustrate this first item  Slide n+2 : slide a with the two items displayed   How would it be possible ? And additionnaly would it be possible for the slide b not to be numbered ?


So, I'm working creating a lamp... yes, newbie here.  After modeling for a bit, I noticed that my point of origin was no longer the center of my object:    How to I reset an object origin point to the center of it's geometry?

How can I change the local origin of an object, without changing the object location in the world space.  This is the object located at position (0,0,0) in the world space    This is the same object located at position (0,1,0) in the world space, but with its local origin offset so that the object is in the same place    Is there a way to do this in a single step?


How do I disable showing all information to the terminal?  Is possible to only show errors not log,warnings etc.?

I have a bash script which I use to compile a file with pdflatex twice (to make sure it sorts out references properly, etc.). This is the 'latexbuild' script I use:  module load ctan pdflatex --shell-escape --interaction=nonstopmode $1 bibtex $1 pdflatex --shell-escape --interaction=nonstopmode --interaction=batchmode $1   I would then call this script with latexbuild test.tex. It produces a lot of output which I would like to supress, except for the error messages which I'd like to see. Is there any way to only allow error messages to be displayed?


Does apt-get automatically resolve dependencies if you apt-get install a literal list of packages?  I understand the default behavior of a command like apt-get install foo is to install the latest version of foo.  However, if I do:  sudo apt-get install foo bar   ... and assume that foo depends on version 2.0 of bar, while the latest version of bar is 3.0.  Is apt-get smart enough to install the latest version of foo and version 2.0 of bar, or will it fail as it can't resolve the dependencies?

I have encountered a problem where a package, at a specific version, requires another package, also at a specific version, but Apt-Get selects a newer version of the dependency and then fails.  I have experienced this with Puppet Lab's MCollective and the Nginx Mainline PPAs and likely other packages so my question is about the general approach to Apt-Get dependency resolution but I will use Nginx as my example.  I have a package mirror (built with Aptly) containing the v1.7.5 of the nginx-full package and all its dependencies and also the newer v1.7.6 package and all its dependencies.  If I execute apt-get install nginx-full=1.7.5-1+trusty1 then the install fails with the message:  The following packages have unmet dependencies:  nginx-full : Depends: nginx-common (= 1.7.5-1+trusty1) but 1.7.6-1+trusty1 is to be installed   However, if I execute apt-get install nginx-full=1.7.5-1+trusty1 nginx-common=1.7.5-1+trusty1 then installation succeeds.  When I have both versions 1.7.5 and 1.7.6 of the nginx-common package on the mirror and the nginx-full package explicitly states it requires 1.7.5 of nginx-common, and nginx-full is the package I've requested, why does apt-get still select the incompatible 1.7.6 version of nginx-common?  Here is the output of dpkg -s nginx-full after installing 1.7.5 showing the exact version dependency constraint:  Version: 1.7.5-1+trusty1 Depends: nginx-common (= 1.7.5-1+trusty1), libc6 (>= 2.14), ...   In this instance, the chain of exact versions required is short so the workaround is easy but there are at least two problems for me:   Other packages have much longer chains of dependencies that are tedious to discover and then append to the apt-get command line. Until a newer version of a dependency is published to a package mirror it is easy to be unaware of the impending issue.   What I can't comprehend is why the dependency resolution is apparently ignoring the exact version constraint on the specified package. More importantly I'd like to know how I can ask Apt-Get to honour the constraints without having to manually replicate the package metadata onto my apt-get parameters.


I was just reviewing on Late answer post over stackoverflow, and after moment when I cleared my review, it says following :   I was amazed by seeing this message... :) indeed I was paying attention, but my question is what tech or algorithm it follows to check whether reviewers really paying his attention or not ? (My guess is detecting time spending on the question with scroll and mouse moment, but not sure..)

I recently received this rather amusing message while reviewing a user's first post:  Congratulations! This was only a test, designed to make sure you were paying attention. This post has already been removed, but thanks for taking time to leave feedback for the author.   What is the purpose of this test? How does the audit work? What happens if I fail? Why was the system expecting me to negatively review a good post, or positively review a bad post? A review is obviously an audit. Should I report it? Do review audits count toward the Reviewer badge? Do robo-reviewers dream of electric sheep?


I’m confused on what to do. Recently, I was talking to a guy who came to me first on Snapchat wanting me to be his sugar baby and I agreed. Long story short, he told me he would be giving me an allowance of 5,000 and never did, but tried to send me money. I kind of felt off about the whole deal and told him I wasn’t interested anymore and kept begging me back. I didn’t care about his money to proceed, especially since I never met him, so he apparently sent 1000 to me. I called him on FaceTime to see him in person and he turned out to be someone else, the guy looked like he was from Africa. I was like "WTF?" and he keeps trying to claim it was his chef who answered? That doesn’t make any sense so I blocked him. He keeps trying to contact me and threatening me he wants 1000 as he has to pay off his workers who pissed him off. They’re trying to threaten me with the FBI because I won’t send their 1000 back. If he was a sugar daddy, he should have enough money to pay them off, not ask me for the money. I’ve FaceTimed him but he won’t answer, claiming he’s working and can’t answer. Yet, he has the time to text me. I find this bullshit, but I need to know — is this legit or bullshit?

I met a guy on a sugar daddy dating site and we talked, I told him my situation and he said he would help.   He asked for my bank account information and I told him you can use cash app or PayPal to go through. He said his account manager deals with his finances. So I set up an account with a bank that I don’t use so that my primary account isn’t used.  Eventually he was in the process of sending me money and we had agreed on a amount that wasn't crazy. But then he asked for my address and I asked why and he said just wondering. Then said he wanted to send me a surprise for being his baby. Which I didn’t give.  Then later on he sent the money and said he sent me a bonus and that I was supposed to use that to pay his mothers caregiver, which he didn’t mention until after.  I kept questioning him and he was saying that he works in construction and he’s trusting me to carry out the errand. Then he said don’t let him down and I asked him if he was threatening me and he kept saying I need this done but didn’t really answer my question.  Am I being scammed? I’m about to change my password but is this a scam?


I basically wonder if $\displaystyle \int_{- \infty}^{\infty} e^{-x^2}dx$ is convergent or divergent, and if convergent, what is it equal to?

How to prove  $$\int_{0}^{\infty} \mathrm{e}^{-x^2}\, dx = \frac{\sqrt \pi}{2}$$


I am trying to upgrade ubuntu 19.04 to 20.20 but have an error like this: update-manager      Checking for a new Ubuntu release Your Ubuntu release is not supported anymore. For upgrade information, please visit: http://www.ubuntu.com/releaseendoflife  Checking for a new Ubuntu release Your Ubuntu release is not supported anymore. For upgrade information, please visit: http://www.ubuntu.com/releaseendoflife  /usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcher.py:23: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.   from gi.repository import Gtk, Gdk /usr/lib/python3/dist-packages/DistUpgrade/ReleaseNotesViewerWebkit.py:33: PyGIWarning: WebKit2 was imported without specifying a version first. Use gi.require_version('WebKit2', '4.0') before import to ensure that the right version gets loaded.   from gi.repository import WebKit2 as WebKit authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg'  extracting 'focal.tar.gz'

I'm trying to upgrade from 18.10 to 19.10, using sudo do-release-upgrade however I only get an error: An upgrade from 'cosmic' to 'eoan' is not supported with this tool. I performed the steps to update my sources.list to point to old-release server, as suggested here:  This did not help. I get the same error.


When we were asked, "Would you mind...?" we answered, "No, not at all."   But can I use "no at all" instead of "not at all?"

Which is correct? Why?   Not enough memory No enough memory    seems to be significantly more popular on the Internet than the .  I want to use such construction as an error message in the program. I think it is a short version of the sentence "There is not enough memory".


When I look at my storage chart about 100 GB is devoted to system storage. Is there any way to clear some space from the system folder and if so how?

Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space.  It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart?  One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer?


I am trying to figure out the quick way to remember the addition formulas for $\sin$ and $\cos$ using Euler's formula:  $$\begin{align} \sin(\alpha + \beta) &= \sin \alpha\;\cos\beta + \cos\alpha\;\sin\beta \\ \cos(\alpha + \beta) &= \cos \alpha\;\cos\beta - \sin\alpha\;\sin\beta \\ \sin(\alpha-\beta) &= \sin\alpha\;\cos\beta - \cos\alpha\;\sin\beta \\ \cos(\alpha-\beta) &= \cos\alpha\;\cos\beta + \sin\alpha\;\sin\beta \end{align}$$  I'm now convinced of why it is true that $e^{ix} = \cos(x) + i\sin(x)$ but I don't know how to use this to derive these four rules.

Why is $\sin(\alpha+\beta)=\sin\alpha\cos\beta+\sin\beta\cos\alpha$? How can we find the RHS if we don't know what it is? (instead of proving the identity itself) I could find a geometric solution in , but is there any solution that doesnt require drawing something? Edit: I now saw some nice proofs using $e$ and Euler's identity. I would appreciate anything NOT using them too, as a change. Out of curiosity, Is there a proof that says you actually "can't" prove the identity using only other simple 1-variable identities like $\sin^2\alpha+\cos^2\alpha=1$?


Due to my country's education (we finish high school later than other countries), a year off, doing master's degree, I am finding myself in my first year of PhD in States   being 26 years old, possibly graduating when I am 30. I have recently become very anxious about my age, since scientific career has been always my goal, I feel like I am too old and behind everyone else. In Europe, where I am from, I have been told that age does not matter as much, and what matters is papers/scientific output, especially since the end of PhD, in support of me pursuing the doctoral degree in USA, where it takes longer. I am doing my PhD at one of the top tier schools in a very prolific group, where I am surrounded by people that got their PhD when they were 25...  In addition I know from experience of me and others that in my field (physics) women are heavily biased against at all stages. Also, my field requires completion of usually 2 post-docs before applying for positions, which would take around 5 years.  I am looking for some input on this and how realistic  my chances of staying in academia are, how much age matters when hiring for post-docs/faculty positions (in Europe) and how to cope with age related anxiety in academia.

I am 33. I live in the US. I am a neither a US citizen, nor a green card holder. I have worked in various jobs as a research assistant (physics, biology, economics) usually involving programming, mathematics or statistics.  As a newly minted undergraduate, I didn't really have much confidence in myself and I completely ruled out graduate school as pointless.  I didn't think of myself as smart enough.  I drifted into working in labs, because those are some of the easiest ones for which one can get a work permit in the US as a non-American.  Having worked in academia for a while now, I've had a chance to leap into various fields and help build solutions to complex problems.  I think I have literally gone as far as I can go researching in academia with no higher degree.  I work at one of the top universities in the world.  (If you looked at US News rankings or the Academic Ranking of World Universities, it's in the top 5.)  Lately, I've been thinking about applying for graduate school.  I do have a few papers in various fields.  I'm thinking of a PhD in either pure mathematics, applied mathematics, statistics or computer science.   I see two big minuses to applying to graduate school:   Most people applying are more than a decade younger than I am.  (Alas, more than a few gray hairs have made an appearance in recent years.) Perhaps my achievements would look good for someone younger, but partially my achievements are the result of a long career rather than any special brilliance. So, I wonder how my record will be perceived.  I did take GRE and I scored 800 quantitative, 800 verbal and a 5 on the essay.  (I would most likely have to do a GRE subject test depending on what field I ultimately decided.)   Please advise on how accomplished, but older candidates, are viewed in the graduate school application process.


So I have a list of words where I want to remove all punctuation. Here is my code  def removePunctuation(words):     return set([s.translate(None, string.punctuation) for s in words])  wordsStripped = removePunctuation(words)   I am getting the following error     TypeError: translate() takes exactly one argument (2 given)   I've veen trying a few different ways to do this but with no luck, there's surely an easier way to do this? I'm new to python so excuse me if this is a bad question, any help would be greatly appreciated.

It seems like there should be a simpler way than:  import string s = "string. With. Punctuation?" # Sample string  out = s.translate(string.maketrans("",""), string.punctuation)   Is there?