In my research I have large pieces of text of which I like to quote some parts of it, without having to copy/paste and have duplicate pieces. I know I can do that with \include, but the need to have all the excerpts in the many different files does not seem very attractive.  Some more background: I'll provide a large piece of text in the full versions of the reports (appendices), but in the main document I'd like to provide the analysis of these larger pieces of information and refer to excerpts like this:     In the interview as provided in section 3.1, [Engineer A] stated:           Donec scelerisque felis et pellentesque tempor. Mauris blandit, nisi vitae mollis dictum, quam arcu pulvinar ipsum, consequat placerat augue mauris non est.         Which is very similar to what [Engineer B] described, as seen in section 3.2, this issue from his position:           Sed lacinia dictum nunc quis molestie. Maecenas neque erat, egestas id commodo at, pulvinar in odio.      And then these are just two quotes from the large sections 3.1 and 3.2.  What would be the best way to accomplish this?  Preferably something similar to this hypothetical approach:  % appendix text Proin dignissim vitae est at suscipit. \begin[quote1]{savetext}Donec scelerisque felis et pellentesque tempor.   Mauris blandit, nisi vitae mollis dictum, quam arcu pulvinar ipsum,   consequat placerat augue mauris non est. \end{savetext} Nulla sollicitudin lorem a urna tempus, nec convallis purus blandit.  % main report In the interview as provided in section \ref{sec:seclabel}, [Engineer A] stated: \printsavetext{quote1}   Perhaps I could define my own environment, abuse the glossaries package or something like that. For what's it worth, I'm using the memoir package for my documents.

I have a paragraph in one part of the .tex file that I want to be duplicated in another part of the .tex file.  I could do ctrl-c, ctrl-v... as easy as that, but then if I modify one place, I will have to do the same for the other.  Is there a way to take a piece of text, in some part of the document, surround it by some reference marker, and then just use this reference marker elsewhere to duplicate the text?  EDIT: I could just do    \newcommand{\textA}{piece of text}   and then use "\textA" anywhere I want this text to appear.  However, I want "\textA" to be defined in a certain place in the document (in the .tex file). That location appears after the first time I want to use this macro.  Macros can be used only in places in the document after which they were defined, so I can't do that.


A user asks a question to get an answer after a lot of research. They get the first answer, but it's not explained or detailed at all. As the asker did a lot of research on the question, he already understood the answer and therefore accepted that as the answer.  The user didn't get an answer anywhere else before, so this will be an important Q&A thread online.  Perhaps the questions without accepted answers may be the first priority for an answerer.  In the above situation, if the answer is not accepted quickly, then there may be more chance that the question will get more answers. So does the process of quickly accepting an answer degrade a thread?  If it is right, I'm suggesting a feature that an answered question gets more answers with the same importance shown to the OP.

Sometimes I read a question that has an accepted answer, and I feel I won't add any value if I answer.  Should one wait to accept an answer in order not to discourage a potentially better answer?


I'm a beginner in C, and I wrote this code. I wonder why this doesn't work with a '\n' but it still works with '\t'. Can someone please help me? Thank you.  int count=0;  while(1) {     key[count]=getch();      if(key[count]=='\n') //The condition works well when a '\t' is used instead     {         break;     }      else     {         printf("*");     }      count++; }

#include <stdio.h> #include <conio.h> main() {     char ch,name[20];     int i=0;     clrscr();     printf("Enter a string:");     while((ch=getch())!='\n')     {         name[i]=ch;         i++;     }     name[i] = '\0';     printf("%s",name); }   When I give "abc" as input and if I press enter it's not working. Can anyone let me know why the condition ch=getch() != '\n' is not becoming false when I press enter? I have also observed that ch is taking \r instead of \n. Kindly let me know. Thanks


I have this simple code:  var result = Enumerable.Range(1, 100000000).ToArray(); var range = string.Join("", result);   What I am trying to do is generate all digits on a range of (1 to 10^8) or (1 to 100000000)  So in order to do that, I use Enumerable.Range but I get an exeption on the second line of my code which is joining them after the range was made.  I get:  Exception of type 'System.OutOfMemoryException' was thrown.   I need to get:  1234567891011121314... and so on. (without space)   Any idea why?

What is the longest string that can be created in .NET? The docs for the String class are silent on this question as far as I can see, so an authoritative answer might require some knowledge of internals. Would the maximum change on a 64-bit system?  [This is asked more for curiosity than for practical use - I don't intend to create any code that uses gigantic strings!]


This is the sentence:  I was looking forward to drinking at the new pub  , but it was closed.  Thanks in advance.

Normally, 'I want to do something', 'nice to meet you', that the verb always be its normal status. But why 'look forward to doing'?For example, I am looking forward to seeing all of the great ideas that you come up with.


Hi need some help with this problem:   Assume $f : \mathbb{R} → \mathbb{R}$ is a continuous function, satisfying $f(α) =  f(β) +f(α −β)$ for any $α, β ∈ \mathbb{R}$, and $f(0) = 0$. Then $f(α) = α f(1)$.  any hints, thank you.

I need to find all functions $f:\mathbb R \rightarrow \mathbb R$ such that $f(x+y)=f(x)+f(y)$. I know that there are other questions that are asking the same thing, but I'm trying to figure this out by myself as best as possible. Here is how I started out:  Try out some cases:  $x=0:$ $$f(0+y)=f(0)+f(y) \iff f(y)=f(0)+f(y) \iff 0=f(0) $$ The same result is for when $y=0$  $x=-y:$ $$f(-y+y)=f(-y)+f(y) \iff f(0)=f(-y)+f(y) \iff 0=f(-y)+f(y)\iff \quad f(-y)=-f(y)$$ I want to extend the result of setting $x=-y$ to numbers other that $-1$, perhaps all real numbers or all rational numbers. I got a little help from reading other solutions on the next part:  Let $q=1+1+1+...+1$. Then  $$f(qx)=f((1+1+...+1)x)=f(x+x+...+x)=f(x)+f(x)+...+f(x)=qf(x)$$ I understood this part, but I don't understand why this helps me find all the functions that satisfy the requirement that $f(x+y)=f(x)+f(y)$, but here is how I went on:  Thus  $$f(qx)=qf(x)$$ and it should follow that $$f \bigg (\frac {1}{q} x\bigg)= \frac{1}{q}f(x)$$ where $q\not =0$, then it further follows that  $$f \bigg (\frac {p}{q} x\bigg)= \frac{p}{q}f(x)$$ where $\frac{p}{q}$ is rational, and lastly it further follows that  $$f (ax)= af(x)$$ where $a$ is real. Thus functions of the form $f(ax)$ where $a$ is real satisfies the requirement of  $f(x+y)=f(x)+f(y)$.  I don't know how much of what I did is correct\incorrect, and any help would be greatly appreciated. Also is there any way that I can say that functions of the form $f(ax)$ where $a$ is real are the only functions that satisfy the requirement of  $f(x+y)=f(x)+f(y)$? Or do other solutions exist?  Again, thanks a lot for any help! (Hints would be appreciated, I'll really try to understand the hints!)


Alright, recently there was a question on 9gag whether the digits of $\pi$ may contain $\pi$ itself . One user had - in my opinion - a really plausible answer:  .  Nevertheless, I would still argue that $\pi$ can "contain" itself. Since $\pi$ is a non-ending sequence of decimal places, consider that the starting index of the repetition can be an infinitely large natural number. We therefore have an infinite non-repeating sequence prior to that index, thus it would still fulfill the requirement of non-repetitiveness in the sense of $ \pi \not\in \{a/b\} \; \forall \; a,b \in \mathbb{N}$.   I wanted to know if this argument is reasonable and what you think about it.    @5xum As for your first remark:  Let that starting index be $\aleph_0$, the smallest infinite cardinal number.   As for your second remark:  Assume the $(n+1)$-th digit is $\aleph_0$.

Sorry if this has been asked before, but I have a query about the notion that the decimal expansion of $\pi$ contains every possible string of numbers (please note that I am only a "casual" maths enthusiast). If it does, then would the expansion not contain $\pi$ itself? (I.e. 3.1415926...31415926...) That would make $\pi$ a repeating decimal which could, in theory, be represented as an exact fraction. If we constrict the argument to say that $\pi$ only contains every finite sequence of numbers, then wouldn't that be contradictory (we would see 3, 31, 314, 3141, 31415... so why not all the way? We could always add another digit to create a longer finite string ad infinitum)?  Thank you in advance.


Whenever I press play on my Minecraft launcher it starts to load, then goes back to the launcher.  This is what it tells me:  [14:43:45] [Client thread/INFO]: Setting user: ropen908 [14:43:45] [Client thread/INFO]: (Session ID is token:dfacc43356b54812936c84cb46be1b1f:5312a93994b5476983f7d0ea5f4060c0) [14:43:48] [Client thread/INFO]: LWJGL Version: 2.9.1 [14:43:52] [Client thread/INFO]: Reloading ResourceManager: Default # # A fatal error has been detected by the Java Runtime Environment: # #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fee37cc475, pid=10208, tid=8952 # # JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode windows-amd64 compressed oops) # Problematic frame: # C  [ig4icd64.dll+0x30c475] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # C:\Users\David\AppData\Roaming\.minecraft\hs_err_pid10208.log # # If you would like to submit a bug report, please visit: #   http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

When I try to launch Minecraft 1.7.4 or newer, the game crashes on startup, and the game output screen says this:  #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=*, pid=*, tid=* # # JRE version: Java™ SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13) # Java VM: Java HotSpot™ Client VM (* mixed mode, sharing windows-* ) # Problematic frame: # C  [ig4dev32.dll+0x3e88] OR # C  [ig4dev64.dll+0x55ec] OR # C  [ig4icd32.dll+0x104a77] OR  # C  [ig4icd64.dll+0x84930a]   This happens with both Java 7 and 8.  What causes this error, and what can I do to fix the issue?


A function is monotonic on the interval $[a, b]$ and traverses all intermediate values between $f(b)$ and $f(a)$. Prove that the given function is continuous on the interval $[a, b]$.  From symmetry we can assume that the function is increasing on $[a, b]$ Now for a given $\epsilon>0$, for all $c\in[a, b]$ we have $f(a)<f(c)<f(b)\implies f(x)-f(b)<f(x)-f(c)<f(x)-f(a)\implies|f(x)-f(c)|<\min(f(b)-f(x), f(x)-f(a))$ So if $\epsilon>\min(f(b)-f(x), f(x)-f(a))$ then we are done and if $\epsilon \leq min(f(b)-f(x), f(x)-f(a))$ Now from here I don't know how to move forward?

A function $f$ is increasing on $A$ if $f(x)\leq f(y)$ for all $x<y$ in $A$. Show that the Intermediate Value Theorem does have a converse if we assume $f$ is increasing on $[a,b]$.  The converse of IVT along with the additional hypothesis would look like this: Lef $f:[a,b] \rightarrow \mathbb{R}$ be an increasing function on $[a,b]$ which satisfies: if $L$ is a real number such that $f(a)<L<f(b)$ (or $f(a)>L>f(b)$), then there exists a point $c\in (a,b)$ where $f(c)=L.$ If the preceding conditions are met, then $f$ is continuous on $[a,b]$.  The proof (if it's correct) I'm going to show is only for the $c \in (a,b)$, but I think for end points ($a$ or $b$), the method should be similar.  We want to show that given $c \in (a,b)$, for all $\epsilon>0$, there exists a $\delta>0$ such that $|x-c|<\delta \implies |f(x)-f(c)|<\epsilon$.  Since $f$ is increasing, we know that $f(a)\leq f(c)$. If $f(c)-\epsilon<f(a)$, then set $x_1=a$, if $f(c)-\epsilon\geq f(a)$, then we know by hypothesis that a $x_1<c$ exists such that $f(x_1)=f(c)-\epsilon.$ In either case, we have for $x \in (x_1,c]$ $$ f(c)-\epsilon \leq f(x_1) \leq f(x) \leq f(c) .$$  In a similar way, since we know that $f(c)\leq f(b)$, we can deduce that a $x_2>c$ exists such that, for $x \in [c,x_2)$ $$f(c)\leq f(x)\leq f(x_2)\leq f(c)+\epsilon .$$  Pick $\delta = \min \{c-x_1,x_2-c \}$, we then have $$|x-c|<\delta \implies |f(x)-f(c)|<\epsilon .$$  Is this correct? In the proof that I saw, they originally used $\frac{\epsilon}{2}$, instead of just $\epsilon$, but I think this one works just as well, what do you guys think?


The Cayley-Hamilton theory states that every matrix $A \in M_n(\mathbb{C})$ is a root of its own characteristic polynomial $p_A(x)$. My thought is this, since by definition $p_A(x) = \det(xI-A)$, filling in $A$ into this polynomial we obtain  $$ p_A(A) = \det(AI-A) = \det(A-A) = \det(0) = 0.  $$ What is wrong with this reasoning?

Cayley Hamilton Theorem states that if $A$ is an $n \times n$ matrix over the field $F$ then $p(A) = 0$.  We note that $p(\lambda) = \det(\lambda I - A)$. Hence, why can't we just substitute $\lambda$ with $A$ and directly prove Cayley-Hamilton Theorem by saying that $p(A) = p(\lambda) = \det(\lambda I - A) = \det(AI - A) = 0$?


Hello there people of the Linux community!  I want to try Linux out on my Toshiba satellite laptop computer.  I have the .iso file ready and a USB Thumb drive  My specs: Windows 8.1 Intel Core i3 500GB HDD Intel HD Graphics 3000  My PC did not come with Windows 8 pre-installed; It had Windows 7 which I update to Windows 8 and then updated to Windows 8.1  How can I install Ubuntu?  (I haven't touched the partitions or anything)  Can I use WUBI?

I know this question has been asked a lot, but I didn't find an answer here.  Ubuntu 12.04.2 64-bit was installed offline just a few hours ago on one ext4 partition, and a swap partition was also created.  The installation went fine, but now I can't get into Ubuntu.  I want to use the Windows 8 boot manager, to select between the two operating systems, so I downloaded EasyBCD and added an entry for Ubuntu.  The entry shows up in the boot manager menu, but when I click on Ubuntu I get the following message:    NST/AutoNeoGrub0.mbr not found   I tried enabling/disabling Secure Boot and restarting, but it still shows that error message.     Out of desperation I tried to find a solution myself and reset the BCD configuration via EasyBCD. Now Grub boots fine and Ubuntu too, but I can't boot Windows 8 anymore.    Then, for whatever reason after installing all updates for Ubuntu, I restarted the system and now I can't boot into Ubuntu. Only via Live CD and the old Linux entry can I start it.


I am trying to downgrade firefox-esr from 60 to  from ppa:mozillateam/ppa.   PPA only has the latest version so apt-get can't downgrade the package. I downloaded the deb but installation fails due to dependency.  $ sudo gdebi  ~/Downloads/firefox-esr_52.9.0esr+build2-0ubuntu0.16.04.1_amd64.deb  Reading package lists... Done Building dependency tree         Reading state information... Done Reading state information... Done This package is uninstallable Breaks existing package 'hunspell-en-us' that conflict: 'iceweasel'. But the '/home/user/Downloads/firefox-esr_52.9.0esr+build2-0ubuntu0.16.04.1_amd64.deb' provides it via: 'gnome-www-browser,iceweasel,www-browser'

What is the most straight forward way to downgrade Firefox 57 to Firefox 56?   This is to have more time to wait for working replacements for legacy extensions.


I got this game demo from a site, and noticed this piece of code:  if(nx == food.x && ny == food.y) {     var tail = {x: nx, y: ny};     score++;     create_food(); } else {     var tail = snake_array.pop();      tail.x = nx; tail.y = ny; }  snake_array.unshift(tail); //how is tail used here?   I didn't find any other declarations of a 'tail' variable, so how is this happening? I'm pretty new to this area of programming (web dev/scripting languages), so I'm not sure if this is allowed.  The full code:  $(document).ready(function(){     var canvas = $("#canvas")[0];     var ctx = canvas.getContext("2d");     var w = $("#canvas").width();     var h = $("#canvas").height();      var cw = 10;     var d;     var food;     var score;      var snake_array;       function init() {         d = "right";          create_snake();         create_food();          score = 0;          if(typeof game_loop != "undefined") clearInterval(game_loop);         game_loop = setInterval(paint, 60);     }     init();      function create_snake() {         var length = 5;          snake_array = [];          for(var i = length-1; i>=0; i--) {             snake_array.push({x: i, y:0});         }     }      function create_food() {         food = {             x: Math.round(Math.random()*(w-cw)/cw),              y: Math.round(Math.random()*(h-cw)/cw),          };     }                      function paint() {         ctx.fillStyle = "white";         ctx.fillRect(0, 0, w, h);         ctx.strokeStyle = "black";         ctx.strokeRect(0, 0, w, h);          var nx = snake_array[0].x;         var ny = snake_array[0].y;  if(d == "right") nx++;         else if(d == "left") nx--;         else if(d == "up") ny--;         else if(d == "down") ny++;          if(nx == -1 || nx == w/cw || ny == -1 || ny == h/cw || check_collision(nx, ny, snake_array)) {             init();             return;         }          /* @@@@@@@@@ This is where it is happening @@@@@@@@@ */         if(nx == food.x && ny == food.y) {             var tail = {x: nx, y: ny};             score++;             create_food();         } else {             var tail = snake_array.pop();              tail.x = nx; tail.y = ny;         }          snake_array.unshift(tail);          for(var i = 0; i < snake_array.length; i++) {             var c = snake_array[i];             paint_cell(c.x, c.y);         }          paint_cell(food.x, food.y);         var score_text = "Score: " + score;         ctx.fillText(score_text, 5, h-5);     }      function paint_cell(x, y) {         ctx.fillStyle = "blue";         ctx.fillRect(x*cw, y*cw, cw, cw);         ctx.strokeStyle = "white";         ctx.strokeRect(x*cw, y*cw, cw, cw);     }      function check_collision(x, y, array) {         for(var i = 0; i < array.length; i++) {             if(array[i].x == x && array[i].y == y)              return true;         }         return false;     }      $(document).keydown(function(e) {         var key = e.which;         if(key == "37" && d != "right") d = "left";         else if(key == "38" && d != "down") d = "up";         else if(key == "39" && d != "left") d = "right";         else if(key == "40" && d != "up") d = "down";     }) })   Source of code:   Any help would be appreciated :)

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


In some book I saw this example on how to multiply numbers $83$ and $157$.  $$83 \qquad 157$$ $$41 \qquad 314$$ $$20 \qquad 628$$ $$10 \qquad 1256$$ $$5  \qquad 2512$$ $$2  \qquad 5024$$ $$1  \qquad 10048$$  The procedure is that in the left column we divide numbers by two and write down the result under the number we divided (if the number is odd then we take integer which is closest to the result and less than the result) and we repeat the procedure until we arrive at the number one.  In the right column we just take the next number to be twice as big as the previous one.  Now we look at the two columns and discard those numbers in the right column if they correspond to the even number in the left column, so we discard $628$ and $1256$ and $5024$.  If we now add the remaining numbers in the right column we obtain $157+314+2512+10048=13031$ but $13031=83 \cdot 157$.  So my questions would be:  1) Does this method works for every two natural numbers $m,n$?  2) Can someone explain why this method works?

I'm studying a combinatorics text () in preparation for taking discrete math this upcoming semester. I've taken a fair amount of math in college, through Calculus II, but this is my first 500+ level math course.    In chapter 2 of the  book, the author introduces an algorithm for multiplication called Russian Peasant Multiplication. I want to prove that this algorithm will always result in the product of two numbers.  I've been chewing on the proof for a while now, and just can't seem to get any traction. Thanks in advance for any help.  Description of Algorithm  I'll try to explain the algorithm clearly. The goal of the algorithm is to find the product of two numbers $m$ and $n$. The below table is filled out for $m$ and $n$:  $$\begin{array}{c} m&&n&\\ \hline \bigl\lfloor \frac{m}{2} \bigr\rfloor&& 2n \\ \bigl\lfloor \frac{m}{4} \bigr\rfloor&& 4n \\ \bigl\lfloor \frac{m}{8} \bigr\rfloor&& 8n \\ \bigl\lfloor \frac{m}{16} \bigr\rfloor&& 16n \\ \bigl\lfloor \frac{m}{32} \bigr\rfloor&& 32n \\ \end{array}$$  The sequence of numbers in both columns is the sequence $a_n = 2a_{n-1}\text{ where }a_1=2$. The columns are extended down until the value in the left column is equal to the number one. After filling out the table, the product is found by adding the values of the right column where the left column is an odd number.  For example, to multiply 18 and 37 with the algorithm:  $$\begin{array}{c} m&&n&\\ \hline 18 && 37 \\ 9 && 74 \\ 4 && 148 \\ 2 && 296 \\ 1 && 592 \\ \end{array}$$  To find the product, cross out values of the left column where the value of the right column is even:  $$\begin{array}{c} m&&n&\\ \hline \require{enclose} \enclose{horizontalstrike}{18} && \enclose{horizontalstrike}{37} \\ 9 && 74 \\ \enclose{horizontalstrike}{4} && \enclose{horizontalstrike}{148} \\ \enclose{horizontalstrike}{2} && \enclose{horizontalstrike}{296} \\ 1 && 592 \\ \end{array}$$  And add the remaining numbers in the right column to get the result: $18\times37=74+592=666$  Alternate Description of Algorithm  As an aside, here is a shorter way to describe the algorithm, repeat the below steps until the left column == 1:  • Halve the last number in the first column • Write the result below (discard the remainder) • Double the last number in the first column. • Write the result below.   Now, for every even number in the first column, delete the adjacent number in the second column. Add the remaining numbers in the second column.  What I've done so Far  I haven't been able to get much of anywhere on the proof. One thing I did was create a bit of a different way of arriving at the same outcome:  $$\begin{array}{c} m&&n&&\text{index}&&\text{remainder}&&\text{if remainder == 1, }n\times2^{Index}&\\ \hline 18 && 37 && 0 && 0 \\ 9 && 74 && 1 && 1 && 74\\ 4 && 148 && 2 && 0 \\ 2 && 296 && 3 && 0 \\ 1 && 592 && 4 && 1 && 592\\ \end{array}$$  Which brings to light the relationship between this algorithm and binary numbers (the fourth column in the above table is the product in binary, read bottom to top).   I also wrote some Python functions to help me explore the problem,


Consider the following sentence. Which one is correct? Why?   Someone called but as soon as they heard my voice they hung up. Someone called but as soon as he/she heard my voice they hung up.

another question, I used the following phrase:     Your reader is [...], but they are a busy person.   I have two difficulties here:   In the first phrase, a reader, being singular noun, certainly implies is; In the second phrase, they, being a plural pronoun (regardless that it refers a single person), still requires are, but are implies the plural for busy persons which sounds awkward (a reader ⇆ persons);   Obviously, if I used "...but he is a busy person", everything works fine, but I'm trying to use a gender-agnostic form.  What is the proper number agreement here?


When given the input 150, I expect the output to be the mathematically correct answer 70685.7750, but I am getting the wrong output 70685.7812.  #include<stdio.h>  int main() {   float A,n,R;    n=3.14159;    scanf("%f",&R);   A=n*(R*R);    printf("A=%.4f\n",A); }

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Today, I saw . The first comment pointed out that it had been . Would it have been appropriate to flag the SU question as a duplicate of the SO question, or is the dupe flag specifically intra-stack?  Note: I have not so flagged it; I don't have enough rep on SU to be able to know whether it has been so flagged/VTC'd.

What's the right course of action for cross-site duplicates?  There are two flavors:   A question is posted which belongs on another site and ends up already having been asked there. I can't find an example right now, but it's bound to happen soon if it hasn't already. The same question is posted in two places at the same time. Take  for example, which is a duplicate of , posted within a half hour of each other by the same user.   Possible actions:   Move it to the proper site and close it once it gets there as a duplicate. Provide a way to close it right away as a cross-site duplicate, without moving it first. Flag it and let a moderator merge them. Close it as "no longer relevant" or something else.   Additionally, flavor 2 is a bit of a special case; perhaps the question really spans both sites in terms of content and intended audience. Should multiple-postings in this case be allowed? If so, should they somehow be linked to each other? If not, how do we avoid a migration war?


How can I get Ubuntu for some new mobile device as are planning to launch new mobile device, what about installation of additional Apps, what built in features & Apps are to be offered with OS, expecting detailed info.

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


A ranch dressing recipe I found online calls for a few dried herbs and a couple of fresh herbs, specifically fresh chives and fresh Italian parsley.  To save time and money, I'd like to substitute if the fresh herbs for dried herbs. Is it OK to make the substitution if the dressing is allowed to rest overnight, hopefully giving the substitutes enough time to release its flavors? And if so, would it be a one to one substitution (e.g. 1 teaspoon fresh = 1 teaspoon dried)?

When replacing a fresh or leaf herb in a recipe with the dried or powdered kind, what is the ratio I should normally use for the substitution?  E.g. if the recipe calls for 2 teaspoons finely chopped rosemary, how much dried rosemary should I use?


I am trying to prove that the number of edges of a complete graph with $x$ vertices is always $\frac{x^2-x}{2}$.  I'm having trouble figuring out this proof by induction.  I've only just started doing induction proofs and I'm not entirely sure where to begin.  Thank you very much!

Proof by induction that the complete graph $K_{n}$ has $n(n-1)/2$ edges.   I know how to do the induction step I'm just a little confused on what the left side of my equation should be. $E = n(n-1)/2$  It's been a while since I've done induction. I just need help determining both sides of the equation.


I just configured Postfix and Dovecot, I can send and receive emails. At the moment I have a problem with Hotmail, all my email are saved on the SPAM folder. My MX has few days, maybe they will control my MX and then set it to their "whitelist".  However, supposing to have DNS configured correctly and a clean IP address, what are the steps to follow to improve the possibilities to pass Hotmail's (and other) SPAM filter?  I have started to use the SPF record on my DNS (TXT) and set the reverse IP to my mail.example.com MX.   ...  then ?

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


If J is a Jordan matrix. How to prove that the elements on the principle diagonal of $ e^J$ are exponential function of elements on the principle diagonal of $J$?  If it is two dimensional, then I can prove by calculating it. I have trouble proving it in general n $\times$ n case. Could anyone kindly help? Thanks!

Let $X$ be a real $n \times n$ matrix, then there is a Jordan decomposition such that $X = D+N$ where $D$ is diagonalisable and $N$ is nilpotent.  Then, I was wondering whether the following is correct.  $e^{tX}(x) = \sum_{k=0}^{m} \frac{t^k N^k}{k!} \left(e^{t \lambda_1} \alpha_1 v_1+..+e^{t \lambda_n} \alpha_n v_n \right).$  Here $x = \sum_{i=1}^{n } \alpha_i v_i$ and $v_i$ are the eigenvectors of the diagonalisable matrix, $\lambda_i$ are the eigenvalues of $D$ and $m$ is the degree up to which $N^k$ is still non-zero.  Is this correct or am I doing something wrong? Cause I could not find a general equation for this matrix exponential, so I tried my best. (Thus, I am only asking for a verification or correction of this answer.)  If anything is unclear, please let me know.


I just visited the question here, which is locked as a "community effort":    I (legitimately) wanted to "Follow" the question so that I would be notified if the status of those types of questions changed in the future.  When I press the "Follow" button, it appears to work. But then I notice a banner at the top of the page:     This post has been locked; locked posts can't be voted on     When I refresh the page, it's clear that the "Follow" action did not work.  Something's clearly wrong here. Ideally I would be able to follow the question. If not, the action button should not be available. And if I can click the button, it should show the correct error message.

Initially I was unable to unfollow deleted posts from the Following tab in my profile. That seemed to been fixed recently so I was cleaning out the deleted posts when I encountered one that would not unfollow.  Turns out the deleted post is locked since it was deleted as Spam.


Why does height:100% not work in IE. How can we get around this.

I have a container div that holds two internal divs; both should take 100% width and 100% height within the container.  I set both internal divs to 100% height. That works fine in Firefox, however in IE the divs do not stretch to 100% height but only the height of the text inside them.  The following is a simplified version of my style sheet.  #container {    height: auto;    width: 100%; }  #container #mainContentsWrapper {    float: left;     height: 100%;    width: 70%;    margin: 0;    padding: 0; }   #container #sidebarWrapper {          float: right;     height: 100%;    width: 29.7%;    margin: 0;    padding: 0; }   Is there something I am doing wrong? Or any Firefox/IE quirks I am missing out?


has posted a answer on , but their profile page shows March 17 as "Last seen".    In this , you can click on "Newest" to view the bug clearly.  Is this a bug in the "Last seen" functionality?

I don't know if this is a bug. It could be, or there might be a simple explanation.   I was visiting a user's profile because they had become uncharacteristically quiet when I noticed the following. The user's last visit is recorded as being March 17         However, when I visited their answer page I saw the following        Is there an explanation for this (seemingly) odd behaviour? How is it possible to post an answer seven days later without that visit being recorded?


Could someone give me a suggestion to solve this problem?  Let $\frak{g}$ a nilpotent Lie álgebra. Prove that there is an ideal  $\frak{h}\subseteq\frak{g}$ such that $\dim(\frak{g}) = \dim(\frak{h}) + 1$

There is an exercise in Humphreys's An Introduction to Lie Algebras and Representation Theory: "Any nilpotent Lie algebra contains a codimension 1 ideal".  The proof I am thinking of is the following.  Suppose the Lie algebra $L$ satisfies $L\neq[L,L]$. Then $\pi\colon L\to L/[L,L]$ is a projection onto an abelian algebra. Choose a codimension 1 subspace $I\subset L/[L,L]$. Then $I$ is an ideal and its preimage $\pi^{-1}(I)$ is necessarily an ideal in $L$, because any subspace containing the derived algebra is an ideal. Moreover, $\pi^{-1}(I)$ has codimension 1. $\square$  The only condition on $L$ is that $L\neq[L,L]$, which holds for solvable Lie algebras as well. Is this proof correct? How come Humphreys didn't set the exercise with "nilpotent" replaced by "solvable"?


I had windows 7 installed, and I set my PC clock to a specific time. It worked fine but then i also installed Kubuntu (now its a dual boot). Whenever I run Kubuntu my clock changes time by -4 hours and when I again run Windows its time too has changed. So every time i set my clock in windows, Kubuntu changes it by -4hrs and this also effects my windows clock any help?

Dual boot system Windows XP Pro and Ubuntu 12.04.  I have the bios set for the correct time and Ubuntu set for US Eastern time.  Ubuntu will boot up and the time will be off by -4 hours.  If I correct the time in Ubuntu then when I boot up in Windows XP the time will be off by + 4 hours.  This is a fresh install of 12.04. I did not have this problem before reinstalling Ubuntu.


Is there any rigorous way to show that it is impossible to have any inertial reference frame with the speed of light apart from the blow up of the Lorentz factor?

Can anyone provide me with a complete mathematical proof about why an observer frame  cannot surpass the vacuum speed of light? I have looked for answers in Quora and FB groups but no one is really convincing. In fact the majority assume that the constancy of vacuum speed of light in all referentials without any proof, other people "only" say that it can be proved using the causality principle but without any proof, which is really frustrating! I hope my curiosity will be satisfied in PhysicsStackexchange, have a nice day!


Doing some very basic decimal maths in Ruby (x = 1/b * c).   a = BigDecimal.new("1");  b = BigDecimal.new("0.8903");  c = BigDecimal.new("0.8903");  x = a / b * c;  puts x   Output: 0.9999999998379   To rule out problems I've simplified the test case to just one decimal (x = 1/b * b)  a = BigDecimal.new("1");  b = BigDecimal.new("0.8903");  x = a / b * b;  puts x   Output: 0.9999999998379   However rearranging the original formula to x = c / b gives the correct answer.  a = BigDecimal.new("1");  b = BigDecimal.new("0.8903");  c = BigDecimal.new("0.8903");  x = c / b;  puts x   Output: 1.0   Any ideas what's causing this or whether this is a BigDecimal bug?  Thanks for the comment telling me what's wrong with floating point maths, that's why I'm using BigDecimal not floats, unless BigDecimal also has the same issue?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


This question is from the perspective of a student who has only a fundamental idea of eigenvectors and eigenspaces (and linear algebra in general). If my understanding is correct, an eigenvector E of a vector V projects the vector V along the direction of itself by a factor of the associated eigenvalue (lambda).  Av = (lambda)v   Now, in PCA we try to find the eigenvectors of the covariance matrix of a dataset. I am unclear as to the purpose of this step: what is the practical interpretation of this? A covariance matrix cannot be interpreted as a vector, but maybe a set of vectors.

In today's pattern recognition class my professor talked about PCA, eigenvectors and eigenvalues.   I understood the mathematics of it. If I'm asked to find eigenvalues etc. I'll do it correctly like a machine. But I didn't understand it. I didn't get the purpose of it. I didn't get the feel of it.        I strongly believe in the following quote:     You do not really understand something unless you can explain it to your grandmother. -- Albert Einstein   Well, I can't explain these concepts to a layman or grandma.   Why PCA, eigenvectors & eigenvalues? What was the need for these concepts? How would you explain these to a layman?


I am working on a homework about arrays and while loop in java. The question is to create a method called public int getPopulation(String province) which returns the population of the province. If there is no such province, return a constant called NO_SUCH_PROVINCE, which is an int set to -1. But I cannot get what I want.  public class Country { public static final int ON = 0; public static final int QC = 1; public static final int BC = 2; public static final int AB = 3; public static final int MB = 4;  public static final int NO_SUCH_PROVINCE = -1;  private String[] provinces; private int[] population;  public Country() {     provinces = new String[5];     provinces[0] = "Ontario";     provinces[1] = "Quebec";     provinces[2] = "British Columbia";     provinces[3] = "Alberta";     provinces[4] = "Manitoba";      population = new int[5];     population[ON] = 12851821;     population[QC] = 7903001;     population[BC] = 4400057;     population[AB] = 3645257;     population[MB] = 1208268; } public int getPopulation(String province) {     int i = 0;     int temp = 0;     while(i < provinces.length) {         if(province == provinces[i]) {             temp = population[i];         }else {             temp = NO_SUCH_PROVINCE;         }         i++;     }     return temp; }

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


We went out for a picnic and took lots of photos but we didn't spot that there was no memory card in the camera until afterwards.   If there was no memory card in Digital SLR camera is there a way to get back the photos taken?   Some images are shown when the camera is connected to a laptop but they are not saved and not detected.

I went out today and took over 75 photos with my Nikon Coolpix P100, but I didn't have a memory card in my camera. I'm now unable to retrieve any of the photos - is there any way to recover them?


I'm trying to show that the equality $$\sum_{i=0}^{k} \binom{m}{i}\binom{n}{k-i} =\binom{m+n}{k}$$  Is true. I know it is since there is a good combinatorical argument for it. If we have a group of $m$ men and $n$ women, and we need to choose $k$ then we know its equal to $\binom{m+n}{k}$, but we can also say that we  choose $0$ men and $k$ women, or we can choose $1$ man and $k-1$ women, or we can choose $2$ men and $k-2$ women, etc.  So in theory they should be equal, but I can't work the math behind it.  A hint in the right direction would be appreciated

I am reading up on Vandermonde's Identity, and so far I have found proofs for the identity using combinatorics, sets, and other methods. However, I am trying to find a proof that utilizes mathematical induction. Does anyone know of such a proof?  For those who don't know Vandermonde's Identity, here it is:  For every $m \ge 0$, and every $0 \le r \le m$, if $r \le n$, then  $$ \binom{m+n}r = \sum_{k=0}^r \binom mk \binom n{r-k} $$


So I was trying to uninstall Python 3.8.2 and I used a command from someone that was like sudo apt purge python3.8 And it started uninstalling everything else, even Firefox and all, the console is gone, everything is gone. So I try to restart and now I get prompted with a lot of beautiful black pixels but nothing else. I read something about the tty console so now I'm the tty console but nothing happens when I do crtl + alt + F7. What do I do ? I'm completely lost I started using Ubuntu this morning...

I am a new Ubuntu user running Ubuntu 13.04.  I've been trying to install and use a DeDRM tool, but I've been having problems doing so. I was following some directions that said I needed a version of Python 2.7, but not anything Python 3.0 or later (because 3.0 versions are missing some necessary libraries?). I tried to install Python 2.7.5.6, but it didn't work. I thought it was probably because I had the later version of Python, so I went through terminal and removed Python 3.3, so I could install the earlier version of Python.  Now that I've uninstalled Python 3.3, a lot of applications no longer work, including the terminal and the Ubuntu Software Center. I have no idea how to fix this problem now.


It is  profile   It happens when (for example) question is down voted 5 times and up voted 2 times (+10/-10), or an answer upvoted 1 time and downvoted 5 times -  title doesn't disappear from these recent rep changes.

On a user's profile summary tab, the reputation amount (+/-) is shown, with the link to the question.  If a user gains 10 reputation for an upvote then it is shown as +10. But when a series of down vote events takes place for the same post, and the reputation reaches 0, it should show 0, but instead it's empty/blank.  Is this a bug or is it done intentionally?


From what I remember it is an old book. It's about a guy who lives near woods and is a fisherman. He finds some alien stones that glow and I think burn a hole through his desk drawer. They get larger and merge together. I think aliens come.

I was reminded of this by . I think it was an older story, one I read in an anthology somewhere in the early 90s (decent chance of it being one of the Alfred Hitchcock collections). At the beginning of the story, an itinerant is found dead on a beach, horribly burned on one side. The assumption is that he died from a lightning strike, supported by that there's an orange ball of glass (about marble-sized) underneath him, posited to be caused by the lightning fusing the sand into glass.  Over the course of the story, the protagonists (I want to say there's at least two, one who's sort of the "viewpoint" protagonist and one who actively researches the bits of glass, maybe a doctor or scientist) learn that the bit of glass can move slowly on its own, and generate a fair amount of heat if trapped, the itinerant likely burned when he collapsed on top of it. I have a vague memory that they found a way to demonstrate the balls effect on-command by striking it with a hammer and seeing it glow with heat. Tracking the ball, they find it's seeking out other bits of glass with the same properties. They set a trap with some dynamite and blow up a much larger sphere (I don't remember the size, at least beach-ball sized if not  sized), thinking they have solved the problem. The story ends with two orange grains of sand beginning to move towards each other, restarting the process...


I wondered whether there is a order in the list of Stack Exchange sites in the Android application, as Stack Overflow and Super User, the biggest sites (I think so) are on number 1 and 3. So if there even is an order, by what variable is it sorted?

The list of Stack Exchange sites within more Stack Exchange communities are sorted in ascending order in the dropdown like below.  Whereas in the Stack Exchange Android app, it is not sorted in ascending order. First I thought it was sorted based on "live" and "beta" sites. But after scrolling down I found a few more "live" sites are in between the "beta" sites. Here is a screenshot from the app.  While writing this question I found the sort pattern is quite similar as of in . But this doesn't make any sense in app. Can we follow a common sorting approach in both site and app?


With an up arrow, I can get the previous command but the same command show multiple times. What can I do to make every command show only once and navigate through them faster?

The same command is listed in my history again and again. How can I avoid this? I know it's possible via HISTCONTROL but I haven't found the right way.


I want to use \cyrgup in my document for some derivations. Is there any package that needs to be installed?

Note I'm not actually planning on writing any, for instance, Russian prose or even any Russian words. It's just that, on paper, I've always had the habit of denoting sets by uppercase roman letters, sets of sets by script letters and, when the need arises, sets of sets of sets by uppercase Cyrillic letters. Is there some package I can load which will allow me to typeset (in LaTeX math mode) Cyrillic letters much as I would typeset Greek letters? ie. $\Zhe$ to produce an uppercase zhe. Thanks!


I created a model in QGIS 3.6 with three inputs parameters (two vector layer and one vector field).  When I run the model, the inputs are not sorted in a correct way: the vector field is requested before the vector layer.   For this simple example, it doesn't matter, however for more complex models with severals inputs, I fear the user could feel not confortable.   Is it possible to choose the order of the inputs parameters ?   Here are two screenshot.  "Conduite" = pipe in french "regard" = manhole in french  I want the user to select firstly "regard" layer, then "ID_regard" field within "regard" layer.

Using QGIS 3 graphical modeler I created a model with a variety of input parameters (> 10). When starting the model, a nice user interface is generated. But the arrangement of the GUI elements is totally confused and apparently unpredictable during creating the model. It does neither seem to depend on the arrangement of input parameters in the graphical modeler nor on the chronological order in which the input parameters are added to the model.   Is there a way that let's me arrange the GUI elements in the order I desire?


Apparently, Star Trek: The Next Generation's counselor Deanna Troi has a . However, her mother, Lwaxana Troi, has a space-American accent.  Why, then does Troi have a space-Israeli accent? Is it something to do with the accent her father has or is there another in-universe reason for it?

The TNG character  always speaks with a slight foreign accent, which I've been unable to place. In-universe it's presumably a Betazoid accent, but what is it based on out-of-universe?  It can't be the actress's own accent, since  is English-American. Is there any information on what she based the accent on for her character, or what kind of real-world accent (if any) she's trying to emulate?  What sort of out-of-universe accent is Troi/Sirtis using?


Using Python, I scan Unix mounted volumes for files, then add or purge the filenames in a database, based on their existence.  I've just realised that if the volume being scanned is unmounted for some reason, the scan will assume every filename on that volume should be purged!  Yikes.  Is there any better way to mount volumes or any suggestions at all?  About the only thing I can think of is to put a permanent dummy file on each volume which I check for before scanning, thereby ensuring that the volume is only scanned if the dummy file can be located.

How to check a particular directory is mounted on the Linux machine. For instance there is a folder named test, I want to check if it is mounted or not.


So I am learning the difference between global and local vars in Python 2.7 and as per my understanding  local var is one that is defined within a function and  globar var is one that is defined outside of the function.  I created this simple function to test how these local and global vars work when used in combination  def f():     global s     print s     s = "Python is great."     print s    Before I ran the function, I declared the global s  s = "I love python!"  f()   The output was:  >>> f() I love python Python is great   I understand till this part, but what I don't understand is, when I call the run a print s  outside the function, why is it printing the local variable instead of the global one. Does this mean that the global var s is used once and discarded?  >>> print s Python is great   can someone please explain this?

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


I tried to define indexed counters, such as x1, x2, . . . etc, by defining them like this : \newcount\x1, \newcount\x2, . . . etc, but it didn't work. Is there a workaround for this in TeX or LaTeX ?   I have written a small tex-file that illustrates what happens when you try it. Note added : With the remark made by @cfr, that in LaTex one may use the command \newcounter{name} the question has a good answer that cannot easily be found by using the search engine. (I have some good reference books for TeX, but not for LaTeX.)  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%  Example tex-file that illustrates what happens  %% %%  when you use a number in the name of a counter  %% %%                                                  %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%           \documentclass{article} \usepackage[paperwidth=0.75in, paperheight=1.5in]{geometry} \pagestyle{empty}  \begin{document}  \newcount\a  \newcount\b \newcount\c7  \a=1   \b=41 \c7=78  \noindent a = \number\a   \par \vskip 5pt \noindent b = \number\b   \par \vskip 5pt \noindent  c7 = \number\c7   \end{document}

I would like put picture into table, and my idea is define new command as below>   \newcommand{\EJ471}{\includegraphics[scale=0.150]{EJ_471.jpg}}   But compiler reports an error. If I use the command name for example \EJa, everything is all right. I've read similar questions as      But still I don't understand why it does not work.


The arrow doesn't effect the function of the buttons as I’m still able to use all the 3 keys. I guess it's just an overlay:

A while ago I upgraded from Ubuntu 17.04 to Ubuntu 17.10 and everything is working fine except for the fact that the icon in the window title bar of my Terminal seems to be stretched out to some ridiculous size.    This only seems to happen in the Terminal window. The Nautilus icon is completely fine.    The problem seems to go away if I login into an Xorg session instead of a Wayland one. I've looked around and didn't find any immediate solution to this. Any help would be greatly appreciated.


When selecting a message on MSE chat to reply about half of the time only the flag icon loads. The other icons don't load. The buttons are there, because replying or starring a message is possible when you guesstimate the right location for the trigger.

For some time now, whenever I select a chat message by tapping it on mobile device, there are no action icons:        However when scrolling, either up or down, the icons appear:        Can the icons please appear when selecting a message, not only after scrolling?  Browser: mobile Chrome 66, android device. Can also reproduce though on desktop Chrome 66 by emulating mobile device via the dev console.  Also, after scrolling once, the issue goes away until reloading the page, i.e. when selecting a message the action icons appear right away.


I observed this bug in version 1.0.73 of the android app. These are the steps to follow in order to replicate it.     From the navigation drawer select any site.   Once you see the set of newest question, from the action bar list select the    tags which will show you a list of tags for those sites. From that select any one tag .     We can see a list of filtered question based on the tag, now change the orientation of the phone. At this moment the selected tag disappears and so does the filtered set of questions.

Changing the orientation of your device within the tag selection view while asking a question removes all selected tags and clears the textbox.     Steps to reproduce:     Ask a question (does not happen when editing) Edit tags Enter some text in the box  Select a tag from the suggestion list Repeat the previous two steps as many times as you care to Rotate the device (source / target orientation doesn't matter, just need to change it) All selected tags and text typed in the textbox are gone and must be re-entered   I've reproduced this using version 1.0.63 of the SE app on two devices:     HTC One E8 m2ss (the Hong Kong version) rooted and running stock 5.0.2 ATT Galaxy S3 i747, rooted and sim unlocked, running Slimkat 4.4.2.build.4.1.official ROM on Android 4.4.2


Edit: This is not asking how to get Ubuntu to remember WiFi passwords. I'm asking for the opposite.  Most of the other questions I find ask how to get Ubuntu's NetworkManager to stop forgetting the WiFi password. Instead, here I'm wondering how to get it to forget the password each time. That is, for security purposes, I would like it so that I would manually need to choose a WiFi network and enter its password each time I start Ubuntu and login. I already know how to get it to stop automatically connecting to a network, but not how to get it to be amnestic about passwords.

I'm connecting to some enterprise wireless network (eduroam).  The thing is that it saves the User/Password in the wireless settings, anyone can click 'Show password' and see my university account password.  What I want is that it prompts me everytime the credentials inputs when I try to connect to the network and don't save it under the 'settings' page.  Is this possible? If yes, how?  Thanks  Ubuntu 18.04 LTS


The problem is show that if $I$ and $J$ are ideals in a commutative ring s.t. $1 \in I+J$, then $1 \in I^m+J^n$ for all natural numbers $m, n$ (Marcus Number Fields Ch3 Problem 7).  I can write $1 = a + b$ for $a \in I$ and $b \in J$. Considering $m=n$ for now, from the binomial theorem we have $$ 1^n = 1 \quad\in\quad I^n + J^n + IJ\sum_{k=0}^{n-1}{I^kJ^{n-1-k}}.$$ I am not sure where to go from here. If $IJ\sum{I^kJ^{n-1-k}}$ were contained in either $I^n$ or $J^n$ we would be done but this does not always hold.

If $I$ and $J$ are ideals in a ring $R$ with 1 which are  co-maximal, i.e $I+J = R$, show that $I^m$ and $J^n$ are co-maximal for all $m,n$ in $\mathbb{N}$  Work done:     Should I proceed using    By taking $$K=I^m+J^m \neq R$$  Let $$S=\{I,J \in R \mid I^m+J^n \neq R \}$$ be the required partially order set ordered by inclusion then  $$I+J \subseteq I^n+J \subseteq I^n+J^m \subseteq \ldots $$  Then, I think this chain doesn't have an upper bound...as $I^m+J^n \neq R$ for all $ m,n \in \mathbb N$. Am I right??  Thanks for any help!!


Trying to identify a short story (possibly read in Asimov's SF magazine) from the late 70s. A man - possibly a professor or scientist - is working or somehow involved with a young man and young woman. I think they have some interest in either time travel or the properties of time. The professor/scientist has a device or capability that allows him to see the couple's past/present/future - basically their entire lives) at the same time.

I was looking at  and I think I may have read the same story, but I'm not sure because a few of the details don't quite line up.  The story I read was about a man who had built a machine that could work out when a person would die.  The way it worked was described as sending a small electric charge along the four-dimensional "sausage" which was a person's extent in spacetime - the story definitely used the word "sausage".  The person who had built the machine had made several predictions which he put in sealed envelopes, including that of his own death.  The story ended with him being visited by a pregnant woman who wanted to know how long her child would live.  The builder saw that she would die very soon, and tried to keep her in his office as long as possible to avoid her fate by giving her tea and cakes, but she insisted on leaving and got hit by a car as she crossed the road to leave his office.  This caused him to kill himself, and the date in his envelope was correct.  I read this in 1999 at the earliest and 2001 at the latest.  Around the same time - possibly but not definitely in the same book - I read a story about a murder mystery in which the murder weapon turned out to be a time-accelerated flashlight.  I tried googling with these details, but kept running into the  which made it very difficult to find earlier stories on that theme.


So I was reading on Forbes and it said a 2017 survey showed that     28% of workers making $50,000-$99,999 usually or always live paycheck to paycheck, and 70% are in debt.   I wonder what kind of financial status would be described as "in debt". If I have a 30-year mortgage to pay, am I in debt? Or if I have college loan to pay, am I in debt? Thank you very much for your time!

75% of Americans are in debt. I'd like to know if I'm also considered in debt if I am paying my mortgage on a house.  I didn't think I was in debt if I own the house. I guess I pay 'rent' to a bank who sold the mortgage to me. If I stop paying, I lose the house I never 'owned'.  So what is the reality? Are people considered in debt if their only 'debt' is the mortgage/loan for their house, or are these people excluded from the statistic?


Trying to get a simple insert saving data and the french characters are read back as box characters. How can I fix this?  $query = 'insert into category (category_en, category_fr) values                             ("Seamanship", "Matelotage"),                             ("General - Histoiry", "Généralités - Histoire")),                             ("Sailing", "Voile")';   When I display the results, I am seeing:   G�n�ralit�s � Histoire   I already noted that if I manually change these characters to be &eacute; that I can save them correctly.  However this does not apply when saving directly from input fields in a form. All French characters in this case are being saved correctly.  I tried to apply SQLite3.escapestring to the query above but it still failed.   Just wondering is there a more straight forward way instead of manually changing each character?  SOLUTION   does the trick.  $query = utf8_encode('insert into category (category_en, category_fr) values                                 ("Seamanship", "Matelotage"),                                 ("General - Histoiry", "Généralités - Histoire")),                                 ("Sailing", "Voile")';   Honestly when forms input fields save french characters correctly one would believe a hardcoded statement would be pretty logical. Hope this helps anyone looking for a quick solution.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I've been able to fit a piece wise linear fit to my data set using Rs splines2 package.  I'm hoping someone could help me with interpretation and vizualization.    Here is the model code:  fit <- glm(Frequency ~ state + eff_year + channel + marital_status + usage +  term_2 + pay_plan_2 + dbs(insured_age2, degree = 1, knots = c(40, 65)) +  vehicle_type + dbs(veh_age, degree = 1, knots = c(29, 45, 60)) +   dbs(rating_base_amt, degree = 1, knots = c(5000, 15000, 40000)) + dbs(length, degree= 1, knots = c(8, 30, 38)) + dbs(credit_bucket, degree = 1, knots = c(524, 499, 649, 724)), family =  quasipoisson, data = spline_training_set)    Below is part of my summary.    My question is now to interpret the spline? Is the estimate on the first spline the estimate I would use for estimate values 40 and below and for all records 65 and above using the second estimate?  Further more, if I wanted to make a line graph using ggplot2 showing each term on the x axis and the estimate on the y axis, how exactly would I do that?

I'm trying to fit a spline for a GLM using R.  Once I fit the spline, I want to be able to take my resulting model and create a modeling file in an Excel workbook.     For example, let's say I have a data set where y is a random function of x and the slope changes abruptly at a specific point (in this case @ x=500).    set.seed(1066) x<- 1:1000 y<- rep(0,1000)  y[1:500]<- pmax(x[1:500]+(runif(500)-.5)*67*500/pmax(x[1:500],100),0.01) y[501:1000]<-500+x[501:1000]^1.05*(runif(500)-.5)/7.5  df<-as.data.frame(cbind(x,y))  plot(df)   I now fit this using  library(splines) spline1 <- glm(y~ns(x,knots=c(500)),data=df,family=Gamma(link="log"))   and my results show  summary(spline1)  Call: glm(formula = y ~ ns(x, knots = c(500)), family = Gamma(link = "log"),      data = df)  Deviance Residuals:       Min       1Q   Median       3Q      Max   -4.0849  -0.1124  -0.0111   0.0988   1.1346    Coefficients:                        Estimate Std. Error t value Pr(>|t|)     (Intercept)             4.17460    0.02994  139.43   <2e-16 *** ns(x, knots = c(500))1  3.83042    0.06700   57.17   <2e-16 *** ns(x, knots = c(500))2  0.71388    0.03644   19.59   <2e-16 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  (Dispersion parameter for Gamma family taken to be 0.1108924)      Null deviance: 916.12  on 999  degrees of freedom Residual deviance: 621.29  on 997  degrees of freedom AIC: 13423  Number of Fisher Scoring iterations: 9   At this point, I can use predict function within r and get perfectly acceptable answers.  The problem is that I want to use the model results to build a workbook in Excel.    My understanding of the predict function is that given a new "x" value, r plugs that new x into the appropriate spline function (either the function for values above 500 or the one for values below 500), then it takes that result and multiplies it by the appropriate coefficient and from that point treats it like any other model term.  How do I get these spline functions?    (Note: I realize that a log-linked gamma GLM may not be appropriate for the data set provided.  I am not asking about how or when to fit GLMs.  I am providing that set as an example for reproducibility purposes.)


The classical picture of EM radiation is the picture of a wave with electric and magnetic field oscillating perpendicularly to each other and to the direction of propagation. Let us neglect the magnetic field part. The energy carried per unit time by such a wave is proportional to the intensity of the wave which is defined as E^2. Here E is the electric field. Away from the source, E of the EM wave falls off by (1/r) where r is the distance from the source. So the energy carried by the EM radiation falls off by (1/r^2). The quantum picture of EM radiation is the picture of a Photon. The energy of a photon is defined as (h*f) where h is Plank's constant and f is the frequency of the radiation. So the energy of Photon is fixed.   Correspondence If in in classical description, one says that an EM wave has high amplitude or high intensity or high energy then the quantum mechanical way of interpreting is to say that the EM wave has high number of photons. So amplitude/intensity/energy of EM wave corresponds to number of photons.  Question: It is possible that at a point far away from the source, the electric field which falls of as (1/r) will attain a value such that k*(E^2)=h*f. where k is the proportionality constant between energy and intensity of the EM radiation. i.e. the energy of EM radiation will correspond to single photon. What will happen beyond this particular distance r? Beyond this distance E will fall off as (1/r) and energy will fall off as (1/r^2) in the classical picture. But the energy of the photon which only depends on frequency should remain constant (there can be no division or waning of the photon). How then is it possible to have the classical and quantum pictures consistent to each other beyond the distance r ?.

At the end of this nice video (), she says that  is a chain reaction of electric and magnetic fields creating each other so the chain of wave moves forward.  I wonder where the  is in this explanation. What is the relation between electromagnetic wave and photon?


I'm trying to install Ubuntu alongside Windows. I have a 3TB hard drive, but when I installed Windows 7 it only allowed me to use 2.2TB.  I want to install Ubuntu in my free hard drive space (which isn't formatted). I supposed I should use the Something else option, but I really don't know what to do. I tried the Install alongside Windows option and it gave me an error message     starting sector number, 4294967296 exceeds the msdos-partition-table-imposed maximum of 4294967295   What should I do?   motherboard : Asus Maximus IV // Hard drive    : Western Digital Caviar Green 3TB

I just bought a 3TB WD green drive, but when I try to partition in in gparted I get an error like:  ====================== libparted : 2.3 ====================== partition length of 5860530176 sectors exceeds the msdos-partition-table-imposed maximum of 4294967295   And when I try with Ubuntu "Disk Utility" I get a similar error like:  Error creating partition: helper exited with exit code 1: In part_add_partition: device_file=/dev/sdc, start=0, size=3000592982016, type=0x83 Entering MS-DOS parser (offset=0, size=3000592982016) MSDOS_MAGIC found looking at part 0 (offset 0, size 0, type 0x00) new part entry looking at part 1 (offset 0, size 0, type 0x00) new part entry looking at part 2 (offset 0, size 0, type 0x00) new part entry looking at part 3 (offset 0, size 0, type 0x00) new part entry Exiting MS-DOS parser MSDOS partition table detected containing partition table scheme = 0 got it got disk new partition Error: partition length of 5860528002 sectors exceeds the msdos-partition-table-imposed maximum of 4294967295 ped_disk_add_partition() failed


I don't understand answer formulated in ways like this "Thus, $p\ast q$ is the distribution of $X+Y$. The cross-correlation $p\circ q$ is the distribution $c=(c_n)_n$ defined by $c_n=\sum\limits_kp_kq_{n+k}=P[Y-X=n]$ for every $n$. Thus, $p\circ q$ is the distribution of $Y-X$."  Can someone explain this in an easier way? See:   PS: By convolution I meant the type of convolution that is used in image and signal processing. Stuff like this:

What's the difference between convolution and crosscorrelation? So why do you use '-' for convolution and '+' for crosscorrelation? Why do we need the "time reversal on one of the inputs" when doing convolution?


My question is this:  If we can look back to roughly 500m years after the big bang and have estimated the age of the universe at 13.7B years, why is the galaxy we are looking at not a part of the non-observable universe?  Shouldn't its space have inflated so much that it is moving away from us faster than the speed of light?  One article I have read is that the true size of the universe may actually be 250 times the size of the observable universe. (Mihran Vardanyan at the University of Oxford + others)  If this is true, then wouldn't the age of the universe be older than we have predicted?  My second question is why isn't the Microwave Background Radiation a part of the non-observable universe if it is older than the oldest galaxies which we cannot see as they are moving away faster than light.

The observable universe is approximately 13.7 billion years old. But yet it is 80 billion light years across. Isn't this a contradiction?


I have installed Ubuntu 14.04 but it runs very slow. Whenever I open any window like "Dash Home" or "Firefox", it takes more time than another computer.  Graphics of my Sony Vaio:- Intel® 852GM/855GM x86/MMX/SSE2

I just installed Ubuntu 14.04 on a Dell laptop with 1.7Ghz Pentium M and 1Gbyte memory.  Graphics are Intel® 852GM/855GM x86/MMX/SSE2, OS type is 32bit.  The whole system is VERY slow. When I launch the applications manager, for example, I need to wait in order to see the letters I typed appear!  It is as if the CPU was overloaded and no memory available, but I only have Firefox running.  How can I make the system run smoother? It used to have Windows XP installed and it worked fine.


Today I installed Ubuntu on my Acer E-15. I go on Netflix a lot and need to be able to watch it. I tried to install Wine but for some reason it wouldn't install "Package dependencies cannot be resolved" I also couldn't copy and paste because I can't scroll over text nor right click .  I tried going on Chromium. When I tried to watch a show "This webpage has a redirect loop".  What I am to do?

Is there a way to stream Netflix content to my Ubuntu machine?


we write as f dash of x   when talk about this formula.    I heard someone pronounce it as "prime" somewhere else.  Does single quote (') pronounce dash, prime or something else?

As in x′ = x + t  "Ex (?) equals ex plus tee".  In Russian it is called "штрих" (shtrikch).


I tried finding a previous post of mine but was unable to so I am asking for more info.  Apologies for the noob question but I am trying to decide between two iMacs since my current Late 2014 iMac is chugging more and more when rendering files using the Cycles engine:  2019 27" iMac:   3.6GHz 8-core 9th-generation Intel Core i9 processor, Turbo Boost up to 5.0GHz 8GB 2666MHz DDR4 memory (Upgrade the RAM to 64GB via 3rd party) Radeon Pro Vega 48 with 8GB of HBM2 memory 1TB SSD storage   OR  Current 27" iMac Pro:   3.2GHz 8-core Intel Xeon W processor, Turbo Boost up to 4.2GHz 64GB 2666MHz DDR4 ECC memory Radeon Pro Vega 56 with 8GB of HBM2 memory 1TB SSD storage   I googled a lot but still do not quite understand is it is better to have a higher clock speed (GHz) or number of Core to render files faster.  There is about a $2k difference between the two iMacs but want to know if that difference is worth it in the long run.  Any feedback is appreciated.

I am considering purchasing a Mac for my godson who will be using it to run Blender 2.8.  I know very little about this program.  All I can find are requirements for a Mac that will run earlier versions of Blender.  Would someone please recommend a list of requirements for a Mac (or a link to a list of requirements) that I could use to find a model that can run 2.8?  Thank you in advance for all your help! Sincerely, M. Lap


Every day, I see a lot of questions on the same topics, for example:   How to perform an Ajax call / how to regularly update data from a database on a page How to use dates in PHP or in MySQL How to reformat a PHP array   These kind of questions are asked many times, everyday, often from new users, who say right away that they are beginners in JavaScript, jQuery, PHP, etc.  Should I answer these questions? Or downvote them, and flag as duplicates?

seems to suggest that it's common knowledge that it's not to be encouraged. However, if there is a simple (and usually really short) answer, should I not vote to close it and answer instead?


As mentioned in PythonCookbook, * can be added before a tuple. What does * mean here?  Chapter 1.18. Mapping Names to Sequence Elements: from collections import namedtuple Stock = namedtuple('Stock', ['name', 'shares', 'price']) s = Stock(*rec)  # here rec is an ordinary tuple, for example: rec = ('ACME', 100, 123.45)   In the same section, **dict presents:  from collections import namedtuple Stock = namedtuple('Stock', ['name', 'shares', 'price', 'date', 'time']) # Create a prototype instance stock_prototype = Stock('', 0, 0.0, None, None) # Function to convert a dictionary to a Stock def dict_to_stock(s):     return stock_prototype._replace(**s)   What is **'s function here?

What exactly do *args and **kwargs mean?  According to the Python documentation, from what it seems, it passes in a tuple of arguments.  def foo(hello, *args):     print hello      for each in args:         print each  if __name__ == '__main__':     foo("LOVE", ["lol", "lololol"])   This prints out:  LOVE ['lol', 'lololol']   How do you effectively use them?


We all are pretty familiar with the Friedmann models of the expanding universe, but at present I would like to concentrate on the model where the universe goes on expanding with the lapse of time.  We know that if we mark spots on a balloon and inflate it, distance between these spots increases gradually(with time, of course). We may draw an analogy that these spots represent the galaxies. Now imagine a space within one of these spots, whose dimensions is indeed less than that of the spot concerned. With time, the dimensions of this space goes on increasing with time. If we compare this space to the interstellar(as well as interplanetary) space, and by the process stated above, go on imagining spaces within the one imagined before, we arrive at a limit where the rate of dimension variation of the space with time becomes very small in magnitude. Here I ask my question: could it happen so that objects in the universe(even solids) are expanding at a rate so very feeble(much much smaller than even the rate at which the universe expands), because all objects, be they solid or any other physical form,  constitute some space within this universe, on account of its existence, and can be designated as a space within the spot considered in our balloon model. It is indeed a mere whim of mine to compare a universe model with that of a balloon-spot model! Nonetheless, please remove my doubts upon this trifling matter, that has perplexed me a good deal.

I have looked at other questions on this site (e.g. "why does space expansion affect matter") but can't find the answer I am looking for.  So here is my question: One often hears talk of space expanding when we talk about the speed of galaxies relative to ours. Why, if space is expanding, does matter not also expand? If a circle is drawn on balloon (2d plane), and the balloon expands, then the circle also expands. If matter is an object with 3 spatial dimensions, then when those 3 dimensions expand, so should the object.  If that was the case, we wouldn't see the universe as expanding at all, because we would be expanding (spatially) with it.  I have a few potential answers for this, which raise their own problems:   Fundamental particles are 'point sized' objects. They cannot expand because they do not have spatial dimension to begin with. The problem with this is that while the particles would not expand, the space between them would, leading to a point where the 3 non-gravity forces would no longer hold matter together due to distance Fundamental particles are curled up in additional dimensions a la string theory. These dimensions are not expanding. Same problems as 1, with the added problem of being a bit unsatisfying. The answer seems to be (from Marek in the previous question) that the gravitational force is so much weaker than the other forces that large (macro) objects move apart, but small (micro) objects stay together. However, this simple explanation seems to imply that expansion of space is a 'force' that can be overcome by a greater one. That doesn't sound right to me.


I want to chain up a very long LED strip to a single source of data. I will be using an ESP8266 and about 15 meters of WS2812b LEDs. With about 30 LEDs per meter, I need to power about 450 of these total. I've read multiple places they're about 60 mAh each, so 60 * 450 = 27A required to run all of these, assuming I want full brightness at red or white (not sure which draws most).   I've experienced that I can (but should not) power about 6 meters (180 LEDs) with a single 2.1A supply, which actually ended up drawing 2.3A (Samsung phone charger). I wrapped the 6 meters around a tube, so I could easily solder some wires from the top to the bottom, so the voltage drop was lower. Every color looked great, but white had a yellow look to them. I know that wasn't suitable at all, but I was simply trying it out.  I'm now trying a different approach, which should work much better. If I for every 3 or 4 meters wire up a wall charger to the strip, can I achieve what I want? This is what I had in mind:    Here's another thing I had in mind, which would help a lot, since I don't have wall outlets every x meters in my house. Can I do something like this instead, if I make sure to use good gauge wires, so they don't lose voltage?:    As a third option, I have a couple of 12v 2A supplies (like the ones above). Can I buy some cheap, alternative hardware, such as voltage regulators, and wire it up in an alternative way?  The question here is not powering the strips. The question is really if chaining the supplies as my first image is possible and what might could go wrong, if I do it that way.

I have 16 meters of  LED Strips . The strips have 60 LED/s per meter and run on 5 volts. They come in 4 meter reels.  I know how i want to control them but i am unsure about how to hook them up safely and so that they draw enough power. I know that i cannot just hook up a power supply to one end and expect the entire 16 meters to be powered. I read online that for the non-addressable ones that run on 12volts you need to hook up the power supply in multiple places, is this the same case with the 5Volts?   Also how do i know what kind of power supply i need and how do i hook it up so that all the LEDs are fully powered? Will i need more than one power supply or should one be enough?


I would like to use Ubuntu from a pendrive, but I read that it works like a live cd. I would like it to keep my files and new packages I install.  Is there a way to install Ubuntu on the pendrive as if it were in an HD?

If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly.


This is an area of English that I consistently have trouble with. Consider the following sentences.   I have a couple of books on my desk. I have a bunch of books on my desk. I have a number of books on my desk. I have a few books on my desk. I have several books on my desk. I have many books on my desk.   How many books, give or take, do I have on my desk in each case?   [digression: one example of how I tend to get these wrong is the following: not long ago, my wife (native speaker of American English) and me were out with a few friends from out of town. At one point I said "[famous landmark] is only two hundred meters from here", to which my wife replied "no, it's more like a a couple hundred meters".]

What does “a couple” mean to you, and what does “a few” mean to you?  Is there a proper way to use these words?  It was striking to hear that “a couple” meant two (2) to someone.  My reaction was, “how/why do you make a short word longer by adding an extra syllable to just say ‘two?’”  I think Few: 2-3, Couple 4-6, Several 7+.  What are your thoughts?


What if we encrypt sha-1 hash of the plain text, along with the plain text using AES-256 in CTR mode?  How much future proof the above method would be in comparison to AES-GCM or any other method where auth tag is made public?  Ultimately the question comes down to which has higher chance of getting cracked in future? AES-256 vs HASH Algorithms.  If AES_256_ENCRYPT_CTR(key, sha-1(plainText)+plainText) is more secure, why in TLS 1.3 AES-GCM is used?  The improved version of this protocol presented in this .

It seems that even in MAC-then-encrypt systems like SSL, something like HMAC is used rather than a plain hash. Why?   Suppose we use some stream cipher; then why can't we use $Encrypt(m | H(m))$ as the MAC-then-encrypted version of the message? Assuming no bad relations between $Encrypt$ and $H$, what are the possible weaknesses? It seems that in this case we are encrypting the hash with part of a secretly keyed stream cipher keystream, and the hash is secure; does this not fulfil an approximation of the ideal MAC?  This must be somehow bad, since no secure protocol seems to use it. Why?


How is  different from a simple copy,  or ?  I just compiled a little utility and want to add it to /usr/sbin so it becomes available via my PATH variable.  Why use one vs the other?

I've seen in many places used install -d to create directories and install -c to copy a file. Why not use mkdir and cp? Is there an advantage in using install?


I'm a LaTeX beginner and just trying to find out, if it is possible to use LaTeX to display Tibetan Mantras and discovered the package ctib, which seems to be quite powerful. But I cannot find out, if it is possible to put the sign \tibSnaldan, which is contained in the package, ON TOP of the letters - as you see it if you "google" a picture of the Tibetan letter HUNG.  I've already conducted hours of research on the Internet but could't find a solution. (\stackrel doesn't work as the Tibetan letters disappear...)  I would be so thankful if someone could help me!!!

Thank you very much for your quick and skilled answers to my first question! Unfortunately they didn't solve my problem exactly, so I become more precise in my question: I'm working on an German translation of a commentary of a Tibetan meditation practise and want to add some expressions and mantras in Tibetan writing and tried the well elaborated ctib package. The great thing about this ctib package is the ability to write in well-known WYLIE transcription system. But for certain Mantras I need to put either the \tibSnaldan sign (part of ctib)  (actually this one mainly over the Tibetan letter Hung)  or just the small circle (...there is also a Sign defined in ctib, but don't know it at the moment, \tibRangjasso or something like this, but any small circle is fine...) over certain Tibetan letters like ba, ma, su, bu, ha and some more. It would be so great if someone could show me a solution!


I am trying to get arcpy to select features in a shapefile that appear in a list generated from a model output file in a variable called 'died'.  The list looks like this:  died ['acadian022', 'acadian051', 'acadian052', 'acadian121', 'acadian152',  'acadian191', 'chick031', 'chick032', 'chick052', 'chick132', 'creeper032',  'downy032', 'downy042', 'kentucky041', 'ovenbird012', 'ovenbird061',  'pewee011', 'pewee021', 'pewee032', 'pewee051', 'pewee071', 'pewee082',  'pewee101', 'thrush022', 'thrush042', 'thrush152']   I can get arcpy to select one of these points using this:  inFeatures = "nests" outFeatures = "C:/test.gdb/new_nests" tempLayer = "nestslyr" expression = "ID = 'acadian022'"  arcpy.CopyFeatures_management(inFeatures, outFeatures) arcpy.MakeFeatureLayer_management(outFeatures, tempLayer)   arcpy.SelectLayerByAttribute_management(tempLayer,"ADD_TO_SELECTION", expression)   But when I change this to a for loop, the loop runs fine and I do not get any errors, but the tool does not select any points.  for x in died:     expression = "ID = 'x'"     arcpy.SelectLayerByAttribute_management(tempLayer,"ADD_TO_SELECTION",     expression)   Does anyone know why this might be the case?

I am trying to loop through a shapefile, selecting each feature in turn and copying it to a temporary shapefile to by included in a union analysis. I'm using a cursor to find the ID name for each feature which I'm setting to a varible 'Name'. Whenever I try to use this variable as part of the where clause in arcpy.Select_analysis I get an error:   ExecuteError: ERROR 999999: Error executing function. An invalid SQL statement was used. An invalid SQL statement was used. Failed to execute (Select).  The code I'm using is:  Name = 101 where = "\'\"StudyID\" = \\'"+str(Name)+"\\'\'" arcpy.Select_analysis("C:\\input.shp", "C:\\output.shp", where)   If I type it out without using the variables:  arcpy.Select_analysis("C:\\input.shp", "C:\\output.shp", '"StudyID" = \'101\'')   it works fine  What to I need to do to fit the variable into the sql statement?


This is a consequence of the exponential rule, but how do I actually prove it to be true?

This problem would be easy if I could use the fact that $\exp(x)=e^x$, but I have to use the following definition: $$\exp(x)=\sum_{n=0}^{\infty}\frac{x^n}{n!}$$ I can also use the fact that $$\exp(x+y)=\exp(x)\exp(y)$$ So how do I prove, using those two equations, that $$\forall x\in \mathbb{R}:\exp(x)>0 $$ I mean, I can't just use the definition, because if $x<0$ then it isn't so obvious that $\exp(x)=\sum_{n=0}^{\infty}\frac{x^n}{n!}>0$. Can someone give me a hint or two?  Thanks!


I have the string xyz which is a line in file1.txt, I want to copy all the lines after xyz in file1.txt to a new file file2.txt. How can I achieve this?  I know about cat command. But how to specify the starting line?

Input file1 is:  dog 123 4335 cat 13123 23424  deer 2131 213132 bear 2313 21313   I give the match the  pattern from in other file ( like dog 123 4335 from   file2).  I match the pattern of the line is dog 123 4335 and after printing all lines without match line my output is:   cat 13123 23424 deer 2131 213132 bear 2313 21313   If only use without address of line only use the pattern, for example 1s how to  match and  print the lines?


I have the following circuit, where I put R52 = R53 = 2700 Ohms :    Triggering levels are of 1V and 2V approximately according to my computations, that is okay according to the following figure showing input in green and output in blue :    But what I find really strange is that the maximum voltage output is around 3.3V and not at 5V. How would you explain that ? And last detail : how would you explain that the output is not exactly at 0V when the input is high?  Thank you very much for your help.

First Question for me.  I have benefited from other answers here but have not fully resolved my problem.  Here's my problem...  The LM311 Comparator output does not drive the N channel MOSFET fully on.  The LM311 has a 110mv ref voltage on the inverting input. The non-inverting input is driven by an opto-isolator output. The Opto-isolator is driven by 1 of 4, AC 60Hz voltages.  <1VAC, 9VAC, 55VAC and 115VAC.  The goal of the design is to have the FET fully turn on the 12VDC fan when there is appreciable AC voltage.  So fan fully On for the 9, 55, and 115VAC voltages.  It seems it should work because I measure voltages on the non inverting input of 1.6, 2.2 and 3VDC respectively for the 3 appreciable AC voltages.  And my ref voltage on the inverting input is 110mv.  So it "almost" works because the fan is off at the <1VAC, but not fully "On" for the other AC voltages.  I believe this is because Vgs is 167mv, 6.1V, 7.7V and 9.9 Volts for the 4 AC voltages listed above.  And the fan is only getting 7, 8 and 10VDC instead of a desired 12VDC. Would really like to be able to fully turn this FET all the way on.  So Close!  Any input or guidance is appreciated.  Ps-Things I think I've done right? Flyback diode across the fan. Putting N channel FET to switch to ground on low side of fan. LM311 has Open collector output using correctly?  PSS-I realize that the pinouts for the LM311 are not right in my schematic.  I have them right in my protoboard circuit.  Its a single device.  Pin 2 is noninveritng and pin 3 in Inverting  Thanks Again.      The suggested duplicate question and answer doesn't help for the following reasons: Both diagram and schematic are"No file found" making it pretty difficult to follow the answers. I am not using any positive feedback in my circuit as I don't think I need one. I have a simple pull up resistor to my 12V supply, not a voltage divider to the power supply as is mentioned in the answer. Thanks.  Just for the record I wanted to post a more accurate schematic and thanks for the response on using a Cap to hold up the opto isolator output. I actually have a full wave input to the phototransistor but I'm sure the cap will help anyway. To answer the last question, the Pin 7 comparator output has a pullup resistor to 12v. The issue is still that Vgs is only 10v when the comparator has 3v on pin 2 and 110mv on pin 3. I would have expected the LM311 output to go much closer to 12v (Vcc) with those inputs. The intent is for the FET to go completely on for pin 2 voltage > pin 3.


So I am running a JUnit Test, which gets the rating of the movie(Hashmap:  HashMap<String, Rating> movieList))  BUT if there is no rating against a movie throw MovieListException.   JUNIT expected vs actual   Learning about Throwing exceptions so I don't know what I am doing wrong?   In the Rating class I check whether object value is null, then throw MovieListException In MovieList class this line is getting error of null: Integer value = movieList.get(string).getRating(); EVEN though I am catching and returning the e object (Which I assume it need to RETURN? BASED on JUNIT TEST?)      ISSUE: I am getting a null pointer instead of my MovieListException   The test class      /* Test 5: Can't get a rating for an unrated movie      */     @Test(expected = MovieListException.class)     public void nonexistentRating() throws MovieListException {         String result = movies.getRating("The Ghost in the Invisible Bikini");      }   MovieList class   public class MovieList { private HashMap<String, Rating> movieList = new HashMap<String, Rating>();  public void addMovie(String string) {     // TODO Auto-generated method stub     movieList.put(string, new Rating(RatingType.NONE, null)); }    public String getRating(String string) throws MovieListException {     // TODO Auto-generated method stub     String ratingString = "";      try {         Integer value = movieList.get(string).getRating();          if(value != null && value > 0) {             for(int i = 0; i < value; i++) {                 ratingString += "*";             }              return ratingString;         }                        } catch(MovieListException e) {         System.out.print(e.getMessage());         return e.getMessage();     }       return "No rating"; }  public void setRating(String string, Rating rating) {     // TODO Auto-generated method stub     movieList.replace(string,  rating); }  package movieListQuestion;   Rating class  public class Rating {   private Integer ratingValue; private RatingType typeValue;  public Rating(RatingType type, Integer rating) {     this.ratingValue = rating;     this.typeValue = type; }     public Integer getRating() throws MovieListException {     if(this.ratingValue == null) {         throw new MovieListException("No rating");     }     return this.ratingValue; }   }  Exception class      package movieListQuestion;  /* A trivial exception class for the Movie List program.  */ @SuppressWarnings("serial") public class MovieListException extends Exception {      public MovieListException() {         super();     }      public MovieListException(String message) {         super(message);     }  }   UPDATED getRating method from MovieList class  public String getRating(String string) throws MovieListException {         // TODO Auto-generated method stub         String ratingString = "";              Integer value = movieList.get(string).getRating();              if (!movieList.containsKey(string)) {                throw new MovieListException("Movie not found");             }              if(value != null && value > 0) {                 for(int i = 0; i < value; i++) {                     ratingString += "*";                 }                  return ratingString;             }                              return "No rating";     }

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


There is a problem which i tried a lot but didn't reach to any conclusions:How can i show that the highest power of n which is contained in $(n^r-1)!$ is $\frac{n^r-nr+r-1}{n-1}$?My try:$(n^r-1)!$=$(n^r-1)(n^r-2)(n^r-3)\cdot\cdot\cdot\cdot3.2.1$.But what next can i do?

What is the highest power of n in $(n^r-1)!$ where $n$, $r$ are positive integers? The answer supplied is $\frac{n^r-nr+r-1}{n-1}$   The highest power of $n$ in $n^r!  = r +$ the highest power of $n$ in $(n^r-1)!$ as $n^r$ contributes $r$ powers.    So,  the highest power of $n$ in $n^r!$ needs to be $\frac{n^r-nr+r-1}{n-1} + r =\sum_{1≤t<r}n^t $.    This is clearly true if $n$ were prime according to .  Again,  if $r=1$, $\frac{n^r-nr+r-1}{n-1}$ becomes $0$.    But according to , the  highest power of composite $n$ in $(n-1)! ≥ 1 $.  So, the answer does not seem to hold for $r=1$ if $n$ is composite. If $n=\prod p_i^{a_i}$, where $p_i$ are distinct primes,  $n^r=\prod p_i^{ra_i}$  So, the highest power $(q_i)$ of $p_i$ in  $n^r!$ is  $$\sum_{1≤t<∞}\left\lfloor\frac{n^r}{p_i^t} \right\rfloor =\sum_{1≤t≤ra_i}\frac{n^r}{p_i^t} +\sum_{ra_i+1≤t<∞}\left\lfloor\frac{n^r}{p_i^t} \right\rfloor$$  as $p^t|n^r$ for $t≤ra_i$.  So, the highest power of $p_i^{a_i}$ in  $n^r!$ is $\left\lfloor \frac{q_i}{a_i} \right\rfloor=P_i$(say).   So, the highest power of n=$\prod p_i^{a_i}$ in  $n^r!$ is $min(P_i)$  I could not proceed anymore.


What is Verlinde's statistical description of gravity as an  leads to the correct inverse square distance law of attraction between classical bodies?

There are people proposing the possibility of using entropic force to explain the gravity force between objects. The emphasis is that entropy is more fundamental than energy. It is the closest study as entropy is closely related to information. What is Mathematical formulation of ?     ... It implies that gravity is not a fundamental interaction, but an emergent phenomenon which arises from the statistical behavior of microscopic degrees of freedom encoded on a holographic screen...


I've learnt about this idiom and its meaning , but i don't know about its common use since i think the word "bullet" is used as an exageration for a painful task or or an unpleasant situation. What is the appropiate way to use it?

I just learnt about the expression "to bite the bullet", meaning Accept the inevitable impending hardship and endure the resulting pain with fortitude (as seen in  in phrases.org).  I have read about its origin, but it looks a bit unclear or disputed, since different historical reasons appear in .  Is there any authoritative or more relevant source to get to know its origin? Does it always mean "show courage" or it depends on the region?


I saw that $$x^{x^{x^{x^{x^{x^{x^{.{^{.^{.}}}}}}}}}}$$ exists as a real number (convergent) if and only if $$x\in[e^{-e}, e^\frac{1}{e}].$$ How can I prove this??

This question arose from . I am interested to find a nice proof about the convergence of $${^n}a=\underbrace{a^{a^{\ .^{\ .^{\ .^a}}}}}_{n\ \text{times}}.$$ I find with google a necessary and sufficient condition to have the convergence is $\frac{1}{e^e} \leq a \leq e^{1/e}$ but the part for $a\le1$ need some ugly work.      Does anyone have an elegant/slick proof ?


I am having a hard time getting around this issue.   I am working with a enterprise DB table that has a column called balance which is a float.   I am trying to insert a decimal value into it. Now in c# I tried round the decimal to 2 places then inserting it into the column and it just does this. 56.4000015258789 when my value is 56.40.  I am debugging just before my insert and it is rounded. I can't change the column . . .so how do I get around this?   I know it has something to do with how sql considers fractions.   I tried formatting the decimal to a string then parsing it to a float and that didn't work.

I want a to be rounded to 13.95.  >>> a 13.949999999999999 >>> round(a, 2) 13.949999999999999   The  function does not work the way I expected.


The trees in a  Random Forest are grown by recursive splitting the nodes, and the best split in each node is obtained by using the Gini index, I want to know if there is a possibility to know the number of all possible split-cuts? For example by knowing the dimension of data and mtry ?

I am just looking to understand how mtry works in random forests.  Please correct me if I am wrong.  When you specify mtry (say 10), it takes 10 random variables from your data set and examines them for one tree.  So the next tree would take 10 more random variables, examine them, so on and so forth until it runs through the ntrees that you specify and then returns the average estimates for the best/most important variables?


I recently started playing/GMing Pathfinder (beginner rules) and currently shopping around for the Core Rulebook (planning ahead). The way the PRD puts it, it sounds like the Core Rulebook is entirely unnecessary:     This compendium is NOT the official Pathfinder Roleplaying Game!   Players interested in a user-friendly introduction to the Pathfinder   system will want to purchase the complete Pathfinder Roleplaying Game   Core Rulebook and the Pathfinder RPG Bestiary, which comes complete   with more than 350 monsters to menace your player characters.      Both books contain hundreds of beautiful full-color illustrations and   lots of descriptive text to explain and introduce key rules concepts   necessary to fully enjoy the Pathfinder Roleplaying Game experience. ()   I do enjoy reading their "user-friendly" material, but if all I'm missing out on is wordiness and pretty pictures I have no problem at all with that and saving $30-$50.

Does the  core rulebook contain any information that is not included already on  that would make it worth it to buy the PDF version of the manual? Or does it only have extra descriptive text?