\pagestyle{headings} causing \hbox warning due to long chapter name

I am being prompted with the following error while using \pagestyle{headings} on a book class LaTeX document:  Overfull \hbox (240.44835pt too wide) has occurred while \output is active \OT1/cmr/m/sl/12 CHAPTER 1. THE CITY OF CARTHAGE WAS THE CENTRE OF THE ANCIENT CARTHAGINIAN CIVILIZATION \OT1/cmr/m/n/12 2   The following is the offending code:  \documentclass[12pt,letterpaper,oneside]{book}  \pagestyle{headings}   \begin{document}  \pagenumbering{arabic}  \chapter{The city of Carthage was the centre of the ancient Carthaginian civilization} The city of Carthage was the centre of the ancient Carthaginian civilization. The city developed from a Phoenician colony of the 1st millennium BC into the capital of an ancient empire.[2] The area of Carthage was before inhabited by Berber people who also became the bulk of Carthage's population and constituted a significant part of its army, economy and administration. Native Berbers and settling Phoenicians in Carthage mixed in different ways including religion and language, creating the Punic language and culture.  The name of Carthage, Latin: Carthago or Karthago,  meaning "New City"   The first civilization that developed within the city's sphere of influence is referred to as Punic (a form of the word "Phoenician") or Carthaginian. The city of Carthage is located on the eastern side of Lake Tunis across from the centre of Tunis. According to Greek historians, Carthage was founded by Canaanite-speaking Phoenician colonists from Tyre (in modern Lebanon) under the leadership of Queen Elissa or Dido. It became a large and rich city and thus a major power in the Mediterranean. The resulting rivalry with Syracuse, Numidia, and Rome was accompanied by several wars with respective invasions of each other's homeland.  Hannibal's invasion of Italy in the Second Punic War culminated in the Carthaginian victory at Cannae and led to a serious threat to the continuation of Roman rule over Italy; however, the Romans gained the upper hand by invading Africa and defeating Carthage at the Battle of Zama in 202 BC. Following the Third Punic War, the city was destroyed by the Romans in 146 BC. However, the Romans refounded Carthage, which became the empire's fourth most important city and the second most important city in the Latin West. It later became the capital of the short-lived Vandal kingdom. It remained one of the most important Roman cities until the Muslim conquest, when it was destroyed a second time in 698.  The ancient Greek philosopher Aristotle wrote extensively on Carthaginian politics, and he considered the city to have one of the best governing institutions in the world, along with those of the Greek states of Sparta and Crete.[5][6]  \section{Topography} Carthage was built on a promontory with sea inlets to the north and the south. The city's location made it master of the Mediterranean's maritime trade. All ships crossing the sea had to pass between Sicily and the coast of Tunisia, where Carthage was built, affording it great power and influence.  \end{document}    The \hbox refers to:      How can I solve this issue using \pagestyle{myheadings}? Or how can I solve this issue keeping the book class heading format?


We have seen the Newton disc, when it is rotated it produces white color. So I want to know whether white exists as a single color or is that a combination of multiple colors?


Is it possible to compile but not showing a part?

If I have a chunk of code which I'd like to hide when compiling, is there something like      \noshow{chunk of code}   So this chunk of code is still compiled but just not showing in the PDF? I know I can comment this part but problem is if I edit my own commands, the commented codes are not compiled and checked.


How did the Big Bang cause the cosmos to be infinitely large?

If the cosmos is product of the big-bang as we think then it would seem there is a problem with the probability of it's supposed infinity (as it was initially finite). In addition, the rate of it's expansion is also finite. On account of this, how can we consider it to be infinite?


$\text{Gal}(\Bbb Q(\sqrt{p_1},...,\sqrt{p_n})/\Bbb Q)=(\Bbb Z/2\Bbb Z)^n$

Let $p_1,...,p_n\in\Bbb N$ be distinct primes. Compute $\text{Gal}(\Bbb Q(\sqrt{p_1},...,\sqrt{p_n})/\Bbb Q)$  Intuitively, $G:=\text{Gal}(\Bbb Q(\sqrt{p_1},...,\sqrt{p_n})/\Bbb Q) = (\Bbb Z/2\Bbb Z)^n$. My first idea is that if $\sigma\in G$, then $\sigma(\sqrt{p_i})=\{\sqrt{p_i},-\sqrt{p_i}\}$ for each $i$. Hence, from this, pick $\sigma_i\in G$ such that $\sigma_i(\sqrt{p_i})= -\sqrt{p_i}$ and $\sigma_i(\sqrt{p_j}) = \sqrt{p_j}$ for all $j\neq i$. Then, $\sigma_i$'s generates $G$ and each $\sigma_i$ does not generates $\sigma_j$ if $i\neq j$, $G = (\Bbb Z/2\Bbb Z)^n$. Is this valid? Another way to do this is using the fact that 'if $K/F,L/F$ are both Galois and $K\cap L =F$ then $\text{Gal}(KL/F)\simeq\text{Gal}(K/F)\times\text{Gal}(L/F)$', we inductively apply this. The problem is whether $\sqrt{p_i}\in\Bbb Q(\sqrt{p_1},...,\sqrt{p_{i-1}})$. Any hint or comment will be appreciated.


Is it correct to do a one tailed test based on observed direction?

Suppose I am testing whether there is a difference between the mean of two normally distributed variables X and Y, where X ~ N(u_1, 1), Y ~ N(u_2, 1). Is it theoretically correct if I compute the p-value as P(X-Y > delta_xy) if the observed delta_xy is positive, and P(X-Y < delta_xy) if the observed delta_xy is negative? Here delta_xy is the difference between the sample mean of X and Y. In other words, can I do a one-tailed test based on the direction already been observed?  It is of note that if I compute the p-value like this, the "worst" p-value I can get is 0.5, instead of 1. How to explain this?  // Following whuber's comment as an "post hoc testing", I give an example as represented in the boxplot, in which we first plot the data and see there is a difference in the mean, most likely we will do a test of mean(OJ) > mean(VC) instead of mean(OJ) != mean(VC), is this an "post hoc testing" abuse?


I have two byte arrays with the exact same content. I tried:  if (bytearray1 == bytearray2) {...} else {...}   and  if (Array.Equals(bytearray1, bytearray2)) {....} else {...}   All time it goes to the else! I don't know why! I checked both arrays manually several times!!!


A classical problem about limit of continuous function at infinity and its connection with Baire Category Theorem

When I google "baire category theorem", I get a  to Ben Green's website. And at the end of the paper, he mentioned such a classic problem:     Suppose that $f:\mathbb{R}^+\to\mathbb{R}^+$ is a continuous function with following property: for all $x\in\mathbb{R}^+$, the sequence $f(x), f(2x), f(3x),\dots$ tends to $0$. Prove that $\lim_{t\to\infty}f(t)=0$.   I find the problem 1.17 on P.27 of the book "", and on  gives the answer by prove the following lemma:      If $G$ is a unbounded open set of $\mathbb{R}^+$, then for any closed   interval $[p,q]\  (0<p<q)$, there exist a $x_0\in [p,q]$ such that   $G$ contains infinitely many points of the form $nx_0\ (n\in\mathbb{N})$.   But, on the above book, it also says:      If $\lim_{n\to\infty}f(nx)$ exists only for points $x$ in a nonempty   closed set without isolated points, then $\lim_{x\to\infty}f(x)$  also   exist.   I didn't find a proof for this result, I want to know whether for any nonempty closed set with no isolated points, the above lemma is true? and could someone tell me why Ben Green mentioned this problem on his paper (see the hint of his paper)?


Why a helicopter stays at same place with respect to earth while floating in air despite of rotation of earth?


Why do we believe space and time are intertwined? What is the idea behind it? And how do we arrive at this conclusion?

What led us to believe that space and time are actually interconnected? How did the idea actually originate? why do we believe that this concept is true?


Is it possible to have a case within a case, like if within a if

Is it possible to have a case within a case, I have seen examples of people using many ifs  if ($check1=1);then     if ($check2=2);then         if($check3=3);then         fi     fi fi   I'm not sure how do i put this example into the case within a case.


In Terraria, is there an order in NPC appearance in addition to the minimum requirements for each one?

I noticed a strange thing about Demolitionist that I do not see mentioned on .  Practically on my world I created immediately a good number of houses with  needed to accommodate an NPC.  The first NPC that arrived was the Nurse. Then I found many bombs but Demolitionist never came. He arrived just immediately  Merchant came, when I finally got the 50 silver coin needed for him.  Is this behavior correct? Is there and order in NPC appearance in addition to the minimum requirements for each one?


Example of a non commutative ring in which all non zero elements are invertible.

Im struggling to think of a ring that satisfies this. I thought maybe a subset of Mat$(2,\mathbb{R})$ with all elements in the General Linear group but I am not sure that would form a ring. Any suggestions?


Is there any difference between String... args and String[] args in Java?

What is the difference between String... args and String[] args in Java?  I'm new to Java programming. Can anyone plz tell me what's the difference between (String....args) & (String [] args) If I'll use first one in place of the second........Does it make any difference?  String... args will declare a method that expects a variable number of String arguments. The number of arguments can be anything at all: including zero.  String[] args and the equivalent String args[] will declare a method that expects exactly one argument: an array of strings.  One difference that might not spring out from those observations is that in the second case (but not the first) the caller may have a reference to the array. In both cases the method works with args as an array of Strings, but if it does things like swap the array elements this will not be visible to the caller if the String... args form is used.


I have an array of arrays which I have planted in the DOM, so that I can reuse it at a later stage to transfer to the server: [["1","aaaaaa","1"],["2","bbbbbbb","2"],["3","ccccccc","3"]]  If I would like to convert it back into a Javascript array, how would I go about doing this?


Black or purple screen instead of log in

Ubuntu 16.04 boots to a black screen.  I'm using nvidia gtx 580, and it was running smoothly before something happened.     When I open tty7:   /dev/sda1: clean, blahblah/blahblah files, blahblah/blahblah blocks.  There is webmin and teamviewer installed. When I access this machine from teamviewer, I can see the log in screen, but when I try to log in, it kicks me out of teamviewer after a few seconds. Even with monitor attached. I reinstalled and tried different video drivers. Now it boots to a purple screen instead. I still have access to tty. I uninstalled teamviewer, and that did not help either. I can confirm that everything else is working, because I have full access to webmin and tty, all files and servers are running as they should. Maybe I messed it up when trying to install a fake monitor? I tried reinstalling xorg along with ubuntu-desktop completely. When I run shutdown from webmin or tty, I can see the purple screen with UBUNTU logo and animated orange dots, while it's shutting down.   It's hard for me to say when exactly this happened. Probably it could happen when either I messed up with xorg files trying to install a fake monitor for teamviewer or when I ran an update for all installed apps from webmin.  I know I could do a fresh install of Ubuntu but that would be my last option.    Tried solutions:   Reinstalling Xorg Reinstalling nvidia drivers, version 364, latest version, and system76 drivers, none helps. The only difference is that the screen is either black or purple. Reinstalling ubuntu desktop     UPDATES:  When I tried to run sudo gedit /etc/default/grub I got an error:   gtk-WARNING **: cannot open display:   Reinstalled drivers again, and when I try to run X -configure I get an error: No devices to configure, I DO have nvidia in List of video drivers.  I changed video card from GTX 580 to 7800 GTX (yeah, the very old one), no changes.  Ubuntu from live cd works with UI, without any problem on any of those cards.  There is no xorg.conf file created neither in my ubuntu installation, nor on live-cd version.    Please, help! Thanks for your time!


How can I add the word "Chap" before the chapters numbers in the Toc in class report?

At here  the word Chapter added in \documentclass{book}. Now I want to use them in \documentclass{report}. How can I do that?


how can I find the Side length Two squares inside an equilateral Triangle?

Question: Figure shows an equilateral triangle with side length equal to  $1$ . Two squares of side length  a  and $2a$  placed side by side just fit inside the triangle as shown. Find the exact value of  $a$.  Its an Assessment question from edX course "A-Level Mathematics Course 1"  and I am supposed to use skills that I learnt in Indices and surds,Inequalities and The Factor Theorem. I have tried finding the height of triangle and then use similar triangles to find the right triangle length still No luck. I am just looking for food for thought or very small hints thats all.


Character from an array of strings -- Java

I've got lines set up something like this:  A a-type_value B b-type_value C c-type_value B b-type_value C c-type_value C c-type_value A a-type_value   My Java code is reading lines like those from a file like so:  BufferedReader reader = new BufferedReader(new FileReader("C:\\Path\\to\\File.txt"));         try {           while (true) {             String line = reader.readLine();             if (line == null) break;             String[] fields = line.split("\t");             LineProcess(fields);           }         } finally {           reader.close();   The LineProcess() method looks like this:  public static void LineProcess(String[] input)     {         int result = 0;         String datetime = null;         System.out.println(input[0]);         if (input[0] == "A") {             result = Integer.parseInt(input[1]);             System.out.println(result);         }         if (input[0] == "B") {             bvalue = input[1] + input[2];             System.out.println(bvalue);         }         if (input[0] == "C") {              System.out.println(input[1]);         }         //System.out.println(input.length);         //for(int i = 0; i < input.length; i++)          //  System.out.print(input[i] + " ");         //System.out.println("");     }   Although there are A's, B's, and C's in my input, the if statements are never catching them.  I'm sure I'm making a simple mistake.  Thanks


Python (3.4) Recursion function not being called on dict/tree flattening

I'm trying to flatten a nested dictionary while also swapping out its keys according to another nested dict.  I assume that none of the branches will have identical keys.  E.g.:  In:  values_dict_test = {"abs": 3, "cd": 23, "sdf": "abc", "gxr": {"rea": 21, "bdf": 95}} mapping_dict_test = {"abs": "one", "cd": "two", "sdf": "three", "gxr": {"rea": "four", "bdf": "five"}}   Expected Out:  {"one": 3, "two": 23, "three": "abc", "four": 21, "five": 95}  I'm using the iteritems hack to try to make this code compatible with Python 2.7, but am testing on 3.4.  I've added a bunch of print statements to trace execution; it appears the recursive call never actually happens.  try:     dict.iteritems except AttributeError:     # Python 3     def itervalues(d):         return iter(d.values())     def iteritems(d):         return iter(d.items()) else:     # Python 2     def itervalues(d):         return d.itervalues()     def iteritems(d):         return d.iteritems()  def flatten_dict(mapping, values_dict):     print("Function called with {} and {}".format(mapping, values_dict))     for (key, value) in iteritems(mapping):         print("K: {} V: {} Mapping: {}".format(key, value, mapping))         if isinstance(value, dict):             # Note that we have to flatten the values_dict as we flatten             # mapping dict, hence the [key]             print("Going to recurse")             print("Passing {} and {}".format(value, values_dict[key]))             flatten_dict(value, values_dict[key])         else:             print("Going to yield {}, {}".format(value, values_dict[key]))             yield (value, values_dict[key])  values_dict_test = {"abs": 3, "cd": 23, "sdf": "abc", "gxr": {"rea": 21, "bdf": 95}} mapping_dict_test = {"abs": "one", "cd": "two", "sdf": "three", "gxr": {"rea": "four", "bdf": "five"}}  for (x,y) in flatten_dict(mapping_dict_test, values_dict_test):     print(x, y)   OUTPUT:  Function called with {'cd': 'two', 'sdf': 'three', 'abs': 'one', 'gxr': {'rea': 'four', 'bdf': 'five'}} and {'cd': 23, 'sdf': 'abc', 'abs': 3, 'gxr': {'rea': 21, 'bdf': 95}} K: cd V: two Mapping: {'cd': 'two', 'sdf': 'three', 'abs': 'one', 'gxr': {'rea': 'four', 'bdf': 'five'}} Going to yield two, 23 two 23 K: sdf V: three Mapping: {'cd': 'two', 'sdf': 'three', 'abs': 'one', 'gxr': {'rea': 'four', 'bdf': 'five'}} Going to yield three, abc three abc K: abs V: one Mapping: {'cd': 'two', 'sdf': 'three', 'abs': 'one', 'gxr': {'rea': 'four', 'bdf': 'five'}} Going to yield one, 3 one 3 K: gxr V: {'rea': 'four', 'bdf': 'five'} Mapping: {'cd': 'two', 'sdf': 'three', 'abs': 'one', 'gxr': {'rea': 'four', 'bdf': 'five'}} Going to recurse Passing {'rea': 'four', 'bdf': 'five'} and {'rea': 21, 'bdf': 95}   (Normally, I'd use values = {key: value for (key, value) in values_dict_gen} where values_dict_gen is the generator returned by that function.)  EDIT: In favor of reopening, (1) the duplicate linked to uses a mutable default argument, which is known to behave counter-intuitively in these situations (2) it's older, and the answer given below shows a Python 3.3 solution I didn't see on the older question.


Are bounty placers notified of comments?

are described at length, but don't address bounties.   If I put a bounty on someone else's question, will I be notified of undirected comments? Can people notify me via @-replies even if my only involvement with the question is putting a bounty on it?   If the answer to one or both is no, could we get a new feature putting anyone with a bounty on a question on par with the question's author for the purposes of comment @-replies?  Or, if not, at least add them to the list of @-reply targets to allow messaging them?  This was all prompted by  from DanQ that had a bounty put on it by rabidsnail, presumably because she had the same problem.  Once it showed up on the Featured Questions list, people asked for more information in comments.  DanQ never responded, and may well not have cared about the question by that point.  Presumably rabidsnail cared, but did she get any notification about the comments requesting more info?  (I assume rabidsnail checked in on the question at some point, and obviously didn't add more info then, but maybe she would have had she known sooner.)  There's also the question of proper etiquette when elaborating on a question that's not yours, but that's beyond the scope of this question.


Passing form data and file to php using ajax

This might have been asked before, but i have search on here and on google and every answer I have read doesnt work.  The question I have to solve is make a form with first name, last name, email and a image. Then pass the data into a database and upload the file also to a database. Currently my code doesnt do anything after I press submit. Before I added the file box it would insert the data into my database.  HTML  <form id="myForm" method ="post" enctype="multipart/form-data">     First Name: <input type="text" name="fname" id="fname">
     Last Name: <input type="text" name="lname" id="lname">
     Email:  <input type="text" name="email" id="email">
     Image: <input type="file" name="image" id="image">
     <button type="button" name="btnSubmit" id="btnSubmit"> Submit </button> </form>   AJAX/JS  $("#btnSubmit").click(function(){      var formData = new FormData($(this)[0]);      $.ajax({         type: 'POST',         url: 'form2.php',         data: formData,          success: function (data) {            alert(data)          },       });   });   PHP  $upload = basename($_FILES['image']['name']); $type = substr($upload, strrpos($upload, '.') + 1); $size = $_FILES['image']['size']/1024;   if ($_FILES["image"]["error"] > 0) {     echo "Error: " . $_FILES["image"]["error"] . "
"; } else {     echo "Upload: " . $upload . "
";     echo "Type: " . $type . "
";     echo "Size: " . $size . " kB
"; }  $fname = $_POST['fname']; $lname = $_POST['lname']; $email = $_POST['email']; echo "You Entered
"; echo "First Name: ". $fname . "
"; echo "Last Name: ". $lname . "
"; echo "Email: ". $email . "
";


Find $\lim_{n\to \infty} \int_0^1 nx^n e^{x^2} dx$

The value of $$\lim_{n\to \infty} \int_0^1 nx^n e^{x^2} dx$$ is ____________(round off to three decimal places) I tried integrating by parts and bring out some recurrence relation , but it was of no use. However, I can show the limit to be greater than or equal to 1. $\int_0^1 nx^n e^{x^2} dx \gt \int_0^1 nx^{n+2} dx$ (using  $e^x\gt x $ for $x\gt 0$) $=\frac n{n+3}=1-\frac 3{n+3}$ Taking limit as $n\to \infty$ , proves my assertion. Please help me find the actual limit.Thanks in advance.


Below it is a very useful command to create a matrix. But it has a short point to me since it shows Parentheses not Square brackets. My question it how should I change this to show square brackets? I appreciate your answer. Thank you so much.  \[ K =   \underbracket{\begin{pmatrix}    K_1 & 0      & 0    \\    0   & \ddots &    0   \\    0   & 0      & K_n    \\    \end{pmatrix}}_{d\times M} \]


Prove that for any $x_0 \in X$ and any $r>0$, the open ball $B_r(x_o)$ is open.   My attempt: Let $y\in B_r(x_0)$. By definition, $d(y,x_0)<r$. I want to show there exists an $r_1\in\mathbb{R^+}$ s.t. $B_{r_{1}}(y)\subseteq B_r(x_0)$. Let $a\in B_{r_{1}}(y)$. Then, $d(a,y)<r_1$. For $a\in B_{r}(x_0)$, $d(a,x_0)<r$. I want to show $d(a,y)<r_1$ implies $d(a,x_0)<r$. By triangle inequality, $d(a,y)\leq d(a,x_0) + d(y,x_0) \rightarrow$  $d(a,y)<r_1\leq d(a,x_0)+d(y,x_0)<2r...$  I'm a little stuck after this point.


Let's say I have 1m of 2,5mm² copper wire, insulated with H07V-K. The wire carries 40A and environment temperature is 25°C. The wire is suspended in free air. How hot will the wire get? And how can I calculate it for other values?  The use case is a 12V-230V AC converter I want to hook up to my car and determine the minimum wire thickness required. Because it's only used from time to time and not buried in a wall I suspect I can use thinner wires. This is a temporary thing and doesn't need to be up to code.


I have a mesh wich currently looks like this on edit mode:    Even though I haven't activated the Z key to enter wireframe mode, I can see the edges behind the mesh. This is really annoying since I keep accidentally selecting the vertices at the back.  How can I disable this?


Safest practice for installing software with potential malware

For a project I have been contracted to work on a collaborating Chinese programmer has provided some software to simplify some tasks.  I am unaware whether this software package contains malware or not.  I would like to run this software and still protect my computer.    While I am not a Ubuntu noob I am newish to the OS.  I understand that under Windows I run the risk of infecting my entire computer.    I am wondering what would be the best practice to protect my computer, private information, and data. Can I create a new user account and install the software with that account?  Will that only protect the information on my primary login but not the computer as a whole?  Note - the software involves running from ./softwarename.sh.  The software is provided as a complete package and I do not have to download it (or anything) from the internet.  I do not have to install any packages, third-party libraries etc.  All I need to do is run a remote license manager (rlm) via a shell script and start the software from a shell script.


Im trying to make a class CardDeck with the constructor vector<Card> CardDeck My Card class looks like this Card.h file: enum Suit{clubs = 0, diamonds, hearts, spades};  enum Rank{two = 2, three, four, five, six, seven, eight,                 nine, ten, jack, queen, king, ace};  class Card{ private:     Suit s;     Rank r; public:     Card(Suit suit, Rank rank)         :s{suit}, r{rank} {};     Suit getSuit() const;     Rank getRank() const;     string toString() const;     string toStringShort() const; };  I now want to make a CardDeck class that will construct the vector cards inside CardDeck CardDeck.h file: #include "Card.h"  class CardDeck { private:     vector<Card> cards{}; //Where I'm stuck public: //... };  Is there a way to loop through all Suits and Ranks like this Pseudocode: for s in Suits:     for r in Ranks:         cards.push_back(Card{s, r})


How to check the maximum number of allowed connections to an Oracle database?

What's the best way, using SQL, to check the maximum number of connections that is allowed for an Oracle database? In the end, I would like to show the current number of sessions and the total number allowed, e.g. "Currently, 23 out of 80 connections are used".


Unable to add and update both functionality to add the user record into Salesforce Marketing cloud Data extension

I have created the code to add the user record to the data extension using form given below and its working fine but Its not allowing me to use add and update both functionality to update the record of existing user into data extension using the same form and same email id of the user. Its redirecting existing user to the error page.  I tried with  but its only allowing to update the record and not allowing to add.  I need both the functionality to add new user record and update existing user record to data extension into exacttarget.     <form action="http://cl.exct.net/DEManager.aspx" name="surveyform" method="post">     <input type="hidden" name="_clientID" value="12345678">     <input type="hidden" name="_deExternalKey" value="surveyform">     <input type="hidden" name="_action" value="add">     <input type="hidden" name="_returnXML" value="0">     <input type="hidden" name="_successURL" value="https://pub.s1.exacttarget.com/successpage">     <input type="hidden" name="_errorURL" value="https://pub.s1.exacttarget.com/errorpage">
         Email Address: <input id="email" type="email" name="EmailID" required>

     <input type="submit" value="Submit" class="submitBtn"> </form>


Windows 10 upgrade if older Windows is not installed

I have a laptop that was shipped with Windows 7. For some reason, the PC was always extremely slow with Windows 7, so on one day of frustration I took a spare drive and installed Ubunto into it. However, even though the performance was great, we kind of missed having Windows on that PC (full MS-Office compatibility, Amazon Prime Video in HD, among other details that only work on Windows).   When I heard about the free upgrade to Windows 10, I decided to delete the Ubuntu drive and install the Insider Preview. The laptop now runs quite smoothly, better as new. However, I am wondering how the upgrade process would be in this case:   I could install the old drive and click the icon after running all the upgrades, but I have no interest on upgrading to Win10 over the old Win7 installation, it is just too full of HP-Bloatware, I want a clean install. Is or will there be any way to get a Win10 key using the product key from Windows 7?


upgrading from 15.10 to 16.04 apt not installed

When trying to upgrade using the terminal, my upgrade stops. This is the line showing in the terminal:  The required dependency 'apt(>=1.0.10.2 ubuntu2)' is not installed.   my problem is that I don't know the command to install this dependency. Using other commands, it says apt is up to date. Solutions?


.htaccess redirect keeping url when there is wordpress code involved

I have two domains, alfa.com and beta.com.   Beta.com points to alfa.com subdirectory named "ae" by following htaccess-file. It works fine, but what should I add to code to keep beta.com URL and not the URL www.alfa.com/ae. There is also some wordpress-code in the beginning, so the last sector is the one I'm talking about (begin beta.com).  Here's the code. Any help would be appreciated. I'm totally stuck with this…  suPHP_ConfigPath /opt/php5/etc/   AddHandler x-httpd-php52 .php   WordPress:  <IfModule mod_rewrite.c>   RewriteEngine On   RewriteBase /   RewriteRule ^index\.php$ - [L]   RewriteCond %{REQUEST_FILENAME} !-f   RewriteCond %{REQUEST_FILENAME} !-d   RewriteRule . /index.php [L]   </IfModule>   beta.com:  RewriteEngine on   RewriteBase /   RewriteCond %{HTTP_HOST} ^(www.)?beta\.com$ [NC]   RewriteRule ^(.*)$ http://www.alfa.com/ae/$1 [R=302,L]   RewriteCond %{REQUEST_FILENAME} !-f   RewriteCond %{REQUEST_FILENAME} !-d   RewriteRule .* index.html [L]


What is wrong with this integer return code?

points = 0  def testfunction():     points = 2     return points  testfunction() print (points)   Why does the points now not equal 2?


Spivak's Calculus: Finding the formula for the sum of a series.

In Spivak's Calculus, Chapter 2, the second problem of the set asks you to find a formula for the following series:  $$\sum_{i=1}^n(2i-1)$$ and $$\sum_{i=1}^n(2i-1)^2$$ Now, for the former, this was fairly straightforward: it sums to $i^2$ and I have a proof that I'm happy with. However, for the latter, I cannot identify a pattern in terms of $n$ to begin building a proof. The series proceeds $1^2 + 3^2 + 5^2 + 7^2 + \cdots + (2n-1)^2$, so the sum for the first few indices would be $1, 10, 35,$ and $84.$ Not only have I failed to come up with an expression of this in terms of $n$, but I'm not even sure what I should be considering to lead me to such a formula.


I'm a math TA and I find that my most consistent comment for improvement involved my board handwriting. Anybody have some tips or techniques I can use to make things a little neater on the board?  There are, of course, time constraints with teaching any course, so I don't want to simply write more slowly in order to assist in writing more neatly. Thankfully in a math course much of what I write is symbols which are easier to (borrowing a typography term) kern than sentences, but I still feel like I need to vastly improve my handwriting on a board if I plan on teaching for any length of time.  This is a sample of my handwriting:   Any advice would be greatly appreciated. Thank you!  EDIT: After checking the room in which I'm assigned to teach this semester, it turns out I do actually have a whiteboard instead of a chalkboard. Like I commented below somewhere, I'm sure 90% of the answers mentioned (those not expressly about chalk, anyway) will be completely cross-transferable and I'll try to make them all work. Thanks again for all the great answers!


I would like to reproduce with tikz a picture like the following:    How would I do that?


This is my code  \documentclass[12pt,a4paper]{book}  \renewcommand{\baselinestretch}{1.5}  \begin{document} \include{Chapter1} \end{document}   I have please a question:   I would change the line spacing (1.5 --> 1.0) of a page inside the document and not the entire document and the size of the words, how can I do please?


How can I improve my Druid build's inherent CMB, mostly for use during Wild Shaping?

I'm looking for feats or other permanent class features that can increase my CMB for purposes of grappling with my druid character. The grappling would be almost always occurring while in wild shape form.   I do not want gear suggestions (permanent or consumable), spells, or other temporary buffs. I would like to know of feats for even higher levels which I do not qualify for at the moment 1–20 level.   Current stats:  Level 2 Human Druid Str 18, Dex 13, Con 14, Int 9, Wis 15, Cha 7 Feats: Improved Initiative, Improved Spell Sharing


The distribution of a linear combinations of poisson random variables

I would like to know what the distribution is of linear combinations of Poisson random variables.  I know that a linear combinations of Poisson random variables is not always a Poisson random variable, namely   $Y : = \sum_k a_k X_k$  with $X_k \sim Pois(\lambda_k)$. Now, $Y$ is only Poisson if all $a_k$ are 1 and else $Y$ is a not Poisson random variable but follows a 'compound Poisson distribution'.  My question is can I still find an expression for this distribution or can I generate it using for instance Matlab?  Kind regards,  Michel


we know that equations of the form $X^2-dY^2=Z^2$ have parameter solutions in $\mathbb{Z}$    but what about equations of the form $X^2-nY^2=d$  where $x,y,z,d \in \mathbb{Z}$ ($X$ and $Y$ are variables)  do they have solutions in general? what about special case below:  $X^2-17Y^2=14$


Is there upquote like package for main text and not just verbatim text?

This MWE  \documentclass[11pt]{article} \usepackage{upquote} \begin{document}  A `set` or 'set'   \begin{verbatim} A `set` or 'set' \end{verbatim}  \end{document}   Compiled with lualatex foo.tex given the PDF file:    I understand that is how Latex default font works. But I want ' and ` (straight quote and back quote) characters in the main text to also remain the same as in the input Latex file.  The package upquote fixes the verbatim text. How would one go about also fixing the ` and ' that show up in the main text as well?  Does one need a complete new font? Which one would that be? Or is there a package like upquote but for main text?  I googled but could not find something.  Using texlive 2017 on Linux.


I'm trying to make a simple line connecting the same node. I'm using a simple qtree package. Here is what I have so far. \Tree [.\textit{sign}  [.\textit{syn-sign} \textit{phrase} ] [.\textit{lex-sign}  [.\textit{word} ] [.\textit{lexeme} ]]]  New question for alignment:  Here's the code: \begin{forest} qtree edges [\textit{sign},name=sign [\textit{syn-sign}  [\textit{phrase} ] [\textit{word}, name=word,]]    [\textit{lex-sign}, name=lex-sign  [, no edge ] [\textit{lexeme} ]]]    \draw (lex-sign.south) -- (word.north);  \end{forest}


If a GameObject in my game has a special ability it triggers it, but I want all the special GameObjects that this GameObject affects to also trigger their abilities, for example if a bomb hits some objects, if these objects are also bombs, trigger them too. I though this would be easy by calling the method that handles all the special abilities recursively, but, as always, it wasn't. Basically what happened is a chain reaction of bullcrap that caused Unity to show an OurOfMemory error. Also makes my PC freeze completely while politely turning all the screens off.  The question is, how can I make it so it triggers all the affected cubes' special abilities, without everything going nuts?  Code:       //Triggers the cube's special ability, if it has any     private void TriggerSpecialCubeAbility(GameObject specialCube) {         switch (specialCube.tag) {              //Destroy all cubes in a radius from the special cube             case "Bomb":                 TriggerBombAbility(specialCube);                 break;              //Destroy all cubes of the same color as the special cube             case "Lighting":                 TriggerLightingAbility(specialCube);                 break;             default:                 break;         }     }      private void TriggerBombAbility(GameObject specialCube) {         var nearbyColliders = Physics2D.OverlapCircleAll(specialCube.transform.position, explosionRadius);         Instantiate(particles[0], specialCube.transform.position, specialCube.transform.rotation);         Instantiate(particles[1], specialCube.transform.position, specialCube.transform.rotation);          foreach (var collider in nearbyColliders) {             if (collider.tag == "Indestructible")                 return;              var affectedCube = collider.gameObject;             TriggerSpecialCubeAbility(affectedCube);             Destroy(affectedCube);         }          destroySelectedCubes = true;         //          Physics2D.gravity *= -1;         //          Physics.gravity *= -1;     }


Mint login screen: wrong keyboard layout

After installing Mint 15 / updating to Mint 17, I'm unable to log in using the GUI login screen and German localisation with a password containing special characters. Changing the language using the language selector doesn't help.  It seems to be an issue regarding the window manager (mdm), since I'm able to log in using a text console (e.g. using ALT+CTRL+F1).  Adapting the file /etc/default/keyboard (as ) or  didn't change anything.


Print the key of the max value in a dictionary the pythonic way

Given a dictionary d where the key values pair consist of a string as key and an integer as value, I want to print the key string where the value is the maximum.  Of course I can loop over d.items(), store the maximum and its key and output the latter after the for loop. But is there a more "pythonic" way just using just a max function construct like  print max(...)


Challenging and "serious" introduction to basic physics

I know most of a standard US undergrad math degree - multi-variable calculus, real and complex analysis, point-set topology, basic abstract algebra, etc. etc. I know very little about physics beyond F=ma, but I want to learn the basics.  I have found any "introductory" book I look at bothers me for a few reasons:   It is written in typical non-serious "American college freshman textbook" style - lots of colorful, distracting sidebars and boxes, links to online exercises, pop science digressions, motivational speeches about how cool it is to be learning physics, etc. Many dozens of extremely easy exercises after every section, when I would have gotten the point after two or three and wanted something more deep/challenging. It assumes the reader is learning basic mathematics at the same time as physics, so it spends way more time than I need explaining concepts like vectors, derivatives, integrals, linear transformations, etc.   On the other hand, any more advanced book I looked at assumes prior physics knowledge.  Does anyone have any recommendations that do not suffer from these flaws?  (For the purposes of this question, let's define "basic physics" as things that were discovered before the year 1900).


Trying to filter elements in a vector, but keep on getting error

I'm trying to filter a string of 2 vectors based on what they have. By that I mean my vector vector1 contains ["01","11","10"] and another vector vector2 which was created recursively using options() function to make binary numbers based on the digit=2 ["00","01","11","10"]. I want to sort through both of them  and the value which is in vector2 but not in vector1 to another string of vectors. So using the above example I want a 3rd vector to contain ["00"] which should be a string. This is my code but on the last for loop where I actually do the filtering it gives me an error #include <iostream> #include <bitset> #include <vector>  std::vector<std::string> options(int width) {     if (width == 1)     {         return {"0", "1"};     }     std::vector<std::string> rest = get_combs(width-1);     std::vector<std::string> appended;     for (const auto& s: rest)     {         appended.push_back(s + '0');         appended.push_back(s + '1');     }     return appended; }  int main() {     std::vector<std::string> vector1 {"01", "11", "10"};     std::vector<std::string> vector2 = get_combs(2);        for (int i = 0; i < vector2.size(); i++){         if ( vector2[i] in  vector1 ){  <-- error             // ...         }     }  }  The error says no viable conversion from       '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char,       std::char_traits<char>, std::allocator<char> > >,       std::__cxx11::basic_string<char, std::char_traits<char>,       std::allocator<char> > >::value_type' (aka       'std::__cxx11::basic_string<char, std::char_traits<char>,       std::allocator<char> >') to 'bool'     if( vector2[i] in  vector1 ){         ^~~~~~~~ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:816:7: note:        candidate function       operator __sv_type() const noexcept       ^  I'm not sure what to do, can somebody help me?


How can I turn on the Intel HD manually?

For some weeks my MacBook 6.2 does not switch to the integrated graphics adapter (Intel HD). This is especially crucial when I work on battery (which happens quite often). I guess the runtime could be enhanced when it would take the HD adapter for display.  I checked that it automatically changes the graphics mode. I am running Snow Leopard 10.6.8.  I recently installed 8GiB RAM (not from Apple). Could this probably related to this issue? Actually I do not want to downgrade or use the expensive Apple RAM.  So, how can I manually turn on the internal graphics adapter?


Convert a comma delimited list of numbers to a hyphenated list or range

I have a comma delimited string of numbers as follows:  1,2,3,5,6,7,8,9,12,14   I'm looking for a command to use in a bash script that can combine adjacent numbers into range/hyphenated entries as follows:  1-3,5-9,12,14   The initial string is guaranteed to be sorted in ascending order.


Why my soql query is returning 'RecordTypeId' instead of the fields mentioned in the query?  Here's my query:  SELECT Id, Name, ABC, (SELECT Id, XYZ FROM InnerObject) FROM OuterObj   Note: My query contains a subquery.


Given any function $g(x): \mathbb{R} \rightarrow \mathbb{R}$, find a function $f(x)$ such that $f(f(x)) = g(x)$.

This is a problem I was casually discussing with friends:     Given any function $g(x): \mathbb{R} \rightarrow \mathbb{R}$, find a   function $f(x): \mathbb{R} \rightarrow \mathbb{R}$ such that $f(f(x)) = g(x)$.   Is it possible to find a solution for $f(x)$ or prove that there isn't a solution for $f(x)$ such that $f(f(x)) = g(x)$ for any given $g(x)$?   For example, if $g(x) = x + 2$, then $f(x)$ could easily be $f(x) = x + 1$. But if $g(x) = x^2 - 1$, then it's not clear to see what $f$ can satisfy such solution.   What approach might be promising? My first gut reaction would be some analytical method but can't think of a way still...Discussions are welcomed!


as part of  old thread, I started trying using an old RC servo with arduino.  The one I used (Sanwa SRM 102) has a torque of about 3kg\cm and operates with 5V. I used an external power supply for the servo and made the wiring with the little material I found out on the web. The wires are RED-BLACK-BLACK and it seem to be +-\Signal.  This is the scheme:   The problem appears when I try to upload my sketch. The servo tries to push as much as possible forward, forcing and I need to power off it.  Using the "Servo" library, the problem appears whatever I write in the myservo.write(x) statement, and tries to reach always the same position.  I made a little video to show you what I mean:    Maybe being and old servo it uses some different communication protocol?  What can I try?   This is my semplified sketch:  #include <Servo.h> #define SERVO_PIN 9  Servo myservo;    void setup() {   myservo.attach(SERVO_PIN);  }  void loop() {   myservo.write(0);  delay(5000);  myservo.write(30);   delay(5000);   myservo.write(50);   delay(5000);   myservo.write(90);  }   EDIT: As suggested, it was just a problem of common gnd.


If $x_n \to 0$, show that $\sqrt{x_n} \to 0$

Let $x_n \geq 0$ for all $n \in N$. If $(x_n) \to 0$, show that $(\sqrt{x_n}) \to 0$  Unless I am missing something, this seems simple to me. Since $x_n$ converges for an arbitrary $\epsilon^2>0$, we have $|x_n| <\epsilon^2 $ for $n\geq N$. Taking square roots here we have $\sqrt{x_n}<\epsilon$ for all $n\geq N$ which is what we needed to show. Is that all? If so, then why $x_n \geq 0$ is important?


Extend onclick function to javascript class

I'd like to include an onclick event in a JavaScript class, but since onclick is a function inside of the class the this variable won't work properly.  How can I modify/output the this variable from the onclick function?  img = new image();  function image() {     this.width = 400;     this.height = 600;     document.getElementById('button').onclick = function()     {         alert(this.width); // alerts undefined     }; }   See JSfiddle here:


Number of roots of a polynomial over a finite field

For any $g$ in $\mathbb{Z}/p\mathbb{Z}[x]$ prove that the degree of $f = \gcd(x^p - x, g(x))$ is exactly the number of distinct roots of $g$ in $\mathbb{Z}/p\mathbb{Z}$.   My main problem is that I do not really understand how to approach this problem at all. I am very new to solving proofs and any type of help would be appreciated thank you.


Edge, Vertex, and Face tool do not show up anymore on the menu

The edge,vertex, and face tool in edit mode disappeared! How can I fix this?


Need a way to do a "loop cut" on a triangle fan

Need a way to do a loopcut- ish thingy on the blue line


I'm looking to treat myself to a totally portable TeX system and was wondering: is it possible to devise an installation scheme that would run on Windows, Linux and MacOS at the "same" time?  I think TeXLive is the best choice here, but I'd much rather avoid having to maintain three separate TeXLive installations. I'd like the three installations to share the package databases for instance.  I'll be using a 32Gb USB stick, in case it matters.  PS: I think I'm onto something here... will post back when I have a working prototype.  Edit: after reading  I managed to format a USB stick with UDF and have it read and written in Linux and Windows (need to perform some tests on Mac yet). This is the first step towards interoperability.  Edit 2: well, as it turns out, the previous note was useless (the partition table breaks under Windows), I've found  and it works like a charm. The only remaining step is writing a couple of scripts to set the environmental variables and we're done ;)


Allow OP to override the result of suggested-edits review

Background  Currently all suggested edits with code changes are rejected. Some people belive that a suggested edit that fixes the code should not be rejected, I don't see any other option because:   If everybody would skip edits in code that he does not understand it would fill up the queue and waste the time of much more reviewers. For the same reasons we already reject minor edits. Reviewing other queues does NOT require special expertise to review. Why should suggested edits different?   Suggestion  But there is a user that should have the nessecary expertise: the original poster (OP). The OP has already a binding vote on suggested edits, but if the edit was rejected in the mean time, he has to edit the post itself, while the edit is still rejected.  So my suggestion is to let the OP override the suggested edit AFTER it was aproved/rejected if there were no other edits in the mean time*.  * How should a suggested edit be done if someone else edits the post after it was rejected?


UEFI Dual boot not recognizing windows 7 partition?

Been messing around with Ubuntu, I actually installed it as my only OS but since my graphics card(AMD) kinda sucks on linux(For gaming purposes) -  I have to have a windows partition.  However, dual-booting simply won't work out for me. I currently installed a fresh copy of Windows 7.. That's fine. When I run the Ubuntu installer, it just doesn't recognize Windows 7. I'm left with wiping the entire hard disk and installing only Ubuntu, or basically nothing else(well, there is the "something else", but it doesn't recognize windows either).  What do I do? It's a problem with the new UEFI bios as far as I understand, right?  I tried booting from both USB/SD and CD/DVD with the same result, so I suppose something is up with the file structure or the UEFI/legacy booting. But before I mess with the BIOS, I'd like a pointer to what I should do exactly? I've tried shrinking my hard drive into a 200GB partition which I thought Ubuntu would recognize(and then install on), but it only recognizes all 1TB I have..? Thanks in advance!


How was Red Skull where the Soul Stone was in Avengers: Infinity War?

In Avengers: Infinity War, why was Red Skull where the Soul Stone was with the knowledge of the Soul Stone?


Switching the definition of epsilon-delta limit

What if the epsilon-delta definition of a limit reversed the wording for $δ$ and $ϵ$: “for all $δ>0$, there exists an $ϵ>0$ such that, if  $0<|x-a|<δ$, then  $|f(x)-L|<ϵ$.” Would this definition still capture the concept of limit? Why or why not? If not, give a counter-example.  I want to say "no" this doesn't capture a limit because the definition of a limit must hold true for each and every epsilon. However, I'm not quite sure how to state this or what might be a counter-example.


Template in a Template of a different types problem

I have a template class called Temp, and it have a method takes an argument of the same type:  #ifndef TEMP_H #define TEMP_H  template<class T> class Temp {     public:         T data;         bool comp(T); }; template<class T> bool Temp<T>::comp(T data) {     return (this -> data < data); } #endif // TEMP_H   now I want to make an object of class Temp with type of pointer to another class called Foo.  Temp<Foo*> TptrF;   usually this is easy and for the method comp, I can do a specialization for this specific type Foo*, but I have to include the file Foo.h in Temp.h:  //Temp.h #ifndef TEMP_H #define TEMP_H #include "Foo.h"  template<class T> class Temp {     public:         T data;         bool comp(T); }; template<class T> bool Temp<T>::comp(T data) {     return (this -> data < data); } template<> inline bool Temp<Foo*>::comp(Foo* data) {     return (this -> data -> val < data -> val); } #endif // TEMP_H   but the problem is that Foo class have an object of type Temp<int> and for this data member in Foo I have to include the file Temp.h in Foo.h:  //Foo.h #ifndef FOO_H #define FOO_H #include "Temp.h"  class Foo {     public:         int val;         Temp<int> Ti; };  #endif // FOO_H   this gives me in Foo.h:      error: 'Temp' does not name a type   I tried to remove #include "Foo.h" from Temp.h and use a forward declaration instead like class Foo;, but it didn't work as I used the 'val' data member of class Foo in the comp function, and it gives me in Temp.h:     error: invalid use of incomplete type 'class Foo'   and tried to remove #include "Temp.h" from Foo.h, and use a forward template declaration instead like template<class T> class Temp;,I thought this will work as I just need an object so I just want the compiler to know that I have a template class called Temp, but it also didn't work, and it give me in Foo.h:     error: field 'Ti' has incomplete type Temp<int>   What should I do to make this code work? Temp<int> and Temp<Foo*> do not contain each other as objects, so I believe this should work logically, or is it just one of the consequences of bad design.


Some keys on Apple Wireless keyboard not working

I noticed that these keys are not working on my Apple Wireless keyboard: q, w, e, r, t, y, u, i, & o. All the other keys work normally. The keyboard layout is set to US.  Is there a setting that I enabled accidentally or it is time to get a new keyboard?


Wifi disabled, no hardware switch available, rfkill list reads "Hard Blocked" anyway on an Acer Aspire One

Somehow, my nephew (who destroys everything he touches) has managed to disable the wifi on his Acer Aspire One series netbook (Model #ZG5).   It's running 14.04 LTS (32-bit). rfkill list indicates it's not soft blocked, but hard blocked.   However, there is no wifi switch on this particular model, and no Fn key shortcut, either. I've scoured the internet... but none of the solutions I've found so far seem to work. Any advice?  I've looked at this question and it doesn't apply to me:


How do I find out whenever a value changes in a certain column?

Need help if anyone can offer! I currently have my select statement returning the TOP 1000 * results from a table. They are CC numbers that are currently active. I'd like to see how I can go about writing a query that could show me what has CC numbers have changed. If something has changed, it will send a report to the listed people. If nothing, then it does nothing. It only actions once something has happened. We have an inhouse system that will do the automated part... I just need a select statement that will return what has changed. If I can get some help on this, it would be amazing! Thank you!


Where to Install Applications when using Terminal?

I use the command line a lot to download and install applications. I've always downloaded into the /tmp directory then installed to another directory.  But where is the place to install such applications? For example, I was just downloading MongoDB (a database application similar to MySQL). And I had no idea where to put it.  Where should such applications be installed on Mac? Whats the conventional way?


Intuition about non measurable sets in $\mathbb R^d$

I am studying elementary measure theory from the book Real Analysis by Stein & Shakarchi. The book defines $m_{*}(E)$ as the outer measure of some set $E \subset \mathbb{R}^d$ and presents the property:  If $E \subset \mathbb{R}^d$, then $m_*(E) = \inf_{E \subset \mathcal{O} \text{ open }} m_*(\mathcal O)$.  Moreover, $E \subset \mathbb{R}^d$ is measurable if for any $\epsilon > 0$ there exists an open $\mathcal{O}$ such that $E \subset \mathcal O$ and $m_{*}(\mathcal O - E) \leq \epsilon$. I find it hard to intuitively understand the difference between the property above and the definition of measurable sets. If, for example, the property was satisfied with a $\min$ instead of $\inf$ would it then imply that any set in $\mathbb{R}^d$ is measurable? In general, how can I visualize a set such that its outer measure is the same as the infimal outer measure of the open sets containing this set, but there does not exist an open set containing this set such that the outer measure of the difference can be bounded arbitrarily?


Manipulator widget appearing where the 3d cursor is

Something weird is happening where the manipulator arrows moves where ever the 3D cursor is. I don't want this.


Closed-form solution for the determinant of a Vandermonde-like matrix

I'm trying to find a closed-form solution $\forall$ odd integer $n\ge 3$ for the determinant of a matrix with some structure on it. After some manipulation, I've reduced it to the following matrix: $\small\begin{bmatrix}\boldsymbol{t_{1}^{n}-t_{a}^{n}} & \boldsymbol{t_{2}^{n}-t_{a}^{n}} & \boldsymbol{\cdots} & \boldsymbol{t_{a-1}^{n}-t_{a}^{n}} & nt_{1}^{n-1} & \cdots & nt_{a-1}^{n-1} & nt_{a}^{n-1}\\ \boldsymbol{t_{1}^{n-1}-t_{a}^{n-1}} & \boldsymbol{t_{2}^{n-1}-t_{a}^{n-1}} & \boldsymbol{\cdots} & \boldsymbol{t_{a-1}^{n-1}-t_{a}^{n-1}} & (n-1)t_{1}^{n-2} & \cdots & (n-1)t_{a-1}^{n-2} & (n-1)t_{a}^{n-2}\\ \boldsymbol{\vdots} & \boldsymbol{\vdots} & \boldsymbol{\ddots} & \boldsymbol{\vdots} & \vdots & \ddots & \vdots & \vdots\\ \boldsymbol{t_{1}^{2}-t_{a}^{2}} & \boldsymbol{t_{2}^{2}-t_{a}^{2}} & \boldsymbol{\cdots} & \boldsymbol{t_{a-1}^{2}-t_{a}^{2}} & 2t_{1} & \cdots & 2t_{a-1} & 2t_{a}\\ \boldsymbol{t_{1}-t_{a}} & \boldsymbol{t_{2}-t_{a}} & \boldsymbol{\cdots} & \boldsymbol{t_{a-1}-t_{a}} & 1 & \cdots & 1 & 1 \end{bmatrix}_{n\times n}$ where $a:=\frac{n+1}{2}$, the bold block is $n\times(\frac{n+1}{2}-1)$, and the non-bold block is $n \times \frac{n+1}{2}$. Although it has some similarities with the  or , it's not the same. Using some values of n, its determinant looks pretty simple, which leads me to think that there should be a closed-form solution: $n=3$: $$ det\left(  \left[\begin{array}{ccc} {t_{1}}^3-{t_{2}}^3 & 3\,{t_{1}}^2 & 3\,{t_{2}}^2\\ {t_{1}}^2-{t_{2}}^2 & 2\,t_{1} & 2\,t_{2}\\ t_{1}-t_{2} & 1 & 1 \end{array}\right] \right)= -{\left(t_{1}-t_{2}\right)}^4 $$ $n=5$: $$ det\left(      \left[\begin{array}{ccccc} {t_{1}}^5-{t_{3}}^5 & {t_{2}}^5-{t_{3}}^5 & 5\,{t_{1}}^4 & 5\,{t_{2}}^4 & 5\,{t_{3}}^4\\ {t_{1}}^4-{t_{3}}^4 & {t_{2}}^4-{t_{3}}^4 & 4\,{t_{1}}^3 & 4\,{t_{2}}^3 & 4\,{t_{3}}^3\\ {t_{1}}^3-{t_{3}}^3 & {t_{2}}^3-{t_{3}}^3 & 3\,{t_{1}}^2 & 3\,{t_{2}}^2 & 3\,{t_{3}}^2\\ {t_{1}}^2-{t_{3}}^2 & {t_{2}}^2-{t_{3}}^2 & 2\,t_{1} & 2\,t_{2} & 2\,t_{3}\\ t_{1}-t_{3} & t_{2}-t_{3} & 1 & 1 & 1 \end{array}\right] \right)= -{\left(t_{1}-t_{2}\right)}^4\,{\left(t_{1}-t_{3}\right)}^4\,{\left(t_{2}-t_{3}\right)}^4 $$ I was wondering if there is a known closed-form solution for this determinant, or if it could be found using the determinant of a generalized Vandermonde matrix Thanks!


Java Map compute vs (containsKey, get and put) in terms of speeed

Is the new map function for compute slower than using a combination of containsKey, get and put  counter.compute(tree[j], (k, v) -> {   if (v == null) {     v = 0;   }    return v + 1; });   I tend to use containsKey, get and put in this combination  if (counter.containsKey(tree[j])) {   counter.put(tree[j], counter.get(tree[j] + 1); } else {   counter.put(tree[j], 1); }   I feel that compute tends to work a bit slower but I don't know how to benchmark to actually understand the performance difference


What to do if I can't get a visa to attend a conference that accepted my paper?

My work got accepted into a very good category in a very good conference in my field. Due to complicated visa issues it will be very hard for me to attend that conference.   If I don't attend the conference they are certainly going to remove my work from the proceedings.  I am worried I won't be able to claim any sort of achievement if I don't attend this conference.  Can I still add it to my CV and specify that my work got accepted in this conference in a very good category?


If $A$ is denumerable and $x\in A$, then $A\setminus\{x\}$ is denumerable. (With my proof)

My Question reads:         Prove: if $A$ is denumerable, then $A\setminus\{x\}$ is denumerable.    I have proposed this:  Let $f:\mathbb{N}\to A$ be a bijection. Let $g:\mathbb{N}\to A\setminus\{x\}$ be a function defined by:  $$ g(y)= \begin{cases}  y, &y=1\\  y+1, &y\geq 2 \end{cases} $$ I just wanted to see if the answer I have provided is a reasonable choice for a bijection. This is an answer I have come up with myself. I want a verification of my answer and/or clarification.


Is there a way to disable a specific JS script from a specific website?

I want to disable a specific JS script from a specific website without disabling the javascript completely. Is there a way to do that ?


Are there any differencies in functionality between those two or any advantages of one over the other? The only thing that comes to mind why someone would use diode-connected transistors over diodes is if, for example, the whole integrated circuit technology is based on transistors and it's easier and more cost-friendly to just configure some of them as diodes when it's needed, other than integrating a diode in the circuit. Or, if transistors are more temperature resistant than diodes? Are there any other differencies?


Which variance inflation factor should I be using: $\text{GVIF}$ or $\text{GVIF}^{1/(2\cdot\text{df})}$?

I'm trying to interpret variance inflation factors using the vif function in the R package car. The function prints both a generalised $\text{VIF}$ and also $\text{GVIF}^{1/(2\cdot\text{df})}$. According to the , this latter value     To adjust for the dimension of the confidence ellipsoid, the function   also prints GVIF^[1/(2*df)] where df is the degrees of freedom   associated with the term.   I don't understand the meaning of this explanation in the help file, so I'm not sure if I should be using $\text{GVIF}$ or $\text{GVIF}^{1/(2\cdot\text{df})}$. For my model these two values are very different (maximum $\text{GVIF}$ is ~$60$; maximum $\text{GVIF}^{1/(2\cdot\text{df})}$ is ~$3$).   Could someone please explain to me which one I should be using, and what is meant by adjusting the dimension of the confidence ellipsoid?


How to differentiate exponential map with parameter dependent basepoint

Let $(M,g)$ be a  Riemannian manifold, $\gamma:I\rightarrow M$ a geodesic. Let $c:(-\varepsilon,\varepsilon)$ is defined to be another geodesic with  $$c(0)= \gamma(0),\ \ \ c^\prime(0)=X.$$ Let $V(s)$,$W(s)$ be parallel vector fields along $c$.  The derivative that I want to compute is  $$\frac{\partial}{\partial s}\exp_{c(s)} \big(t\cdot(V(s)+sW(s))\big)$$ at $s=0$.  I looked at examples, but there is no such thing as the $c(t)$ there so I can not figure it out.  Thank you very much, I hope it is not a too simple calculation question for this forum.


I need to sort my HashMap according to the values stored in it. The HashMap contains the contacts name stored in phone.  Also I need that the keys get automatically sorted as soon as I sort the values, or you can say the keys and values are bound together thus any changes in values should get reflected in keys.  HashMap<Integer,String> map = new HashMap<Integer,String>(); map.put(1,"froyo"); map.put(2,"abby"); map.put(3,"denver"); map.put(4,"frost"); map.put(5,"daisy");   Required output:  2,abby; 5,daisy; 3,denver; 4,frost; 1,froyo;


Why are American-style options worth more than European-style options?   I realize I can exercise American-style options anytime before the  expire, but I can only exercise European-style options during their  "exercise period" (usually right when they expire, but no earlier).   So it makes sense that an American option is worth at least as much as  a European option.   But why is it worth more? If I exercise my American option early, I  may make more money than waiting until expiration, but I also may make  less. Mathematically, there's no advantage, since I'm equally likely  to make as much money by waiting for expiration.   Mathematically speaking, is there ever a good reason to exercise an  American option early?   I realize people don't always behave logically, but even the formulas  that valuate options show that American options are worth more.   EDIT (answering comments):    Many of the comments people made would apply to lookback options  (), but not to American  options.  American options can do everything European options can and more. I  understand that, and that means American options can't be worth any  LESS than European options, but I'm still not clear on how you would  mathematically calculate this extra value.  @Aaronaught: "The difference between an American and European  option is the difference between getting N chances to get it right (N  being the number of days 'til expiration) and getting just one  chance. It should be easy to see why you're more likely to profit  with the former, even if you can't accurately predict price  movement."    REPLY: I don't think you really get N chances. Once you exercise the  option, that's it, no more chances. And, if you decide not to exercise  the option today, and the underlying's price falls, you can't go back  in time and exercise it yesterday.    @jdsweet: Think of it this way, if you traveled back through time  one month - with perfect knowledge of AAPL's stock price over that  period - which happens to peak viciously then return to its old price  at the end of the period - wouldn't you pay more for an American  option?    REPLY: Well, no. I'd simply buy a cheaper European option that expires  right at the spike. Or, I'd buy a European option that expires later,  and sell it when the spike occurs. American options don't give you  precognition, so you're still guessing as to when to sell/exercise.    @jdsweet: "one of the more common reasons people exercise (as  opposed to sell) an American option before expiration is if an  unexpected dividend (larger than remaining time value of the option)  was just announced that's going to be paid before the option contract  expires"    REPLY: This makes sense. I'm actually trading FOREX options, so there  is no dividend. In that scenario, are European and American options  worth the same?


Permanently Re-arrange fields of attribute table (feature class and tables)?

I am trying to Find out simple Geoprocessing Tool that can physically re-arrange the fields of attribute table (for both feature class +  tables), I have found some posts here, but nether of them have provide a good and a simple tool that can do the  job.


interpretation of dummy coded linear regression

I'm struggling with the interpretation of a regression model where a categorial variable (5 levels) is dummy coded. Here is the result of my calculation in R:  Call: lm(formula = DV ~ Age + Gender + factor(Categorial) +  Continuous 1 + Continuous 2 + Continuous 3,  data = dat)  Residuals:  Min       1Q   Median       3Q      Max  -1.30058 -0.25326  0.00349  0.28123  1.49877   Coefficients:                       Estimate Std. Error t value Pr(>|t|)    (Intercept)           -0.42367    0.30694  -1.380  0.16842    Age                   -0.05949    0.02026  -2.936  0.00356 ** Gender                -0.01800    0.04828  -0.373  0.70952    factor(Categorial)2   -0.30625    0.12645  -2.422  0.01596 *  factor(Categorial)3   -0.03441    0.07752  -0.444  0.65736    factor(Categorial)4   -0.12603    0.09914  -1.271  0.20453    factor(Categorial)5   -0.08417    0.13269  -0.634  0.52630     Continuous 1           0.12080    0.04346   2.779  0.00575 ** Continuous 2          -0.06592    0.04383  -1.504  0.13354    Continuous 3          -0.06230    0.03475  -1.793  0.07392 .  --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 0.4259 on 336 degrees of freedom   (6 observations deleted due to missingness) Multiple R-squared:  0.1315,    Adjusted R-squared:  0.1057  F-statistic: 5.089 on 10 and 336 DF,  p-value: 6.353e-07   Ok. Age, Factor 2 of the categorial variable and the first continuous variable are significant predictors of the dependent variable. so far so good.   What I'm not understanding is:   The reference category of the dummy coded categorial variable is the intercept and the first category of the categorial variable. right? How do I interpret this?  When doing an anova with the categorial variable as a independent variable, this factor is a significant predictor. With the results of the linear model, one could conclude that this is only due to category 2, right? Can I test contrasts with this linear regression model (e.g. Category1 vs. Category2)? Should I include interactions?   I'd be glad for any help :-)


I'm searching for a function $f\notin L^{\infty}(\Omega)$, but $f\in L^p(\Omega)$ for all $1\le p <\infty$. And it has to be $|\Omega |<\infty$. I tried $f(x)=\frac{1}{2\sqrt{x}}$ and $\Omega= (0,1)$ and something like that, but it is $f\notin L^p(\Omega)$ for all $1\le p <\infty$. Could you help me?


So I have a very simple rsync command that is set within a script.   rsync -avzh /mnt/data/i user@server:/mnt/data/   When I run the script manually there are no issues. When I run the script from crontab I get the following in my output:  WARNING: ECDSA key found for host server in /home/user/.ssh/known_hosts:9 ECDSA key fingerprint   Host key verification failed. rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.6]   So rsync finds the ssh key but for some reason cannot use it. Now I found some questions that were for the same error and were solved. One involved running the script in cron and manually as different users. I have verified via a whoami within the script that the cron job runs as the same user that I am using to manually run the script. Another question is solved by defining where the rsync command is in the file system. This one also has been checked by running a which within the script.  Now through all of this I have noticed that rsync is using ssh to do its job. So I checked the locations of ssh within the script. Two separate locations, one in /usr/share/centrifydc/bin, when run manually, and the other in /usr/bin, when run by cron.  So this led me to checking out the .bashrc and .bash_profile to find out if that path or possibly alias is set there. It is not.  This leads me to the actual question, how can I set the /usr/share/centrifydc/bin/ssh binary as the default for the cron jobs? And if I do will it fix the issue?


upload and dowload the files from server without giving password

I want to download the file from sever by using cron job, so I need to use scp  command without giving password by keyword.  How do I do so?


Every time I have my bike serviced, the bike shop sets up the gears on a stand in their workshop. The gears change perfectly on the stand, but when the bike is on the road, the rear derailleur doesn't change smoothly, and some gears are jumped.   I've fiddled with this myself, but can't improve over the default setup. Is it possible, or does this mean the Shimano gearsets are worn/the springs worn out on the rear derailleur?


How to convert RTF string to Plain text in python using any library

I want to convert an rtf string to plain text without using Regular expressions  rtfstring = '{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0 Arial;}}{\colortbl;\red255\green0\blue0;\red1\green1\blue1;}\viewkind4\uc1\pard\f0\fs18 {\b Amount/complexity of data to be reviewed:\b0}\par{- Review and summarization of old records}\par}'   Plain text will be  Plaintext = "Amount/complexity of data to be reviewed:- Review and summarization of old records"


Prove that $n^n>1\times3\times5\times7\times \dots\times(2n-1)$

The main question is :  Prove that $n^n>1\times3\times5\times7\times\dots\times(2n-1)$  My approach :  We can write the R.H.S as,  $$\frac{(2n-1)!}{2\times4\times6\times\dots\times2(n-1)}$$ We can write $(2n-1)!$ as $(2n-3)!(2n-1)2(n-1)$  Thus, in this manner we can cancel out even terms till $n$ appears. I'm having trouble doing this. What I intend to do is say that any positive number's factorial is less than the number raised to itself. I welcome any alternate method. Please help.  P.S. I am still in high school and do not understand binomial theorem and induction.


How to replace 'subsubsection' with just 'section' whilst using autoref package?

I am using the autoref package to make labelling of sections, figures and graphs much easier, and it really is much easier. However, when I am referring to a particular subsubsection, I just want it to appear in the final document as section 3.1.1 yet it appears to render as subsubsection 3.1.1.   How do I disable the usage of subsubsection X.Y.Z and just have it say section instead?


I installed Ubuntu 14.04 and the current Android development SDK, which contains 32-bit executables. I found that I cannot run those 32-bit binaries. Trying to start them from bash gives me an error: $ ./adb bash: ./adb: No such file or directory  It is there though: $ ls -al ./adb -rwxrwxrwx 1 thomas thomas 1231255 Jan 17 13:31 ./adb $ file ./adb ./adb: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped.   Same symptom for all the other 32-bit tools in the Android SDK. In olden days one could just install 32-bit libraries on 64-bit Ubuntu to get 32-bit support, but that does not seem to work anymore. How do I run 32-bit apps on a 64-bit Ubuntu distribution?


Should Likelihood add to 1 in frequentist case?

I know maximum likelihood and Bayes formula works for both frequentist and Bayesian approach. We know there are two approaches to statistics, and likelihood is a term that is used in both frequentest and Bayesian approach. I heard that for Bayesian case likelihood in general case will not add to 1 and you may  and see the Wikipedia has a formula without using $\mathbb P$ for likelihood: $$ \mathbb{P}\left(\theta \mid x_{1}, x_{2}, \ldots, x_{n}\right)=\frac{f\left(x_{1}, x_{2}, \ldots, x_{n} \mid \theta\right) \mathbb{P}(\theta)}{\mathbb{P}\left(x_{1}, x_{2}, \ldots, x_{n}\right)} $$ Is still the case the likelihood will not add to 1 in frequentist case as well? I checked the post on  but unless I haven't understood something I haven't found the answer to my question. To me simplified likelihood is something that we already measured, and probability is something that hasn't happened yet.


Writing PhD thesis by copying and pasting paragraphs from publications I authored or co-authored: is this plagiarism?

I'm planning to write my PhD thesis about the work I authored or co-authored in published journal. In this case, is it okay to simply copy and paste the paragraph from the paper to my thesis? Is this considered plagiarism if I am the author or co-author of the paper? I'm particular concerned for those papers that I'm not the first author.


How do I make function out of this?           //check if station is alive          $.ajax({            url: "lib/grab.php",            data: "check_live=1&stream_url="+valueSelected,            type: "GET",                success: function (resp) {                  if (resp == 1) {                    play_this(valueSelected);                  } else {                    //                  }                },                error: function (e) {                  console.dir(e);                }          });   I thought I could do something like this:  function is_alive(valueSelected) { result = false;              //check if station is alive              $.ajax({                url: "lib/grab.php",                data: "check_live=1&stream_url="+valueSelected,                type: "GET",                    success: function (resp) {                      if (resp == 1) {                        result = true;                      } else {                        //                      }                    },                    error: function (e) {                      console.dir(e);                    }              }); return result; }   But obviously due to asynchronous nature of ajax call, result always returns false.  What is the trick of dealing with this situation?  Seems to work:          //check if station is alive         function is_alive(url) {           //           var result = false;           //           return $.ajax({             url: "lib/grab.php",             data: "check_live=1&stream_url="+url,             type: "GET",                 success: function (resp) {                   if (resp == 1) {                     //                     result = true;                     //                   }                 },                 error: function (e) {                   console.dir(e);                 }           }).then(function() {             return $.Deferred(function(def) {               def.resolveWith({},[result,url]);             }).promise();           });         }   And call it like this:      //Change song on select, works both for fav and station lists     $(document).on("click", ".ui-listview li a", function(){       var valueSelected = $(this).data("station-url");       //       is_alive(valueSelected).done(function(result,url){           if (result) {             //             play_this(valueSelected);             //           }       });     });


How to find which WDS access point I'm connected to?

I'm reposting  I asked on the  SE, bacause I have been redirected to Super User.  I have successfully set up two Linksys routers running DD-WRTv24 to do WDS. They have the same SSID, but different static local IP addresses. There is no security: it's just for testing; no Internet connection.   When I open my notebook, I see the SSID shared by the routers in the list of WiFi access points, and I can connect to it. Once connected, I can ping both routers' local IP addresses, so I know that the WDS is working. But I can't find a way to find out which of them I have actually connected to.  I wouldn't like to have different SSIDs, because I plan to have the access points hand-off users to one another, and I want it to be transparent for the users. I configured one AP to distribute DHCP IP addresses in one range, and the other in another range, so I can discover which AP I connected to at first, but I want a way to discover which AP I'm connected to now, so that I can find out whether the hand-off actually occurred.


If $|a|$, $|b|$ is finite then $|ab|$ is finite?

Let $a,b\in G$, with finite $G$. Assume the order of element $|a|$, $|b|$ is finite, then what i want to know is $|ab|$ finite?    First what i know is if $ab=ba$, $i.e$, $G$ is abelian, $|ab|$ is finite.   For $(|a|,|b|)=1$, $|ab| = |a| |b|$, and general case i notice that  $|ab| = \textrm{lcm}(|a|,|b|) = \frac{|a||b|}{gcd(a,b)}$    I want to relax this by neglecting abelian condition.  Then is $|ab|$ finite?, If so how one can prove this?


If the matrix rings over two Rings of the same size are isomorphic, then the scalar rings are isomorphic

Let $R$ and $R'$ be rings (with 1 but no further assumptions) and $n \in \mathbb{N}$. Does the following implication hold?     If $M_n(R) \simeq M_n(R')$ then $R \simeq R'$.   If the rings are commutative then it follows from considering the centers of $M_n(R)$ and $M_n(R')$. If the rings are division it also holds and even stronger, it holds even if the matrices are not of the same size.  I thought about considering the embeddings of $R$ in $M_n(R)$ as diagonal matrices, but since I do not want to asume anything about the isomorphism I was not able to conclude that these subrings of matrices in $M_n(R)$ and $M_n(R')$ are isomorphic. I hope someone can help me or with a proof, an idea or a counterexample. Thank you.


Any problems when buying used Xbox One game on disk

There are plenty of new game releases on used disks sold online(for example ) and the price of the disk is almost always lower then the new one.  Are there any restrictions or account bindings when you buy a used game like that? Or I can just buy the disk, install it on Xbox's hard drive, bind to my live account and play without any fear?


How to search for a value in an Array of JavaScript?

I am learning JavaScript and i came across this problem. I want to catch an input value using document.formName.elementName.valueand compare that value with an instance of an Array object.If the value exists it will throw an alert!.


Event recevier will fire twice when i create a list based on another list template

I am facing is strange behavior inside my sharepoint 2013 on-premise farm. here is my problem:-   i have created a custom list , and i added many site columns to it . i name the list "Projects". i created a new event receiver based on the custom list templete, and it is scoped at the web level. inside the event recevier i have methods for ItemAdding,ItemAdded,ItemUpdating,ItemUpdated. now i tested the event receiver on the Projects lists and it is working well. now i saved the Projects list as template (without content). then i created a new list based on the list template, i name it ProjectsNew. now i tested the event receiver on the new list and i have noted that the event receiver will be firing twice !! now i tested the original list and the event receiver will fire only one time correctly.    so not sure why the event receiver will be firing twice on the list created using my list template?. while the original list will be working fine in respect to the event receiver. now i knew that the event receiver will be firing twice on the new list since inside my event receiver i have added some logging (where the event receiver will write to a logs list which i have created), and i can see that duplicate logs entries will be added!! can anyone adivce on this please. at this stage i do not want to share code.. to see if this is a common problem inside sharepoint on-premise farm ??


Is there a way to call a function through using a string that matches its name?

This is what I have attempted, and may give a better gist of the question I'm trying to ask: var x = "run"; var y = "Function"; var xy = x + y;  function runFunction() {     console.log("Function has been called."); }  xy();   What am I doing wrong here?


When is it true that a group of order n is unique up to isomorphism?

A group of prime order is cyclic and so unique.   But is this the only possibility?  How do you characterize finite group of order $n$ for which it is unique up to isomorphism?  As pointed out by friend earlier, if $n=pq$ is composite, then $C(p) \times C(q)$ is not isomorphic to $C(n)$ and we are done.   But Here is a theorem:     Let $n$ be a positive integer. Then the cyclic group $C(n)$ of order $n$ is   the only group of order $n$ if and only if one has $(n, \phi(n)) = 1,$ where   $\phi$ denotes the Euler phi function.   I'm just trying to understand it.


Can you create OpenGL context without opening a window?

Occassionally I hit places where I'd want to get an OpenGL framebuffer object, but where I'm not interested about opening a window of any kind.  Is it possible to create an opengl context without attaching it to a window of any kind?


Which sentence is correct? The one using the, an or no article?

I have a problem with these sentences. which one is correct?and why?  He studied the role of an/the/ ' extended family in caring for older people.


Prove that $\binom{n}{r} + \binom{n}{r+1} = \binom{n+1}{r+1}  $  Thanks in advance, my professor asked us to this a couple weeks ago, but I was enable to get to the right answer.   Good luck!  Here is what I got up to;  $\frac{(n+1)!}{(n-r)!(r+1)!} = \frac{(n)!}{(r)!(n-r)!} + \frac{(n)!}{(r+1)!(n-r-1)!}    $


These two questions were in one question of a list of exercises.  Let $E$ be a Banach space and $T : E \longrightarrow E^*$ be linear.   If $\langle T(x),x \rangle \geq 0$ holds for all $x \in E$, then $T$ is continuous.  If $\langle T(x),y \rangle = \langle x ,T(y) \rangle$ holds for all $x, y \in E$, then $T$ is continuous.   I tried to expand it, as in the proof of the Cauchy-Schwarz inequality, to get a polynomial of degree $2$. Any solution or hint?


I get this error in Lubuntu 12.04 when I try to update in terminal:  $ apt-get update E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?


I have been recently made aware of the following motor, which uses two magnets and a wheel to generate motion, and the creator of this machine claims that this motion is perpetual.    Here is a YouTube video demonstration of the motor in action:   Of course, I know that a perpetual motion machine could not exist due to the First Law of Thermodynamics, however, I've been struggling to find an explanation on why this particular motor seems to run so flawlessly. Obviously, in the video, sounds and friction can be heard, so some energy exchange must be happening. Where is that energy coming from?  I've been told that this machine could not be perpetual due to the fact that magnets lose their magnetism over time. While this is true, I don't find this explanation satisfying, because if demagnetization over time was the only problem, then this machine could still probably run freely for months or years.  The video demonstration is very short, and I strongly suspect that this motor would stop running after a certain amount of time, possibly a few minutes or hours. So my question is why wouldn't it work? Why is it not perpetual? Certainly, the decay of magnetic properties of a magnet is not the only answer.


I am sorry if this is quite elementary question. But I always think, that why we use $:=$ at some places, instead of $=$. Is there any fundamental difference between these two? Before reading Terry Tao's blog (4 months ago), I had never seen a symbol like this (:=).


Why do I get a "file too big" error when I transfer files to an external hard drive that has plenty of room?

I am digitizing my video collection and want to put it on an external hard drive. It is a 1TB Western Digital HD. The files are all over 5GB as I am ripping the files with Handbrake and at a very high quality. I use the copy/paste method of transferring them to the HD and when it hits a certain size, it errors and stops the transfer telling me that the file is too big. There is plenty of space on the HD.  Any suggestions would be appreciated!  Thanks.  I am running Ubuntu 12.04 on a Dell Latitude E6400 32bit.


Deleting the old site and 301 redirect migration to preserve page rank

So I am looking to completely redesign a site, keep the domain name, but change the host. Every damn article / tutorial for successful website migration I was looking at is assuming that the old site/domain will still be live - to host the .htaccess file.  In my case, the client has a site with some company (one of those cheap site-builder companies for beginners). I need to completely redesign the layout and content of the site, move it to a new host and keep the domain and SEO juice - surprisingly, the site has a very good ranking.  What is the best way to go about this ? Thank you.


After upgrade to 18.04 / gnome: how can I activate keyboard shortcuts for maximizing windows with ?

After upgrading to Ubuntu 18.04, I miss the keyboard shortcut to maximize / unmaximize a window. In 16.04, I pressed <Alt><Space>, and the following menu opened:  Afterwards I pressed x to maximize or unmaximize the referring windows. Every menu entry had a certain key assigned. Thes key assignments seem to be gone in 18.04. How can I activate it again?


Why is `object` an instance of `type` and `type` an instance of `object`?

I am a little bit confused about the object and type classes in Python 3. Maybe someone can clear up my confusion or provide some additional information.  My current understanding is that every class (except object) inherits from a base class called object. But every class (including object) is also an instance of the class type, which is an instance of itself and object and also inherits from object.  My questions are:   Is there a reason/design decision why object is an instance of type and type inherits from object? Has the type/class of an object also to be an object itself? How can a class (type) be an instance of itself?  Which one is the real base class object or type? I always thought object would be the most "fundamental" class, but it seems to be an instance of type, which is an instance of object, which is an instance of type, ... Where does this recursion end? Is there a possibility to illustrate the relation between the object and the type class?   I tried looking up the entries of object and type in the Documentation of the Python Standard Library.  Every class (except object) inherits from object.  >>> for x in object, int, float, str, list, dict: ...     print(f'{x.__name__:6}: {x.__bases__}') ...  object: () int   : (<class 'object'>,) float : (<class 'object'>,) str   : (<class 'object'>,) list  : (<class 'object'>,) dict  : (<class 'object'>,)   Every class is an instance of the class type.  >>> for x in object, int, float, str, list, dict: ...     print(f'{x.__name__:6}: {x.__class__}') ...  object: <class 'type'> int   : <class 'type'> float : <class 'type'> str   : <class 'type'> list  : <class 'type'> dict  : <class 'type'>   type is an instance of itself.  >>> type.__class__ <class 'type'>   type also inherits from object.  >>> type.__bases__ (<class 'object'>,)   Also  >>> isinstance(object, type) True >>> isinstance(type, object) True >>> isinstance(type, type) True >>> isinstance(object, object) True   >>> issubclass(type, object) True >>> issubclass(object, type) False


$f:[a,b]\rightarrow R$ that is integrable on [a,b]  So we need to prove:  $$\int_{-b}^{-a}f(-x)dx=\int_{a}^{b}f(x)dx$$  1.) So we'll use a property of definite integrals: (homogeny I think it's called?)  $$\int_{-b}^{-a}f(-x)dx=-1\int_{-b}^{-a}f(x)dx$$  2.) Great, now using the fundamental theorem of calculus:  $$-1\int_{-b}^{-a}f(x)dx=(-1)^2\int_{-a}^{-b}f(x)dx=\int_{-a}^{-b}f(x)dx$$  This is where I'm stuck. For some reason I think it might be smarter to skip step 2, to leave it asL  $$-1\int_{-b}^{-a}f(x)dx$$   because graphically, we've "flipped" the graph about the x-axis, but we're still calculating the same area. Proving that using properties seems to have stumped me.  I prefer hints over solutions, thanks.


Listen which URLs an app tries to connect

Is it possible to listen/monitor an app's network activities?  I have this one app, and I couldn't figure out where it gets its images. I tried to google an app to listen to other apps connections, but I didn't find any. I'm looking for similar functionality as Google Chrome's network tab from developer menu.  I have rooted Nexus 4 with 4.2.2.


Pythonic way to import modules in a packaged .py file

I'm preparing a package for  submission with a similar (simplified) structure. Trying to balance memory footprint, execution time, and package design/dependencies.    Is there a Pythonic or some optimal placement (and why) of from math import exp?   at the top of main.py at the top of each sub-module (shared.py, a.py, b.py) at the top of each class at the top of each method that uses exp() some other ways to import?   A gentle/constructive criticism of (or inquiries about) the structure is welcome :) References would be great!


Divisor of $m$ and $n$ divides $m - qn$ (in proof of Euclidean algorithm)

In Knuth's book "The Art Of Computer Programming Vol.1" there is a description about Euclid's algorithm to find the greatest common divisor of m and n.   And there is a phrase.     $m = qn+r$.  If $r = 0$, then $m$ is a multiple of $n$, and clearly in such a case $n$ is the greatest common divisor of $m$ and $n$. If $r \neq 0$, note that any number which divides both $m$ and $n$ must divide $m -qn =r$ , and any number which divides both $n$ and $r$ must divide $qn+r =m$.   I don't understand why any divisor of $m$ and $n$ must divide $m-qn =r$.


When I boot my Ubuntu appears a message: /dev/sda clean

I'm new in Linux and I don't know what I need to do in this screen or if it's an error.


Since today, post notices do have a blue border:    As you can see in the images in the  that these used to have a gray-ish border.    Either the colors have been updated without a corresponding notification, or there is another .


I have a very wired problem with numbers in javascript. Some big numbers return the wrong value. Here a few examples    let number = 23020678097666048;  console.log(number); // Output is 23020678097666050 console.log(number + 4) // Output is 23020678097666052 console.log(number + 5) // Output is also 23020678097666052     Is it possible that the number is too big? Can anyone explain the behavior to me?


Center of mass in n dimension, possible?

Is it possible to calculate the center of mass for some 20-dimension ($x_i, i=1,\ldots,20$) particles? If it is possible, how can I do that?


How do I create thumbnail resizer in my template

I was wondering to improve thumbnail size as you see here just in front page of template with some text (See ) and table via Blogger CSS.


I'm currently developing a custom activity for Journey Builder but have hit an issue I can not resolve.  The activity is appearing in Journey Builder and can be added to an interaction however when it runs, all of the contacts within the DE defined fail with the following error;     Failed - ExactTarget.JourneyBuilder.Activities.RestActivity.ContactKey: Error binding data bound member.   Googling hasn't thrown up much nor has SFMC documentation. The problem also occurs with the Hello World example on ExactTarget's public Github which makes me think it might be a configuration issue rather than the activity itself but if anyone can offer any suggestions it would be hugely appreciated!  So far...   Activity has no in/out arguments. It simply outputs to console.log whenever the save/validate/publish/execute endpoints fire Granted full read/write access in AppCenter Ensured the contact model has been configured with a root data DE (Sandbox_Customer) that relates to a Contact Key Ensured Contact Configuration > Email has been setup correctly with the email address from the Sandbox_Customer DE Ensured contacts exists in both subscribers and the Sandbox_Customer DE Ensured the journey contact entry is set as multiple Followed the suggestions in this question -


Is there a standard template for a long list of acknowledgement section for master's thesis?

There are a lot of people/websites/organizations that I want to include in the acknowledgement section of my master thesis. I think it does not look good if I name all of them in sequence with a brief explanation.   Would a numbered or bullet list or even a table be acceptable for this purpose? Do you know some useful template?


I have an question that is confusing me, I tried to search on internet but no clear answer... Questions : How can i determine the equation of a conic given 4 or 5 points example : Given the points  A(1,1) B(0,2) C(-3,0) D(2,1) E(1,2) How to write the equation of conic passing through the points ( A,B,C,D ) ?


Can't listen to music with iPhone speaker

I am using an iPhone 4 running ios 7.1.1. Recently, I've had a very frustrating problem, and it is not being able to listen to music with speaker. I'm pretty sure the speaker isn't broken because I can use it for alarms. Also, in my voice memos, the sound works although I have to click that speaker button on the top right corner so that the sound would come out of the speaker instead of the earpiece (top speaker).  When listening to music, there is completely no sound, and I can't adjust the volumes. Here's a screenshot of my music.    I think the problem first occurred after recording with my voice memos and syncing my phone to iTunes to transfer my recording from my phone to PC. After that, there's just no sound coming out of my phone speaker. The music works when i'm using earphones. It's still frustrating though. Any suggestions?


Return 'dir' command results into array/list

I want to know how to return the output of the dir command into an array. I'm using the command like this: dir /s /b *.txt how would I put each result (file name) into an array/list. Thanks


Has anyone tried to write an itunes alternative for linux?

It seems to me that it would not be to hard to parse the database schema on an iPod and make a working application on Linux that could load and manage songs.  There is no hope left in me that Apple will support Linux users in any way if we buy there products like my current iPod 5g running IOS 9.2, so it seems we must help ourselves here.  Yes booting over to my win10 partition is an option but I am very resistant to doing that because of the very long time to start and shut-down since so many updates seem to accumulate during the times I (rarely) boot over to that partition.  And honestly I don't like Windows that much after seeing how easy, customizable and fast my Linux is.  The suggested solutions like Amorok, Rythmbox, Banshee and every other Linux music app I have tried have been unsuccessful at connecting to any but the very oldest iPods running IOS 6 or less.  I may just have to switch to Android music players in the future as my last resort.  Any developers out there with ideas or experience trying to write software to communicate with the iPod?


Representation theory is a subject I want to like (it can be fun finding the representations of a group), but it's hard for me to see it as a subject that arises naturally or why it is important. I can think of two mathematical reasons for studying it:   The character table of a group is packs a lot of information about the group and is concise. It is practically/computationally nice to have explicit matrices that model a group.   But there must certainly be deeper things that I am missing. I can understand why one would want to study group actions (the axioms for a group beg you to think of elements as operators), but why look at group actions on vector spaces? Is it because linear algebra is so easy/well-known (when compared to just modules, say)?  I am also told that representation theory is important in quantum mechanics. For example, physics should be $\mathrm{SO}(3)$ invariant and when we represent this on a Hilbert space of wave-functions, we are led to information about angular momentum. But this seems to only trivially invoke representation theory since we already start with a subgroup of $\mathrm{GL}(n)$ and then extend it to act on wave functions by $\psi(x,t) \mapsto \psi(Ax,t)$ for $A$ in $\mathrm{SO}(n)$.   claims that if our physical system has $G$ as a symmetry group, then there is a correspondence between particles and representations of $G$. I'm not sure if I understand this correspondence since it seems to be saying that if we act an element of G on a state that corresponds to some particle, then this new state also corresponds to the same particle. So a particle is an orbit of the $G$ action? Anyone know of good sources that talk about this?


Android adware lets me opt out: is it safe?

Recently my mom's phone running Android 5.0 has been infected with a piece of adware:    At first we thought this was caused by applications, but as you can see here, only the Google/METROPCS Internet browser is running.  In the photo, there is a button that reads 'opt out'. So I clicked on it and it took me to this link at http://tracker.tpc.re/optout/mobile/:    BUT both of these options smelly fishy. For starters, the manual app is not a download link in the play store but an APK, making it seem like a virus. The second (manual) as for sensitive information, which could harm me even more.   Which one of these options do I choose? Are they legit or do I have to do get rid of it another way?


Viewport clipping noise(?) with a huge object

I'm trying to work with a really large object (XYZ approx. 8,000x7,000x8,000 meters) and the viewport seems to have trouble showing just the things facing me at the corners. It's like things become partially transparent at this scale when they're "near" each other (see animated gif, it's hard to describe). Is there any way to fix this and get a clean display? I want to work at 1:1 scale, should I not at this size?


Let $(E,d), (E',d')$ be two metric space, and $f:E\rightarrow E'$ an injective function such that the image of any compact set from $E$ is compact in $E'$.   How can I prove that $f$ is continuous?  Thank you.