I have the following priority_queue with items of type base. The problem is, when I get item from the Queue with top(), then call its f() function via base reference object, it does call the  f  of base class but not the overriden f.  I want child object's f() to be called. Any help? Thanks..      #include <queue>     #include <iostream>      using namespace std;      class base {          public:             int id;              virtual void f() const {                  cout << "base f()" << endl;             }      };      class D1: public base {          public:              void f() const {                  cout << "D1 f()" << endl;             }      };      class D2: public base {          public:              void f() const {                  cout << "D2 f()" << endl;             }      };      bool operator<(const base& b1, const base& b2)             {         return b1.id > b2.id;     }      int main()     {          priority_queue<base, deque<base>, less<deque<base>::value_type> > Q;          D1 d1;         D2 d2;          Q.push(d1);         Q.push(d2);  // this is not something  I want         const base& b = Q.top();         b.f();        // base f()   // this works as I want     const base& b2 = d2;     b2.f();        // D1 f()      return 0;      }


Are tags for what the content of the question is, or what the answer is?

I was having some trouble with a recent question I asked and people kept editing in erroneous tags as I described the problem. I reverted back to the original over and over and finally I arrived at my answer. A visual studio feature was causing problems for me. I answered the question, but then someone came in and edited in the feature to the tags for the question.  But the question wasn't "Why is [feature] doing this?", it was "Why is this so slow?".  I'm frustrated in general with the response to my question so I don't know if I'm being obstinate, but I always considered tags to be tags about questions, not about answers.   So what was the right move here? Leave the tag that was described the answer, or rollback so that the tags represent the question?


Rotating screen while adding tabs clear newly added tags

This only clears tags added before pressing "done".  To reproduce :   Create a new question Go to tags selection Select tag Rotate screen    Android 6.0.1   Nexus 5   Version 1.0.83


Nvidia drivers and UEFI working together

I have Ubuntu 16.04 and after enabling Secure Boot Nvidia drivers stops loading. Same is with VirtualBox kernel modules. When I try to force loading kernel  # modprobe nvidia_361 modprobe: ERROR: could not insert 'nvidia_361': Required key not available sign module   I read that from Ubuntu 16.04 version kernel prevents loading unsigned modules. Is there any way to turn on Secure Boot and use proprietary kernel modules, without compiling own kernel?


I installed Ubuntu 13.10 in my PC recently, also installed Eclipse, Qt Creator, Blender and Synaptic (to download all the packages in order to work with OpenCV) everything went fine until i shut down the computer and then later, when i tried to log in Ubuntu, put my password an everything, the screen went black, and only the pointer appeared.. Tried several things to fix it but nothing work so i re-installed Ubuntu, and all the programs again but testing re-starting the computer after every installation, and all of them work except for the OpenCV packages, after installing them the blackscreen problem came back.  If anyone can help me please i'll appreciated a lot


Installing a new package from command line

How do I installed the Arduino IDE in Ubuntu from a command line?  I understand that a command line will look for the package on the web repositories and installed in a proper location in the hard drive.  Please correct me if not correct me if the logic is not correct.  Arduino is found in   UPDATE 1:  I use this command sudo apt-get install ubuntu-make but after installing a lot of files (Don't know where and in which folder)  don't see any Arduino Icon


Regex Replace in Visual Studio With Wildcard

So I want to find all of the following in a .cs file   driver.FindElementByXPath("XPathHere").SendKeys(keys);   Where XPathHere is different each time. I've tried using the following in Visual studio find and Replace.  driver.FindElementByXPath("[^"]+").SendKeys(keys);   But that is unable to find the whole thing I believe it is an issue with the parentheses in regex how can I fix this?  Thank you!


I'm experimenting with SimpleXML for PHP and I was wondering about something. The XML document is like this:  <?xml version="1.0" standalone="yes"?> <users>     <user id="1">         <name>Jan</name>         <sex>Male</sex>         <password>fu9f8w9080fd9id9di093r9f9if9if9d0sfu</password>         <avatar type="remote">http://www.avatars.com/av_1.gif</avatar>     </user>      <user id="3">         <name>Piet</name>         <sex>Male</sex>         <password>fu9f8w9080fd9id9di093r9f9if9676674bv</password>         <avatar type="local">html/avatars/Eten%20en%20drinken/cola.png</avatar>     </user>      <user id="4">         <name>Ilse</name>         <sex>Female</sex>         <password>fu9f8w9080fd9id9di4564564564539d0sfu</password>         <avatar type="none"/>     </user>      <user id="5">         <name>Els</name>         <sex>Female</sex>         <password>fu9f8w9080fd9id9di09gi5uy378wrfuih4w</password>         <avatar type="upload">avatar_1.gif</avatar>     </user> </users>   I made a descending for loop to remove all female users, but I was wondering if there were other methods, using foreach to iterate through the users or using xpath to select all records of females and remove them all at once.  Also, I was wondering if you could remove all nodes  without iterating through all users.  So far I have figured out that "removeChild" does not work in simpleXML, or have I missed something.  Thanks,  Coenj


Is it possible to re render a single pass and not the whole scene again?

I'm experimenting with the values for the mist in my scene (Cycles), however each time I want to test the new values I can't find a way to only render the mist pass. This results in the whole scene being rendered again which takes a lot of time and makes experimenting with the values a real drag.  So the question is, can I render only the mist pass and then use it with the original render in the compositor?


Make selected edges equidistant, like you can in Inkscape?

In Inkscape there is a tool where it will make selected objects equidistant. In blender I am trying to find a similar tool. In the example below the tool would make the selected edges equidistant on the y axis. Does it exist?


If for every $z\in G$ there is $n$ such that $f^{(n)}(z)=0$, then $f$ is a polynomial.

Let $G$ be an open and connected set of the complex plane      $\mathbb{C}$ and $f:G\rightarrow \mathbb{C}$ be analytic, such that for each      $z\in G$ there is $n=n(z)\in \mathbb{N}$ such that      $f^{(n)}(z)=0$. Prove that $f$ is a polynomial.      Attempt It seemed to me like a Baire-type application, since $\displaystyle G=\bigcup_{n=1}^{\infty}\{z\in G:~f^{(n)}(z)=0\}$, but there is no completeness on $G$ to work it that way.   Edit. Motivated by , let  $n:G\rightarrow \mathbb{C}:~n(z)=\min\{k:~f^{(k)}(z)=0\}$ which is well defined and $\displaystyle G=\displaystyle \bigcup_{k=1}^{\infty}n^{-1}(\{k\}).$ Since $G$ is open, it is uncountable and at least one $n^{-1}(\{k\})$ is uncountable, so posseses an accumulation point $z_0 (\in G?)$. Therefore by the identity theorem $f^{(k)}$ is zero on $G$ and $f$ is a polynomial. My question is why $z_0\in G$?  Thanks a lot in advance for the help!


Would an Alcubierre drive actually allow FTL travel?

If I do not phrase this question right, please forgive me in advance because I am a layman on the subject of physics, but a software engineer, nonetheless. I do understand many technical subjects. That said, I currently am writing a science fiction novel and an important thought occurred to me while describing the fiction's technology- could a theoretical  actually allow for faster than light travel?  I ask this because in my reading on the subject I learned that both gravity and gravitational waves propagate at the speed of light and no faster. If this is true, then how can a ship ride a wave of distorted space-time that moves faster than light? I know that in a local frame of reference the ship technically would not move at all, but if you consider the "warp bubble" the ship is inside as moving at some velocity relative to an outside observer, then it seems pretty clear that the warp bubble could not surpass the speed of light.  Of course, this is a science fiction I am writing, so I have ample room for "bending the rules" with the theoretical, but I have great respect for science and literature, and want to get things right enough as to seem plausible.


Let G be a simple group and let ${n_p}$ be the number of Sylow p-subgroups, where p is prime. Show |G| divides $({n_p})!$.

Using this or otherwise, prove groups of order 48 cannot be simple. could someone help me about this problem? Do we use the Sylow-Theorem?


I'm new to R and don't know how to deal with this warning I get while doing negative binomial log regression: Warning in anova.negbin(nb.MouthOpen) : tests made without re-estimating 'theta' Can I ignore this or does it have an effect on the results I get? I have no idea of what kind of information you need to help me...does the code help? The data are behavioural observations made by a 1-0 sample method and is then compared against a noseband tightness score. It's for my master thesis. summary(nb.MouthOpen <- glm.nb(cbind(NosebandMouthOpen,NosebandTotalscans-NosebandMouthOpen) Noseband TightnessNoseband, data = Noseband)) anova(nb.MouthOpen) (est <- cbind(Estimate = coef(nb.MouthOpen), confint(nb.MouthOpen))) exp(est) deviance(nb.MouthOpen)


So I have to either prove or disprove this inequality:  $$ \left\lVert x\right\rVert^2 - \left\lVert y\right\rVert^2 \le \left\lVert x-y\right\rVert \left\lVert x+y\right\rVert$$  I know this to be true in Hilbert space. But i cant figure out what to do in Banach space.


Increase the thickness of node border in TikZ

Suppose I have a node in the shape of a circle. How can I make its border thicker?   \node[circle, draw=blue!80, inner sep=0pt, minimum size=12pt] (1) at (0,0) {1};


I have problem using prepared statements in my project. I've created a class named DB and inside this class I have a function called "where" and in this form it does not work:  public function where($table_name, $key, $value) {     try {         $stmt = $this->connection->prepare("SELECT * FROM $table_name WHERE :key = :value ORDER BY id DESC");         $stmt->execute(array(":key" => $key, ":value" => $value));         return ($stmt->rowCount() > 0) ? $stmt : false;      } catch(Exception $e) {         return false;     } }   but when I change the function to just work with one placeholder it works! Why this happens?  public function where($table_name, $key, $value) {     try {         $stmt = $this->connection->prepare("SELECT * FROM $table_name WHERE $key = :value ORDER BY id DESC");         $stmt->execute(array(":value" => $value));         return ($stmt->rowCount() > 0) ? $stmt : false;      } catch(Exception $e) {         return false;     } }


i have been searching online and cant seem to find an appropriate fix for my error: Cross-thread operation not valid: Control 'Form1' accessed from a thread other than the thread it was created on.  I looked onto but cant figure out how i invoke my size change?  My code which works some times and the other throws the above code is:  'Handler to handle screen resizes! (Tablet being flipped etc...) Private Sub TouchRadio_Resize(sender As Object, e As EventArgs) Handles Me.Resize     Dim thread As New Thread(AddressOf resizescreen)     thread.Start() End Sub  Public Sub resizescreen()     System.Threading.Thread.Sleep(1)     For index As Integer = 1 To 50000         If Screen.PrimaryScreen.Bounds.Width = (Screen.PrimaryScreen.Bounds.Width + 17) Then             Exit For         End If         Dim screenWidth As Integer = Screen.PrimaryScreen.Bounds.Width         screenWidth = (screenWidth + 17)         Dim screenHeight As Integer = Screen.PrimaryScreen.Bounds.Height         Me.Size = New System.Drawing.Size(screenWidth, screenHeight) 'Here it errors at         GeckoWebBrowser1.Size = New System.Drawing.Size(screenWidth, screenHeight)         Me.Location = New Point(0, 0)     Next End Sub


Changing the out-degree value in the code below doesn't seem to be working. The figure I get always has an out-degree equal to 0. Any ideas why?  \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{arrows, positioning}  \begin{document}  \begin{frame} \begin{figure}     \centering     \begin{tikzpicture}         [             state/.style={fill=blue!30, circle, minimum size=0.5cm},             transition/.style={>=stealth'},         ]          \node[state, label={-120:$q_1$}] (q1) {};          \def\n{4}         \foreach \q in {2,...,\n} {             \pgfmathsetmacro\pq{\q-1}                       % previous node index             \node[state, label={-120:$q_\q$}, right=of q\pq] (q\q) {};  % node             \draw[transition, ->] (q\pq) to (q\q);                  % transition level 1              % transition level 2             \edef\tempa{\q}             \edef\tempb{2}             \ifx\tempa\tempb             \else                 \pgfmathsetmacro\ppq{\q-2};     % 2nd previous node                 \edef\new{q\ppq};                  %%%% THIS OUT-DEGREE doesn't work                 \draw[transition, ->] (q\ppq) to[out=45, in=135] (q\q);                              \fi         }      \end{tikzpicture} \end{figure}  \end{frame}  \end{document}   At the moment, the code generates this figure:    However, I expect to get something like this:


Use Riemann integral to evaluate the limit $\lim_{n \rightarrow \infty} \frac{\sum_{k=1}^n \sqrt{k}}{\sum_{k=1}^n \sqrt{n+k}}$

Use Riemann integral to evaluate the limit $$\lim_{n\to\infty}\frac{\sum_{k=1}^n \sqrt k}{\sum_{k=1}^n\sqrt{n+k}}$$


My system uses the date format dd-MMM-yyyy. Most of the dates on SE/SO sites are formatted as MMM-dd-'yy.  Having only 'yy makes it especially hard to search for years. yyyy would make that a lot easier.  It would be really cool if this became user-configurable; I personally like the ISO 8601 format very much.  No matter what, the default should change; only about 33% of SE users are from the USA, and only about 20% of SO users are. So it makes sense to go for a form of DMY, as that is what most of the world uses.  Edit:


In meetings, I often see people detaching the VGA connector from one running laptop and connecting it to another, while the projector is still on. Is this 100% risk free, and OK by design of the VGA standard? If there's a risk involved in hot-plugging VGA, can it be removed by turning off or suspending either laptop, display, or both? I see this being done all the time without causing disaster, so clearly I'm not interested in answers stating "we do it all the time, so it should be OK!". I want to know if there's a risk - real or in theory - that something breaks when doing this. EDIT: I did an internet search on the topic, and I never found a clear statement as to why it is safe or unsafe to hot swap VGA devices. The typical form is a forum question asking basically the same question as I did, and the following types of statements  Yes it's hot swappable! I do it all the time! It involves some kind of risk, so don't do it! You're some kind of moron if you think there's a risk, so just do it!  But no explanation as to why it safe or not... Joe Taylors answer below contains a link to a forum post and answers that basically give me the same statements as mentioned above. But again, no good explanation why. So I looked for an actual manual for a projector, and found . It states on page 3-1:  Connecting devices Computers and video devices can be connected to the projector at the same time. Check the user’s manual of the connecting device to confirm that it has the appropriate output connector. [image] Attention: As a safety precaution, disconnect all power to the projector and devices before making connections.  But again, no good explanation.


Why my residual-fitted plot looks like this?

I'm using a glm poisson regression in R, and I did a model diagnostics after my model fitting, but the residual distribution is so wierd.


I have a clean HTML page. I need to print (download) it as a pdf file. I have searched in internet. But everyone gives some plugins and libraries. Can I do that without those? I mean how to download as pdf using php code. I am using codeigniter

 Name	 <?php echo $name;?>

   This is how my code looks. $name value will be dynamic


How can I create a new Ubuntu desktop environment/window manager?   lists a lot of available environments, but how can I create a new one?  What are the steps to create an Ubuntu desktop environment/window manager?


I am trying to crack a SHA-256 hash but I am not sure how to approach this in an efficient way. The following is known of the original non-hashed content:   64 characters long only consists 0-9 and a-z (no capital letters) the original content does not consist dictionary words the hash is not salted   I have done some reading on the subject of cracking hashes and some information I have read is conflicting. For example, one said on a public forum that SHA-256 is virtually impossible to crack while the other said that it's a rather poor method for password storage as it could be cracked easily.  Is SHA-256 a safe method to hash passwords with (if not, what are the alternatives) and how do I crack a given hash in an efficient way (assuming the given criteria above).  Thanks in advance!


What is the difference between /etc/profile and .bashrc

As the title suggests I am asking about the main differences between .bashrc and /etc/profile. What I know is that .bashrc is a shell script that runs on login(I guess). And I know /etc/profile runs on ssh login or terminal login I also guess. Could someone please steer me in the right direction here?


Capture Linux grep command to variable in C

The following Linux command returns a single integer representing the number of cores on the processor (physical, not virtual cores):    grep ^cpu\\scores /proc/cpuinfo | uniq |  awk '{print $4}'   What is the best way to call this command in C and assign the result to a variable?


What are the units of $\mathbb Z/2\mathbb Z \times \mathbb Z/5\mathbb Z$

I'm struggling with this a lot. I think it all boils down to my basic understanding of what the ring   $\mathbb Z/2\mathbb Z \times \mathbb Z/5\mathbb Z$ is. As much as I know is that it is a ring of 10 elements, but I have no idea how I would go about finding the units in this.  The way I view it is:  $\mathbb Z/2\mathbb Z  = \{0,1\},\qquad   \mathbb Z/5\mathbb Z= \{0,1,2,3,4\}$.  So would   $\mathbb Z/2\mathbb Z \times \mathbb Z/5\mathbb Z= \{0\times0, 0\times1, 0\times2, 0\times3, 0\times4, 1\times0, 1\times1, 1\times2, 1\times3, 1\times4\} = \{0,0,0,0,0,0,1,2,3,4\}$?  This seems totally incorrect to me, so it would be great if someone could clear this up for me.  I understand a unit is an element $u$ such that $uv=vu$, but in this I don't really even know what the elements are... Would the unit be $0$ and $1$?  Any help would be great. Thanks


Server 2012 R2 - Can't access remote 2012 server in "all servers"

This is a scenario set up for MCSA training in my homelab, not an enterprise environment.   I'm trying to make changes to add roles to a virtual machine (VM workstation) Server 2012 R2 (running in bridged mode, meaning it gets dynamic IP from physical default gateway dhcp server) from my main Server 2012 R2 physical server from Server Manager, All Servers.   I add the remote server, TESTSERVER1, via manage->add servers and it shows up as such in "All Servers":   Here are the error messages produced:   The main physical server, APOLLO has a static IP but the VM server is dynamic. This is a 255.255.255.0 subnet. This is a workgroup environment.  How can I gain access to TESTSERVER1 so I can make changes to it remotely. When I right click it, "add roles and features" and "restart server" are greyed out. I appreciate any insight, thank you.


Ubuntu 14.04.1 LTS suspends when 12.04 LTS did not

I'm running Ubuntu 14.04.1 LTS Server on an Asus Eee PC netbook.  Back when I had 12.04 installed, I was able to close the netbook and the system would stay running. Now with 14.04, closing the netbook puts the system in suspend mode.  How do I make it so that the netbook stays powered on after closing the screen?  I have tried adding acpi=off apm=off to the default grub boot option in /etc/default/grub, but this did not work.


Is it ethically correct to be proud of one's country?

It is a very well known phenomena that people feel pride for the country where they were born and/or live, even though the effect seems to be declining slightly nowadays. Frequently, governments also try to instill a sense of national pride in their citizens in order to motivate them to serve the country.  But is it ethically correct to be proud of one's country?  When people say that they are proud of being a citizen of a country that has an independent jurisdiction, is a democracy and respects its citizens' rights, the obvious question to me is: Can you be proud of something that you did not create?


Proof about prime factors: every prime factor of $4n^2+1$ is congruent to $1 \pmod 4$.

Show that if $n$ is an integer, then every prime factor of $4n^2+1$ is congruent to $1 \pmod 4$. (Hint: if $p\mid 4n^2+1$), then what can you say about $(-1\mid p)$?  Approach:  I went over all the cases for n and concluded that $4n^2+1 \equiv 1\pmod 4$. We know that $4n^2+1$ can be represented as the product of prime numbers, so let $4n^2+1=q_1\cdots q_\ell$. This implies that $q_i \mid 4n^2+1$  b) Show that there are infinitely many primes congruent to 1(mod 4)  Approach  The common way to do this is by contradiction. Assume there are finitely many primes congruent to 1 mod 4. Call them $p_1,....,p_k$. Now let's build a number n congruent to 1 mod 4 with these primes. n=$4p_1*....*p_{k}+1 \equiv 1(mod\text{ } 4)$. By definition we can represent n as a product of primes. Let $n=q_1,...,q_l$. If $q_j=p_j$ then $q_j | 4p_1*...*p_k$ and $q_j | 1$ which can't be possible, so contradiction.  I am just wondering if there is a way to do the latter by using what was just done.


How to get time stamp of closest keyframe before a given timestamp with FFmpeg?

I want a FFmpeg seeking command that fast and accurate. I found .  The solution is that we apply -ss for both input (fast seeking) and output (accurate seeking). But: If the input seeking is not accurate, how can we be sure that the seeking position is accurate?    For example: If we wanted to seek to 00:03:00, the command is something like:  ffmpeg -ss 00:02:30 -i <INPUT> ... -ss 00:00:30 <OUTPUT>   The first -ss will seek to somewhere else, not 00:02:30, say 00:02:31. And after applying the second seek, the final result would be 00:03:01- not what we want. Is that correct?  Where does the first -ss seek to? Does it seek to the keyframe that is closest to 00:02:30?  If so, here is my thought—correct me if I'm wrong: after first seeking, we get the timestamp of the result (in this example: 00:02:31), then we apply second seeking with appropriate time, in this case 00:00:29.  Question is: How do we get time stamp of the first seek result?


When  , the image overflows:    The image is too tall, and there's a strange white border around it… (taken from the blog image) When hovering over it, it becomes even more clear due to the dotted border. The image on the blog should have margins, rather than white pixels, and the onebox image should have a max-height. The overflow in chat is only apparent when you hover over the post, showing the dotted border. I'm on Safari 9, OS X 10.11.


What is the reason for Hulk's decision at the end of 'Age of Ultron'?

In the end of Avengers: Age of Ultron we get the new roster of Avengers and this is not a new thing, it always happened in comics and cartoons.  But it's due to a major character leaving from the current roster. I can understand why Iron Man left or Thor or Hawkeye but why did Bruce Banner/Hulk leave the Avengers?


is my system strong enough to run most animations. Seem to be having problems rendering Intel 3.2 GHz 4GB RAM with nvidia 610


Typesetting a full citation whose title ends with a word in braces

I am using Biblatex and need to typeset full citations in my document text, so I'm using .  While it works correctly most of the time, it has trouble with Biber/BibTeX entries where the last word of a field is enclosed in braces (to force capitalization).  In these cases, \longfullcite may fail to properly capitalize the following word.  Take the following example:  \documentclass{article}  \usepackage{biblatex} \makeatletter \newcommand{\tempmaxup}[1]{\def\blx@maxcitenames{\blx@maxbibnames}#1} \makeatother \DeclareCiteCommand{\longfullcite}[\tempmaxup]   {\usebibmacro{prenote}}   {\usedriver      {\DeclareNameAlias{sortname}{default}}      {\thefield{entrytype}}}   {\multicitedelim}   {\usebibmacro{postnote}}  \usepackage{filecontents}  \begin{filecontents}{test.bib} @inproceedings{blow2015,   author       = {Blow, Joe},   title        = {{GNU} loves me},   year         = 2015,   booktitle    = {Proceedings of Some Conference}, }  @inproceedings{blow2016,   author       = {Blow, Joe},   title        = {I love {GNU}},   year         = 2016,   booktitle    = {Proceedings of Some Conference}, } \end{filecontents}  \addbibresource{test.bib}  \begin{document} \nocite{*} \noindent \longfullcite{blow2015}\\ \longfullcite{blow2016} \printbibliography \end{document}   Here is the output:    Note the inconsistent capitalization of the word "In" produced by the two \longfullcite commands.  By contrast, the citations emitted by \printbibliography correctly capitalize "In" for both entries.  What is causing this inconsistency and how can I fix or work around it (preferably by changing the definition of \longfullcite rather than changing the .bib file)?


Java: how to accomplish isKeyDown() functionality that is independent from java components?

With Java, I need to detect whether a given key (using it's keyCode) is pressed down or not at a certain moment in time.  You might suggest for me to create an event listener for all keys for a certain component and store all keys' states (pressed down or not). However, I need to know whether a key is pressed down in general, and not for a certain Java component.  For example, if my Java application is running in the background and a user has a key pressed down inside OpenOffice, I need to be able to detect so.  How would I accomplish this isKeyDown() functionality that is independent from java components within Java?  Any feedback is appreciated.


How do I install/upgrade r-base to the latest version?

I am pretty new to Linux. I installed R-base in my Ubuntu 12.04 using the Software Center (which by default is r-2.14). I want to upgrade to/install R 3.02 or newer. How can I do that? Thank you.


Which one is the best way to get timestamp in android in long format?

I searched a lot I found some solutions for that and got confused to select which method to use to get a timestamp in android and which one is the best. found  Get by using the android Calendar  Calendar.getInstance().getTimeInMillis()  By using the Date   new Date().getTime()  By using System  Long tsLong = System.currentTimeMillis()/1000; String ts = tsLong.toString(); Please help me to understand.


Is there a slowest rate of divergence of a series?

$$f(n)=\sum_{i=1}^n\frac{1}{i}$$ diverges slower than $$g(n)=\sum_{i=1}^n\frac{1}{\sqrt{i}}$$ , by which I mean $\lim_{n\rightarrow \infty}(g(n)-f(n))=\infty$. Similarly, $\ln(n)$ diverges as fast as $f(n)$, as $\lim_{n \rightarrow \infty}(f(n)-\ln(n))=\gamma$, so they 'diverge at the same speed'.   I think there are an infinite number of 'speeds of divergence' (for example, $\sum_{i=1}^n\frac{1}{i^k}$ diverge at different rates for different $k<1$). However, is there a slowest speed of divergence?  That is, does there exist a divergent series, $s(n)$, such that for any other divergent series $S(n)$, the limit $\lim_{n \rightarrow \infty}(S(n)-s(n))=\infty$ or $=k$? If so, are there an infinite number of these slowest series?


Recursion depth limit for a fibonacci program in Python

I have a Python program that performs pretty fast for fibonacci sequences up to 999. For numbers above 999, the program fails with RecursionError: maximum recursion depth exceeded in comparison. I am utilizing memoization to cache fibonacci of previous values.  Here is my code.              def fibonacci(position, cache=None):                 if cache is None:                     cache = [None] * (position + 1)                  if cache[position] is not None:                     return cache[position]                  else:                     if position < 3:                         return 1                     else:                         cache[position] = fibonacci(position - 1, cache) + fibonacci(position - 2, cache)                  return cache[position]   Does anyone have a hint how I can improve my solution?


Reducing vertical space before and after using align

I am currently having outrageous vertical space before and after I use align.   For a bit of context, I used \onehalfspacing to make my document a bit clearer. However, it becomes ugly when I using align. For instance, here is a picture of what it looks like compared to when I am using array (and in fact any time I need to write maths using "$$") :     I would like to reduce this white space when I use align, but I can't find anything relevant enough. Since I am searching for something that works anytime without always repeating the command each time I have to use align, I was thinking of creating a new environment, but I don't know how to make one like align.   Thanks a lot for your help !   EDIT : Here is the code I used to take the picture :   \documentclass{article} \usepackage[utf8]{inputenc}  %---------------  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \usepackage[french]{babel}  \usepackage[cyr]{aeguill}   %---------------   \usepackage{fancyhdr} \usepackage[top=3cm, bottom=3cm, left=3cm, right=3cm]{geometry} \usepackage{setspace}   %---------------  \onehalfspacing  %\setlength{\parskip}{0cm} %not usefull  %---------------   \usepackage{amsmath, amssymb, amsthm}  \usepackage{mathrsfs} \usepackage{etoolbox} \usepackage{stmaryrd}  \title{Tests Overleaf} \date{\today}  \begin{document}  \maketitle  \section{Introduction}  ------------------------------------------------------------------------------------------  I am using array :   $$\begin{array}{cccccc}     f : & A & \times & B & \longrightarrow & C \\     & x & ; & y & \longmapsto & xy  \end{array}$$  ------------------------------------------------------------------------------------------  I am using align* :   \begin{align*}     a \times (b+c) & = a \times b + a \times c\\     & = a \times b + a \times c + 0 \end{align*}  ------------------------------------------------------------------------------------------  \end{document}


python - re.S/re.DOTALL flag not supported by re.sub

Is it me or is it a bug in python ?  >>> re.sub(r'.*', '', 'a\nb', re.M | re.S) '\n' >>> re.sub(r'(.|\n)*', '', 'a\nb', re.M | re.S) ''   And, strangely, it works with re.search:  >>> re.search(r'.*', 'a\nb', re.M | re.S) <_sre.SRE_Match object; span=(0, 3), match='a\nb'>   EDIT: I've added the re.M flag to make it clearer


So with  you cannot discern color. Recently I stumbled upon a debate fighting over wether or not you could read in darkness with darkvision, since you cannot discern the color of the ink from the color of the page. Some argued that you would only be able to discern the text if it had texture, while others said there was special ink - But some of these arguments drew from 3.0 and 3.5. I was wondering if there were any official rulings one way or the other.


Well, I have to do a mesh in millimeters, and amplify the view to begin, and set a vertex in the center (Y=0 X=0), and as you can see, set the top view, and create a square of 10cm but the mesh does not fit the grid. See the first image please.     But when I fit the selected vertex to the grid, result in this:    On the job will be a mess if I leave that 10.1367cm, because y need exact precision, and I set Scene >>> Units >>> Meters and Unit Scale to 0.1 and 0.01 and 1... nothing!  The scale to 1, 0.1, 0.01... nothing!!!  And what I need is a grid with exact measurement in millimeters.


Show that for any constants $k$ and $j$, where $j > 0$, $(n+k)^j = \Theta(n^j)$

Does this solve the question: There exist $c, n_0$, such that $(n+k)^j = n^j$ for all $n>=n_0$  I tired the above but couldn't find an answer..


I would like to multiply, row-by-row, two columns in an Excel sheet (in order to take the median of the resulting column).  1  3 2  5 4  2   Should become  3 10 8   How can I do that in a formula (i.e. without creating a separate column with the multiplication result)?


Why can't classical information be transmitted through quantum entanglement by measuring time between change events?

If the effect of measurement in quantum entanglement occurs instantaneously why can't it be used to transmit classical information faster than light?  I'm based my question off this seemingly well cited Wikipedia article:   Edit: It would seem that my question should be more focused on why we can't use change as a method of data transmission.


If $\sum a_n$and$\sum b_n$diverge, can$\sum \min\{a_n,b_n\}$converge?

Do there exist sequences $\{a_n\}$ and $\{b_n\}$ satisfying all of the following properties?   $a_n>0$ and $b_n>0$ $\{a_n\}$ and $\{b_n\}$ are both decreasing $\sum a_n$ and $\sum b_n$ both diverge $\sum\min\{a_n,b_n\}$ converges


Where does the electron come from when a free neutron transforms?

I'm reading in  (page 68) that "Each neutron is made up of one up quark and two down quarks.  In a free neutron one of the down quarks will transform into an up quark, turning the neutron into a proton and creating an electron in the process."  Where does that electron come from?


how can a ‘stressed schwa’ exist? In ‘Applied English Phonology 3rd edition’ (page 85), ‘herder’ is the example of the stressed schwa and it is manifested as ‘3’(with r-coloring tail). As I’ve seen so far, a schwa is so light that the syllable containing it cannot be stressed despite the following coda. Thank you


I'm a newbie to R and am hoping someone can show me the error of my ways. I'm getting what appears to be a logistic regression and plot but I wasn't expecting the slope around 25.2 to be so steep and was expecting a more typical logistic curve.  Also, the glm function threw a couple warnings but I don't think it's necessarily indicative of a problem.  Warning messages: 1: glm.fit: algorithm did not converge  2: glm.fit: fitted probabilities numerically 0 or 1 occurred   p1ShapeResponse <- structure(list(Response = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 1L), Temperature = c(23.74959742, 23.77777778,23.88043478,24.00322061,24.0394525,24.06360709,24.19041868,24.25885668,24.30112721,24.50040258,24.5326087,24.76811594,24.78019324,24.82045089,24.87077295,24.94927536,25.0821256,25.41022544,25.65982287,25.82085346)), .Names = c("Response", "Temperature"), class = "data.frame", row.names = c(NA, -27L)) p1Shape.glm <- glm(Response ~ Temperature, data=p1ShapeResponse, family=binomial(link=logit))  plot(p1ShapeResponse$Temperature, p1ShapeResponse$Response, xlab="Mean Temperature", ylab="") curve(predict(p1Shape.glm, data.frame(Temperature=x), type="resp"), add=TRUE, col="black") mtext("p1 Shape", side=2, line=2, col="blue") axis(side=1,col="black",col.axis="black",las=1) points(p1ShapeResponse$Temperature,fitted(p1Shape.glm),pch=20)   p2ShapeResponse <- structure(list(Response = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 0L, 0L), Temperature = c(23.74577573, 23.77265745, 23.88018433, 23.99923195, 24.00691244, 24.03763441, 24.05683564, 24.19124424, 24.26036866, 24.30261137, 24.4984639, 24.53302611, 24.76728111, 24.7749616, 24.8172043, 24.87096774, 25.4124424, 25.65821813, 25.82334869)), .Names = c("Response", "Temperature"), class = "data.frame", row.names = c(NA, -27L)) p2Shape.glm <- glm(Response ~ Temperature, data=p2ShapeResponse, family=binomial(link=logit))  ## Allow a second plot on the same graph par(new = TRUE)  ## Plot the second plot and put axis scale on right plot(p2ShapeResponse$Temperature, p2ShapeResponse$Response, axes=FALSE, bty="n", pch="+", col="blue", xlab="", ylab="") curve(predict(p2Shape.glm, data.frame(Temperature=x), type="resp"), add=TRUE, col="blue")  ## a little farther out (line=4) to make room for labels mtext("p2 Shape", side=4, line=2, col="blue") axis(side=4, col="blue",col.axis="blue",las=1)


Rate question difficulty as in [unrated, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Would it be possible to create some sort of question difficulty flag which would be enabled for peers with enough rep within that respective tag?  The purposed of this would be to identify questions that people at lower personal experience level would be able to answer.  As peers cast their difficulty rating this would cause the difficulty rating to get averaged and re-calculated.  If this is a duplicate, please guide me to the meta question that already justifies/denies this idea because I was unable to find any.


Transformation and marginalization of a joint distribution function

Suppose that the joint probability density function of X1 and X2 is given by: $$f(x_1; x_2) = exp(−x_1 − x_2)$$ $x_1 > 0$; $x_2 > 0$ and $0$ $elsewhere$. We define Y1 and Y2 as follows: $$Y_1 = X_1 + X_2$$ and $$Y_2= \frac{X_1}{X_1+X_2}$$  Determine the distribution of Y2.   SOLUTION:  I have used transformation theorem to find the distribution of Y2. Firstly I found that $X_1=Y_2Y_2$ and $X_2=Y_1-Y_2Y_1$  Jacobian determinant yields $J = Y_1$  Finally, I get:  $$f(y_1,y_2) = e^{y_1}\times y_1$$  QUESTION: How are the boundaries for the new joint distribution determined? I always have troubles to determine the boundaries/range in this kind of examples. Is there a technique?  To determine the marginal distribution I "integrate out" the $y_1$ (assimung the boudary is $0<y_1<1$) as follows:  $$ f(y_2) = \int_0^{1} e^{y_1}\times y_1 dy_1 = [(y_1-1)e^{y^1}]_0^1=-1$$  This doesnt seem right. I guess the boundry is where i am making the mistake?


Consider the following :   A\input{foo1}C  A\input{foo2}C  A\input{foo3}C  A\input{foo3} C   with foo1.tex containing "B", foo2.tex containing "B%" and foo3.tex containing "B\n%".  In the first case, we obtain "AB C", in the second "ABC" and in the third "AB C" and in the fourth "AB  C" (with double space).  Up to here we can think that A\input{foo}C is equivalent to A<insert foo>\n C.  But,  \begin{equation} \input{bar} \end{equation}   with bar.tex containing "a=b" will not produce the expected error (two \n makes an empty line inside the equation).  Question  So my question is : what \input{foo} is equivalent to ? Is there a conditional addition of \n when the file does not finish by % or something ?  I'm not asking how to get rid of the extra space, but, on the contrary, how to conserve this extra space when replacing \input{foo} by the content of foo.bar.  Non equivalence with an extra newline  Let foo.tex containing only "A"  \input{foo}B   will produce the same as "A\nB" but  \input{foo} B   will produce a larger space between A and B wich is not equivalent to "A\n B".


Can anyone help me to solve this integral problem: $$\int \sin (x^2)\,\mathrm dx$$ I have tried every method that I know, but still can't get any completion.


It seems like when I hover into my Tags section in my profile, I only see posts counting as questions. Shouldn't it count as answers as well?  I have 63 questions and 7 answers so shouldn't that be 70 posts in C#?  I know this is minor but I'm just curious that's all.


Can I forcibly deactivate an iPad? If not, what are my options?

I've just been given a corporate iPad mini that previously was used by someone else in my team. It appears to have been factory reset - it is taking me through the welcome and setup process (language selection/wi-fi selection/etc.), but once I've connected it to the network, it says the iPad is currently linked to an existing Apple ID (it masks it with stars, but shows enough information that I can see who that is) and asks me to sign in with that Apple ID (which I don't have). The person in question is uncontactable. Is there any way I can forcibly reset it and remove its link to that Apple ID? If not, are there any options which make it more useful than a lightweight doorstop?


I have come upon this question and could not find a solution for it.  Prove that there is no entire function $f$ such that $\forall z\in \mathbb{C}$ $\quad|f(z)|>|z|$.  Any ideas on how to solve this question?


Find the value of $$\int\frac{1}{(x^2+x+1)^{1/2}} dx$$   Anyone can provide hint on how to integrate this, and how you know what method to use? (I mean, is there any general guideline to follow for solving?)  Thank you!


Where in the span of a floor joist can I drill holes to run wiring?

How far from the end of a 2x12 or 2x10 floor joist can I drill a hole?  NEC 502.8 does not give this answer, only that you have to be 2" above or below the edges, not in what part of the span it has to be in.


Why does __int64 take 12 bytes inside struct?

I have VC++ 2012 and noticed that if have something like  struct mystruct{      char a[100];      __int64 b; };   then sizeof(mystruct) would yield 112.  Why is this?


Sum of Bernoulli random variables with different success probabilities

Let $X_{i} \in \{0,1\}$ be Bernouli random variable with probability of success $p_{i}$, i.e., $P(X_{i}=1) = p_{i}$ and $P(X_{i}=0) = 1-p_{i}$ and let $Y=\sum_{i=1}^{n}X_{i}$ for $n>0$. Is it relatively simple to estimate the pmf $P(Y=y)$ when $p_{i} \neq p_{j}$ for $i \neq j$?


Should there be a "No vote, but okay" option in reviewing first posts?

I'm happy to see the "first posts" facet arriving on the Beta Review system.  I like that it encourages reviewers to make a decisive move on a question or answer, but frankly, I think there should be a No vote, but okay option in addition to the I'm done and Not sure ones.  I think that there are some posts that are perfectly acceptable, but that show no demonstrable lack of effort or lack of clarity that might warrant a downvote.  I am a firm advocate for voting good quality posts up, I just think that forcing an option of voting or making the reviewer throw their work back into the pool untouched (assuming no edits or flags, etc. are needed) may be detrimental in the long term.


How to Convert 18 char Id to 15 char Id using substring in Apex trigger

I have a trigger where i am assigning ID to a cusotm field like below -   D.customfield__c = acc.Id;   The ID is coming as 00P28000000EwpjEA0  But i need only 00P28000000Ewpj 15 char. Is there is a way to use substring in apex trigger. I can't use formula field.


Recovering Windows Partition After Deleting It

So after installing Ubuntu, I wanted to get rid of Windows. So I installed GParted and then looked through it. I deleted just 1 Partition and restarted my System.  Now ever since I installed Ubuntu(Which is today), everytime I booted-up my PC, it would automatically go onto Windows and then I'd have to boot-up Ubuntu from there. And since I've deleted 1 Partition, I cannot get back into Windows. All it shows is the Troubleshooting-Panel and what OS I want to boot-up(Luckily enough, I can still boot-up Ubuntu).  I really want to recover this Windows Partition. I'm really scared in case I can't get Windows back or I've broken a really important part of my PC.


How to fasten armored cable to joist in tight space

I have some armored cable (AC/MC) that needs to be fastened to the floor joist.  Very limited access.  I could probably reach in and swing a hammer a few inches, but no way to get a drill or screwdriver without busting up the ceiling.  I can use staples meant for NM cable?


Is Maxwell's theory of electromagnetism completely validated?

Most of the time, I read articles or watch videos saying that Hertz experiments validated Maxwell's theory of electromagnetism. But Hertz only confirmed the existence of waves (that are perhaps electromagnetic) and that they travel at the speed of light. He did not for example confirm that these waves have both an electric and magnetic components. Although we know that the spark generated at the receiver of his apparatus is due to electromagnetic induction (changing magnetic field that produces current), we don't have evidence about the electric component. Is there any experiment that confirms there is an electric component of these waves?


In Stargate why can you go only in one direction through the gate but radio signals can go both ways?

So why can people and other objects just go in the one direction while radio signals can go both ways? Is that ever explained or is it just fact?


I have a shapefile of lines and I would like to know an Arcmap tool to create a new shapefile  with orthogonal lines from the midpoint of that existing line shapes. I know that it is possible to do it manually, but I have so many lines so it would be an impossible way.  Does anybody know an automate way to do it?      Yes, perpendicular lines that cross the middlepoint of the existing lines. An example would be like this:


I came across a how-to guide for running Android 1.7 in a virtual machine (VirtualBox), but 1.7 is old. I haven't been able to find a Android 2.2 or 2.3 image anywhere, does anyone have any ideas on how to virtualize newer Android OS's? Preferably a free virtualization solution like VirtualBox.  Here is the link about virtualizing 1.7:    They send you to here to download Android disk images:    But I can't find anything newer than 1.7, anyone have any ideas?


Filter "Hot Network Questions" by excluding sites

I was going to make a filter for the "" by excluding some sites from it.  I noticed  which talks about "negative filtering" but does not explain how one can do it or if it is possible.  There does not seem to be a way to do this, though.  On the filter page, my only options are:  So how can I do "All sites except [list]"? It would also be nice if this could include similar functionality with the meta checkbox.  Something like "All main & meta sites except..."


activate windows 8.1 using windows 8 oem key

I have a dell laptop that came with windows 8 (OEM) I upgraded to 8.1 and yesterday I had to reinstall the windows so I created a windows 8.1 usb using an iso from the internet (windows 8.1 pro 64 bits which is the same version that I had) but my windows 8.1 installation didn't recognize my windows 8 OEM key so I used the Windows 8.1 default key to complete my install, off course the default key is invalid but my windows 8.1 wont accept the OEM key that I found cracking my bios....  How can I make windows 8.1 accept my OEM key?


Can you get a legendary new born dwellers

So I have one male and one female dwellers that have high special. If I let them make a baby dweller do I get a good chance of getting a good baby dweller?


Stretching plot horizontally and vertically with matplotlib?

How can I physically stretch the plot below both horizontally and vertically?  import pandas  import numpy import matplotlib from matplotlib import pyplot %matplotlib inline  df = pandas.DataFrame(numpy.random.randint(0,5,size=(10, 2)),          columns=list('AB'))  fig = matplotlib.pyplot.figure() ax = fig.add_subplot(111) ax2 = ax.twinx() ax.plot(df.index, df.A, color ='r') ax2.plot(df.index, df.B, color = 'b')


How can I make this kind of table in Latex?


How do I list all databases and tables using psql?

I am trying to learn PostgreSQL administration and have started learning how to use the psql command line tool.  When I log in with psql --username=postgres, how do I list all databases and tables?  I have tried \d, d and dS+ but nothing is listed. I have created two databases and a few tables with pgAdmin III, so I know they should be listed.


Does Produce Flame Trigger Flames of Plegethos?

I have a player in my campaign who took the  tiefling racial feat (from Xanathar's Guide to Everything, p. 74-75). One of its abilities is:     Whenever you cast a spell that deals fire damage, you can cause flames        to wreathe you until the end of your next turn. The flames don’t harm        you or your possessions, and they shed bright light out to 30 feet and        dim light for an additional 30 feet. While the flames are present, any        creature within 5 feet of you that hits you with a melee attack takes        1d4 fire damage.   Additionally, he took the  cantrip:     A flickering flame appears in your hand. The flame remains there for        the duration [...]      You can also attack with the flame. When you cast this spell, or as an        action on a later turn, you can hurl the flame at a creature within 30        feet of you. Make a ranged spell attack. On a hit, the target takes 1d8        fire damage.   If he casts the produce flame cantrip and holds it (i.e. doesn't attack or attempt to deal damage with it) would that still trigger this Flames of Plegethos ability?


I'm trying to figure out why does it work like this when there's 2 verb in a single past sentence. for example, "I've never seen him dress like that before" and "I helped someone find their dog" Why do the bolded words remain in simple tense ? Shouldn't they be changed into past tense ? I can't seem to find the rule that explains this. Can you help elaborate what's going on here ?


How to redirect old url alias to new url alias?

Is there any way to redirect old URL alias to the new URL alias?  I want example.com/good-news to redirect to example.com/good-news-index, automatically.


Values are same on debug, but not in if statement

I have a problem with if statement. Two values - strings, one declared in class by arrow and another declared by radiobutton.gettext(). In debuging i can read values of both var. and they are same, but if statement says they are different.  Do you have any idea why is this happening?  Debuger:   Getting rbAnswer :   private String mChoices [][] = {     /* #8 */        {"razgovor između pomoraca u karanteni i njihovih obitelji", "za osobno razmatranje i razgovor s duhovnikom"," "," "},   }  ...  public String getChoice1(int a) {     String choice0 = mChoices[a][0];     return choice0; }   public String getChoice2(int a) {     String choice1 = mChoices[a][1];     return choice1; }   ...  rbGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {         String rbAnswer;          public void onCheckedChanged(RadioGroup group, int checkedId) {             if (checkedId == R.id.radiobtn1)                 rbAnswer = "" + rb1.getText();             else if (checkedId == R.id.radiobtn2)                 rbAnswer =  "" +  rb2.getText();             else if (checkedId == R.id.radiobtn3)                 rbAnswer = "" + rb3.getText();             else if (checkedId == R.id.radiobtn4)                 rbAnswer = "" + rb4.getText();              tTEST.setText(rbAnswer);             if (rbAnswer == mAnswer) {                 varScoreTrue = varScoreTrue + 1;                 updateScore(varScoreTrue);                 obavijestTocno();                 updateQuestion();              } else {                 varScoreFlase = varScoreFlase + 1;                 updateScore(varScoreFlase);                 obavijestKrivo();                 updateQuestion();             }            }      });   Declaring mAnswer:  private String mCorrectAnswers[] = {              ...          /* #8 */        "za osobno razmatranje i razgovor s duhovnikom",               ... }   ...  public String getCorrectAnswer(int a) {     String answer = mCorrectAnswers[a];     return answer; }   ...  mAnswer = mQuestionLibrary.getCorrectAnswer(mQuestionNumber);


How do you prove that OLS Estimator must pass through mean of X and Y

This is regarding the simple case of y=mx+b.   It's my understanding that the OLS estimator must necessarily pass through the mean of X and Y.  How do you prove that this is always so?


Short story about humans as beasts of burden for another race, read about 30 years ago

Short story or possibly book where humans on a planet are work animals for a different race. It turns out that it was a human colony that was overrun by this race a long time ago. I believe it is the song "Twinkle Twinkle Little Star" that has importance in this story. A man and woman end up entering tower that turns out to be human space ship and launching it. They are on their way back to Earth with a message "colony {colony name} needs assistance."


Show that if n is odd, then the equation $x^2-y^2=2n$ has no integer solutions x,y.

The question also says to consider modulo 4 of the equation which I have no idea how to apply.


Is any offline upgrade from 13.10 to 14.04 possible?

I typically upgrade downloading the relevant ISO (not necessarily the alternate one), going offline and then running:  sudo mount -o loop ubuntu-11.04-alternate-amd64.iso /media/cdrom gksu /media/cdrom/cdromupgrade   ...and then connecting and doing an update once the system is installed. I do this for stability and so I can schedule the upgrade and update independently (i.e. juggling time and bandwidth).  However, the  say:     Offline upgrade options via alternate CDs are no longer offered for Ubuntu Desktop and Ubuntu Server. Please ensure you have network connectivity to one of the official mirrors or to a locally accessible mirror and follow the instructions above.   Does this mean that an offline upgrade is impossible, even with the non-alternate ISO? If it is impossible, can I still do the upgrade via a mounted ISO, or is a USB/DVD now required?


Comparing and contrasting, p-values, significance levels and type I error

I was wondering if anybody could give a concise rundown as to the definitions and uses of p-values, significance level and type I error.  I understand that p-values are defined as "the probability of obtaining a test statistic at least as extreme as the one we actually observed", while a significance level is just an arbitrary cutoff value to gauge if the p-value is significant or not. Type I error is the error of rejected a null hypothesis that was true. However, I am unsure regarding the difference between significance level and the type I error, are they not the same concept?  For example, assume a very simple experiment where I flip a coin 1000 times and count the number of times it lands on 'heads'. My null hypothesis, H0, is that heads = 500 (unbiased coin). I then set my significance level at alpha = 0.05.  I flip the coin 1000 times and then I calculate the p-value, if the p-value is > 0.05 then I fail to reject the null hypothesis and if the p-value is < 0.05 then I reject the null hypothesis.  Now if I did this experiment repeatedly, each time calculating the p-value and either rejecting or failing to reject the null hypothesis and keeping a count of how many I rejected/failed to reject, then I would end up rejecting 5% of null hypotheses which were in actuality true, is that correct? This is the definition of type I error. Therefore, the significance level in Fisher significance testing is essentially the type I error from Neyman-Pearson hypothesis testing if you performed repeated experiments.  Now as for p-values, if I had gotten a p-value of 0.06 from my last experiment and I did multiple experiments and counted all the ones that I got a p-value from 0 to 0.06, then would I also not have a 6% chance of rejecting a true null hypothesis?


Connecting two DC wallwarts in series - to produce dual DC supply

I have two 9 V, 300 mA wallwarts and would like to connect them in series to produce +9 V, 0 V and -9 V. This can be done with two 9 V batteries (as seen below), but can I do this with two non-identical wallwarts?


Difference between Const int & int const?

is there a difference between Const int dd{4}; & Int const dd{4};. The dd is non modifiable in both cases, so what is the difference?


Is it possible to derive Ohm's law (perhaps in some appropriate limit) from Maxwell's Equations?


Distribution of Electric Charge on the surface of Sphere - simple explanation?

Which basic physics principle could I use to formulate a simple explanation of the homogeneous distribution of electric charge on the surface of a hollow metallic sphere?  P.S.: targeted audience with no background in physics.


Can I go to Germany with a Schengen visa from another country after failing to get a German visa?

I have to travel to Germany and Switzerland for business purpose. I have already been here 2 years ago. I have applied for business visa to the German consulate twice and both times the application got rejected. They have put a green stamp on the last page twice. The reason is the purpose and information submitted regarding intended stay is not reliable. I have submitted the documents to Swiss consulate and they have accepted and granted me a visa. Now I have to first travel to Germany and then to Switzerland.  So my question is, with a Schengen business visa granted by Switzerland, may I enter in Germany? Does the rejection stamp has any impact for entering at German airport ? Does it mean I cannot travel to Germany but to other Schengen countries ?


No debt. Any advice where to invest saved money and what to invest in after maxing out 401k?

My situation:   I'm 24, single, and I live with my parents in the United States I have no debt and I have 100k in a savings account I have a 90k job I am currently maxing out my 401k  I have no experience with investing and no family with any experience    My company offers a discount deal for managed 401k accounts with Alight for half of a percent, which I am using.  I recently started looking at this site and realized that due to inflation, I am losing money by having that much in my bank account. I'm not sure how much I have lost but it must be a lot.  From reading other questions, I am interested in dumping some of my savings into  Index funds which rise with inflation. Admittedly I don't know much about it.  My parents have suggested that I consider buying a house as an investment and renting it. With my savings I could put down a larger down payment to get a better deal on a mortgage. They said they would help me fix it up and that I could  live with them until I decided to move into the house in the future.  I understand that property should not be thought of an as investment and that there could be another crash like in 2008 at any time. But I still think that is an interesting suggestion.  Question 1: Any suggestions where to invest my saving account money, especially options not presented? In principle, is getting a house with a bigger down payment a good idea?  On the new investing options side:  I have plenty of room to invest more per month.  After my monthly part of the bills, rent, groceries, and putting some away  for fun stuff, I can afford to invest 3k per month.  I have read a lot  about Index funds, Vanguard, and Roth IRA on this site but I don't understand most of it. While I continue to study, where is a good place to immediately put this extra money instead of letting it deteriorate in my savings account?  Question 2: Is there a basic advice where to invest after maxing out a 401k?  Lastly, what are some good sources to start researching some investing concepts?


I'm trying to get my csv table aligned to the left of my graph. The graph is appearing below (and indented) the table. Any ideas?  \begin{minipage}{0.5\textwidth} \pgfplotstabletypeset[col sep=comma, columns/distance/.style={column name={Col1}, column type={|c|}}, columns/loss/.style={column name = {Col2},column type={c|}}, every head row/.style={before row=\hline}, after row={\hline} ]{graph-data/data.csv} \end{minipage}  \begin{minipage}{0.5\textwidth} \begin{tikzpicture} \begin{axis}[ xlabel = Distance ($m$), ylabel = Loss ($dB$)] \addplot table [col sep=comma]{graph-data/data.csv}; \end{axis} \end{tikzpicture} \end{minipage}


How to tackle this question of bounded variation?

Let $f : [0,1] \longrightarrow \mathbb R$ be a function defined by   $f(x) = x^\alpha \sin \frac 1 {x^\beta}$ , whenver $x \in (0,1]$ and $f(0) = 0$ where $\alpha > \beta$. Then for what values $\alpha$ and $\beta$, $f$ is a function of bounded variation on $[0,1]$?  I think the theorem which states that "If $f : [a,b] \longrightarrow \mathbb R$ be a continuous function on $[a,b]$ and if $f'$ exists and is bounded on $(a,b)$ then $f$ is a function of bounded variation on $[a,b]$" can be applied to solve this kind of problem. But we also know that there exist functions which are of BV but do not satisfy the above theorem. So, my question is what is the actual way to proceed?   Please help me. Thank you in advance.


Advice about the copyright in research work as a research associate

I need advice regarding the copyright of the work done as a research associate.  I am working for a university as a research associate and my principal investigator insists on publishing my work without my consent. She thinks that she is entitled to do so because i worked on her idea and she paid me the salary. So she has a right to publish my work without my consent and I have no right on that work any more.   Is this true?


Always use \NewDocumentCommand instead of \newcommand?

Are there compelling reasons to stick with \newcommand or should one always use \NewDocumentCommand instead, even when not using any of the additional features offered by xparse?  In addition and more specifically,   If I already require xparse to define one of the macros of my document/package/class, is it a good idea to use \NewDocumentCommand for all my other macro definitions? Will \newcommand eventually get deprecated/discouraged in favor of \NewDocumentCommand with LaTeX3?


About the expected value of a certain random variable

For $n \in \mathbb N$, consider the following experiment :  1) choose a random number in $[\![ 1, n ]\!]$  2) if the number wasn't already chosen, write it on a piece of paper  3) repeat 1) and 2) until all the set $[\![ 1, n ]\!]$ is listed on your piece of paper  Let $X$ be the number of tries it took to finish the experiment, what is the expected value of $X$?  I began by solving the case $n = 2$ :  For $k \in [\![ 2, \infty [\![, \mathbb P(X = k) = \frac{1}{2^{k-1}}.$  So,   $$ \mathbb E(X) = \sum_{k = 2}^\infty\frac{k}{2^{k-1}} = 2  \cdot \sum^\infty_{k = 1}\frac{k}{2^{k}} - 1 = 3.$$  I need help for the general case.


How to change the numeration of captions

My problem is that every time I write \caption in a figure, the preceding number increases its value in one unit. Nevertheless, I'd like to group them as in sections. For example, instead of 1,2,3,etc. I'd like 1.1,1.2,2.1,etc. The class of document I'm using is an article.  Thank you for your responses.


How to deal with custom configuration on versioned files? - git

This question   suggest to ignore them, and while it is an alternative I don't really want to have them moving the .ignore file all that much, seems like dirty to me.   Most of the team members have some sort of configuration in a number of versioned files which are not to be committed to the main branch.  ie. app.config file with the local database etc.   How to deal with these files? They need them to have their environments running but at large they tend to forget to add new files to the repo because they start ignoring modified files.   I was thinking have some sort of script the removes them from the local file system when they compile so they can tell if the whole solution will stil compile or not when pushed into the repo, but I wonder is there is a better solution?


How to find Windows 7 File Transfer History?

Is it possible to find out which files are transferred to an external usb flash drive in certain period of time?   To be more clear. If I/someone have a flash drive and take some data from me. How do I know which files are copied? Finding out file copy hostory could be also a work around.


I want to count items in radius of 10 chunks but I have never made a plugin and I didn't saw a event to count a specific item. What I want to do is for example: count the amount of cobblestone items on the ground, in chest and in inventories and I want to put that number in a variable. If two players would use the same plugin at the same time. Will it putt the amount of cobblestone of both players in that variable or does the game makes them separate. I really Want it to be separate. I don't want to spoil what I am going to make because I saw that what I am going to make has never been made before(I think) I hope someone can help.


Several times over the past couple years, I've heard of people using apt-fast for updating and installing packages, but I'm not really sure what it does.  I think I've traced its origin to , and it seems to be a script that speeds up apt-get operations.  What exactly does the script do? Are there any potential downsides to using it? If not, why isn't everyone using it?


I'm trying to learn the archaic conjugation (for fun) and I wonder if the imperative verbs in the archaic form can be conjugated with -est for the second person singular (ex: Eatest thy vegetables).  Thank you in advance for your answers!


SHA-256 : Finding two strings that the first n bits of hash value are same

How can I find two strings that have the same hash value for first $n$ bits in SHA-256? I'm implementing it by Python and I have the following ideas and problems:   Keep generating two random string    What is the length of the string that I need to generate?   How to avoid generating the existing string again? How many string should I generate in total?  Hash the two random string and store in a dictionary    import hashlib in python {random string : hash value}  Loop the dictionary to check if there is two hash value share the same first n bits and return the two strings as a result     Please give me some advice on it.


What time zone do SO's servers operate in?

What time zone do Stack Overflow's servers operate in?  I noticed that it couldn't be my time zone, or the ones before me (I'm in North American Eastern Time), because I logged into SO earlier today (around 12 pm), then I logged in just a few minutes ago (around 8 pm), then about a minute later I got the Fanatic badge (yay me!).


Does the scheme-theoretic definition of a manifold include Hausdorffness and second-countability?

Wikipedia has that:     Scheme-theoretically, a manifold is a locally ringed space, whose structure sheaf is locally isomorphic to the sheaf of continuous (or differentiable, or complex-analytic, etc.) functions on Euclidean space.   I wonder if the locality assumption on the structure sheaf (every stalk is a local ring) implies Hausdorffness. If we let the line with two origins have the structure sheaf inherited from the quotient, won't the stalks at each of the origins be $\Bbb R(y)[x]_{(x)}$ and $\Bbb R(x)[y]_{(x)}$, which are local rings?  What about second countability?


Curve25519 over Ed25519 for key exchange? Why?

I've been reading up on the Signal Protocol (in this ) and it seems to be using  for ECDH and  (with Ed25519) for signatures.  My question is why not use only Ed25519?   supports Ed25519 and key exchange so what is Curve25519 needed for?  Are there any security considerations where it beats Ed25519 key exchange?   answered why to use Ed25519 over Curve25519 for signatures but why not to use Ed25519 for key exchange?


Selectively showing latin numbers whithin a xepersian document paragragh

Consider the following document:  \documentclass[10pt,a4paper]{report} \usepackage{xepersian}  \settextfont{FreeFarsi}% http://sourceforge.net/projects/fpf/ \begin{document} این یک متن فارسی  است. \LR{Ch4}  ادامه متن فارسی... \end{document}   It prints \LR{Ch4} as Ch۴, whereas I want it to be printed as Ch4. But I do not want this to effect other numbers in the text. How can I do this?  I could use \begin{latin}...\end{latin} or \latin ... \persian, but they add new lines before and after the contained text.


Google Glass Charade Sample Error: Module 'gdk-charades-sample' production: java.lang.NoClassDefFoundError: com/android/resources/ResourceFolderType

I am trying to build the apk for the charade sample for google glass:  I am getting the error Error:Module 'gdk-charades-sample' production: java.lang.NoClassDefFoundError: com/android/resources/ResourceFolderType Does anyone have any idea what is causing the error?


Does quantum spin contribute to the angular momentum of a black hole?

Let's say I have the ability to crunch a given quantity of particles into a black hole.  I now use a sizeable quantity of electrons to do this, with the restriction being that all of them have $+\frac{1}{2}$ spin.   Apart from the charge, does this intrinsic angular momentum exhibit itself in the black hole?  Would the resulting black hole resemble a Reissner–Nordström black hole or a Kerr-Newman black hole?   Would it be different from a black hole that I make out of equal amounts of $+\frac{1}{2}$ and $-\frac{1}{2}$ electrons? It should be, shouldn't it? (because the information about those spins should be conserved)


I have a strange issue where sudo is not preserving the PATH by default. I tried the answers from  and it works when I use the sudo env "PATH=$PATH" version but I want to fix this permanently. Here's my PATH as regular user and under sudo: $ echo $PATH /usr/local/bin:/bin:/usr/bin:/opt/jdk/bin:/opt/python3/bin:/opt/qt5/bin $ sudo printenv | grep 'PATH' PATH=/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc  I tried sudo -E and sudo "PATH=$PATH but they don't work either. sudo env "PATH=$PATH" works but I have to type it every time run sudo. I want to avoid doing that every time I run sudo. I'm not sure where sudo is picking up this path from. I don't have secure_path hard-coded or env_reset in /etc/sudoers. Hence this is not a duplicate of . Any ideas what is going on and how to fix this? I would prefer not create aliases or hard-code the secure_path. Edit: As requested, the output of sudo -l: $ sudo -l User munir may run the following commands on munir-lfs:     (ALL) NOPASSWD: ALL


Which is the best way to install new hplip versions?

Hplip is the software that drives most hp printers. Usually new printers are only supported in newer versions of the software. Canonical doesn't backport new versions packages to older Ubuntu versions, that means that newer drivers are not going to be available in the Software Center of older Ubuntu versions.  As an example yesterday I needed to hook a hp 1005p to a computer running 8.04. I was forced to install a newer hplip than the version available in the repositories. I installed it using the script from the hp page, but I'd like to know other alternatives.  Which is the best (technically, not the easiest) way to install it and why?.


Why does Beamer not change the itemize symbol when using \setbeamertemplate?

This code:  \documentclass[10pt]{beamer} \setbeamertemplate{itemize item}[circle] \setbeamertemplate{itemize subitem}[triangle] \setbeamertemplate{itemize subsubitem}[square]   \begin{document} \begin{frame} \begin{itemize} \item first level     \begin{itemize}     \item second level         \begin{itemize}         \item third level         \end{itemize}     \end{itemize} \end{itemize} \end{frame} \end{document}    produces this output:    I expected the symbol of the first level item to be a circle, not a square. Is there an error in my code? The log file was too long to include in the question, so I .


Syntax highlighter doesn't handle unpaired backticks

If you have an unpaired backtick  file = $` raise unless file == "my_file.rb"   You get the next line treated as a comment string.  It seems to be a pairing problem, based on   file = $` raise unless file == "my_file.rb" file2 = $` raise unless file2 == "my_other_file.rb"   having the last line highlighted correctly.  This is observed in the current version of .  Edit: Correction based on Michael's answer.


I want to see the previous dmesg log before the reboot. In previous versions of fedora, It used to be in /var/log/messages. But from Fedora 20, it's being stored through systemd i.e. journalctl.  I've a directory /var/log/journal. It has many files and all of them having extension as .journal. I tried to open them with gedit. But couldn't succeed. I tried with notepad++. It's showing unreadable data as if a binary file.  How to read them?


homomorphism from $S_3$ to $\mathbb Z/3\mathbb Z$

TRUE/FALSE TEST:  There is a non-trivial group homomorphism from $S_3$ to $\mathbb Z/3\mathbb Z.$   My Attempt:  True: Choose $a,b\in S_3$ such that $|a|=3,|b|=2.$ Then $S_3=\{1,a,a^2,b,ba,ba^2\}.$ Define $f:S_3\to\mathbb Z/3\mathbb Z:b^ia^j\mapsto j+3\mathbb Z$ Then $f$ is a nontrivial homomorphism.  Is the attempt correct?


I am wanting to gain root privileges on my Google Nexus 7 tablet, running Android 4.1-4.2.1. How can I do this?


Help me remember the name of an old animated sci-fi (apocalyptic) movie

When I was young I remember my mother bringing me a movie home from goodwill. The movie was in the 80s style if I remember correctly. I don't remember much about the movie other than a masked character who always wore a red suit, carried a rifle and rode an ostrich like creature. I think this character never spoke and died at some point in the movie. The front cover of the movie has this red cloaked character mounted on his ostrich like creature with his gun.  If I remember right, the movie's landscape was very bleak and apocalyptic and was inhabited with characters wearing the same cloak and riding the same beast as the character mentioned above only with a different color scheme.   Any help would be great appreciated.


How do you unlock Yoda, R2-D2 or Darth Vader?

I've built all levels and completed all missions in the game and I've still haven't seen Yoda, R2-D2 nor Darth Vader, despite having unlocked them in the Bitizens Album.  Why haven't they begun to appear in my elevator, yet?


PLSQL Trigger Error. "is mutating, trigger/function may not see it" ORA-04091

When I declare a trigger in my Oracle database project, I'm getting an error, which says:  ERROR at line 1: ORA-04091: table MIHAL277.LEAGUE_GAMES is mutating, trigger/function may not see it ORA-06512: at "MIHAL277.DELETE_UNUSED_GAME", line 4 ORA-04088: error during execution of trigger 'MB358996.DELETE_UNUSED_GAME'   Basically I'm creating an academic project for managing boardgame leagues. So there is a Game table and a League table. There's also a League_Games table, which indicates whether a game is available in a League (i.e if the players in the League play this game). A League can decide to stop 'owning' a game and then it's deleted from the League_Games table. But when it happens I want to run a trigger, which checks out if there are still some Leagues that use the game and if not - delete the entry for the particular game from the Game table.'  My trigger goes like this:  CREATE OR REPLACE TRIGGER delete_unused_game BEFORE DELETE ON League_Games FOR EACH ROW DECLARE    deleted_game_count integer; BEGIN     SELECT COUNT(*)      INTO deleted_game_count      FROM League_Games      WHERE Game_ID = :OLD.Game_ID;     IF deleted_game_count = 0 THEN         DELETE FROM Game         WHERE ID = :OLD.Game_ID;     END IF; END; /   So when I delete an entry from Leage_Games, the error appears. What is wrong with this trigger?


How can I make subsections lose the section number within the section and gain the section number outside it?

For a paper I am typesetting, the author wants subsections to be written with single numerals.  So far, OK,   \renewcommand{\thesubsection}{\arabic{subsection}}   does the job.  Yet frequently, he wants to cite the subsection in a later section, and wants both section and subsection numbers in references; i.e., he wants to quote Section 1.1 from Section 2.      My current workaround is to give both the section and subsection numbers in the reference.   MWE  \documentclass[11pt]{amsart} \usepackage{hyperref} \usepackage[backend=bibtex,citestyle=alphabetic]{biblatex} \renewcommand{\thesubsection}{\arabic{subsection}}  \begin{document} \section{A section} \label{sec:first} \subsection{A subsection} \label{subsect:first} Something cool. \section{New section} Now I want to cite the coolness in Section~\ref{sec:first}.\ref{subsect:first}. \end{document}     This works fine, except that the hyperref is set up so that if you click on the first 1, you go to Section 1, not Subsection 1.  Yet I would prefer that both numerals go to the same place in the hyperref links.       I could just wrap each such citation in \renewcommand{\thesubsection}'s, but is there  an easier way to add section numbers when citing subsections from a different section?   Note: Since I'm using biblatex, titlesec is not applicable.


How to find "file-release" in OS X El Capitan 10.11.6?

I can not find file-release through command line on OS X El Capitan Version 10.11.6. On my virtual machine in Ubuntu I can do "ls /etc/*release" and it shows me two files with all needed information:  $ cat /etc/redhat-release  Red Hat Enterprise Linux Server release 7.0 (Maipo)  $ cat /etc/os-release  NAME="Red Hat Enterprise Linux Server" VERSION="7.0 (Maipo)" ID="rhel" ID_LIKE="fedora" VERSION_ID="7.0" PRETTY_NAME="Red Hat Enterprise Linux Server 7.0 (Maipo)"   No idea how to find the file with release information on Mac. Please give me a hint or a hint how to search it?


What does Yoda mean when he says, "The Last of the Jedi Will You Be" from the perspective of Legends?

I ask because as one podcaster put it at that time "you pretty much can find a Jedi by looking under a rock." So in what sense does Yoda mean that since there where other Jedi hanging around?


Covariance and correlation between OLS estimators for slope and intercept

I am a scientist and new to this group so apologies in advance if this has been covered before. In my work, I use experiments to calculate the slope and intercept of experimental data from a simple regression model: $$y=\beta_0+\beta_1x+\epsilon$$ The OLS estimators from this model: intercept ($\hat{\beta}_0^{OLS}$) and slope ($\hat{\beta}_1^{OLS}$) are then used as parameters in other functions to calculate other variables. Because these OLS estimators are correlated, I also need to know the covariance $\mathrm{Cov} (\hat{\beta}_0^{OLS},\hat{\beta}_1^{OLS})$ between them in the corresponding error propagation calculations in order to calculate the uncertainty of these other variables. I have discovered the discussion in this group on , which has been helpful, but I have some additional questions: (1) In the posting above, @RichardHardy states that the correlation between the two estimators is: $$\mathrm{Corr} (\hat{\beta}_0^{OLS},\hat{\beta}_1^{OLS})=\frac{-\sum^n_{i=1}x_i}{\sqrt[]{n}\sum^n_{i=1}x_i^2}$$ Is there a published reference for the derivation of this expression?  I would like to know how this is derived (for myself), and as this will eventually be used in publishing the research, I would like to ensure there is a proper and valid reference for it. (2) To determine $\mathrm{Cov} (\hat{\beta}_0^{OLS},\hat{\beta}_1^{OLS})$, am I correct in assuming that: $$\mathrm{Corr} (\hat{\beta}_0^{OLS},\hat{\beta}_1^{OLS})=\frac{\mathrm{Cov} (\hat{\beta}_0^{OLS},\hat{\beta}_1^{OLS})}{\sigma_{\hat{\beta}_0^{OLS}}\sigma_{\hat{\beta}_1^{OLS}}}$$ If this is not correct, could someone point me to a reference which will allow me to derive $\mathrm{Cov} (\hat{\beta}_0^{OLS},\hat{\beta}_1^{OLS})$?  Thanks in advance for any help or advice.


I want to study Einsteins General Theory of Relativity, but before i start reading about it can anyone of you recommend some good books about Curved Geometry? since i will need it to understand the first part.


Similar masses and lifetimes of the $\Delta$ baryons

Why do the four spin 3/2 $\Delta$ baryons have nearly identical masses and lifetimes despite their very different $u$ and $d$ quark compositions?


How to copy a remote tree without hidden files?

I have a tree with 100GB of data, and I'd like to scp it to a remote machine. A large portion of the data is in hidden .files that I'd like to keep locally, but I don't need it remotely.  Is it possible to copy over via scp or another method the entire tree without the hidden files?


Best way to migrate a huge SQL Server database with low downtime over network

Problem definition  Our database server needs to be transferred to an other datacenter. It runs on Microsoft SQL Server 2012 Enterprise (64-bit) and contains two databases of about 2TB and 1TB.  Having little to no downtime for this would be ideal.  Workload  Those databases are used for a .NET website and are constantly getting updated.   Having it not available over the weekend would be acceptable though. The currently in use DB would remain the only one in use until the switch over to the new one.  That switch would ideally be made just by changing DNS entries to point to the new DB server while making sure the DB is not being updated.  Also, time taken by this operation does not really matter as long as the switch from one server to the other (downtime) is kept low.  Approaches considered   Backup and restore  This has been done in the past but involved a high downtime even though it was done through an internal network, so more efficiently than through Internet Log shipping  As far as I understand, this approach would minimize downtime by configuring a master/slave and transferring  an exact copy of the master DB to its slave being read only. As mentioned above, no access to the slave would be necessary and we just need a way to have a replica of the master DB without data corruption.   It also seems to be quite efficient in terms of resources utilization and wouldn't impact to much the master performance.   I might be wrong about this approach so feel free to correct me. Database mirroring  I'm not too aware of that approach but it seems like a valid option. No need to have real time sync and performance of the master is quite important so asynchronous would be the way to go if this approach were to be chosen. Other options?  That server runs directly on bare metal hardware so lower level solutions are unfortunately not an option. Maybe there is a better way to get this done?   Constraints  As described, those databases are quite big to the point they are hard to maintain but that's an other problem.  The versions of SQL Server will be the same (Microsoft SQL Server 2012 Enterprise 64-bit).  It will have to be transferred over network between two datacenters so most probably over Internet. Having disks sent from one site to the other for an initial sync is unfortunately not an option. Having some sort of security for the transfer would be ideal but we will do the best of this situation.  That should give a quite good overview of our needs for this task and hopefully some of you had to face that situation before.


I would like to split pages in pdf so that each page would be divided into 2 pages ( e.g. form 100 pages I would go into 200 but smaller - exactly half size).  I need this to read pdfs on my ebook reader.  Anybody knows how can this be done ?


Let $(X,\tau)$ be a topological space. Recall that a subset $A\subseteq X$ is called regular open iff $A=\mathrm{Int}(\overline{A})$. Obviously it follows from the definition that a regular open set is open (being the interior of something). It is also clear that a clopen set is regular open. Now here's my question:   Suppose that $(X,\tau)$ is a topological space with the property that every open set is regular open. That is, $\forall A\in\tau,A=\mathrm{Int}(\overline{A})$. Does this imply that every open set is also closed?    Clopen sets satisfy the definition of being regular open in a sort of trivial way in that both the interior and closure operators act as the identity. So a topology in which every set is clopen is, a fortiori, a topology with only regular open sets. I was wondering if there is any more interesting example. At the extreme end, one might wonder if there exists a connected topological space in which every open set is regular open (besides the indiscrete topology of course).  The problem is making sure that $\tau$ is closed under union and finite intersections. For example, the interval $(0,1)\subseteq \mathbb{R}$ is regular open, but the open set $(0,1)\cup (1,2)\subseteq \mathbb{R}$ is not because $\mathrm{Int}\Big(\overline{(0,1)\cup (1,2)}\Big)=(0,2)$. Any ideas for a proof/counter-example would be greatly appreciated!


group records bases on one column name in data set and display all the values corresponding to the column for which records are grouped in SQL

For example, if I have a data-set as below  ID ITEM 1   A 2   B 3   C 1   B 1   C 2   A   then need a sql query which gives output as below:  ID  ITEM 1    A, B, C 2    B, A 3    C   That is how to group based on ID and display all the values pertaining to another column attributes in SQL.


Setting the Line End Styles for Canvas.LineTo

Is there any way to set the style for the lineends for the TCanvas.LineTo method? It seems to default to rounded ends, which looks very bad for several lines in a row of different colours when Pen.Width is set to a large value (e.g. 9).  It looks like this (rounded ends):   ********........****** **********........****** **********........******  ********........******   (where * is e.g. blue and . is yellow)  It is even worse if the two outer lines are drawn after the middle line:   ********........****** **********......******** **********......********  ********........******   I'd like it to look like this (streight ends):   ********........******  ********........******  ********........******  ********........******   Pen does not seem to offer any setting for this and neither does the LineTo method. Is there maybe a windows API function I could call?


This answer  has the curious sentence  The singularity of a black hole is not a point at its center, it's a spacelike singularity.  What is that supposed to mean and is it accurate (according to our models)?


In English, especially in a poetic description, ships and cars are  referred to as "she".   Maybe their owners compare their beauty and elegance with those of women, but what if a female owner wanted to describe her yacht or car?   Would she also say, "She is a real beauty", or it might be "he" then?   Does the choice of a pronoun depend on whom she is giving the description of it to — a man or a woman?  What about a man-o’-war or a merchantman? Being ships, are they also referred as "she"?  P.S.  on the use of "she" in reference to ships, but there seems to be no answer to my question there.  P.P.S. My question wasn't pulled out of a thin air. I came across a book by a prominent Russian linguist, G.Veichman, written in 1990, (Novelties in The English Grammar is my translation of the title), where I read that the rule of personification of vehicles may be added regarding a female owner talking about her car using the preposition "he". Period. No further explanation or reference examples.


What is the difference between community and non-community answers on a given SE?

I have answered I believe around 12 questions on Chess Stack Exchange with > 1 for all of them. How come I only have credit for 3 in terms of non-community answers? What is the difference between a community and non-community question?


Grant SFTP permission and limit Ubuntu user to only one directory

I'm trying to let create a user with SFTP permissions to only one directory (that is not his home directory). When he connects through a SFTP client I want him to land on this directory and I don't want him to be able to view any other directory unless it's a sub-directory. I'm using Ubuntu 12.04.  I followed the steps below:  Edit the /etc/ssh/sshd_config file.  Add or modify the Subsystem sftp line to look like the following:  Subsystem sftp internal-sftp   Add the below block of text to the bottom of the file:  Match Group filetransfer     ChrootDirectory %h     X11Forwarding no     AllowTcpForwarding no     ForceCommand internal-sftp   Restart OpenSSH:  service ssh restart   Create a system group for users whom you want to restrict to SFTP access:  addgroup --system filetransfer  sudo adduser username #added user usermod -G filetransfer username #added him to the group chown root:root /home/username #disabled access to his default home directory chmod 755 /home/username   Changed the permissions directory I want him to be able to modify:  cd /srv/www/website_name/public_html/wp-content/themes/ chown username:filetransfer specific_folder chown username:filetransfer specific_folder/*   Set this folder as his home directory:  sudo usermod -d /srv/www/website_name/public_html/wp-content/themes/specific_folder username   But now I'm not able to connect using SFTP. This fails after I change his home directory. What should I do to fix this?


Typesetting LaTeX Source Code with the listings package

I am writing some documentation for a LaTeX package, in which I am going to be including some example LaTeX code.  What is the best way to typeset that code?  I know I could just use verbatim, but it would be nice to get syntax highlighting.  I realize that this is a duplicate of , in which the consensus was to use the  package.  The problem with listings is that it seems to only have a driver for TeX, not LaTeX.  For example, when I typeset something like this:  \begin{lstlisting}[language=TeX,                    keywordstyle=\bfseries,                    identifierstyle=\itseries,                    stringstyle=\ttfamily] \begin{minipage}{\hsize}   This is a test! \end{minipage} \end{lstlisting}   it results in something like this:     \begin{minipage}{\hsize}     This is a test!   \end{center}   which is obviously messed up.  Is there a LaTeX-specific driver for listings?  If not, is there another package that does syntax highlighting for LaTeX code?


How can I implement regenerative braking of a DC motor?

I know that many electric cars are able to convert the momentum of the car into stored energy in batteries, rather than convert it to useless heat at the brake pads. How does this work? How can I implement it myself?


Elliptic R-matrix and Yang Baxter solution for XYZ model

in the framework of QISM, How can i derive the R-matrix for XYZ Heisenberg model?


What is best module to hide or disable or un-publish some terms in taxonomy or vocabulary like the way in the node tab of publishing in the back end


How are these two definitions of angular momentum related?

I've seen angular momentum defined as:   $$\ L=I \omega\ $$  In dynamics, the notation is different and states:   $$\ L_o = r  × (mv) \ $$  How are these definitions related, if they are describing the same thing?


How can bash aliases be configured to handle spaces in directory names?

The alias below works well in zsh when spaces in directory names are \ escaped, but bash doesn't handle them properly. What changes would be required to make them work with bash properly.    dum() {   du -h --max-depth=1 $1   }   zsh succeeds   user@server: dum "Server Configuration" 32K     Server Configuration  user@server: dum Server\ Configuration 32K     Server Configuration   bash fails  user@server:~$ dum "Server Configuration" 8.0K    Server/install_scripts 300K    Server du: cannot access 'Configuration': No such file or directory user@server:~$ dum Server\ Configuration/ 8.0K    Server/install_scripts 300K    Server du: cannot access 'Configuration/': No such file or directory         How can the alias be written to make it work in bash?


Does technological developments terminate the evolution of human species?

One of the most agreed upon mechanism for evolution is natural selection.Changing environmental conditions necessities development of variations that enable the survival of that particular species.These genetically passed down variation later becomes the adaptive features which further result in development of new species.  But with development of technology we are finding newer ways to cope up with changes in the environment.Do this impact human evolution?


How to get disconnected teeth and beard to move with rigged face?

So I'm trying to weight paint but can't seem to get my teeth and beard on the character to move with his head on two different bones, I have tried to move the head then weight paint it so that it gets moved into position as I paint but that doesn't work because it just stops getting closer to the head... so if someone could help using like team viewer or something that would help me a ton.   newest image:


Can I make a package .deb from .tar.gz or .tar.bz2?

If I had an application with .tar.gz or .tar.bz2 extension can I transform it to a package .deb ?


Multiple item drag'n'drop on Desktop, with mouse, doesn't work

On Ubuntu 20.04, when I select multiple files on Desktop and move them (either moving icons around on desktop, or moving multiple files to Trash), only the item over which mouse is residing gets moved, the rest are left behind. As a result, I am unable to do multi-icon mouse drag'n'drop actions on Desktop. This behavior doesn't happen when I move files in File manager, across windows and/or folders. Thoughts?


I was deriving the expressions for capacitance for spherical capacitors and i am completely confused now.please help! Outer sphere is B with radius b and inner sphere is A with radius a. CaseI- sphere B is earthed( +Q given to sphere A) (i) outer surface earthed: Potential on B is just due to -Q (induced charge) as potential of outer surface is 0(it is earthed) and V on A is due to +Q charge given to it.now the two surfaces of B are at different potentials so why doesnt charge flow between them and their potential difference become zero? (ii) inner surface earthed Induced charge on the inner surface due to inner sphere goes to earth. Then is the potential due to charge on A or is there somehow charge induced on outer surface of sphere B? Case II sphere A earthed (+Q given to B) (i) outer surface earthed No charge induced on inner sphere... system behaves as isolated spherical conductor B. C=4(pi)(epsilon)b. Is my reasoning correct? (ii)inner surface earthed Why does the Charge on outer sphere distribute on inner and outer surface when a conductor’s charge always resides on its surface? Please point out any inconsistencies or wrong assumptions.


I need information specific to CPU core. Is there any api exposed for mac

Suppose we have one CPU with 2 core , then I need information about no.of.Processes , IO time,IDLE Time, System Time, Name of core for specific core Level and not to CPU Level etc. So I would you like to know is there any api expose for mac.


The Feynman lectures are universally admired, it seems, but also a half-century old. Taking them as a source for self-study, what compensation for their age, if any, should today's reader undertake?  I'm interested both in pointers to particular topics where the physics itself is out-of-date, or topics where the pedagogical approach now admits attestable improvements.


When is a duplicate question not a duplicate?

I thought that this question  was a duplicate (sorry, as a noob meta user I can only post one link, please follow my comment on that question), but other folks don't seem to agree.  If two questions are phrased differently, but describe the same underlying problem (and therefore have the same answers) are they not same question?  Thanks, from a puzzled Binary Worrier :(  Related:


I want to get a space to the phrase "1\times 8 \mathrm{ matrix}", how can I get it inside the math environment?     \begin{align*} C_{D_{1\succ 2}, \mathrm{increasing}}   &=  \underbrace{\begin{pmatrix} 1   &   -1  &   1   &   -1  &   1   &   -1  &   1   &   -1  \\ \end{pmatrix}}_{1\times 8\mathrm{ matrix}}       \\ A_{D_{1\succ 2}, \mathrm{increasing}}   &=  \underbrace{\begin{pmatrix} 1   &   0   &   1   &   0   &   1   &   0   &   1   &   0   \\ 0   &   1   &   0   &   1   &   0   &   1   &   0   &   1   \\ 1   &   1   &   0   &   0   &   1   &   1   &   0   &   0   \\ 0   &   0   &   1   &   1   &   0   &   0   &   1   &   1   \\ 1   &   1   &   1   &   1   &   0   &   0   &   0   &   0   \\ 1   &   1   &   1   &   1   &   0   &   0   &   0   &   0   \\ 0   &   0   &   0   &   0   &   1   &   1   &   1   &   1   \\ \end{pmatrix}}_{7\times 8 \mathrm{ matrix}}. \end{align*}


If $V$ is finite-dimensional with $J : V \to V$ such that $J^2 = -id$, then $V$ has even dimension

Let $V$ be a $\Bbb R$-vector space, with $J$ being an endomorphism $J: V \to V$ with $J^2=-id$ (identity).  I already had to show that $V$ became a $\Bbb C$-vector space with the scalar multiplication: $$(a+bi)\cdot v=av+bJ(v).$$  Now $V$ is set to be finite-dimensional. The problem is the following:  Show that $\operatorname{dim}_{\Bbb R} V$ is even.  Any ideas on how to show this? (I've seen the post  which has the same problem but I don't really get the solution that is offered there, they write $J$ as a matrix, so far so good, but from there I don't get it.)


What is a good book/lecture notes that covers Lagrangian and Hamiltonian mechanics and includes a lot of numerical computation?

I am looking for a book or lecture notes that doesn't just describe the theory of Lagrangian and Hamiltonian mechanics, but places strong emphasis on dealing with these topics computationally. Any computational physics book or lecture notes that I come across seems to be either a very basic introduction to standard numerical methods, or else focuses on very elementary physics.  So does anyone know any resource that may be of use? I would not normally ask for a resource recommendation on stackexchange sites but I have had no luck after lots of searching the net.


Is there a rule to understand how the group "Cha" has to be pronounced?  "Character" sounds with a hard first syllable, while "Charm" sound softer, but I don't find how to tell which sound to use before earing someone saying the word. It could be because of the double consonant "rm" vs "ra"? Or is it just a matter of knowing the rule for every single word?  EDIT: More specifically, let's talk about UK English pronunciation.


Persistent do not disturb toggle in Yosemite possible?

When Do Not Disturb is on it shows in Notification Center. When it's off, no toggle.  I just want it there all the time so I can flick it on while I focus for an hour or so.  Anyone know how to make that happen?


I'm using live mode to boot Ubuntu from an USB. Every time I restart the computer all files are gone. How can I store files on the USB running the live install?