I understand that if you put a bag of holding in a bag of holding, both are destroyed and anything within 5 feet of them gets sucked into the Astral Plane.  But if you're in the Astral Plane, can you do the same thing to get out of said plane?

What would happen if someone were to place a Portable Hole within a Bag of Holding while being within the Astral Plane? Would it be the reverse effect?


This question seems a lot like one of those "Phylosoraptor" memes all over the Internet, and it might be very silly, but I've been thinking about this for a while.  Is it possible that space is not actually expanding but rather, the speed of light is decreasing throughout the entire Universe? ...as if light were traveling through a medium that would be changing its properties over time.  I guess there are several phenomenons that can be explained just as well by assuming that either space is expanding, either light is slowing down, but I do not know enough physics (and phenomenons that could contradict such a claim) in order to rule out this possibility.

Could someone judge my (stoner) hypothesis that the speed of light has changed over time -- i.e. as the universe has expanded in volume light has slowed down, perhaps going so far as back to the big bang when it was infinitely fast and there was no time because everything happened at once etc. Thinking that the speed at which information can propagate through the universe is linked to the size of it seems intuitive to me. My question -- is there an easy disproof of this? Would Einstein have to be wrong? Does it violate anything supposedly more fundamental such as quantum or string theories? Do any current experiments invalidate it? If not can you show me in any case why you think its unlikely.   Edit 8/24  I'm accepting Mark M.'s answer but will post this here because there is a character limit on comments  @Mark M thanks, good answer but as someone who has only read some popular physics, and should leave this to the experts, I'm still muddled in my personal theory. I don't see why you should need two units to measure the speed of light. The thing I have a hard time wrapping my head around is the relation of time and distance. They seem like they could fundamentally be the same thing. If you say time is measured fundamentally by the vibration of so and so quantum object in space... why can't we just measure that vibration distance as the constant... I'll repeat myself to try to be clear... there is a certain minimum distance that particles have to go to interact with each other... if it wasn't vibrating there wouldn't be time,its what creates the illusion of time...so instead of talking about speed or c as distance/time.... can't we simply talk about that distance a quantum object vibrates....I'll lead up to my point.....perhaps there can need be only one constant here, and that is the physical size of the universe. a tiny metal tuning fork doesn't appear to be vibrating at all but if you blew it up to the size of the empire state building the metal rods would move from window to window. perhaps as our universe expanded in size the length of that minimum vibration (perhaps infinite at point zero) would have expanded, and therefore created the illusion of time and the speed of light, which, as the universe expands, will continue slowing down. perhaps we are like a big balloon and we have been blown up and all the fields/particles-without-size are vibrating more and more in that space.. am i missing something obvious here?


I face a problem with BibTeX, which for just two particular references appear with the author's full names. I used scholar google to get the BibTeX file.  the references \cite{hughes2018comparison}  and \cite{hughes2018dynamic}  publishes in the same year and with the same first author that appears with authors full names. I don't like to show all the authors names in the main text like (Hughes, El Saeiti and Garca-Fi~nana, 2018) (Hughes, Komarek, Czanner and Garcia-Fi~nana, 2018).  I like a (Hughes et al. 2018a) and (Hughes et al. 2018b).  I include another two references that publishes with same author and same year and appear like (McCulloch and Neuhaus, 2011a) (McCulloch and Neuhaus, 2011b)  How can I achieve this  (Hughes et al. 2018a) and (Hughes et al. 2018b)?  Bibtex file here:  @Article{komarek2010discriminant,   author    = {Kom{\'a}rek, Arno{\v{s}}t and Hansen, Bettina E and Kuiper, Edith MM and van Buuren, Henk R and Lesaffre, Emmanuel},   title     = {Discriminant analysis using a multivariate linear mixed model with a normal mixture in the random effects distribution},   journal   = {Statistics in medicine},   year      = {2010},   volume    = {29},   number    = {30},   pages     = {3267--3283},   publisher = {Wiley Online Library}, }  @Article{hughes2018dynamic,   author    = {Hughes, David M and Kom{\'a}rek, Arno{\v{s}}t and Czanner, Gabriela and Garcia-Fi{\~n}ana, Marta},   title     = {Dynamic longitudinal discriminant analysis using multiple longitudinal markers of different types},   journal   = {Statistical methods in medical research},   year      = {2018},   volume    = {27},   number    = {7},   pages     = {2060--2080},   publisher = {SAGE Publications Sage UK: London, England}, }  @Article{hughes2018comparison,   author    = {Hughes, David M and El Saeiti, Riham and Garc{\'\i}a-Fi{\~n}ana, Marta},   title     = {A comparison of group prediction approaches in longitudinal discriminant analysis},   journal   = {Biometrical Journal},   year      = {2018},   volume    = {60},   number    = {2},   pages     = {307--322},   publisher = {Wiley Online Library}, }  @Article{mcculloch2011prediction,   author    = {McCulloch, Charles E and Neuhaus, John M},   title     = {Prediction of random effects in linear and generalized linear models under model misspecification},   journal   = {Biometrics},   year      = {2011},   volume    = {67},   number    = {1},   pages     = {270--279},   publisher = {Wiley Online Library}, }  @Article{mcculloch2011misspecifying,   author    = {McCulloch, Charles E and Neuhaus, John M},   title     = {Misspecifying the shape of a random effects distribution: why getting it wrong may not matter},   journal   = {Statistical science},   year      = {2011},   pages     = {388--402},   publisher = {JSTOR}, } @Comment{jabref-meta: databaseType:bibtex;}   I show here

With BibTeX and the harvard/AGSM style, some references (from authors who have multiple papers per year) aren't abbreviated to "et al.", with the addition of a, b, et cetera. For example, with the code attached below, I get:    Only one paper is abbreviated to et al., the others not. Any idea why this is happening? The in-text references should be Basu et al. (2008a) and Basu et al. (2008b), which I believe AGSM should automatically do?  \documentclass[10pt,a4paper]{article} \usepackage{natbib}  \begin{document}  \cite{basu2008a, basu2008b, beare2006}  \bibliographystyle{agsm}  \bibliography{references.bib}  \end{document}   With BibTeX file (references.bib):  @string{jam="J. Appl. Meteor."} @string{ag="Acta Geop."} @string{blm="Bound.-Layer Meteor."}  @article{basu2008a,   author={Basu, S. and Vinuesa, J.-F. and Swift, A.},   title={Dynamic {LES} modeling of a diurnal cycle},   journal=jam,   year={2008},   volume={47},   number={4},   pages={1156-1174} }  @article{basu2008b,   author={Basu, S. and Holtslag, A. A. M. and Wiel, B. J. H. and Moene, A. F. and Steeneveld, G. J.},   title={An inconvenient "truth" about using sensible heat flux as a surface boundary condition in models under stably stratified regimes},   year={2008},   journal=ag,   volume={56},   number={1},   pages={88-99} }  @ARTICLE{beare2006,  author={Beare,R. J. and Macvean,M. K. and Holtslag,A. A. M. and Cuxart,J. and Esau,I. and Golaz,J. -. and Jimenez,M. A. and Khairoutdinov,M. and Kosovic,B. and Lewellen,D. and Lund,T. S. and Lundquist,J. K. and McCabe,A. and Moene,A. F. and Noh,Y. and Raasch,S. and Sullivan,P.},  title={An intercomparison of large-eddy simulations of the stable boundary layer},  journal=blm,  year={2006},  volume={118},  number={2},  pages={247-272} }


Can anyone explain how this code works?  function makeAdder(x) {   return function(y) {     return x + y;   }; }  var add5 = makeAdder(5); var add10 = makeAdder(10);  console.log(add5(2));  // 7 console.log(add10(2)); // 12   Reference:

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I'm using Windows 8.1 Pro, with a Microsoft Gaming keyboard. When I'm writing posts on StackOverflow I often need to enclose things in code marks (`). In order to get these, I have to press the ¬ | key on my keyboard 4 times, which produces two of these.     Why do I need to do this? Why doesn't this key work as others?

in Windows XP, when I type an apostrophe ', or  ", no character is displayed.  If I type another character, the apostrophe or dumb quote and the next character appear at the same time.  This happens with double quotes ", apostrophes ' and tilde ~ characters.  What could possibly be causing this?  This occurs in all applications I have tested - wordpad, firefox, ms word etc.


What is the reasoning behind the design decision to allow users to create a display name which matches another existing users exactly?    This is opposed to the common practice of enforcing unique user names, and I'd really like to learn something.

I recently changed my username to Undo. I was amazed when I pressed Submit and saw that it actually went through - surely someone somewhere was using this same username.  Out of curiosity, I then search the SO user list for Undo - and found  with Undo as thier name. They have 50 rep. I have around 1,500.   Is there some kind of pecking order, I.e. a high-rep user can 'steal' a low-rep user's name? Or is this a bug?  Or can two users have the same username without causing the SO servers to go down in a burning ring of fire?


I haven't been able to prove that the cardinality of the set of all equivalence relations on N is equal to 2^N. I think that there's probably a bijection between the set of all equivalence classe on N and P(N) but I can't find it. Would apreciate some help.

I came across this long proof on this site:    But I would like to know whether my direction can work.  Say we want to find the cardinality of all equivalence relations in $\mathbb{N}$. Since it is a subset of all relations in $\mathbb{N}$, I conclude it has a cardinality smaller or equal to $\aleph$. Now, define an injective function from $P(\mathbb{N})$ to the set of equivalence relations by matching each subset of $\mathbb{N}$ with the identity relation (which is an equivalence relation in $\mathbb{N}$.  Therefore the cardinality of all equivalence relations in $\mathbb{N}$ is greater or equal to $\aleph$ and using CSB we get the desired result.  Seems legit?


I know that when dealing with artificial neural networks, RELU yields a value based on the weighted sum of the inputs plus a bias term. However, this logic does not seem to apply to convolutional neural networks.  Looking at the ResNet architecture, the outputs of the convolutional neural nets (what I believe to be feature maps), is added to the input x, and then RELU is applied onto it. What exactly does the RELU function do in this case? Do the convolution layers output feature maps, or something else?

I am building a convolutional neural network to classify certain types of greyscale images (chess puzzles).  I can see obvious advantages for using ReLU as my activation function e.g. I can treat the input layer feed to the first hidden layer in the same way as the input into any other hidden layer in terms of the domain of the input.  But I have a question about how to use ReLU activations at the other end - i.e. as the output of the fully connected output layer.  I am looking to classify images of chess boards and so it seemed to me obvious that I could classify a part of the board as being a white square or a black square and then with some other (optional, as it were) classifications e.g. with pawn which itself could be black or white.  I cannot really see how to do this with ReLU - and so that suggests that what I really have to do is implement every possible outcome as a separate output neuron e.g., empty black square, empty white square, white square with white pawn, white square with black pawn, black square with white pawn ... etc.  Is that correct?  (I originally asked this on Stack Overflow and got no answers, but a recommendation to ask here. So I have deleted the original and posted this. Since I originally asked I have built a network and, using random weights - learning is about to begin, see that the overall results, after several layers of leaky ReLU activated filters and a leaky ReLU fully connected layer,  don't stray too far from the 0 - 1 range, though this may be luck more than anything else: but I am still intrigued by this problem so would welcome answers.)


I am not sure how this number is constructed.     I know that $2>q^2>p^2$, I then also know that q>p, hence I could construct a q such that q>p. I therefore choose q=p+x, where x could be an element of of rationals and then given I know that $2>q^2$ then $2>(p+x)^2$, so I should be able to solve for x. But since I cant use square root( have not created the real number line yet) I need to figure out how to solve $2>p^2+2 p x+x^2$   How would I proceed?  Or am I completely off track?   Thanks

First, my apologies if this has already been asked/answered.  I wasn't able to find this question via search.  My question comes from Rudin's "Principles of Mathematical Analysis," or "Baby Rudin," Ch 1, Example 1.1 on p. 2.  In the second version of the proof, showing that sets A and B do not have greatest or lowest elements respectively, he presents a seemingly arbitrary assignment of a number $q$ that satisfies equations (3) and (4), plus other conditions needed to show that $q$ is the right number for the proof.  As an exercise, I tried to derive his choice of $q$ so that I may learn more about the problem.  If we write equations (3) as $q = p - (p^2 - 2)x$, we can write (4) as   $$ q^2 - 2 = (p^2 - 2)[1 - 2px + (p^2 - 2)x^2]. $$  Here, we need a rational $x > 0$, chosen such that the expression in $[...]$ is positive.  Using the quadratic formula and the sign of $(p^2 - 2)$, it can be shown that we need   $$ x \in \left(0, \frac{1}{p + \sqrt{2}}\right) \mbox{ for } p \in A, $$  or, for $p \in B$, $x < 1/\left(p + \sqrt{2}\right)$ or $x > 1/\left(p - \sqrt{2}\right)$.  Notice that there are MANY solutions to these equations! The easiest to see, perhaps, is letting $x = 1/(p + n)$ for $n \geq 2$.  Notice that Rudin chooses $n = 2$ for his answer, but it checks out easily for other $n$.  The Question:  Why does Rudin choose $x = 1/(p + 2)$ specifically?  Is it just to make the expressions work out clearly algebraically?  Why doesn't he comment on his particular choice or the nature of the set of solutions that will work for the proof?  Is there a simpler derivation for the number $q$ that I am missing?


I've produced notes collections for physics courses that I've taken that include problem set solutions.  Two Professors have said they are worried future students will use my notes to cheat (i.e. it's a lot of work to produce new problem sets).  I'm toying with the idea of making the default version for the notes of a couple of these classes a redacted version, with the full version available on request.  I've used a macro around the .tex contents that uses a boolean flag to expand to nothing when a redacted flag is true.  However, I thought there could be a more fun way of doing the same problem.  Is it feasible to make it look like large portions of text (and formulas, and perhaps images) have been gone over by the big black marker of an over-zealous CIA redaction officer, faced with the impossible task of obscuring how much they've spent financing terrorism and government coups around the world?   Here's an example with about 1/3 redaction:    If something could be done like this, with random content redacted in black up to some threshold, that would be a pretty fun way of obscuring the problem set solutions.

I wonder if there is any LaTeX library that allows me to obtain a sanitization "black marker" effect in order to conceal omissis information, like for example a secret code in an URL or a password in a code listing.  Please have a look at this to get the idea of what I wish to obtain:  and   Any ideas?


Lucius Malfoy was a well known Death Eater and eventually Draco Malfoy became one as well. But what about Narcissa Malfoy, Lucius' wife and Draco's mother? She certainly spent a great deal of time around Voldemort and her husband, but I don't recall her ever being explicitly described as a Death Eater.   So was Narcissa Malfoy a Death Eater? Or was she a non-Death Eater permitted to be in the company of Voldemort?

All I can find about Lucius or Narcissa Malfoy, or their life after the Second Wizarding War, is that they were not sent to Azkaban and that they had a grandchild.  Is there any information about what happened to them and what they did after the Second Wizarding War?  Were they ostracized by friends because they left the Death Eaters publicly?  Were people scared to trust them?  Has J. K. Rowling given any information about what their life was like after the war?


I have problems with trying to get this method to work, I am trying to use mbedtls with psk. Turns out the example they have is very hard to understand for a C novice like myself.  /*  * Parse a string of pairs name1,key1[,name2,key2[,...]]  * into a usable psk_entry list.  *  * Modifies the input string! This is not production quality!  */  psk_entry * psk_parse( char * psk_string ) {   psk_entry *cur = NULL, *new = NULL;   char *p = psk_string;   char *end = p;   char *key_hex;    while( *end != '\n' )   {     end++;   }   *end = ',';    while( p <= end )   {     if( ( new = mbedtls_calloc( 1, sizeof( psk_entry ) ) ) == NULL )       goto error;      memset( new, 0, sizeof( psk_entry ) );      GET_ITEM( new->name );     GET_ITEM( key_hex );      if( unhexify( new->key, key_hex, &new->key_len ) != 0 )     {       goto error;     }      new->next = cur;     cur = new;   }    return( cur );    error:   psk_free( new );   psk_free( cur );   return( 0 ); }   What is the expecting string formatting to get this method to work? currently, I have  char * list = "JD,4f07d80fde6469fbdbf1f154a47f27c916dba68b644ff1ffa26295e598855810";  which gets passed to the method but I keep getting a segfault when *end = ',' is trying to get added.

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


How can I compute this conditional expectation given I only have access to $P(X>t)$?  I have been looking into the literature for quite sometime and have not seen something similar.  Please help!! Thank you

I am wondering if the following expectation can be computed in the shown manner  $$\begin{aligned} E[\log_2(1+X) \mid X>a] &= \int_{0}^{\infty} P( \log_2(1+X)>t \mid X>a) dt \\ &= \int_{0}^{\infty} P(X>2^t-1 \mid X>a) dt \\  &= \int_{0}^{\infty} \frac{P(X>2^t-1 \cap X>a)}{P(X>a)} dt \\ &= \frac{1}{P(X>a)} \left(\int_{0}^{a} P(X>a) dt + \int_a^{\infty} P(X>2^{t}-1) dt \right)  \end{aligned}$$  Note that there is no closed form expression for the PDF of X hence I am trying to find alternative ways to compute the expectation.  Thank you


How can you get the length of this kind of array using javascript or jquery?  var Accounts = { 'Account001' : { 'data1' : 'foo1', 'data2' : 'bar1' }, 'Account002' : { 'data1' : 'foo2', 'data2' : 'bar2' }, 'Account003' : { 'data1' : 'foo3', 'data2' : 'bar3' }, 'Account004' : { 'data1' : 'foo4', 'data2' : 'bar4' } };   I tried Accounts.length but it seems to return NAN.

I have a JavaScript object. Is there a built-in or accepted best practice way to get the length of this object? const myObject = new Object(); myObject["firstname"] = "Gareth"; myObject["lastname"] = "Simpson"; myObject["age"] = 21;


I'm an international student in US on F1 Visa. I just want to know if how legal is trading stocks on my visa status. I've found some posts on quora that say Trading is completely legal, but should not be on a daily basis. It's mentioned that trading should be only a passive source of income. Can someone clarify further ?  Thank you.

I am foreign graduate student in USA. I recently completed my undergrad (from USA) and have a bit of money saved up. I know that F1 students cannot work off campus and other business activities such stock trading etc are prohibited as well. I wanted to know if opening an account in an investment management firm like Charles Schwabb or Betterment is allowed. I would not be working but I will still be earning a small interest on my deposits. If that is not allowed, are there any good and legal ways for foreign students to earn a little interest on savings?


Should I use "these" or "those" to refer to previously mentioned arguments? I can give some context:  Paragraph 2: Argument A  Paragraph 3: Argument B  Paragraph 4: Argument C  Paragraph 5: For th_se reasons I would like to apply to this scholarship, since.......

I would like to know what is the exact difference between These & Those.


Can I get "fail to reject the null" when testing with test statistic, and "reject the null" when testing with P-value at the same time in a same nonlinear regression model?

Let's say you let the Null Hypothesis $H_0$ be that the mean volume of water in a bottle is some $\mu$, and the alternate hypothesis $H_1$ be that the mean volume is not $\mu$. Let's assume you pick a 95% confidence interval, so $\alpha = 0.05$. That would give you a critical value (assuming a normal distribution) of 1.96. Let's say the P-Value is less than 0.05, which would mean you reject $H_0$. But what if the test statistic is less than 1.96? In that case you would reject $H_1$, but you already rejected $H_0$ from the P-value. Does one take precedence over the other, or would this never happen?


I came across a question in another language that I happen to speak. Should I edit it and add a translation?

I remarked this problem from this post:    Lets say I see a really good question in a foreign language and I am fluent in this language.  I want to translate it in English so all users can understand it.  If I do that, we have following occuring problems:   Source: To guarantee that the translation is correct, the original text should be preserved and visible (at first ?) so that other people can verify that this is a correct translation. Grace period: If we would allow someone to translate questions, we need a grace period. If these questions are open, there is a very high probability that the question will be closed and removed -> useless work done. We would only need a few hours. Mark as translation in progress: To prevent flagging and complaints it should be possible to mark this question so that people see that a translation is in work.   If you support the idea that people may translate questions, is it possible to introduce documentation rules, grace period and translation mark into Stackoverflow ?


For example, you have:     name  1   2   3   4   5   6   7 8   With tab delimiter ^  And I want to switch between 2 columns (for example 7th and 8th if you start with 0) so it would look like:     name  1   2   3   4   5   6   8 7   Eventually, it should be probably other column indexes..  I tried using awk but got a lot of errors. Could you explain?  The command I tried was:  awk ' { t = $10; $10 = $9; $9 = t; print > "test2.txt"; } ' test.txt    It created a new file, but without the tab delimiter. (With space delimiter)

Here's a similar question but I ran into a problem that was not addressed in the question.   I want to do something similar, however my file is tab delimited instead of space delimited.  I want to change field 3. Lets say my file looks like this:  NAME\tNUMBER\tID\tSEQ\t...\t...\t...    Lets say I want to change field 3 to AD  awk '{$3 = "AD"; print}' infile > outfile   my output is  NAME\tNUMBER\tAD SEQ ... ... ... ... ... ...   my tabs turn into spaces after the replaced  I'm sure I can just tr the output file but I want to know what causes awk to change the field delimiter.  expected output:  NAME\tNUMBER\tAD\tSEQ\t...\t...\t...\t


As illustrated in the picture, the thickness $d$ is known and the parabolic formula of the inner (red) curve is given, say $y = 0.1x^2$. Then, how to obtain the formula for the outer (green) curve? I think the formula should be in this form: $y_2 = kx^2 - d$ but I have no idea how to derive the value of $k$. Can anyone give me some hint? Thank you!

I have a simple parabola in the form $y = a + bx^2$. I would like to find the formula for a curve which is parallel to this curve by distance $c$. By parallel I mean that there is an equal distance along a line perpendicular to the tangent to my curve at all points.  I've established that the curve isn't in the form $y = a + c + dx^2$, whilst I can make this satisfy for $x=0$ and $x$ equal to one other number is isn't valid across the range.  Any help much appreciated.  Rob


The experiment says that if I split a photon into two coherent entangled photons, one towards a double-slit, one towards a which-way detector, I can control whether  the interference pattern appears by choosing either detecting which way the photon came through or destroying the information about the photon, even if the detector/destroyer is further away than the double slit screen.  Does it imply that I can know about whether the which-way information will be detected or not even before it is detected? Suppose I have a person controlling the detector 10 ly away from the slits, and the double-slit setup immediately in front. Then just by looking at the screen, will I be able to know whether the person 10ly away decides to observe or not 10 years before he even decides it? I am quite uncomfortable with this thought.

WRT:   Now I found a paper "Why Delayed Choice Experiments do NOT imply Retrocausality by David Ellerman" on the internet but as a layman, I couldn't understand the paper but everyone on youtube is saying that this experiment shows retrocausality, can someone explain in simple terms why this experiment does not imply retrocausality?


I am making a social application that its base work is like twitter.  When user opens app,it fetches data(texts and images) from server and listitems will be filled and users can be followed and etc.  I think number of users for it is up to 500,000 and i want to use node.js for server side because it's faster that php.  How should i find best webserver(VPS,dedicated,...) for this application?

This is a "catch-all" question designed to serve as an answer for all questions about choosing web hosting.  Pro Webmasters no longer accepts new questions about how to choose hosting.  All future questions pertaining to finding web hosting should be closed as a duplicate of this question. For more information about this policy please see .    How to find web hosting that meets my requirements?  What we're looking for in answers to this question are the basics about web hosting:   What is web hosting? What is the difference between shared, VPS, and dedicated hosting? How does a content delivery network relate to web hosting? Anything else you feel is helpful in finding a web host.   What we do not want is:   Endorsements or recommendations for specific web hosts We do not want your experience or other subjective information (just the facts please)


I want to be able to write text as 'raised to power' without mathmode. E.g. how can I write this without textmode?  $\text{Some text}^{change}$

What is the easiest way to superscript text outside of math mode?  For example, let's say I want to write the $n^{th}$ element, but without the math mode's automatic italicization of the th.  And what if I still want the n to be in math mode, but the th outside?


I understand the statement of the Seifert-Van Kampen theorem - given an open cover ${A,B}$ of a space ${X}$ such that ${A\cap B}$ is non-empty and path-connected, then $$ \pi_1(A\cup B) = \frac{\pi_1(A)*\pi_1(B)}{N} $$ where ${*}$ is the free product, and $N$ is the normal subgroup of ${\pi_1(A)*\pi_1(B)}$ given by $$ N = \{f_*(c)g_*^{-1}(c)\ |\ c \in \pi_1(A\cap B)\} $$ where ${f_*}$ and ${g_*}$ are induced from the inclusions ${f : A\cap B\to A}$ and ${g : A\cap B\to B}$ respectively. I understand this is essentially to stop us from "overcounting" loops essentially. Applying this to the torus, looking at the fundamental polygon for it, - we can use the open cover ${A=T^2\setminus \{x\}}$ for $x$ in the interior of the square (so the punctured torus) and ${B =}$ interior of the square of the torus. We would then have ${A,B}$ are open, and ${A\cap B}$ is clearly path-connected and ${A\cap B\simeq S^1}$. This gives us that $$ \pi_1(T^2) = \frac{(\mathbb{Z}*\mathbb{Z})*\{0\}}{N} = \frac{\mathbb{Z}*\mathbb{Z}}{N} $$ but then I am confused about how we can find ${N}$. I understand that for every $c$, we have ${g_*(c)=1}$, hence we essentially just have $N$ being generated by ${f_*(c)}$. But how would we find ${f_*(c)}$?

I'm trying to get my head round the following calculation of the fundamental group of the torus, using Seifert Van-Kampen (I know it's easier to do this by considering covering spaces, but I'm trying to learn the Seifert Van-Kampen method).   Consider the torus $T$ as the unit square in $\mathbb R^2$ with opposite edges identified. Let $A$ be an open disc (say of radius $1/4$ about the origin), and $\overline{A}$ be it's closure. Let $B$ be complement of $A$, so that $A \cap B = S^1$. Then we have $T = A \cup B$ where $A$ and $B$ are a neighbourhood deformation retract pair, so we can use Van Kampen. It is clear that $\pi_1(A) = \{e \}$ and $\pi_1(A \cap B) = \mathbb Z$. So we need to find $\pi_1(B)$. Observe that $B$ deformation retracts onto the boundary of the square which, after identification, is homeomorphic to $S^1 \vee S^1$; in this way we see that $B$ and $S^1 \vee S^1$ are homotopy equivalent (inclusion in one direction, the retraction in another), and so $\pi(S^1 \vee S^1) = F_2$ (which can be calculated by Van Kampen, or by using the theory of covering spaces). So, by Van Kampen, $\pi_1(T) \cong F_2 *_{\mathbb Z} \{e\}$. This is the quotient of $F_2$ by the normal closure of the image of $l_* : \pi_1(A \cap B) \to \pi_1(B)$ (where $l_*$ is the homomorphism induced from the inclusion map $l : A \cap B \hookrightarrow B$). The following is causing me confusion: The generator of $\pi_1(A \cap B)$ is homotopic in $B$ to a loop of the form $u.v.\overline{u}.\overline{v}$, where $u$ and $v$ represent the two generators of $F_2$. So $\pi_1(T) \cong \langle a,b ; aba^{-1}b^{-1} \rangle$, the free abelian group on two generators.  Any explanation or geometric intuition would be really appreciated. Thanks


Hold on, I am not asking the difference between when to use "the", "a", or "an".  My question is, when to use the.  For example:     Do not cross in front of bus;   or     Do not cross in front of the bus;   Similarly,     Check if we can reach target from source;   of     Check if we can reach the target from the source;   Are there some definitive rules about when (and when not) to use the articles (especially the the)?  Me?  Well, I have the habit of using (or rather overusing) the article the.  Hence the question.

How do I know whether to use the definite (the) or indefinite (a, an) article, and when to omit it altogether?


While looking at a question, I noticed that the asker's profile photo didn't load. So, I opened the image in a new tab and noticed it was hosted at fbcdn.net.  Turns out my browser had blocked the image from loading on the SE because it was considered a tracker. (it loads fine when opened in its own tab)  I don't meant to single out this user in particular, but it's the only time I've seen something like this on the site.  Here's the  () and the  ().   How did this image get added to this user's profile? (I can't seem to find the add-facebook-image button in my profile) Can I make my profile image one that's hosted on a remote server? Was I warned about SE sending data to third parties and just missed it while signing up?

Users who register for their account via Facebook get  as their default avatar. However, the avatar is not copied to SE servers or Imgur, and thus the original URL is kept. This URL compromises the privacy of the user as it contains their Facebook user ID which everyone can easily extract and then view the profile.  The image is also not visible at all to those who have Facebook blocked for their own privacy (by extensions such as Ghostery or browser features ), or due to network policy (e.g. some work and school networks block Facebook).  With the new avatar system, it would be much better if the Facebook photo was stored like a manually uploaded avatar to avoid this problem.


I am new to Java and I tried a couple of ways to initialize my HashMap through a method, but every time after method executed, my Map is still empty, I can debug and see during my LoadData method execution, my maps are assigned with value from sub-method, however, when jumping out of the LoadData, my outer parameter becomes empty Map again  // file1.java public Map<String, Student> getStudentWithIdMap() { ... } public Map<String, Teacher> getTeacherWithIdMap() { ... }  public static void LoadData(Map<String, Student> studentMap, Map<String, Teacher> teacherMap, ...other Map) {      studentMap = getStudentWithIdMap();      //I tried with studentMap.putAll(getStudentWithIdMap());      // doing this triggers an exception like "UnsupportedOperationException"      // I also tried studentMap = new HashMap<>(getStudentWithIdMap());      teacherMap = getTeacherWithIdMap(); }  // file2.java public void PrepareData() {    Map<String, Student> studentMap = Collections.emptyMap();    Map<String, Teacher> teacherMap = Collections.emptyMap();    file1.LoadData(studentMap, teacherMap, ...); }   What would be the reason and the best way to deal with the above scenario?   I get to know Java treats method as value type always, so if passing a class object and modify its value, it would be modified after method finishes execution, why a Map behaves differently?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Is it possible to find how gravity changes with time? That is, height is not part of the equation.   For example, $g$ can be expressed as a function of height that does not involve time with this relation:  $g_i=g_0 (r /(r+h))^2$  where $g_i$ is $g$ at any height and $g_0$ is on the Earth's surface.   I also found through the above relation that $g_i = g_{i-1} ((r+h_{i-1})/(r+h_i))^2$  By the same token, there should be a relation between $g_0, g_i,   t$ that does not involve distances. An object in free fall will be going through changes in $g$ as time progresses. Is it possible to create such an expression?

Suppose an object of mass $m$ starts at rest at a radial distance $ r_0$ from a perfectly spherical mass $M$ (where $m << M$), $r_0 > R =$ radius of $M$.    Can we analytically determine when $m$ will hit the surface of the $M$?  In other words, can we analytically solve this initial value problem:  $$ \frac{d^2r}{dt^2} ~=~ - \frac{GM}{r^2} ,$$ $$ \dot{r}(0) ~=~ 0 ,$$ $$ r(0) ~=~ r_0? $$


I want to retrieve all site collection from my webpart. i have code to get all site collection which is work in on premise.  SPWebApplication webApplication = SPContext.Current.Site.WebApplication;         SPSiteCollection siteCollections = webApplication.Sites;          foreach (SPSite siteCollection in siteCollections)         {             ddlsubsite0.Items.Add(new ListItem(siteCollection.RootWeb.Title, siteCollection.ServerRelativeUrl));         }   but as we used SPWebApplication, it is not working in Office 365.

I want to retrieve all site collections in an Online tenant through Visual Studio:   I can do it via Powershell: get-sposite on-premise server : Get-SPSite on-premise again: var sites = webapp.Sites.Where(i=>i.url.StartsWith(webapp.url + "/departments/"));  http://sharepoint.stackexchange.com/questions/7137/how-can-i-list-the-site-collections-under-a-given-url-path   I can use the following code to iterate through sites within one site collection, so I thought I could try "" but of course it doesn't work, because such site doesn't exist.     "The remote server returned an error: (401) Unauthorized." at context.ExecuteQuery():   ClientContext context = new ClientContext(https://domain.sharepoint.com/sites/);             context.Credentials = new SharePointOnlineCredentials(userName2, password2);              Web site = context.Web;              context.Load(context.Web.Webs);             context.ExecuteQuery();              string allsitecollections = "";              for (int i = 0; i < context.Web.Webs.Count; i++)             {                  allsitecollections = allsitecollections + context.Web.Webs[i].Url + "\n";              }   Is there a way to retrieve the site collections with C# or should I resort to  ?


To start off, my apologies if this question may come off as illogical.  Let us take a natural number X and integral number Y and compute Y / X. We see that for values of X, such as 11 or 37, no matter what Y is, X will be a repeating number. Yes, I do realize that there are some values of Y that do not agree with this case, such as 3/12 (in which X = 12 and Y = 3). However, for the purpose of this question, we will consider 0.25 (the quotient of 3/12) as a repeating decimal (0.2500...). This is only for the purpose of the question.  Examples for 11 include 5/11 (0.4545...) and 22/11 (2.000...). 37 works as well. Examples include 9/37 (0.243...) and 11/37 (0.297). Now, moving onto the question:  What are the characteristics of numbers like X, beyond primes? Numbers such as 1, 2 (prime), 3 (prime), 5 (prime), 6, 8, 9, 10, 11 (prime), 12... even 37 (where any integral number Y produces a "repeating" decimal) but not 7, 13, 17, 19, 21, 23, 29...   Again, my apologies if this question seems badly worded/illogical. Curiosity formed this inquiry.

Given any fraction where both the numerator (N) and denominator (D) are both positive and are both whole numbers.  Without manually dividing N by D, is it possible to pre-determine if the resulting value represented in decimal would be a repeating value? (e.g. 44÷33 is 1.3333333333....)  I believe the value of N ÷ D will NOT be a repeating decimal if and only if D is any of the following   D is equal to 1 OR D's prime factors only consist of 2's and/or 5's. (includes all multiples of 10)   Otherwise, if none of the two rules above hold true, then the positive whole numbers N and D will divide into repeating decimal.  Correct, or am I missing a case?


Good night. I'm stuck in this prove.  Prove if $\left\{ a_{n}\right\} $ is a sequence and $$\lim_{n\rightarrow\infty}a_{n}=L$$ then $$\lim_{n\rightarrow\infty}\frac{a_{1}+a_{2}+...+a_{n}}{n}=L$$  I make this:  $\mid\frac{a_{1}+...+a_{n}}{n}-L\mid=\mid\frac{a_{1}+...+a_{n}-nL}{n}\mid\leq\frac{\mid a_{1}-L\mid+...+\mid a_{N}-L\mid+\mid a_{N+1}-L\mid+...+\mid a_{n}-L\mid}{n}=\frac{\mid a_{1}-L\mid+...+\mid a_{N-1}-L\mid}{n}+\frac{\mid a_{N}-L\mid+\mid a_{N+1}-L\mid+...+\mid a_{n}-L\mid}{n}$  And I'm stuck, please help!!

Prove that if $\lim_{n \to \infty}z_{n}=A$ then:  $$\lim_{n \to \infty}\frac{z_{1}+z_{2}+\cdots + z_{n}}{n}=A$$ I was thinking spliting it in: $$(z_{1}+z_{2}+\cdots+z_{N-1})+(z_{N}+z_{N+1}+\cdots+z_{n})$$ where $N$ is value of $n$ for which $|A-z_{n}|<\epsilon$ then taking the limit of this sum devided by $n$ , and noting that the second sum is as close as you wish to $nA$ while the first is as close as you wish to $0$. Not sure if this helps....


Anyone else find that trying to use  `something in quotes'   frustrating because  `s   is always mapped to  \sigma   Where is my mistake?  1) Shouldn't I be using (`quote') in the first place?  2) Is there a way of unmapping the back-quote to greek letters?

I like some of the features provided by the Vim-LaTeX suite, but not all of them.  In particular, I dislike all of the mappings like [[ = \left[ \right] and the automatic placeholder stuff with <++>. I am a very fast typist but with that comes more typing mistakes, which I correct almost instantly by pressing backspace. Unfortunately, if something has automatically added a bunch of place-holders or expanded some expression, I then have to move around the document and remove more characters than necessary. For example, if I accidentally press [ twice, instead of only having to delete one character, I have to delete 10.  Having already looked through the documentation, and some of the source, I have managed to disable some of these "features", but not all of them:  In particular:  let g:Tex_SmartKeyBS = 0 let g:Tex_SmartKeyQuote = 0 let g:Tex_SmartKeyDot = 0   (Turn off maps for backspace, double quote and triple dot.)  let g:Imap_UsePlaceHolders = 0   (Turn off <++> placeholder insertion.)  But I can't seem to find a way of turning off the other stuff. Anyone have any suggestions?  Edit: I was able to "disable" some more things by setting:  let g:Tex_Leader = '`tex' let g:Tex_Leader2 = ',tex'   (Which stops some expansions but still not all. It's not really disabling it but just making it less likely that you're going to type in `texa as opposed to the potentially more common `a, for example.)  PS: Personally, I think it is very poor practice to make an optional package that, when installed, greatly changes the default handling of your system. I don't mind some intelligent source highlighting etc, or some new commands (that don't clobber any old ones), but it seems unhelpful to enable this drastic kind of key remapping by default.


I need help with this question: Consider a loaded dice such that the probability to obtain an outcome of 1 is 2p/3, the probability of obtaining 2, 3, 4 or 5 is p each, and the probability of obtaining 6 is 3p/2.  (1) Compute the average outcome of throwing the above loaded dice. (2) Compute the variance in the outcome of throwing the above loaded dice  I have calculated p to be 6/37 and i've tried to do the other 2 questions but i don't know how to them

I have no idea how to do this question. If you have a loaded dice such that the probability to obtain an outcome of 1 is 2p/3, the probability of obtaining 2, 3, 4 or 5 is p each, and the probability of obtaining 6 is 3p/2. Find p.   Any help would be much appreciated!


How can I find the limit of the series $$\sum^{\infty}_{n=0} \frac {(-1)^n 2^{-n} x^{2n+1}} {n!}$$ where $x \in \mathbb R$ ?  I've tried telescoping and looking at $s_k$ (partial sum).

How can I find the radius of convergence $R$ of the power series $\sum^{\infty}_{n=0} \frac {(-1)^n 2^{-n} z^{2n+1}} {n!}$ ? I've tried to get it onto the proper form $\sum^{\infty}_{n=0} a_n(z-a)^n$ without luck. I need this form to use the well-known formula for calculating the limit of the terms $a_n$ (ratio) ?


I want to add more keywords to a listing, however, I only want to match the exact instances of that new keyword, as the keyword sometimes happened to occur as part of normal words and it gets colored wrongly: An example: otherkeywords={in,out,inout}, morekeywords={in,out,inout}  I get something  like this,  Edit (possible answer, not for my case): I am using a separate file for each listing in my tex document, also I have a string line of code, so the suggested method at the commit works only if you write the code directly inside the tex document and you don't use a string in your code. so possible answer for others is

I am trying to paste Isabelle code into a LaTeX document using the listings package.  The nearest language= options seem to be ML and Haskell.  Some of the code contains blocks delineated by quotation marks ("...") within which there are keywords.    Specifying language=ML or language=Haskell does not embolden keywords within the "..." blocks (e.g. " ... if ... ").  On the other hand, setting otherkeywords={if} does embolden keywords within quotation blocks, but also picks up variable names like shift.  \documentclass{article} \usepackage{listings} \lstset{language=ML,         otherkeywords={if,then,else,return,"}         }  \begin{document}   \begin{lstlisting}     "if foo then bar * shift"    \end{lstlisting} \end{document}


I came across the following problem and wrote up the following proof a few years ago - what do you think?    It is required to demonstrate the truth of Statement S1: "If $a^2 + b^2$ is a perfect square, then $a^2 - b^2$ can't be one.  Assume that S1 is false and that $a^2 - b^2$ is a perfect square. Then there exists $m < a$ such that $a^2 - b^2 = m^2$. This implies that $b^2 + m^2$ is a perfect square. Again, with S1 assumed false, the difference between $b^2$ and $m^2$ would be a perfect square $n^2$ smaller than at least one of them. We should be able to continue this process, getting smaller and smaller perfect squares $m^2$, $n^2$...ending at $3^2$, corresponding to $5^2 - 4^2 = 3^2$. However, $5^2 + 4^2 = 41$ is not a perfect square. Hence S1 must be true. QED?  PS: The above argument seems to be Fermat's method of infinite descent. I wonder if Fermat's method of infinite descent can be used to prove his last theorem. Incidentally, I think the following "proof" of Fermat's Last Theorem holds only for Pythagorean triples:

Define an "integer 3-relationship" as a function $f(a,b,c)$ of three integer variables, together with the condition that this function must equal zero.  Two examples would be the "Pythagorean triplet relationship" with $f(a,b,c) \equiv c^2 - (a^2 + b^2) $ and the "near-miss Pythagorean triplet relationship" with $f(a,b,c) \equiv c^2 +1 - (a^2 + b^2) $.  For any given integer 3-relationship based of some $f$, there may be many triplets that satisfy the condition.  For example, any triplet  $$ \{k(m^2 - n^2), \,2k m n, \, k(m^2+n^2)\}\,\, (k,m,n \in \Bbb N) $$ satisfies the Pythagorean triplet relationship.   In some cases, there may be a chain of $n$ triplets  $$ \{a, b, c\},\, \{b, c, d\},\,  \{c, d, e\},\, \cdots $$ such that each of these triplets satisfies the same integer 3-relationship based of some $f$, and the last two entries in each triplet match the first two entries in the next.  For example, with $f(a,b,c) = c^2 +1 - (a^2 + b^2)$, the triplets $\{7,\, 11,\, 13\}, \{11,\, 13,\, 17\}$ form a 2-chain because $$ 7^2 + 11^2 = 13^2+1 \\ 11^2 + 13^2 = 17^2 + 1 $$ I am concerned with looking for chains of Pythagorean triplets.     Prove that (other that trivial chains with $a$ or $b$ zero) there are no 2-chains of Pythagorean triplets (or disprove that conjecture by providing an example Pythagorean 2-chain).     I think I have a proof along the lines of starting with a "primitive" 2-chain (with no common factor in $a$ and $b$), applying the general form of Pythagorean triplets given above, and re-distributing the factors in $2 m n$ to form the $2 r s$ of the next triplet, so that $ 2mn = 2rs$ and $m^2 + n^2 = r^2 - s^2$. At that point I can solve a quadratic equation for one of the factors and the condition that the discriminant be a perfect square leads to the construction of a different 2-chain with smaller numbers -- and reduction ad absurdium applies.  But my proof is not what I consider solid...


Im trying to split the stings into even parts. For example if I have ['abcdef'], expected output should be ['ab','cd','ef']. I keep getting the same input for the first test 'asdfadsf'/   def solution(s):      lists = []      for i in s:         if len(s) % 2 == 0:             lists.append(s)             zip(*[iter(lists)]*2)         return lists  test.describe("Example Tests")  tests = (     ("asdfadsf", ['as', 'df', 'ad', 'sf']),     ("asdfads", ['as', 'df', 'ad', 's_']),     ("", []),     ("x", ["x_"]), )   for inp, exp in tests:  test.assert_equals(solution(inp), exp)

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


When I hold the left shift key on grub menu, nothing appears and it still boots to Ubuntu like it normally does (Ubuntu is the only machine installed). How can I change the password for root elseway? I have access to the terminal but when I write sudo, it says that I am not a sudoer and incident will be reported. I was a suoder and used to be able sudo until today which I messed up with system. Apparently the solution is changing the root password.  When I am trying to start the GUI it tells "Failed to start the session" however I used CTL+ALT+F1 and have access to terminal.  Note that I am not a sudoer and cannot change grub settings.

I need to reset my password. I have followed these steps:    However, then I go to "root" or "netroot" recovery options, it tells me:  Give root password for maintenance (or type Control-D to continue)   Clearly, I do not know the root password. If I type CTRL+D, I return to the list of options. From  I read:  Under chapter 'The Other Way':  4. Highlight the line that begins kernel and press 'e' to edit`   But in the grub configuration file I have no line that starts with kernel. Only:  setparams 'Ubuntu...' recordfail set gxfpayload... insmod part_msdos insmod ext2 set root=... search --no-floppy... linux /boot/vmlinuz-2.6.38... initrd /boot/initrd.img-2.6....   Those are all lines in my GRUB. Which line should I edit? Or is there another way to reset my password?


Hello I am new in blender and I clicked Ctrl +  B+  Left Click. I had there whole peace for my job. But I do not know what happened. I tried step back, but it does not work. How can I take my step back?

When looking at my objects in 3d view I'm seeing a gray cone that seems to be hiding other objects.   Can anyone help me turn this off and explain what it is please.  Screenshots attached.


prove if $a, b ,c$ are positive integers, then $lcm(a,lcm(b,c))=lcm(a,b,c)=lcm(lcm(a,b),c)$ $lcm$ is least common multiple My thought is to show that they have common divisors but not sure how to go about it.

Definition: The least common multiple of $a.b\in\Bbb{Z}$ is the smallest  $k\in\Bbb{N}$ that is divisible by both a and b.         Proposition: $\text{lcm}(\text{lcm}(a,b),c)=\text{lcm}(a,\text{lcm}(b,c))\tag{2}$    Proof: We want to show $\text{lcm}(\text{lcm}(a,b),c)\mid\text{lcm}(a,\text{lcm}(b,c))$ and $\text{lcm}(a,\text{lcm}(b,c))\mid \text{lcm}(\text{lcm}(a,b),c)$ such that $\text{lcm}(\text{lcm}(a,b),c)=\text{lcm}(a,\text{lcm}(b,c))$.  Let $k=\text{lcm}(\text{lcm}(a,b),c)$, then $c\mid k$ and $\text{lcm}(a,b)\mid k$, but if we let $l=\text{lcm}(a,b)$, then $a\mid l\,\,\text{and}\,\, b\mid l$. Therefore $c\mid k\,\,,a\mid k\,\,\text{and}\,\, b\mid k$, but then $\text{lcm}(b,c)\mid k$. Thus $\text{lcm}(a,\text{lcm}(b,c))\mid k$      Question: Does this makes sense, ifso can I do the same for $\text{lcm}(\text{lcm}(a,b),c)\mid \text{lcm}(a,\text{lcm}(b,c))$?


What do we have to do when our question is resolved in the comments? Should we delete the question, or just let it appear as unanswered eternally, or there is another solution?  Edit:  I have read the question  but i think that the answer given by Kate Gregory would be also useful to the community as it suggests another solution which is not suggested in the first question.

I'm trying to go through and provide answers to every unanswered question (search "closed:0 answers:0"), somewhat following the spirit that was blogged about at  .  However, I'm finding this much more difficult than it needs to be, as many of the questions have already been answered without the use of an "answer" - but instead, in the form of a comment by either the OP or another poster. I wouldn't mind reading through and skipping these, as long as there was some appropriate action I could take to at least assist with preventing these questions from being seen again from the same query - either by myself or another SO member.  Is there such an appropriate action?  Should we vote to close?  If so, using what reason? Even if I vote to close, what are the chances that 4 other users will also view the question and also vote to close?  (i.e., will my individual vote even do any good?  Is there any report to show recent close votes, so that others may also review and contribute supporting close votes?) Should we post some sort of an answer - even just something to the effect of "this was already answered by the OP's own comment to his answer (above)"? Would something like this be appropriate to flag for moderator attention, and let the moderators deal with it?  (Or would this be considered too trivial?) Should we rename the question title to something standard that can be used in a search exclusion?  (Maybe "SOLVED:"?)  Basically, how can I help to denote questions as "This question is no longer in active search of an answer - though better answers may still be appreciated."? I've already reviewed , which was closed as a duplicate of  - but this requires effort on part of a user who may very likely no longer be active. Otherwise, is there something I should be doing to improve my search to filter out these types of questions? I've run across this many times, so I don't consider it to be a rare issue.  However, the last question like this I just ran across, prompting this question, was .  In this case, the question was self-answered by the OP in the form of a comment, this question is the OP's only question, the OP has no other visible activity on SO, and the OP hasn't been seen on SO since he registered and posted the question 5 months ago. Another one I just ran across is .  However, here the "answer" comment was posted by a reputable and recently active SO member.  Should I leave a comment directed at him, asking him to re-post his comment as an answer, or should I post my own answer echoing his comment?  (Or something else?) Yet another is .  Interestingly, the OP actually self-edited the question to include the "SOLVED:" prefix on to the question, instead of posting his resolving comment as an answer (and ideally accepting it) as he was asked to do by another comment.  This brings up another good idea - is there a "standard" we should use to rename the titles on these "resolved but unanswered" posts that could be used as a search exclusion?  (Also added to the above list.)


What is the meaning of UNIT ROOT in time series modelling? I understand that, for a time series data to be stationary, the mean and standard deviation must be constant throughout the period considered.  Also, Augmented Dickey Fuller test checks for the presence of unit root in the time series, which if it does, the series is non stationary. I do not understand the intuition behind the presence of unit root and how it relates to a time series' property of being stationary.

How would you explain intuitively what is a unit root, in the context of the unit root test?   I'm thinking in ways of explaining much like I've founded in .  The case with unit root is that I know (little, by the way) that the unit root test is used to test for stationarity in a time series, but it's just it.   How would you go to explain it to the layperson, or to a person who has studied a very basic probability and statistics course?  UPDATE  I accepted whuber's answer as it is what most reflect what I asked here. But I urge everybody that came here to read Patrick's and Michael's answers also, as they are the natural "next step" in understanding the Unit Root. They use mathematics, but in a very intuitive way.


This else if statement works as intended, except after it is finished running it comes to this ConcurrentModificationException error. Im thinking it might be from the for each loop but I am not too sure.   else if(input == 2){             System.out.println("Enter a period");             int periodInput = sc.nextInt();             System.out.println("Enter the students name (Dont include a space between the first and last name)" );             String nameInput = sc.next();             if(periodInput == 3){                 for(Student a: period3){                     if(a.getName().equals(nameInput)){                         period3.remove(a);                         System.out.println(period3);                     }else{                         System.out.println("No student was found with this name");                     }                 }             }

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


I read a lot about Hyper threading and how it works. One thing I still can't 'digest' is how is it more efficient than not using hyper threading at all? Hyper-Threading is where two threads are able to run on one single-threaded core. That also means that in that single core, there could be exactly 1 thread running. No matter if hyper threading allows 200 or 2 threads on single core, there would still be 1 thread running at a given time..and then slicing (but that is not my question). So, can someone make a point in how it improves our performance?

I'm wondering what the theoretical speedup is from hyper threaded CPUs. Assuming 100% parallelization, and 0 communication - two CPUs would give a speedup of 2. What about hyper threaded CPU?


I am using MVC3 ASP, and have configured my web.config file to login into the MYSQL DB as root. I have created many stored procedures which i can connect fine with. i now want to change this login user to a public user, called tempuser and NOT root anymore.   However, when i change the login user from "root" to "tempuser", i get the error:  Unable to cast object of type 'System.DBNull' to type 'System.String'   i get the above error at the execution of ExecuteNonQuery().   I have granted access to the functions by:  GRANT EXECUTE ON FUNCTION check_user_exists to tempuser@'%';   I have also granted 'select' and 'update' on this table that im accessing which the function uses. I can login to mysql command line as tempuser and call the function manually with no problems. But when i run ExecuteNonQuery() i get the above error. I am currently using Visual Web Developer 2010, Razor Engine, MVC3.   ANy help, please.   I have been trying for weeks now with no luck.   Here is the code that is being executed. The ExecuteScalar() function is where the error is. The error is the subject of this question: However, if i login as "root" user, i dont get the error.    [HttpPost]     public ActionResult Register(RegisterModel model)     {         if (ModelState.IsValid)         {             // Attempt to register the user              DBController dbcontroller = new DBController();              if (dbcontroller.DBConnection())             {                 MySqlCommand command = new MySqlCommand("check_user_exists_signup", dbcontroller.conn);                 command.CommandType = System.Data.CommandType.StoredProcedure;                  // Add parameters for the check_user_exists_signup STORED FUNCTION                 command.Parameters.Add(new MySqlParameter("@userName", model.UserName));                 command.Parameters["@userName"].Direction = System.Data.ParameterDirection.Input;                  // RETURN parameter for the insert_users STORED FUNCTION                 MySqlParameter cnt_user = command.Parameters.Add("@cnt_user", MySqlDbType.Int32);                 command.Parameters["@cnt_user"].Direction = System.Data.ParameterDirection.ReturnValue;                  try                 {                     command.ExecuteScalar();                     object ret = command.Parameters["@cnt_user"].Value;                                  dbcontroller.conn.Close();   The stored proc is :  CREATE DEFINER=`root`@`localhost` FUNCTION `check_user_exists_signup`(        userName varchar(20)) RETURNS int(11)     DETERMINISTIC BEGIN DECLARE cnt_user int;    select count(*) into cnt_user     from users     where user_name = userName;  RETURN cnt_user;  END

This question comes up occasionally, but I haven't seen a satisfactory answer.  A typical pattern is (row is a DataRow):   if (row["value"] != DBNull.Value)  {       someObject.Member = row["value"];  }   My first question is which is more efficient (I've flipped the condition):    row["value"] == DBNull.Value; // Or   row["value"] is DBNull; // Or   row["value"].GetType() == typeof(DBNull) // Or... any suggestions?    indicates that .GetType() should be faster, but maybe the compiler knows a few tricks I don't?  Second question, is it worth caching the value of row["value"] or does the compiler optimize the indexer away anyway?  For example:    object valueHolder;   if (DBNull.Value == (valueHolder = row["value"])) {}   Notes:   row["value"] exists. I don't know the column index of the column (hence the column name lookup). I'm asking specifically about checking for DBNull and then assignment (not about premature optimization, etc.).   I benchmarked a few scenarios (time in seconds, 10,000,000 trials):  row["value"] == DBNull.Value: 00:00:01.5478995 row["value"] is DBNull: 00:00:01.6306578 row["value"].GetType() == typeof(DBNull): 00:00:02.0138757   Object.ReferenceEquals has the same performance as "=="  The most interesting result? If you mismatch the name of the column by case (for example, "Value" instead of "value", it takes roughly ten times longer (for a string):  row["Value"] == DBNull.Value: 00:00:12.2792374   The moral of the story seems to be that if you can't look up a column by its index, then ensure that the column name you feed to the indexer matches the DataColumn's name exactly.  Caching the value also appears to be nearly twice as fast:  No Caching: 00:00:03.0996622 With Caching: 00:00:01.5659920   So the most efficient method seems to be:   object temp;  string variable;  if (DBNull.Value != (temp = row["value"]))  {       variable = temp.ToString();  }


Here is the question I want to answer: Let $R = \mathbb Z[\sqrt{-5}]$ and $ I = (2, 1 + \sqrt{-5})$ be an ideal of $R$. Show that $I$ is not a free $R-$module. But here in this question  in its answer the author said that: to prove that it is free of rank 1, we should try to prove that no element of $R$ divides both $2$ and $1 + \sqrt{-5}.$ could anyone explain to me why this will prove that it is not free of rank $1$? Here is the answer I am speaking about: It is generated by two elements so if it were free, it would be free of rank $1$ or $2$. If it were free of rank $1$, it would be generated by a single element: you can then try to prove that no element of $R$ divides both $2$ and $1+\sqrt{-5}$. If it were free of rank $2$, then $2$ and $1+\sqrt{-5}$ would have to be free generators (can you see why ?). You can then try to prove that this is not the case, that is, that $2$ and $1+\sqrt{-5}$ are not linearly independent. EDIT: I know that we are using the contrapositive of this statement for the proof: $I$ is free $R$ module $\implies$ I is a principal ideal. And I know that we are trying to show that $I$ is not principal.

Here is the question I want to answer: Let $R = \mathbb Z[\sqrt{-5}]$ Show that $I = (2, 1 + \sqrt{-5})$ is not a free $R-$module. Hint: It helps to view $R$ as $\mathbb Z[x]/(x^2 + 5).$ My questions are:: 1- How can I use the hint? I have found here  how to show that it is not free as it says in the answer in that link the following: It is generated by two elements so if it were free, it would be free of rank $1$ or $2$. If it were free of rank $1$, it would be generated by a single element: you can then try to prove that no element of $R$ divides both $2$ and $1+\sqrt{-5}$. If it were free of rank $2$, then $2$ and $1+\sqrt{-5}$ would have to be free generators (can you see why ?). You can then try to prove that this is not the case, that is, that $2$ and $1+\sqrt{-5}$ are not linearly independent. 2- for showing this "If it were free of rank $1$, it would be generated by a single element: you can then try to prove that no element of $R$ divides both $2$ and $1+\sqrt{-5}$.", should I use the norm function? Could someone push me in the right direction to answer those questions please?


Which of these sentences is correct?     The accent with which I speak   The accent which I speak with   Are they not the same?  While we are on the topic, I would greatly appreciate if you would tell me which one of the following sentences is correct and if the wrong one is not said at all.        They are a very proud people   They are very proud people    Cancer cells help invade   Cancer cells help to invade   Oxygen has a higher electronegativity   Oxygen has higher electronegativity

Like many others, I commonly find myself ending a sentence with a preposition.  Yes, it makes me cringe.  I usually rewrite the sentence, but sometimes (in emails) I just live with it.  To, with... you know who you are.  Should I keep fighting myself on this one, or is it okay in some circumstances?


Let $x \in \mathbb{N}$ be a natural number. If there exists a $n \in \mathbb{N}$ such that $$ n^2 \lt x \lt  (n+1)^2$$ then prove that $\sqrt{x}$ is irrational. I want to prove it rigorously. I tried proof by contradiction but I have no idea how to proceed. Can anybody give me an idea of how to proceed with this?

It is well known that $\sqrt{2}$ is irrational, and by modifying the proof (replacing 'even' with 'divisible by $3$'), one can prove that $\sqrt{3}$ is irrational, as well.  On the other hand, clearly $\sqrt{n^2} = n$ for any positive integer $n$.  It seems that any positive integer has a square root that is either an integer or irrational number.        How do we prove that if $a \in  \mathbb N$, then $\sqrt a$ is an integer or an irrational number?      I also notice that I can modify the proof that $\sqrt{2}$ is irrational to prove that $\sqrt[3]{2}, \sqrt[4]{2}, \cdots$ are all irrational.  This suggests we can extend the previous result to other radicals.        Can we extend 1? That is, can we show that for any $a, b \in \mathbb{N}$, $a^{1/b}$ is either an integer or irrational?


UPDATE: I tested by concatenating with the + operator and the performance was almost the same as by doing it with a StringBuilder (results in the end). This suggests, as some of you have mentioned in the answers, that the slower performance is due to the format analysis.  Conclusion: Java's printf() is not a efficient method for concatenating and printing strings. Either the + operator or preferably a StringBuilder should be used for better performance.  Does Java's printf() use slow concatenation when creating Strings? i.e. does it create a new String after appending each element to the final String?  I tested using a StringBuilder to create the string I obtained a performance improvement of about 4 times faster run time. This part of the program was called thousands of times in my program.  The only differences between the two tests were the following blocks of code:  1) printf() (0.8 seconds):  System.out.printf("%d %d %d %d %d %d\n", nums[a], nums[b],     nums[c], nums[d], nums[e], nums[f]);   2) StringBuilder + println() (0.2 seconds):  StringBuilder sb = new StringBuilder(); sb.append(nums[a]); sb.append(' '); sb.append(nums[b]); sb.append(' '); sb.append(nums[c]); sb.append(' '); sb.append(nums[d]); sb.append(' '); sb.append(nums[e]); sb.append(' '); sb.append(nums[f]);                   System.out.println(sb.toString());   3) + operaror + println() (0.22 seconds):  System.out.println(nums[a] + " " + nums[b] + " " + nums[c] + " " + nums[d] + " "                           + nums[e] + " " + nums[f]);

We have to build Strings all the time for log output and so on. Over the JDK versions we have learned when to use StringBuffer (many appends, thread safe) and StringBuilder (many appends, non-thread-safe).  What's the advice on using String.format()? Is it efficient, or are we forced to stick with concatenation for one-liners where performance is important?  e.g. ugly old style,  String s = "What do you get if you multiply " + varSix + " by " + varNine + "?";   vs. tidy new style (String.format, which is possibly slower),  String s = String.format("What do you get if you multiply %d by %d?", varSix, varNine);   Note: my specific use case is the hundreds of 'one-liner' log strings throughout my code. They don't involve a loop, so StringBuilder is too heavyweight. I'm interested in String.format() specifically.


I'm new to Blender and I have another problem:  I've got myself nice, shiny material on my space ship, however it's really clean and now I want to add some details to it - stripes, logos, text etc.   Basically, I want to make it like it's another layer in Photoshop with different images.   How do I connect these logos textures to my existing nodes?    Node setup:   What I want to achieve:

I am trying to put a label over the transparent plastic bottle, but i was unable to do so, because when i build the bottle material(plastic) and mix it with the diffuse shader(using the label texture), the label gets faded. So the solution i found was to duplicate the bottle and scale a little bit and apply the label material on it. So it looks its the same material, but in reality its one material over the other. How can I make my plastic material be under my label material(image)? Here's how it looks:   Here's my material setting for the plastic bottle:   Thanks in advance.


I'm trying to set global environment variables in my mac so that they can be seen from anywhere. I've tried setting them in both /profile and /.bash_profile but still when I run my script from blender then call echo $MY_LIB_PATH and echo $MY_PRO_PATH only one of them $My_PRO_PATH exists, I'm not sure why, looks like there is another location where $My_PRO_PATH is set where I need to set $My_LIB_PATH as well. Any advice please?  this is my /etc/profile:  # System-wide .profile for sh(1)  if [ -x /usr/libexec/path_helper ]; then     eval `/usr/libexec/path_helper -s` fi  if [ "${BASH-no}" != "no" ]; then     [ -r /etc/bashrc ] && . /etc/bashrc fi  export MY_LIB_PATH=/usr/local/mypro/mylib/ export MY_PRO_PATH=/usr/local/mypro/   this is my bash_profile:  export MY_LIB_PATH=/usr/local/mypro/mylib/ export MY_PRO_PATH=/usr/local/mypro/

What is the proper way to modify environment variables like PATH in OS X?  I've looked on Google a little bit and found three different files to edit:   /etc/paths ~/.profile ~/.tcshrc   I don't even have some of these files, and I'm pretty sure that .tcshrc is wrong, since OS X uses bash now. Where are these variables, especially PATH, defined?  I'm running  (Leopard).


I ran a robust regression using the rlm package but I see that p-value of the coefficients are not returned. What is the best way to test the coefficients returned from rlm for significance?  I was looking at the rlm function here:   pvalue are not returned:  summary(rr.huber <- rlm(crime ~ poverty + single, data = cdata)) ##  ## Call: rlm(formula = crime ~ poverty + single, data = cdata) ## Residuals: ##    Min     1Q Median     3Q    Max  ## -846.1 -125.8  -16.5  119.2  679.9  ##  ## Coefficients: ##             Value     Std. Error t value   ## (Intercept) -1423.037   167.590     -8.491 ## poverty         8.868     8.047      1.102 ## single        168.986    17.388      9.719 ##  ## Residual standard error: 182 on 48 degrees of freedom   Thank you.

I'm running some regression analyses and got pretty confused about R's output when it comes to robust regression models. When I run a OLS -- using the command lm() -- I get this as output:  Coefficients:                 Estimate Std. Error t value Pr(>|t|)   But when I run a robust linear model using the rlm() command, the output looks like so:  Coefficients:                 Value   Std. Error t value   How do I get  the p-values and the significance-levels in an rlm then? Without that, the whole analysis is somewhat pointless. Unfortunately, I couldn't find an answer to that anywhere, so I hope someone around here can help me out. Thanks a lot!!


I saw this symbol recently used in the TeXworks user manual, I'd like to know how to insert it. I found it in the manual on GitHub (), it was on page 7 at the bottom. I have never seen it before and was wondering if there is a command for it.

I'm looking after a macro to write the (La)TeX logo (with parentheses), i.e. something similar to \TeX, \LaTeX, but where the output includes ()'s.


I know there are some truncating issues or kind of rounding issues in float. but truncation for any value should be same. but here Can anyone explain. why outputs for 4.2 5.2 etc are extracting 19 as decimal part while 1.2, 2.2 etc as 20.  By the way the program is trying to represent pattern as follows  1.23 => 100 and 23  4.2 => 400 and 20 etc..  I guess in my machine 4.2 is stored as 4.1999998092651367187500000000000000000000000000000000000 while 1.2 as 1.2000000476837158203125000000000000000000000000000000000 But why ? whats differs from 1.2 and 4.2.  #include <stdio.h>  int main(void) {     for ( float value = 1.2 ; value < 100; value++){     printf("Obtained value : %f real part : %d decimal part : %f \n", value, (int)value * 100, (value - (int) value) * 100);     }     return 0; }

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


Just wanted to see how this effect can be achieve in the images in .  If you notice closely there is a 'bluish' theme in the pics yet colours are standing out and there is more drama in the pics.  I understand this is definitely something to do with post processing and perhaps something to do with curve.  I have client who has requested similar colour tone in pics and I have no idea how to do these properly. No matter what I try, I am not getting similar results.

I have been wondering how to achieve a great portrait effect I have been seeing a little bit more lately.  The portraits are usually washed out, but blacks are still deep (not dull), and there seems to be some kind of a blue tint.  Here are examples:      How would I achieve something like this from a well lit, standard portrait shot?


Show by induction that if $f:\mathbb{R}\to\mathbb{R}$ is convex, then for any $x_1,\dots ,x_n$ and $\lambda_1,\dots ,\lambda_n$ with $\sum_{i=1}^n\lambda_i = 1$,   $$ f\left(\sum_{i=1}^n\lambda_i x_i\right) \leq \sum_{i=1}^n\lambda_i f (x_i) . $$   I think this is similar to the Jensen's inequality, but am not sure how to formally proof this.  Thank you so much!

I'm learning for an exam in calculus and have come across this question which I can't seem to prove:  Let $C \subseteq V$ be a convex set. Let there be a function >$f:C\rightarrow \mathbb{R}$ a convex function. Now let there be scalars $\alpha_1,\alpha_2 \dots \alpha_k >0$ such that >$\sum^k_{i=1} \alpha_i = 1$, and also let there be a group of points >$x_1,x_2\dots x_k \in C$. Show that the following inequality exists: $f(\sum^k_{i=1} \alpha_i x_i) \leq \sum^k_{i=1} \alpha_i f(x_i) $  I thought about using induction to show the inequality, whereby the basis k=2 is the actual definition of a convex function i.e: $f(\lambda x + (1-\lambda)y) \leq \lambda f(x) + (1-\lambda)f(y)$ I've ran into a problem using induction, since the scalars won't sum up to 1 in the induction hypothesis. I also don't really use the fact that C is convex, which I'm probably supposed to... Either there is some algebraic trick that can be done so I can use induction, or I'm doing something wrong (and induction is not the way to go with this inequality) Any help will be appreciated, thank you!


I am trying to get this wall to look like this material (screenshot taken from the preview window in the material editor):    But, it just shows up like this (the gray area is the part that has the material applied to it):    This what the nodes look like:   Why does the correct material show up in the preview window, but not in the rendered version?

I am creating a model of a glass and I would like to put a drawing on it (a png picture).  I know how to do it using Blender Render, but not with Cycles Render. Help :)


I found a flight from a smaller airport (A) to an intercontinental place (C) for a price of EUR 440. This flight has 1 stop at a city also not far from my home (B). The stop however is 26 hours.  So I searched for the flight going from point B to point C directly without the stop of 26 hours and the price is EUR 750. The price difference for adding 1 stop for the same flight is EUR 310 more.  I asked the airliner how this is possible but didn't get a clear answer. Thanks in advance.  Scenario:  A->B (26h)->C = EUR 440  B->C          = EUR 750

Usually I find a flight I like that uses one or more connections with the same or different companies. In these cases, if the distance between the first and the second connection is not too large, I prefer to go by bus or train and then take the flight. The problem is that sometimes it is more expensive to take the flight in the second airport than to take the flight from the first one. I mean, I'm wondering why sometimes it is more expensive to take only a flight than to take the same flight and another one.  A practical example (and real, you can check with SkyScanner). Imagine I am in Madrid (Spain) and would like to go to Rio de Janeiro (Brazil) on April 1st. The cheapest flight I have found is this:     TAM airlines: MAD -> GRU -> GIG : 507 €   Fantastic! GRU is one of São Paulo's airports. That's perfect for me! I'll go on to Rio traveling overland. But then, I look for this flight (MAD -> GRU, non-stop):     TAM airlines: MAD -> GRU : 597 €   It's the same flight, 90 € more expensive! I've found this kind of behavior a lot of times and I'm intrigued to know why it happens.


is it possible to reverse after make mkfs.ext4 ?  mkfs.ext4  -j -m 0 /dev/sdb -F   for example we create file system on new device - sdb ( no any data on sdb )  mkfs.ext4  -j -m 0 /dev/sdb -F   now we want to reverse back as was before the "mkfs"

we created the ext file system on new sdd disk as the follwing   mkfs.ext4  -j -m 0 /dev/sdd -F   in order to get the disk as was before mkfs   I guess we need to delete the partition that created by mkfs ,   how to perform that ?


I have this command /summon villager -179 64 95 {VillagerData:{profession:farmer,level:2,type:plains},Invulnerable:1,NoAI:1,CustomName:"\"Gardener\"",Offers:{Recipes:[{buy:{id:gold_nugget,Count:3},sell:{id:wheat_seeds,Count:3,CanPlaceOn:["farmland"]},rewardExp:0b,maxUses:9999999},{buy:{id:wheat,Count:1},sell:{id:gold_nugget,Count:3},rewardExp:0b,maxUses:9999999}]}} it works well, but in line 3-4 those wheat seeds are not place able on farmland. I checked around this website for an answer but no real answers. anybody know what I did?

I am making a Minecraft Mini Game adventure map, and one of the levels has a /setblock command, I am using the command in a way to spawn an item in a chest (Wooden Button) I need the wooden button to have CanPlaceOn tag so it can be placed on a log. I have tried this command: setblock 294 5 -1251 minecraft:chest 0 replace {Items:[{Count:1,Slot:0,id:minecraft:wooden_button,CanPlaceOn:[log]}]}`


and  seem to lean towards the idea that if an ability check can be repeated indefinitely given enough time, a drawback should occur on each failed attempt to offset that. But how can I resolve a repeatable skill check when there's no time constraint or clear drawback from repeating it? For example, making a History check in a library, lockpicking a safe that you've already stolen and brought back to your hostel, or making an Investigation check on an emptied dungeon, etc. Basically, it feels like they are going to succeed in both cases, and the roll looks useless.

Picking a lock typically requires a DC 15 Dexterity check (Basic rules, p. 49). Likewise for manacles (p. 50), which can alternately be escaped with a DC 20 Dexterity check or broken with a DC 20 Strength check. But what happens if you fail?  The general rules for ability checks state (p. 58):     If the total equals or exceeds the DC, the ability check is a success—the creature overcomes the challenge at hand. Otherwise, it’s a failure, which means the character or monster makes no progress toward the objective or makes progress combined with a setback determined by the DM.   As a DM, how can I handle this in practice? In our last session, the players wanted to get inside a locked building to rescue people trapped inside. Picking the lock seemed like an easy enough task for the rogue, but unluckily he failed the check, and I wasn’t prepared for the consequences. There wasn’t much time pressure and no obvious reason why he couldn’t try again, so I allowed another attempt, but it just didn’t feel right.  I’m sure that similar situations will come up again, so I’d like some advice on how to deal with checks so that they don’t just turn into a tedious exercise of rolling until you succeed. I presume that  was left out of the game for good reason, but I’m not sure what to do instead. I suspect that this was a good occasion to use “progress with a setback” but that’s a fairly new thing for D&D and I’m not sure how to go about it. I’m unsure when I should use setbacks versus lack of progress, and in the latter case I’m unsure when I should allow players to try again versus requiring a different approach.  For example, suppose that a manacled player tries to pick the lock and fails the DC 15 Dexterity check. Now, the player could try to pick it again, or he could try one of the other escape methods, or he could wait for somebody else to rescue him, or he could simply succeed with some setback like a minor injury. How do I choose how to proceed? Or do I let the players choose?


Is this a reasonable way to do a wiring diagramme. What are the common practices when making this sort of thing?  Basically I am a compleat beginner and would love to know if this is a proper neat way to represent a circuit schematic.

There are a lot of poorly drawn schematics here. A few times people have actually asked for critiques of their schematics. This question is intended as a single repository on schematic drawing rules and guidelines can point people to. The question is  What are the rules and guidelines for drawing good schematics?     Note: This is about schematics themselves, not about the circuits they represent.


There are several possibilities to do an endless loop, here are a few I would choose:   for(;;) {} while(1) {} / while(true) {} do {} while(1) / do {} while(true)   Is there a certain form which one should choose? And do modern compilers make a difference between the middle and the last statement or does it realize that it is an endless loop and skips the checking part entirely?  Edit: as it has been mentioned I forgot goto, but this was done out of the reason that I don't like it as a command at all.  Edit2: I made some grep on the latest versions taken from kernel.org. I does seems as nothing much changed over time (within the Kernel at least)

In the spirit of questions like :  Which style do you use for an infinite loop, and why?   while (true) { } do { } while (true); for (;;) { } label: ... goto label;


How do i recover the deleted pictures from the partition of a formated hard drive. I have an old hard drive that has a partition where I hid my pictures after I formated the hard drive but how do I do this?

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


My apologies in advance as I assume this has already been answered, but I can't seem to find it anywhere.  I'm passing an Integer with a leading zero to a method and instead of resolving as the value passed like I expect (leading zero not an effect) the value is changing.  Here is my call and method:  assertEquals("1800", job.validateTime(1800, 0400));   I test the output:  public String validateTime(Integer startTime, Integer endTime) {         System.out.println(endTime); }   ...and the output is 256 where I would expect it to be 400 or 0400.  Would someone please help me understand what is happening here?  Thank you in advance!

This prints 83  System.out.println(0123)   However this prints 123  System.out.println(123)   Why does it work that way?


I've been working on this code for hours but it always gives me error, I don't really know what to do. This code should return a string of 1s and 0s, reading a tree. I'll put in here both code and structures. When i try to execute it it gives me segmentation error, i don't know where's the problem. I want it to return char* .  struct info{     int frequency;     char symbole; }info;  typedef struct info* pinfo;  struct node{     struct info* in;     struct node* right;     struct node* left; }node;  typedef struct node* pnode;    struct tree{     pnode root;     int frequency; };  typedef struct tree* ptree;  char * codage(char c, pnode pn){     char cl[]=" ";     char cr[]=" ";     if(pn->in->symbole==c){         return "";     }else{         printf("testtttK\n");         if(pn->left==NULL){             return "3";         }else{             strcpy(cl,strcat("1",codage(c,pn->left)));             strcpy(cr,strcat("0",codage(c,pn->right)));         }     }     char* res;     if (cl[strlen(cl)-1]=="3"){         res=cr;         return res;     }else{         res=cl;         return res;    } }  char* compress(char* txt, ptree pt){    int i;    char* res="";    for(i=0;i<(int)strlen(txt);i++){        res=strcat(res,codage(txt[i],pt->root));    }    return res; }

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


I'm having trouble trying to show the following:  $$ \frac{1}{r_{1}}+\dots+\frac{1}{r_{v}} \ge \frac{v^{2}}{r_{1}+\dots+r_{v}} $$  where  $r_{i}>1$ for all i and $r_{i}$ are not necessarily equal. And:  $$v=\frac{n}{r}\;;\;n=\sum_{i}r_{i}=rv$$ $$r= \frac{\sum_{i}r_{i}}{v}$$  I've run multiple simulations which all show that the required result is true. I've been able to show that the RHS has a larger denominator but also a larger numerator; which left me stuck trying to show that the effect of the denominator dominates.

How can I prove that $\frac{n^2}{x_1+x_2+\dots+x_n} \le \frac{1}{x_1}+ \frac{1}{x_2} +\dots+ \frac{1}{x_n}$?   im trying to use AM-GM  $\sqrt[n]{ \frac{1}{x_1} \frac{1}{x_2} \frac{1}{x_3} ..\frac{1}{x_n}}   \le \sum_{k=1}^n \frac{{\frac{1}{x_1} +\frac{1}{x_2}+ \frac{1}{x_3}+ ..\frac{1}{x_n}}}{n}$  $ln\sqrt[n]{ \frac{1}{x_1} \frac{1}{x_2} \frac{1}{x_3} ..\frac{1}{x_n}} \le ln \frac{1}{n} \sum_{k=1}^n {\frac{1}{x_1} +\frac{1}{x_2}+ \frac{1}{x_3}+ ..\frac{1}{x_n}}$  $ \frac{1}{x_1} \frac{1}{x_2} \frac{1}{x_3} ..\frac{1}{x_n}\le  \sum_{k=1}^n {\frac{1}{x_1} +\frac{1}{x_2}+ \frac{1}{x_3}+ ..\frac{1}{x_n}}$  im not sure is this right or not, however i dont know how to include the $n^2$ in the nominator? is there also alternative proof using jensen inequality?


All my other/previous computers (Mac and Windows) allowed me to import ringtones to replace the system sounds for things such as e-mail delivery. When searching the FAQ, I saw reference only to Ubuntu phones, but I want to reset my ringtones on my Ubuntu laptop computer. How can I do this?

After installing gm-notify I see the option of hearing a sound every time a new e-mail arrives in my Gmail inbox, but I don't know where Ubuntu (10.4) stores the system sounds to assign one. Any ideas? Thanks.


I upgraded to Cosmic through tonight, and now I have no audio: neither my laptop speakers nor the ehadphone jack seem to do anything. The audio settings menu shows only a "dummy audio" option.  Below are the outputs of aplay and lspci, which I have seen asked for in the Ubuntu forums (on three year old threads, but whatever).  What can I do to get the sound working? My only idea would be to reinstall  18.04, which worked fine.  $ lspci | grep -i audio 00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)  $ aplay -l **** Lista di PLAYBACK dispositivi hardware **** scheda 0: PCH [HDA Intel PCH], dispositivo 0: ALC269VC Analog [ALC269VC Analog]   Sottoperiferiche: 0/1   Sottoperiferica #0: subdevice #0 scheda 0: PCH [HDA Intel PCH], dispositivo 3: HDMI 0 [HDMI 0]   Sottoperiferiche: 1/1   Sottoperiferica #0: subdevice #0 scheda 0: PCH [HDA Intel PCH], dispositivo 7: HDMI 1 [HDMI 1]   Sottoperiferiche: 1/1   Sottoperiferica #0: subdevice #0 scheda 0: PCH [HDA Intel PCH], dispositivo 8: HDMI 2 [HDMI 2]   Sottoperiferiche: 1/1   Sottoperiferica #0: subdevice #0 scheda 0: PCH [HDA Intel PCH], dispositivo 9: HDMI 3 [HDMI 3]   Sottoperiferiche: 1/1   Sottoperiferica #0: subdevice #0 scheda 0: PCH [HDA Intel PCH], dispositivo 10: HDMI 4 [HDMI 4]   Sottoperiferiche: 1/1   Sottoperiferica #0: subdevice #0  $ sudo lshw -C sound sudo: impossibile risolvere l'host riccardo-laptop: Argomento non valido   *-multimedia                      description: Audio device        product: Sunrise Point-LP HD Audio        vendor: Intel Corporation        physical id: 1f.3        bus info: pci@0000:00:1f.3        version: 21        width: 64 bits        clock: 33MHz        capabilities: pm msi bus_master cap_list        configuration: driver=snd_hda_intel latency=32        resources: irq:129 memory:dc228000-dc22bfff memory:dc200000-dc20ffff

After I updated to Ubuntu 18.10 my sound device isn't recognized anymore. Only a dummy device is shown.  I have an onboard Intel device:  lspci -nnk | grep -A2 Audio 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller [8086:1e20] (rev 04)     Subsystem: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller [8086:2036]     Kernel driver in use: snd_hda_intel     Kernel modules: snd_hda_intel   The command pacmd list-cards does not show any devices:  :~$ pacmd list-cards 0 card(s) available.   This message in /var/log/syslog might have to do something with the problem:  Oct 19 21:02:06 MyComputerName pulseaudio[14331]: E: [pulseaudio]  backend-ofono.c: Failed to register as a handsfree audio agent with  ofono: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono  was not provided by any .service files   Does anybody have the same issue? How can I fix this?


"I recommend trying it if you like writing with pen and paper". This is a sentence in a book. Why isn't there an "a" article before "pen" since pen is a countable noun? Is it just a style preference?

love between husband and wife   What is the reason that there is no article (e.g. "love between a husband and a wife") in the above? Has some kind of a rule been identified grammatically when it comes to such a case? If I were to guess I think it's because the indefinite article 'a', the purpose of that, is taking a generic sample (or 'instance') from a 'class' (the class of husbands), but in the above sentence you want to refer to the class itself... the husband class and the wife class... and not an 'instance' of them, because it just is more to the point. Do you think this is a fair reasoning? Also, a thought came to me that with the use of the indefinite article, you get a generic husband and a generic wife, which, may not necessarily love each other (for they are not a specific pair of a specific husband and a specific wife who in fact love each other).


My friend (who doesn't use stackoverflow) asked me a peculiar and interesting question just now.  Is there a way to "disconnect a Log file, or shrink a log file without affecting Point in Time Recovery"? as I quote his exact words. He is working against a live system, and somehow, the Log file has grown to 72GB  All I know is you can Delete a log file (as indicated in the snippet below from technet)  USE master; GO ALTER DATABASE AdventureWorks2012 REMOVE FILE test1dat4; GO   And Truncate it  DBCC SHRINKFILE(<log_file_name_Log>) BACKUP LOG <database> WITH TRUNCATE_ONLY DBCC SHRINKFILE(<log_file_name_Log>)   I am no SQL Server wiz, and from my experience which I have, I cannot help him - though this is something I want to know the answer myself -  Any advice?

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


guys i try to download image from parse server and set it into navigation drawer Image View but when it try to find file in background  file.getDataInBackground i got this error i should do public void queryForUserPic() {         try{             ParseQuery<ParseObject> query = ParseQuery.getQuery ("Images");             query.whereEqualTo("userId",ParseUser.getCurrentUser().getObjectId());             query.findInBackground(new FindCallback<ParseObject>() {                 @Override                 public void done(List<ParseObject> objects, ParseException e) {                    if(e==null &&objects.size()>0){                        for (ParseObject object : objects) {                            ParseFile file = (ParseFile) object.get("Image");                            Log.i("test",object.get("userId").toString());                            file.getDataInBackground(new GetDataCallback() {                                @Override                                public void done(byte[] data, ParseException e) {                                     if(e==null& data != null){                                         Bitmap bitmap =BitmapFactory.decodeByteArray(data,0,data.length);                                         profile_image.setImageBitmap(bitmap);                                     }                                }                            });                        }                    }                 }             });          }catch (Exception e){             e.printStackTrace();         }      }  this is the error    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.parse.ParseFile.getDataInBackground(com.parse.GetDataCallback)' on a null object reference

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


Hi I have been living in the UK for around 8 years.  Me and my children are German citizens,  my wife is an Indian citizen but she has a permanent residence card UK.  She booked a flight via Germany:  UK -> Frankfurt -> Munich -> India but they told my wife that she needs a transit visa for a flight to Germany.  Is that correct?

I have Indian passport and USA H1 valid visa, will be travelling US and my itinerary is Mumbai – Munich – Frankfurt – San Francisco. This route has two stops in Germany, Munich – Frankfurt is German domestic flight. I am not sure if I would need a Schengen or Transit Visa. I was going through few German and Indian consulate visa website but I am not able to get the correct info, specially below two statements are confusing. Could you please help me with this?    In these five airports in Germany you can stay at the International Transit Area without a visa: 1.  Cologne/Bonn 2.  Düsseldorf 3.  Frankfurt/Main 4.  Hamburg  5.  Munich  Airport transit privilege does not apply in the following cases and you will need to get a visitor visa if: You are transiting through two or more airports in the Schengen Countries