Geometric meaning of completion and localization

Let $R$ be a commutative ring with unit, $I$ an ideal of $R$ and consider the following three constructions.   The  $R_I$ of $R$ at $I$ (i.e. the localization of $R$ at the multiplicative system $R\setminus I$) gives a morphism $$ f_1:\operatorname{Spec}(R_I)\to \operatorname{Spec}(R)=:X $$ The  $\widehat{R}_I$ of $R$ at $I$ gives a morphism $$ f_2:\operatorname{Spec}(\widehat{R}_I)\to X $$ For the special case $I=(a)$, the localization $R_a$ (i.e. the localization of $R$ at the multiplicative system $\{1,a,a^2,\ldots\}$) gives a morphism $$ f_3:\operatorname{Spec}(R_a)\to X $$   My question is:     What is the geometric meaning of all three constructions and how are they related?   This is what I ''know'' already or describes at least the style of answer I would appreciate. As remarked in the comments, $I$ has to be a prime ideal.   $R\to R_I$ is injective iff $R\setminus I$ contains no zero divisors which is the case if $I$ is a prime ideal. The scheme $\operatorname{Spec}(R_I)$ is the intersection of all the neightbourhoods of $I$ in $X$. This is a little contra-intuitive for me since the last statement sounds like ''$f_1$ is injective'' but the $\operatorname{Spec}$-operator should turn 'injective'' and ''surjective'' around somehow (I know this is literally not true but I only want to get a feeling like ''is contained'', ''is bigger'', ''is smaller'', etc.). $\operatorname{Spec}(R_a)$ is somehow the opposite of $\operatorname{Spec}(R_{(a)})$ (= the intersection of all the neightbourhoods of $(a)$ in $X$) because $\operatorname{Spec}(R_a)$ seems to be something like the union of all the open sets of $X$ not containing the point $(a)$. $R\to\widehat{R}_I$ is injective iff $\cap I^n=(0)$ and this holds very often (e.g. for $R$ noetherian and either an integral domain or a local ring). Hence (this is probably false intuition as remarked before), $f_2$ should be something like a ''projection'' (from something ''big'' into something ''small''). But what is geometrically the difference between localization and completion. I don't have a geometric idea of completion at all.   As remarked by Qiaochu Yuan in the comments below, one should not think of $\operatorname{Spec}$ as injective-surjective switching.


Is there any game engine using a functional programming language?

Is there any game engine using a functional programming language similar to Scheme, Common Lisp, Clojure or JavaScript?  I've tried Unity3D but their "JavaScript" is not actually JavaScript, is strongly typed and is not functional.


I was fascinated when I heard that the most intuitive laws of arithmetic are no longer necessarily valid when it comes to the sum of an infinite sequence, which be denoted  by $$S = \sum_{n=0,1,2,...}a_n$$ There are different ways of convergence, and particularly interesting I find Riemann's rearrangement theorem, which states that for conditionally convergent series, it is possible to rearrange the series to converge to any given value.  Since this is all about the sum of a countably infinite set of numbers, I wonder whether there is a similar field of study on the sums of uncountably infinite sets of numbers, which could be written like this:  $$S = \sum_{x\in\mathbb{R}}a_x$$ Or if interpreted as the sum of all values of a function $f(x)$: $$S = \sum_{x\in\mathbb{R}} f(x)$$  Some minor observations are that:   if $f$ is continuous and $f(x)\ge 0$ for $x\in [a,b]$ then $S_{[a,b]}=\sum_{x\in [a,b]}f(x) \to +\infty$ (and the opposite if $f(x)\le0$ in $[a,b]$) The integral of $f(x)$ in $[a,b]$ seems to be the sum $S_{[a,b]}$ diveded by the number of already counted values of $f$, however this seems not quite right because we are talking about an uncountably infinite amount of numbers and we have no notion of transitioning from countably to uncountably infinite values.   Is there any study on the sum of uncountably infinite sets of numbers?


A permanent magnet can be used to pick up a string of nails, tacks, or paper clips, even those these are not magnets by themselves. How can this be?


Let $U, V \sim U(0,1)$ be independent. What is $P(U \leq V)$?  My attempt:  We are looking for $P(U-V \leq 0)$. For a given $t \in [0,1]$ this is equivalent to $$P(U \leq t, V \gt t)= P(U \leq t)P(V \gt t)=P(U \leq t)(1-P(V\leq t))=t(1-t)=t-t^2$$  Then summing over $t$ on $[0,1]$, I get:  $$\int_0^1 t-t^2 \, dt = \frac{1}{6}$$  Which seems like a reasonable value, but I'm not exactly sure whether my approach with doing this in terms of t was correct, can anybody please validate my solution?


Why is there no community dedicated to atheism on Stack Exchange?

I mean there are tons of religious communities on Stack Exchange like Biblical Hermeneutics, Buddhism, Hinduism, Islam etc. Why not a community for atheism, where every religion and its practices can be questioned in purely logical terms?


Suppose that both f(n) and g(n) are non-negative functions. If $f(n)=O(g(n))$, is  $2^{f(n)}=O(2^{(g(n)})$ true too? If not, give counter examples.  I am unsure of how to proceed. What I have in mind at the moment is that since f(n) and g(n) are non-negative functions, making them functions exponents to 2 (as the base) would not change their characteristics. I would appreciate help in understanding this problem and proving it.


Unbounded continuous function on non-compact metric space

Suppose $(S,d)$ is a non-compact metric space. Is it possible to construct an unbounded continuous function from $S$ to $\mathbb{R}$? If it is possible, please show the construction method :)  Here's my attempt to solve this problem: Because $S$ is not compact, we can find a neighborhood assignment function $N(x)$ so that a finite cover is not possible. Then each time we can find an uncovered point from the union of neighborhoods before, and change the function by $f(x):=max\{f(x),\text{a function which equals to the indice of this point at that point and gradually vanishes at further points from the selected point}\}$. However I'm concerned that while this function is unbounded, there may be some invalid points for this function (goes to infinity)...  EDIT: As I found out there is a duplicate question, however the elementary solution is not presented in that question, so I still wish to know about this problem. :)


Minecraft LAN "java.net.ConnectException: Connection refused: no further information:"

I am trying to play a map on LAN. But every time I try to log on, I get:     java.net.ConnectException: Connection refused: no further information:   This used to work, but for some reason has stopped all of a sudden. I looked it up online, and everything I found said the firewall just wasn't allowing Java through. I followed tutorials to allow Java through the firewall, but even then it won't work. I know for a fact that I'm putting the IP in correctly, and everything seems to be correct, but yet I still get the same error message.  If it helps any, I'm using MC version 1.8.9 (the map requires it), and I don't have any mods.


What happens after upgrading Ubuntu using dev channel?

recently I upgraded my Ubuntu to 21.04 using dev channel: sudo do-release-upgrade -d  (it was because I was curious of 21.04 and couldn't use -c flag because of ) where: -d, --devel-release               If using the latest supported release, upgrade to the development release  Now I wonder, am I using dev version of Ubuntu from now on? I would like to eventually use stable version of 21.04. How do I do that?


I'm trying to find the solution to $10^n = 1 \bmod 13$. I know from Fermat's little theorem that $n = 12k$ is a solution, however I can also manually see that $n = 6k$ is a solution, $k$ being any integer. How can I see this solution without calculating manually. Thanks.


Use rsync. Include file based on pattern

I want to use rsync to upload files to a server. I'll default to exclude all.  Then I'll include the ones I need.   While doing so I realised sometimes I need to exclude a file within a folder but include the other folders.  I want to use a pattern to do so but I'm not sure what the pattern format should be in order to say "I want to include all subfolders except the one named demo"  --include="models/" --include="models/!demo" --exclude="*"   I definetely don't want to be typing every single folder to include within a folder or every folder to exclude from my project.  I would like to exclude all by default. Then include based on pattern so I won't have to be forced to include the whole folder.  Any idea?


How do I add Telegram Desktop app on Lubuntu startup

I tried copy pasting and other things to enable my Telegram on Lubuntu startup.


Struct or Classes For This Specific case

With all the knowledge I possess at this very moment I cannot decide which shall I use for my use case.  This is now example with struct.  The first class looks like this:  class Owner {   public A[] Kids;    public Owner(int count)   {     Kids = new A [count];      // If I would use classes I would need to create new class for each item, right?     // It would look like below and my worries are memory impacts because of new A()     // for(int i = 0; i < count; Kids[i++] = new A());   } }   The second class looks like this:  class Node {   private Owner o;   private int num;   private A[] kids;    public Node(Owner o, int num)   {    this.o = o;    this.num = num;   }    public A[] Kids   {     get     {       this.kids = o.Kids[num].NextList;       return this.kids;     }   } }   The type A looks like this  <struct or class> A {   public int Value;   public A[] NextList; }   The question is now when using structs would the access run faster than when using classes?  Would I get memory overhead when using classes since I would need to initalize each class.  Would I need to take care of killing references when using classes?  Which would you use guys in this case?  I apologize in case this is a duplicate or if i did something wrong. Please tell me what I did wrong before downgrading the question. I am still new to this forum.


drawing different parts of a line in different colours

How to draw different parts of a line in different colours. In the following code can each part of the line be drawn in different colour      \documentclass{beamer} \beamertemplatenavigationsymbolsempty \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{frame}[fragile,t] \frametitle{} { \begin{tikzpicture} \draw [thick, green] (2.3,1.4) +(-27:2.2cm)-- +(153:2.2cm) +(42:1.88cm) -- +(-138:1.88cm); \end{tikzpicture} } \end{frame} \end{document}


How can I modify the advanced search form when my hook runs too early?

I'm using  to modify the content of the form on the search page — I want to remove the "phrase" and "not" fields, and restrict the "only of the types" checkboxes to a hand selected list of types.  I have the following code, which is being called and which I think should work:  function MYMODULE_form_search_form_alter(&$form, &$form_state, $form_id) {     unset($form['basic']);     unset($form['advanced']['keywords']['phrase']);     unset($form['advanced']['keywords']['negative']);     unset($form['advanced']['type']);     $form['advanced']['type'] = array(         '#type' => 'checkboxes',         '#title' => t('Only of the type(s)'),         '#options' => array(             'blog' => 'Blog entry',             'event' => 'Event',             'news' => 'News article'         )     );     // print_r($form);     // die; }   Except  gets to the search form after my form alter hook runs, so I don't get a chance to modify any of the form elements that it's adding.  I'm running Drupal 7.22.  How can I modify the advanced search form when my module hook runs before the hook that defines the advanced search form?


Apostrophe usage in the Iliad (Lombardo)

I'm taking a classics class, and we're currently reading Lombardo's translation of the Iliad. It strikes me incredibly odd how possessive and plural nouns are formed:     The met by the ancient oak tree. /   Lord Apollo, Zeus' son, spoke first   (7.15-16)   The professor of the class says, for the purposes of our paper, to always use an " 's " to clarify the possessive form of the noun, even if the noun ends in an s.     Achilles's love of battle...   Just to make things perfectly clear, the way that I understand usage:   Single: "Greek" or "Achilles" Plural: "Greeks" or "Achilles" (For more than one Achilles, we have to infer plurality) Single Possessive: "Greek's" or "Achilles's" Plural Possessive: "Greeks'" or "Achilles'" (Once again, for something belonging to more than one Achilles, we have to infer plurality in the sentence)  And the pronunciation, as I understand it, is as follows: Single: "Greek" or "Achilles" Plural: "Greek-s" or "Achilles-s" Single Possessive: "Greek-s" or "Achilles-es" Plural Possessive: "Greeks"  or "Achilles-es"   Am I completely off base here, I'm so confused. Can someone shed some light on this?


Why is a full turn of the circle 360°? Why not any other number?

I was just wondering why we have 90° degrees for a perpendicular angle. Why not 100° or any other number?  What is the significance of 90° for the perpendicular or 360° for a circle?  I didn't ever think about this during my school time.  Can someone please explain it mathematically? Is it due to some historical reason?


How does the inverse transform method work?

How does the inversion method work? Say I have a random sample $X_1,X_2,...,X_n$ with density $f(x;\theta)={1\over \theta} x^{(1-\theta)\over \theta}$ over $0<x<1$ and therefore with cdf $F_X(x)=x^{1/\theta}$ on $(0,1)$.  Then by the inversion method I get the distribution of $X$ as $F_X^{-1}(u)=u^\theta$.    So does $u^\theta$ has the distribution of $X$?  Is this how the inversion method works?  u<-runif(n) x<-u^(theta)


Prove that $U⊆W_1$ or $ U⊆W_2$ if $U⊆W_1∪W_2$.

Let $V$ be a vector space over a field $F$, and $U,W_1,W_2$ three subspaces of $V$, with  $$U⊆W_1∪W_2$$  Prove that $U⊆W_1$ or $U⊆W_2$.


How to say fractions like "7/8" or "546/823"

I have come across the following three spoken variants for the fraction ⅞:   Seven by eight Seven over eight Seven into eight   I am also aware of seven-eighths but I don't want to use that as it isn't practical for larger numbers. As an Indian, the most common variant I have heard is the first one but somehow that doesn't seem right. Besides, since English isn't our native language, I wouldn't want to trust it. I want to know from native speakers what they use and what's the correct way to refer to such numbers.  To make things even more complicated, most Indians use the third variant to mean something like 7×8, which I guess should be more appropriately referred to as seven times eight.


Commands pasted into bash not recorded in history

From time to time I find that when I copy/paste a command from a web page (or from the Terminal window itself) the pasted command is not recorded in bash history. For example, just now I did this:  cd foo     git push --set-upstream origin master cd ../foo2     git push --set-upstream origin master cd ../foo3/     git push --set-upstream origin master cd ../foo4     git push --set-upstream origin master   (Note: I typed the cd commands manually - the git push commands were pasted).  However when I type history I see this:   2008  cd foo  2009  cd ../foo2  2010  cd ../foo3/  2011  cd ../foo4  2012  history   Bash version:  GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)   Linux version:  Ubuntu 14.04 LTS   Terminal version:  Gnome Terminal 3.6.2   This is kind-of annoying, because for one thing history does not show exactly what I did. Secondly, I can't just up-arrow to recall the command I just pasted.  Why is it doing this, and how can I stop it?


This is probably a very simple fix but I have a spinner which I cannot get to center in the page whenever I shows on the page for some reason  My CSS is here:  #spinner {     height: 55px;     width: 55px;     display: inline-block;     position: absolute;     margin: 0 auto;     z-index: 1;     transform: translate(50%, 50%);     -webkit-transform: translate(50%, 50%);     -ms-transform: translate(50%, 50%);     -moz-transform: translate(50%, 50%); }   Simple HTML Mark-up

   You can see the JS Fiddle here     #spinner {     height: 55px;     width: 55px;     display: inline-block;     position: absolute;     margin: 0 auto;     z-index: 1;     transform: translate(50%, 50%);     -webkit-transform: translate(50%, 50%);     -ms-transform: translate(50%, 50%);     -moz-transform: translate(50%, 50%); }


Two point masses m1 and m2, separated initially by distance d, move towards each other under mutual gravitational force. Find the time they take to collide? The main problem I'm having is to solve the differential equation...


Why human endometrium doesn't stay constant?

Is there any explanation or evolutionary advantage to the endometrium constantly cycling between the proliferative and menstrual cycle? Wouldn't it be more advantageous if it kept always fully thickened? I imagine it is less energetically expensive than to be always producing and losing all those cells, blood vessels, etc.


In Apple Mail, How can I delete a message without moving to the next one, causing the next one to be marked as read?

I typically leave messages as unread if I need to remember to read them later.  Also I like to keep my inbox clean, so I delete mail I don't care about saving.  When I select a message and press delete, the selection jumps to the next item in the list. Many times, this is the item I just marked as unread for later.  How can I avoid this?


What happens to HP when Constitution decreases?

WotC recently released the Basic Rules for the DM, and with it came a few items like the Amulet of Health:     Wondrous item, uncommon (requires attunement)      Your Constitution is 19 while you wear this amulet. The amulet has no   effect on you if your Constitution is already 19 or higher.   The Basic Rules state at the end of Chapter 1, under "Beyond 1st Level":     When your Constitution modifier increases by 1, your hit point maximum   increases by 1 for each level you have attained. For example, when   Bruenor reaches 8th level as a fighter, he increases his Constitution   score from 17 to 18, thus increasing his Constitution modifier from +3   to +4. His hit point maximum then increases by 8.   But it doesn't explain what happens when the Constitution modifier decreases!  My players will soon get the Amulet as a reward, and I fear that they will just pass the item around to increase everyone's max HP; I want to prevent that. Are the HP lost when a character is no longer attuned to the Amulet?


Cannot paste text from clipboard into a comment

I was trying to copy a bug reference number from an email into a comment on a question, but it would not appear after tapping Paste. I tried copying several times, to no avail.    App Version: 1.6.6.2 Device: iPhone 7 Plus OS Version: Version 11.0 (Build 15A372)


Why on earth my PC has a folder named "Baidu" in Documents folder

This folder has been nagging me for a long time though I do not know when it appeared in my PC. I have a folder named Baidu in Documents folder (C:\Users\Public\Documents\). It has a folder named 'Common' inside which another folder I18N which contains a file named conf.db. I could read its contents when opened in notepad, which, of course, doesn't make any sense to me(the content would be provided on request as I fear it may contain any personal identification data). I tried deleting it and will get deleted without any problem. But it will come back there, not all of a sudden or after a reboot, but I can assure that it will be there after some days. First of all, I would like to know:   What this folder is? And its contents? Why is it in my computer? Which program creates it? What purpose does it serve?     and, ultimately,     How can I get rid of this folder and its contents forever?


Proofs that proceed by induction are almost always unsatisfying to me. They do not seem to deepen understanding, I would describe something that is true by induction as being "true by a technicality". Of course, the axiom of induction is required to pin down the Natural numbers and certainly seem to be indispensable in one form or another.   However, I am still interested in the following: Are there any "natural" theorems in mathematics that seem unlikely to fall to any method other than induction for whatever reason? I would not include examples that proceed by breaking down a structure into smaller components that are more easily handled - somehow these proofs satisfy whatever criteria for beauty I have in my mind.   An example of a theorem that does have an inductive proof and a more "superior" proof is Fermat's little theorem. It is perfectly possible to prove it by induction but the proof through group theory seems better - perhaps because it is more easily generalizable. I would like examples where it seems like the "neat" proof is unlikely to exist.  This is probably very philosophical and I do not really have a concrete question but I am sure I am not alone in feeling this way.


I use Debian 7 and have installed a virtual host with address sub.domain.com following this tutorial:   I have enabled it, rebooted the PC but still the subdomain opens /var/www  Here is the file contents of the file named "sub.domain.com", located at /etc/apache2/sites-available/ :  <VirtualHost *>     ServerName sub.domain.com     DocumentRoot /usr/share/destfolder     ServerAdmin info@domain.com     ErrorLog /var/log/apache2/sub.domain.com-error_log     CustomLog /var/log/apache2/sub.domain.com-access_log common </VirtualHost>   By the way when I reload apache's configuration, I get: NameVirtualHost *:80 has no VirtualHosts  Any suggestions?


I have a group of order $p^\alpha$, $p$ is prime. I argued that by the Lagrange's theorem, the subgroups of this group are of prime power order. Just want to clarify if this also implies the existence of these subgroups? Can I say this group has  subgroups of order $p$, $p^2$, ..., $p^{\alpha-1}$? Or do I need to refer to other results/theorems? Thank you.


Yellow-highlighted chat messages are shortened

When somebody replies to or pings me, and I click on the little notification circle, their message is highlighted in yellow. It also makes the right side of the .message div shorter by about 50 pixels.  The problem with that is that the flag, star, and reply buttons are contained within the .message, so they are moved ~50px to the left from where I expect them to be. Of course by the time I figure out where they've moved to, the message becomes un-highlighted and they move back to where they normally are.  This bug is most likely caused by this snippet that's in :  .message.highlight {     margin-right: 48px }   Is this supposed to be that way? Is there even any point to the .message.highlight section? Should it be removed?


Is $\sum_{n=1}^{\infty} \frac{1}{\operatorname{lcm}[1,~2,~\ldots,~n]}$ irrational?

Is $$\sum_{n=1}^\infty \frac{1}{\text{lcm}[1,~2,~\ldots,~n]} $$ an irrational number? I just thought up of the problem, and can anyone help this out?


Evaluate: $$\int_0^{\infty}\dfrac{\ln(x+\frac{1}{x})}{1+x^2}\cdot dx$$   I tried substituting $\ln(x+\frac{1}{x})=t$ that to some extent created denominator but made it more tedious. Please give some hints to solve.


Whats the error in my derivation that i-squared is +1?

Here is my derivation. $i^2= ((-1)^{0.5})^2$ $=((-1)^2)^{0.5}$ = $1$ Is there a rule saying that 2nd line is not allowed? I have seen on a related post that sqrt(a).sqrt(b)=sqrt(a.b) is true only if a and b are above zero But i do not understand what it can mean for a and b (2 complex numbers) to be greater than zero?  Please explain this rule.  And also if the rule can be more generally stated? Note: i learnt in school that square root of x means the POSITIVE square root of x. That was true throughout all algebra before we got to complex numbers. I now understand that that referred to the "principal" root. (Root with the highest real element). Also when we define i as square root of -1, this is a strange statement actually because also, -i is also sqr rt of -1.


Differences between re.match, re.search, re.fullmatch

From the  it says that:  Pattern.match(...)     If zero or more characters at the beginning of string match this regular expression   Pattern.fullmatch(...)     If the whole string matches this regular expression   Pattern.search(...)     Scan through string looking for the first location where this regular expression produces a match   Given the above, why couldn't someone just always use search to do everything? For example:  re.search(r'...'   # search re.search(r'^...'  or re.search(r'\A...'   # match re.search(r'^...$' or re.search(r'\A...\Z' # fullmatch   Are match and fullmatch just shortcuts (if they could be called that) for the search method? Or do they have other uses that I'm overlooking?


c++ Does the return type of a function cause ambiguity?

While making a very simple program, I started wondering about whether the return value of a method has any participation in making a method ambiguous?  for example (not the case I was wondering about this is just a simple example to support my question):  int    CalculateSum(double firstNumber, double secondNumber); double CalculateSum(double firstNumber, double secondNumber);   Are these two methods ambiguous or not?  On ,  I read that overloading with return type is possible so does that mean that a return type does have a participation in a method being ambiguous?


How to prove this function is bijective?

Funtion $$f:\mathbb{N}^2\rightarrow\mathbb{N},\quad(x,y)\mapsto\frac{(x+y)(x+y+1)}{2}+x$$  Note that given $z=f(x,y)\in\mathbb{N}$,$\,\,$you can find $x$ and $y$ by bounded minimization.


Lenovo B50-70 Electric Shock when touching VGA port , when plugged to AC

Recently bought Lenovo B50-70 (2 days), connected it to AC with three pin adapter given. Accidently touched the vga port and I got a serious jolt. Vga Ports are OK. When using on battery I don't have this issue. Can this be rectified or should I get this laptop replaced.


Wake up a planet by detonating deep down in the core?

I remember an old novel about people trying to rejuvenate a planet (probably Mars?) by drilling a big hole down to its core and setting a great deal of bombs (probably atomic bombs?) inside. Probably to resurrect its geothermal energy or magnetic field. Could you help me identifying this novel?  EDIT: As far as I can remember:   The book I read was a translated book published in 80-90s. So the original novel would be older. It might be partially translated to tone down the story suitable for children. The people are desparate because if they fail, the planet would remain inhabitable. The hole on the planet, maybe it was already there before the story starts, abandoned by former settlers of the planet. (I'm not sure about this.) I think the story ends as      they successfully detonate the core   but I'm not sure this is really how the story ends, since it might be a partial translation.


How to preserve author's initials from being abbreviated

Some names should be abbreviated using not one but two characters, e. g. "Yuri Gagarin" => "Gagarin, Yu." But if I specify  author = "Gagarin, Yu."   or even  author = "Gagarin, {Yu.}"   bibtex nevertheless abbreviate it as "Gagarin, Y.", with only one character. How this can be corrected?  Compilable example, as requested in comments:  \documentclass{article} \begin{filecontents}{bibliography.bib} @book{pi,   author = {Gagarin, Yu.},   title  = {Everything is flying to 3.14}, } \end{filecontents} \begin{document} The rifle is a festivity\cite{pi} \bibliographystyle{abbrv} \bibliography{bibliography} \end{document}


Background I teach Algebra and second year Algebra to middle school students. We are currently studying Exponential, Power, and Logarithmic functions. We study exponential functions (of the form $f(x) = ab^x$ where $a \neq 0, b > 0$). I've taught the basics of exponential functions before and I've wondered about the function $f(x) = (-2)^x$. At first I was confused as to why the calculator would not graph any exponential function with a negative base. Then I realized that depending on the roots, say for $(-2)^{1.25}$ and $(-2)^{1/3}$ some very different calculations would need to be performed. I'm still lost as to how you would explain $(-2)^\pi$ but I suppose that's just being annoying. I want to know how to explain the output of $f(x) = (-2)^x$. Comments I know for example that there are a host of values for which the output would be imaginary. If we limit the domain of $x$ to rational numbers with odd denominators  Here are two examples $(-2)^{2/5} = \left(\sqrt[5]{-2}\right)^2 \approx 1.3195$ $(-2)^{3/5} = \left(\sqrt[5]{-2}\right)^3 \approx -1.5157$)  we should be able to compute $f(x)$ for all such numbers. I would then think the graph would look something like $f(x) = 2^x$ and $f(x) = -(2^x)" /> Curious how to visualize the plot including the imaginary outputs when $x \in \mathbb{R}$ Wolfram Computes the result using the principal roots  Question: How could you visualize and interpret $f(x) = (-2)^x$ while incorporating the real-root based output I presented above? Or, alternatively, what's wrong with this?  which makes sense given the restricted domain necessary to compute real outputs. Is there any mistake in thinking that with the domain restrictions I specified above ($x$ all rational numbers such that $x = a/b$ where $b$ is odd) the output would resemble my plot above? Is there a way to visualize -- or even better -- explain the behavior of this function for for all real numbers $x$? If we added in an imaginary axis, could we use it to show the results when we need to compute an imaginary output?


Install MySQLdb (for python) as non-compressed egg

The install instructions are:  $ python setup.py build $ sudo python setup.py install # or su first   This gives me an .egg file. How do I tell the install to dump the files as a normal, uncompressed library?  Thanks!


How to play music on iPhone via Apple Watch on watchOS 4?

In watchOS 3 the 'Now Playing' complication played music on your phone when you pressed play, unless you changed audio source to the watch.  In watchOS 4 this defaults to the watch, and so far as I can tell there's no way to change it to the phone.  In practice this means that I will travel somewhere listening to music, arrive at my destination, do something else for a bit, then when leaving I press 'Play' on my watch and it starts a completely different album or playlist from the watch instead of continuing where the iPhone left off (the desired behaviour – and the default if I pressed 'Play' on the iPhone, or in watchOS 3).  Since it's not an LTE watch, and it has very little storage on it for music, this change seems completely bizarre as it means that there's only a small selection of tracks to play ever.  My question: is there a way to disable this, and make the Watch start music via the iPhone instead of the Watch?


I wrote this unit (/etc/systemd/system/test@.service):  [Unit] Description=TEST (%I)  [Service] ExecStart=/bin/echo "%i %I" >> /home/vagrant/test.txt  [Install] WantedBy=multi-user.target   After I run systemctl enable test@ and systemctl start 'test@slug=test phone=999999999999', I don't see any file on /home/vagrant.  The output of systemctl status 'test@slug=test phone=999999999999' is:  ● test@slug\x3dtest\x20phone\x3d99999999999.service - TEST (slug=test phone=99999999999)    Loaded: loaded (/etc/systemd/system/test@.service; disabled; vendor preset: enabled)    Active: inactive (dead)  May 01 15:40:51 vagrant-ubuntu-wily-32 systemd[1]: Started TEST (slug=test phone=99999999999). May 01 15:40:51 vagrant-ubuntu-wily-32 echo[2161]: slug\x3dtest\x20phone\x3d99999999999 slug=test phone=99999999999 >> /home/vagrant/test.txt   I tried to use systemd-analyze verify test@.service to check for syntax errors but the output is: Failed to load test@.service: Invalid argument.


There is bold, there is italic, but what about underlining? Or strikethrough even? Coming from Microsoft Office or other areas of the Internet, not having a way to underline something or strikethrough irrelevant stuff seems weird to me, so where did the choice to not include it come from?


What does this scene with Meg turning her room's lamp on and off refer to?

In Season 5 Episode 8 of Family Guy (Barely Legal),  where Meg turns the lamp in her room on and off while spinning the tag on Brian's collar while somebody sings an aria.  The context of this clip (which is pretty much the plot of the episode) is that Brian took Meg to the prom as a favour, they made out, and Meg became infatuated with Brian ever since. This is one of the things she's done as a result.  To this day, I have no idea what that scene means. It appears to be a ritual of some sort, but I don't know if it's just something made up by the writers or whether it actually refers to something else.


Java HttpComponents "Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ParseException"

I'm developing a Java application using Apache HttpComponents. I downloaded the "5.0.zip" from  today and then added it as user library to my classpath in Eclipse. Everything is working fine.  However, when I compile the Application and try to use it outside of Eclipse, I get the following error message:  Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ParseException         at java.lang.Class.getDeclaredMethods0(Native Method)         at java.lang.Class.privateGetDeclaredMethods(Unknown Source)         at java.lang.Class.privateGetMethodRecursive(Unknown Source)         at java.lang.Class.getMethod0(Unknown Source)         at java.lang.Class.getMethod(Unknown Source)         at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)         at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.apache.hc.core5.http.ParseException         at java.net.URLClassLoader.findClass(Unknown Source)         at java.lang.ClassLoader.loadClass(Unknown Source)         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)         at java.lang.ClassLoader.loadClass(Unknown Source)         ... 7 more   I really don't know what causes this or how I can fix it...help is greatly appreciated!


When Does "Adapting" An Image Go Too Far?

I am interested in using a particular figure from the literature, but I do not want to go through the hassle of paying to use a figure. What I am wondering is if I made a similar figure, how easy is it to get in trouble for copyright infringement? If I were to essentially redo the image, it would not be verbatim the same, but very similar depictions would be pulled from the image. As an example, I provided two illustrative examples where the bottom image is an "adapted" version:   The second one is in a published paper as well from a reputable journal, so I am guessing that it should be okay to go about making a similar diagram myself, but again, I wouldn't mind other opinions as too when I might start to tow the line on copyright infringement.


How to properly implement member and non-member functions with templates in C++?

I am learning object-oriented programming on my own. I am trying to implement a templated class. I am getting some linking error which I don't understand. My implementation is given below. The Point.h contains a declaration of a Point class. //Point.h #pragma once template <typename T> class Point {         public:                 T x,y;                 Point();                 Point(T , T);                 Point(const Point<T>& P); };  template <typename T> Point<T> operator+ (const Point<T> & P1, const Point<T> & P2);  The member functions of Point class is implemented in Point.cpp //Point.cpp #include "Point.h" template <typename T> Point<T>::Point() {}  template <typename T> Point<T>::Point(T _x, T _y) {         x = _x;         y = _y; }  template <typename T> Point<T>::Point(const Point<T> & P) {         x = P.x;         y = P.y; }  template <typename T> Point<T> operator+ (const Point<T> & P1, const Point<T> & P2) {         Point<T> P3;         P3.x = P1.x + P2.x;         P3.y = P1.y + P2.y;         return P3; }  Now, I am testing the file in test-1.cpp. //test-1.cpp #include <iostream> #include "Point.h" using namespace std;  int main(int argc, char *argv[]) {         Point<double> A(0,0), B(1,1), C;         C = A+B;         cout << C.x << endl;          return 0; }  When I try to compile the test-1.cpp as g++ Point.cpp test-1.cpp  It gives some linking error, /usr/sbin/ld: /tmp/cccV74gb.o: in function `main': test-1.cpp:(.text+0x2e): undefined reference to `Point<double>::Point(double, double)' /usr/sbin/ld: test-1.cpp:(.text+0x52): undefined reference to `Point<double>::Point(double, double)' /usr/sbin/ld: test-1.cpp:(.text+0x5e): undefined reference to `Point<double>::Point()' /usr/sbin/ld: test-1.cpp:(.text+0x75): undefined reference to `Point<double> operator+<double>(Point<double> const&, Point<double> const&)' collect2: error: ld returned 1 exit status  What disturbs me most is the last error, where the compiler looks for + < double > operator which I never defined. I have only overloaded + operator. How to properly implement member and non-member functions with templates?


When there's one answer, it's no big deal. But when there's dozens and you have to scroll past every single other answer to add a new one, loading them in batches on a sketchy network, that takes a lot longer than it should.  When already on the Answers tab, display a + button to add an answer.


Cartoon with girl on a wheelchair and a genie as helper against an evil entity

I remember watching a cartoon as a child, in the 80s or early 90s and I can't remember the title (or a lot of details about it). The setting reminds me of "Nadia: The Secret of Blue Water": we could be at the end of the 19th century, but my memory does not support me much in this.   Anyways, the protagonist of the cartoon is a girl on a wheelchair who is supported by a female genie wearing "One Thousand and One Nights" clothes. The genie protects the little girl from the assaults of the minions of an evil entity; in the first episode of the series the minions disguise themselves as workers of a circus just arrived in the town where the little girl lives. For some reasons I do not remember, the evil entity wants to terminate the little girl.  At the end of each episode the minions are inevitably defeated by the magic of the genie and the evil entity transforms them in little worms, for eternal punishment. The worms retain the original heads (so they continue to talk to the evil entity) and live in a rocky-bowl next to their master.


Unit testing for C++ code - Tools and methodology

I'm working on a large c++ system that is has been in development for a few years now. As part of an effort to improve the quality of the existing code we engaged on a large long-term refactoring project.  Do you know a good tool that can help me write unit tests in C++? Maybe something similar to Junit or Nunit?  Can anyone give some good advice on the methodology of writing unit tests for modules that were written without unit testing in mind?


I see that many people have already asked the same question, but unfortunately I can't make it work for me at the moment. So, once again, how can I centre and fit tables larger than that to my report? Command \scalebox{0.8} doesn't work for larger tables.  \documentclass[12pt,a4paper]{article} \usepackage{setspace}  \spacing{1.5} % \raggedright  \usepackage[margin=1.3in]{geometry} \usepackage{amsmath} \usepackage{graphicx} \usepackage{soul} \usepackage{color} \usepackage{graphicx}  \newcommand{\head}[1]{\textnormal{\textbf{#1}}}  \usepackage[polutonikogreek,english]{babel} \usepackage[utf8x]{inputenx} \newcommand{\greek}[1]{{\selectlanguage{polutonikogreek}#1}}  \begin{document}  \begin{table}     \centering     \resizebox{\linewidth}{!}{\begin{tabular}{ll}     \hline     \head{XXXXXXXXX} & \head{XXXXXXXXX}\\     \hline     \ttfamily xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx & \ttfamily xxxxxxxxxxxxxxxxxxxxxx \\     \ttfamily xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx & \ttfamily xxxxxxxxxxxxxxxxx \\     \ttfamily xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx & \ttfamily xxxxxxxxxxxxxxxxx \\     \ttfamily xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx & \ttfamily xxxxxxxxxxxxxxxxx \\     \hline     \end{tabular}}     \caption{Articles related to stock-prediction techniques}     \label{tab:RegressionMarketEquitiesRSSs} \end{table}  \end{document}


I need to trace and monitor client login connections (successful and failure) to our important SQL servers (20 MSSQL Server). What method do you recommend?  Note: I think enabling "both failed and successful logins" to windows event logs may create large log files so in my mind it is last option. Also i think auditing may affect database performance so this is last option too.


Is there a reliable way to read an in-circuit capacitor?  I have a PCB-type ESR meter with a zero-force insertion socket that works for components, but do not have a meter that was designed to read specifically capacitors embedded in a circuit.


Find all continous functon satisfying: $\int_{0}^{x} f = f^2(x) + C$, for some constant $C$

Find all continous function satisfying: $\int_{0}^{x} f = f^2(x) + C$, for some constant $C$ This is problem 7 of Chapter 14, Calculus by Spivak. My approach involves differentiating both sides of the equation. But by doing so, we assume the differentiability of  $f$ in $R$. It's impossible to think of something else other than considering derivatives. So let we say: $f$ is a differentiable function for simplicity. So we have: $$\int_{0}^{x}f = f^2(x) +C \Leftrightarrow f(x) = 2f(x)f'(x) \Leftrightarrow  \left[  \begin{array}{rcr}     f(x) =0 \\     f'(x) = \frac{1}{2} \\   \end{array}(**) \right.$$ There are two cases to consider: either $f(x)$ is $0$ for every x in R or there exists some $x$ satisfying $f(x) \not= 0$ So, $f(x) =0,\forall x\in R$ is one solution. The other solutions are $f$(s) such that: $f'(x) = \frac{1}{2}$, for $x$ such that $f(x) \not= 0 $ It seems that there's no guarantee that the set $\{x: f(x) \not= 0\}$ can be any specific set. If we assume $f(x) = 0$ only once at $0$ then $f(x) = \frac{x}{2}$ is another solution. But is that all in the second case? I'm trying to somehow exclude other cases. I haven't found any promising approach yet. Any ideas ?


What's geometric about a "geometric progression"?

An arithmetic progression is $a+0b, a+1b, a+2b, ..., a+nb$ A geometric progression is $ab^0, ab^1, ab^2, ..., ab^n$. Multiplication is arithmetic, so why is a geometric progression not also an "arithmetic" progression? A line being extended be iteratively adding a constant length is a geometric construction, so why is an arithmetic progression not also a "geometric" progression?


How can I take selfie by running a console command on Mac?

I know I can take a selfie with the built-in camera via the Photo Booth app. However, is there a way capture an image via command line, in sort of  style?


Is there any way of achieving cross-application non-destructive RAW editing? (Maybe xmp files?)

Is there some way of saving (basic) non-destructive RAW developing/adjustments that is not limited to a particular app ecosystem (eg Adobe)? Understandably some transformations are proprietary (eg. some cool denoise algorithm, or a spot removal tool) but others are rather generic that I think could easily be standardized (eg. crop, exposure, white balance) and be read by other applications.  At first I thought sidecar xmp files could be useful in that respect, since Camera RAW/Lightroom and darktable save their adjustments inside such files, but seems that adjustments created by Camera RAW/Lightroom can not be previewed/edited by darktable and vice versa.  Any solution that has worked for you?  This question is mostly about creating a futureproof way of storing the original camera data, but also the edit history (adjustments in a non-destructive way)


Why is reputation not awarded for helpful flags?

I would like to know, why on Stack Exchange sites we don't currently get reputation for helpful flags?  It could perhaps be awarded with the same amount of rep that an edit is worth (+2 per helpful flag, perhaps up to 1000 rep total like edits).


Python - Iterate through a list and append n values every nth iteration to a vector

I am dealing with a deep reinforcement learning problem and the state I need to feed to my agent is contained in a vector of binary numbers.   The list  looks like that:  [7.0, 1.0, 1.0, 0.0, 1.0, 5.0, 0.0, 1.0, 0.0, 1.0,   7.0, 1.0, 1.0, 0.0, 1.0, 6.0, 1.0, 0.0, 1.0, 0.0]   However, each complete state for my problem is contained every 5th iteration. Examples of complete states from the sample data are:  [[7. 1. 1. 0. 1.]] [[5. 0. 1. 0. 1.]] [[7. 1. 1. 0. 1.]] [[6. 1. 0. 1. 0.]]   I have tried creating a parser function, similar to a sliding window which should capture the 5 values every 5th iteration.  def getState(data, timestep, window):     parser_start = timestep - window + 1     block = data[parser_start:timestep + 5] if parser_start >= 0 else data[0:timestep + 5] # pad with t0     res = []     for i in range(window - 1):         res.append(block[i])      return np.array([res])   to then implement into a for loop of the type:  window_size = 5     for t in range(10):         next_state = getState(data, t + 4, window_size + 1)             print(next_state)   However, when running the loop the result I get is:  [[7. 1. 1. 0. 1.]] [[1. 1. 0. 1. 5.]] [[1. 0. 1. 5. 0.]] [[0. 1. 5. 0. 1.]] [[1. 5. 0. 1. 0.]] [[5. 0. 1. 0. 1.]] [[0. 1. 0. 1. 7.]] [[1. 0. 1. 7. 1.]] [[0. 1. 7. 1. 1.]] [[1. 7. 1. 1. 0.]]   It seems to append a sliding window of 1, rather than 5. I have been trying for weeks now but I can't find where the problem is.  Do you guys have any fresh ideas?


$Tr(A^2)=Tr(A^3)=Tr(A^4)$ then find $Tr(A)$

Let $A$ be a non singular $n\times n$ matrix  with all eigenvalues real and  $$Tr(A^2)=Tr(A^3)=Tr(A^4).$$Find $Tr(A)$.  I considered $2\times 2$ matrix $\begin{bmatrix}a&b\\c&d\end{bmatrix}$ and tried computing traces of $A^2,A^3,A^4$ and ended up with following    $Tr(A^2)=Tr(A)^2-2\det(A)$ $Tr(A^3)=Tr(A)^3-3Tr(A)\det(A)$ $Tr(A^4)=Tr(A)^4-4Tr(A)^2\det(A)+2\det(A)$   I have no idea how to proceed from here...


Shared centimorgans of first cousins with different paternal grandmothers?

On average, how would range of shared centimorgans compare between first cousins who have same paternal grandmother versus first cousins with different paternal grandmothers, same paternal grandfather in both cases.


What is the difference between "anyone" and "everyone" in this context

What is the difference between "anyone" and "everyone" in the following context?  For example,     Anyone is welcome to do such and such.   and     Everyone is welcome to do such and such.   mean exactly the same thing to me. But since I am not a native speaker, I guess there might be some subtle differences. Can anyone explain?


Reset gnome to its fresh post-install ubuntu 17.10 state

I did a fresh install of 17.10, and my desktop looked roughly like this:    Then, I started messing around and installed tweak tools, and . Then after a reboot I suddenly got a strange bar at the bottom like so:    I'm trying to revert gnome to its earlier state, but nothing seems to work. I've tried the following commands:  rm -rf .gnome .gnome2 .gconf .gconfd .metacity .cache .dbus .dmrc .mission-control .thumbnails ~/.config/dconf/user ~.compiz* gsettings set org.gnome.desktop.wm.preferences theme "Ambiance" gsettings set org.gnome.desktop.interface gtk-theme "Ambiance" dconf reset -f / sudo apt-get install --reinstall gnome-shell   None of them bring me back to my begin state. I'm considering reinstalling completely, but hope there is a better way.


What's the difference between a confidence interval and a credible interval?

Joris and Srikant's exchange  got me wondering (again) if my internal explanations for the difference between confidence intervals and credible intervals were the correct ones.  How you would explain the difference?


difference between inner join vs multiple ands


Download media File in PHP instead of open

i am trying to make force download of mp3 file instead of open in browser.  i am using the following code.  header('Content-Disposition: attachment; filename="' . $name . '"'); readfile($path); exit();   This works fine, But the problem is resume/pause is not work and the total filesize/percentage is not mentioned when download the file. May i know how to fix this.


How I can prove that if $A$ is a ring and $f\in A$ is not nilpotent then $A_f\cong A[T]/(Tf-1)$?   My attempt is the following.  I define the homomorphism $\phi : A[T]\longrightarrow A_f$ in this way: $\phi(a):=a/1$ and $\phi(T^n)=1/f^n$. Now, of course $(Tf-1)\subseteq \ker \phi$, but I'm not able to prove the reverse inclusion.


Finding value of definite integral - $f(f(x)) = x$

Question:     If $f(x)$ is such a function so that $f(f(x)) = x$ and $f(0) = 1$ then find the value of:   $$ \int_0^1(x+f(x))^{2016}dx$$   I have no clue where to start this question. A small hint would be appreciated.


I've got 2 methods of storing pages. The first is simple; store it in a file. The second is to store it in the database which is I'm having issues with. The whole "system" is based around an "engine" which outputs the page by injecting it into a HTML template. To put it simply: the code must be executed before it reaches the engine. Hopefully this will make a little more sense with some code. page.class.php    ... // Page was found in the database             $this->name = $pageVariables['name'];             $this->requiredAuth = $pageVariables['requiredAuth'];             if ($parsed) {                 ob_start();                 echo $pageVariables['content'];                 $this->contents = ob_get_clean();                 var_dump($this->contents);             } else {                 $this->contents = $pageVariables['content'];             } ... // File exists on the system, load it                 $fileContents = file_get_contents($this->url);                 if ($parsed) {                     ob_start();                     include($this->url);                     $this->contents = ob_get_clean(); var_dump($this-contents);                     if (isset($pageName)) {                         $this->name = $pageName;                     }                     if (isset($requiredAuth)) {                         $this->requiredAuth = $requiredAuth;                     }                     if (isset($useEngine)) {                         $this->useEngine = $useEngine;                     }                 } else {                     $this->contents = $fileContents;                 }   The if ($parsed) {...} is there so the page can be fetched un-parsed for editing purposes. Obviously that is a cut down version, but I hope that shows enough. If I load a page with the code  Hello World
 <?php echo 'Hello World'; ?>   from the database the output I get is  Hello World
 <?php echo 'Hello World'; ?>   however, the same code stored in a file outputs      Hello World     Hello World   I have tried using eval(), but that will only evaluate PHP code, and fails when I include the HTML/PHP mixture. Maybe there's a better way of going about this (storing it, executing etc), but this is the issue as I currently see it.


A small display bug in the reputation graphics in Edge browser only

My reputation graphic show the diagram below.  I think the year columns 2016-2019 are not displayed well. Is this a (small) bug?  I'm using Microsoft Edge:  Microsoft Edge 44.17763.771.0 Microsoft EdgeHTML 18.17763 (C) 2018 Microsoft   Windows version:  Windows 10 Enterprise version 1809


I am developing a website. I use ready template.this template contains many css files with many css rules. But I have few pages and I am sure I didn't use all selectors. Is there any tool exist for scanning project HTML files and finding unused css rules and remove them ?  I found  that says :   is a firefox plugin that finds unused selectors.  But its not compatible with FF6 and seems it just review current viewing page and not scans whole website files.


I am trying to extract IPs from a huge web generated list which contains a mix of text, IPv4 & IPv6 IPs, newlines, IP ranges etc.  Below is a snippet from the list:   ; Spamhaus DROP List 2016/07/03 - (c) 2016 The Spamhaus Project ; http://www.spamhaus.org/drop/drop.txt ; Last-Modified: Sun,  3 Jul 2016 21:18:32 GMT ; Expires: Sun, 03 Jul 2016 23:26:45 GMT  1.0.1.0/24 223.223.176.0 129.130.100.100 1.160.118.30 91.121.120.228 # 2016-07-05, ns350944.ip-91-121-120.eu, FRA, 1                         62.210.111.59 # 2016-07-05, sender9p2.offresduweb.fr, FRA, 1                             52.90.253.169 # 2016-07-05, ec2-52-90-253-169.compute-1.amazonaws.com, USA, 13                   2a01:4f8:200:2153::2 # 2016-06-27, 2a01:4f8:200:2153::2, DEU, 2                                 2601:1c1:8801:618c:9864:3f33:7569:38c4  # 2016-06-28, 2601:1c1:8801:618c:9864:3f33:7569:38c4, USA, 2 #last updated 2016.07.04 1733 UTC  1.0.1.0/24  China 1.0.2.0/23  China 1.0.8.0/21  China 1.0.32.0/19  China 1.1.0.0/24  China   For a bigger snippet, please see  This is not the full list btw, as the actual one has over 44k lines.   What I'm trying to do is to get only regular IPs (IPv4) from the list.   Here is what I ran against the above:  grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'   and it gives me:  1.0.1.0 223.223.176.0 129.130.100.100 1.160.118.3 198.55.103.144 etc etc   Now, this is fine but I don't want anything that ends in '.0' ( eg 1.0.1.0 or 223.223.176.0) as they are IP ranges and not actual IPs. So I piped the output of the above grep to an awk statement which strips off all the IPs ending in 0.   The grep (IPs) | awk (remove those that end in 0) solution works, but I'd like to know if there is a better way to do it and minimize the use of multiple piped greps (or sed/awk).


There seem to be several different scoring systems for fields/cities in Carcassonne -- which is correct?

It seems that the scoring for fields and cities in Carcassonne varies -- has this changed over the years, or is this a difference between the US and international versions? Are there generally-accepted correct scoring rules for fields and cities?


Deriving 2nd order passive low pass filter cutoff frequency

I'm working on a 2nd order passive low pass filter, consisting of two passive low pass filters chained together.         – Schematic created using   Let \$ H(s) = H_1(s)H_2(s) \$ where \$ H_1(s) \$ and \$ H_2(s) \$ are the transfer functions for each separate filter stage.  Then \$ |H(s)| = |H_1(s)||H_2(s)| \$  Knowing the magnitude of a passive low pass filter,   $$|H(s)| = \dfrac1{\sqrt{ (\omega R_1C_1)^2 + 1} } \times \dfrac1{\sqrt{ (\omega R_2C_2)^2 + 1} } = \dfrac1{\sqrt{((\omega R_1C_1)^2 + 1)((\omega R_2C_2)^2 + 1)}} $$  Then trying to find the cutoff frequency:  $$ \left(\dfrac1{\sqrt{2}}\right)^2  = \dfrac1{\sqrt{((\omega R_1C_1)^2 + 1)((\omega R_2C_2)^2 + 1)}} $$ $$ 2  = \sqrt{((\omega R_1C_1)^2 + 1)((\omega R_2C_2)^2 + 1)} $$ $$ 4  = ((\omega R_1C_1)^2 + 1)((\omega R_2C_2)^2 + 1) $$ $$ 4  = (\omega R_1C_1)^2(\omega R_2C_2)^2 + (\omega R_1C_1)^2 + (\omega R_2C_2)^2 + 1 $$  And I'm stuck. Research on the web tells me \$ \omega_c = \dfrac1{\sqrt{R_1C_1R_2C_2}} \$, but I can't find why? Can anybody show my the derivation to find this?


GREP / SED or AWK: Print entire paragraph in a file on pattern match

I have a file with hundreds of paragraphs of around 15 lines each. I need to search for a pattern, say Occurrence: 1. If this pattern is found in the para, I need to print the entire paragraph. Note that the paragraphs are separated by 2 new line characters.  I have tried the below line of code and this obviously prints the first occurrence in the file. I am somehow unable to use a loop and print all such occurrences.  sed -n '1,/Occurrence: 1/p' ystdef.txt | tail -9 > ystalarm.txt   Can I use the g (global) flag with sed to make this work? If yes, how?  Note that I am aware of the grep -A/B/C commands but they wont work on my Cygwin terminal.


A query that lists all mapped users for a given login

When looking at the properties of a particular login, it's possible to see a list of users mapped to that login:   I profiled SQL Server Management Studio (SSMS) and I see that SSMS connects to every database one at a time and retrieves information from sys.database_permissions  Is it possible to write a single query that retrieves the user mapping information shown above or am I forced to use a cursor or sp_MSforeachdb or something like that?


Is there an example of a new species through mutation breeding?

Is there a demonstrable species that went through mutation breeding and through successive generations it drifted so far away from its initial parent species that it can't breed with them anymore? (I assume it would need to be able to breed with intermediate generations though). Also by "demonstrable" I mean a case where we can directly demonstrate this process by starting from a parent species to a new species and not establish this relationship by looking back (like observing the connection between corn and teosinte through genetic information). Edit: I'm mainly curious about postmating/post- zygotic reproductive isolation. As I understand, the timescale of us is not enough to observe that kind of speciation (we can either directly observe the start of the isolation or the end of it but not both), that's why I'm curious about whether induced mutation could speed up the process enough to directly demonstrate speciation by the most difficult to achieve definition. I have checked the thread  but it seems to me that those results only shows premating isolation. I have checked:  article which says, that postmating barriers observed may be due to postcopulatory-prezygotic mechanisms. Thank you for the corrections, Im reading into


Does conservation of energy hold in quantum mechanics?

Say we have a particle in an infinite deep well that is $V(x)=\left\{\begin{array}{ll}0 & 0 \leq x \leq L \\ \infty & \text { elsewhere }\end{array}\right.$. The energies corresponding to various states are given as $E_n=\frac{n^{2} \pi^{2} \hbar^{2}}{2 m L^{2}}$.This means that the particle can have different energies upon different measurements. But this goes against the rule that the total energy of a system remains constant,because if I measure the energy now it's something and later on it may be something else, violating conservation of energy! Where am I wrong?


Run a command in a shell and keep running the command when you close the session

I am using Putty to connect to a remote server. What I want to know is if there is any way to write my commands and allow them to keep running after I close the session with Putty. The reason for this is that I do not want to keep the computer ON all the time. Is there any way to do this?.  Update with the solution  For my question as it is presented the best solution is use one of the commands provided such as nohup, because you do not have to install any additional software. But if you are in the same problem use screen, install it and use it. It is amazing.  I have selected the answer of Norman Ramsey as favourite because propose several solutions using commands and screen. But please check the other answers specially the one of PEZ, then you get an insight of what screen is able todo.


How to add programs to the Unity Launcher or Ubuntu Dock?

How can I add new programs to the launcher (or the dock in Ubuntu 17.10 and later) in Ubuntu?


Is there any evidence to suggest that subatomic particles have 3D physiscal size?

What I'm asking is do subatomic particles like a proton have a volume or any 3 dimensional size? Or are they just points?


I have upgraded from blender 2.79 to  2.83.1, and then I can not grab mesh, only the origin dot is moving but the mesh stay in place. This was working with 2.79 version.


Proof of an inequality by induction: $(1 + x_1)(1 + x_2)...(1 + x_n) \ge 1 + x_1 + x_2 + ... + x_n$

Let $n \in \mathbb N^+$. Show that if $x_1, x_2, ... , x_n$ are $n$ real numbers such that $-1 \le x_i \le 0$ for each $1 \le i \le n$, then $$(1 + x_1)(1 + x_2)...(1 + x_n) \ge 1 + x_1 + x_2 + ... + x_n$$  I am using a proof by induction, but I am unable to complete it. I would appreciate any tips on how I could finish the proof.   Incomplete Proof Let $P(n)$ be the proposition that $(1 + x_1)(1 + x_2)...(1 + x_n) \ge 1 + \sum_{i = 1} ^ n x_i$. When $n = 1$, LHS = RHS = $1 + x_i$. Clearly $1 + x_i \ge 1 + x_i$ and so $P(1)$ is true. Assume that $P(k)$ is true, i.e. $(1 + x_1)(1 + x_2)...(1 + x_k) \ge 1 + \sum_{i=1}^k x_i$. Case 1 Suppose $x_{k + 1}  = -1$. Then $1 + x_{k + 1} = 0$, hence LHS = $(1 + x_1)(1 + x_2)...(1 + x_k)(1 + x_{k+1}) = 0$. RHS = $1 + x_1 + x_2 + ... + x_k - 1 = x_1 + x_2 + ... + x_k$ which is always nonpositive since each $x_i$ is nonpositive. Hence RHS $\le 0$ and so LHS $\ge$ RHS. Case 2 Suppose $x_{k+1} = 0$. Then $1 + x_{k+1} = 1$, hence multiplying it to LHS does not change anything. Also, adding $x_{k+1}$ to RHS does not change anything. Therefore, LHS $\ge$ RHS still holds. Case 3 Suppose $-1 < x_{k+1} < 0$. Then $0 < 1 + x_{k+1} < 1$. Adding $x_{k+1}$ to RHS makes the RHS smaller since $x_{k+1}$ is negative. If LHS $= 0$, then multiplying $1 + x_{k+1}$ to LHS does not change anything, and so LHS $\ge$ RHS holds. If LHS > $0$, then multiplying $1 + x_{k+1}$ to LHS makes the LHS smaller since $0 < 1 + x_{k+1} < 1$. In this case LHS $\ge$ RHS does not necessarily hold? ...


Time Machine keeps asking me to create a new backup, even after I fixed the sparsebundle

I repaired my Sparsebundle on my Time Machine server . I edited the com.apple.TimeMachine.MachineID.plist file and the com.apple.TimeMachine.MachineID.bckup as one of the commenters on that post said that was necessary for his to backup to work again.  However, just moments after starting up the backup, I get the Time Machine error that my last verification failed and I need to create a new backup.  I checked my plist file and Time Machine changed the VerificationState from 0 to 2, obviously without performing another verification.  It seems as if Time Machine is reverting to a previous plist file, or there are other places changes must be made to continue backups. I followed the steps exactly in the post, but still cannot backup to my sparsebundle.  I also tried removing the plist and bckup files, re-running the backup, but the files were simply recreated nearly instantly, and moments later I got the same error that my last verification failed and I need to create a new backup.  I am running macOS Sierra. What could I be missing?  Other users on Ask Different have suggested that my question is a duplicate of , but it is not. I understand why Time Machine initially asked me to create a new backup. I have found that many people have solved the initial problem by , however there appears to be more to it. The top upvoted answer suggests I follow the same instructions I have already followed, and while I was able to repair the sparsebundle, my specific issue is that Time Machine does not recognize the plist setting reset and immediately asks me to create a new backup. The question is why won't my plistsettings take affect and allow me to run a backup?


was tying to create a <input type="button" /> in drupal 8, below code snippet  $button['button'] = array(     '#type' => 'button',     '#value' => $this->t('#Clear'), );   followed by   render($button)   It's not working as expected. An input type submit is being created instead.    I have also check the example module for D8 , same thing occurs here.  How do I create an input type=button, any help ? , or am I doing some thing wrong ?


How to change Android's primary Google account

During the "in-app purchase" I am unable to switch the Google account I would like to use for "in-app purchase".  Currently, in order to change the primary Google account on Android operating system, we have the following ways:   Perform factory reset on our devices. Remove other Google accounts, leave only one Google account.   If we perform factory reset, we will lose all data that we have not backed up or unable to do backup. And, we have to re-install the applications that we need to use.  If we choose to remove other Google accounts from our systems and leave only one Google account, if there are applications installed from Google Play Store by using the Google account that we want to remove from our systems, then we will not be able to remove the account from the system unless we remove those applications. However, sometimes we may forgot which account we used to install an application from Google Play Store.  My question is that is there any other way to switch between the accounts?


What is the difference between "talk to" and "talk with"?

Does the  meaning of "talk to" and "talk with" relate to their one-side or two-side conversation?


Can C# be used in embedded environments?

As I'm learning C# and my budding interest in embedded devices, I wondered If I can use C# in an embedded environment. How is C# going to help us in the realm of the Internet Of Things.  Note: The only question I found that resemble  this is this one:   But this question has been asked 3 years ago. Obviously many things have changed since then.


Suspended for deleting old unanswered questions?

I got this message: Sorry, we are no longer accepting questions from this account. See  to learn more.  Now I'm a little paranoid, so sorry if I am violating some other rule at this moment.  Is there any way to tell exactly why I was suspended from asking questions?  The link has a list of possible reasons, not 'the' reason(s).  Perhaps one reason is that I have been deleting my unanswered questions.  I felt I was being good by cleaning up after myself.  I ask a lot of questions that nobody knows the answer to.  Is it better that I just leave them?  I also had one or two messages moved to serverfault.com.  I'm very sorry for whatever else I did.  But I will say that I do not understand the logic against self-deletions.  I delete items that are unanswered, and I do not see how it is my fault that nobody knows the answer to some of my questions.  At any rate, if that is against the rules then I will stop doing it.  I'm just a little curious.  Thanks, Dave


Changing processor and motherboard but keeping same Operating System setup,etc

I want to upgrade my Processor and Motherboard but I want to keep the OS setup(dual boot for Ubuntu and Windows7) intact.   Is it possible? What are the problems faced, if any?


How to create vertical Bullet Graphs with PSTricks?

I was looking for a package to create bullet gauge graphs, but I couldn't find any. A good person in this forum show me how he would make it in TikZ, with a little options.  I was waiting any moths but no package appear to make this fantastic kind of graphs with LATEX, so...  A bullet graph looks like this:   and an sample description/specification can be found   It is available in Mathematica 9 (), with multiple details (but only in horizontal, it´s a pity!! vertical is very usefull )  How you would create this kind of graphs (preferent in vertical) in a easy way with PSTricks in LaTeX (like Matehmatica 9 or similar)?  I hope that a package to do this kind of graphics appear!  You can see the  I´m only interested in the options of the simple graphs that you can see in the first little image. At most, any color changes.


Is the word "data" now considered singular? If so, what about "datum"?

I know that the singular of data is datum. I know that data is a plural.   However, common usage of the word "data" suggests it is used as a "collection of data".     Here is [the collection of] data.   In which case, is the word data now a singular again, or still the plural? If so, what is the correct use of the word data and datum now?


eGPU Vega 56 (Blackmagic) Mac + cycles problem

Hello I just got the AMD Radeon RX Vega 56 (blackmagic eGPU Pro) yesterday  plugged it in to my brand new Mac mini (Mojave), it shows up in the menubar and as an alternative as a render engine,. My question is, can I use this eGPU for cycles renders? (Blender 2.80)  Very grateful for your responses.


How can I find an international flight number?

I need to know the flight number for the flight to Orlando, Florida, from Gatwick in London, UK in August 2011, via Virgin Airlines, that I missed, but I don't know how to find it. Where can I find the flight number?


Admin Filter - Add Post Type Description on Post Type Page

WordPress allows adding descriptions to Custom Post Types whenever it's registered. ( . I would like to output that title on the Admin Landing Page ( View All Post Type ) preferably underneath the title. I've looked into /wp-admin/edit.php but I'm not sure if the filter presented is usable in this case ( and thus it may not be possible to do ).   is where it looks like the actual title gets set. Is is possible / is there a way to filter into it and add my post type description?


Show $\ln2 = \sum_\limits{n=1}^\infty\frac1{n2^n}$

Problem:  Show that $$\ln2 = \sum_\limits{n=1}^\infty\frac1{n2^n}.$$  My progress:  The problem before this one had me find the Taylor series for $\ln(1-x)$ which was $$-\sum\limits_{n=1}^\infty \frac{x^n}n$$  so I figured I'd use $x=-1$ and plug that into the Taylor series. However, there was a side note stating that the Taylor series I found is only valid for $x\in(-1, 1)$. And in any case, my calculation isn't going anywhere, since I end up with the series $1-\frac12+\frac13-\frac14\cdots$  Question 1: How can I use this to solve the problem stated initially, and in the title?  Question 2: I can see why $x$ is restricted to be less than 1, to prevent taking the log of zero or a negative. Why is it not valid for x greater than 1?


I need to show somebody a website running on my local machine tomorrow. Normally I'd accomplish this by port forwarding on my local router but thanks to failing hardware and its replacement being awful, my current router doesn't let me do port forwarding.  So stuck with this delay and not wanting to push the whole thing onto a proper server, I had a crazy idea: Can I just forward my port to an external server over SSH?  I've done port tunnelling before but I usually do it the right way around:   I connect to a remote box and ask that port 12345 shows up on my local machine at port 12345. I start something on P12345 on the remote machine I can access it via localhost:12345   What I want to do:   Connect to a remote PC and ask that that its local P12345 fetch things from my local P12345 (over the tunnel) I start something on my local computer on P12345 Other people can access remote:12345 and see my localhost:12345


When I use contextual filters in a view, I can select an option to display a summary when the argument is not present. If I do it, it shows a list of node IDs instead of titles. For example, I get the following output, where the first number is the node ID, and the second number is the count of nodes.   1256 (12) 4323 (723) 5643 (34)   I want is to rewrite the output and replace the node ID with its title. ViewExecutable has a $args property I can check to know when the argument is not present.  How could I achieve this in a hook? In Drupal 7 I could use hook_views_post_execute(). I modified $view->result and changed it on my own.  I tried to do the same with Drupal 8 and the same hook, but hook_views_pre_render() gets a ViewExecutable object, and I don't know how to change it. I used the following code.  function MYMODULE_views_pre_render(ViewExecutable $view) {   if ($view->id() == 'myidoftheview') {     $results = $view->result;     foreach ($results as $result) {       \Drupal::logger('myview')->notice('<pre>'.print_r($result,TRUE).'</pre>');       // What code should I write here?     }       } }


How to store data into list with JavaScript?

I want to store these information into my list called QuizList.  I have the following code:  var dtm = new Date();  var itemCreateInfo = new SP.ListItemCreationInformation();  var listItem = resultList.addItem(itemCreateInfo);      listItem.set_item("Student", UserName);     listItem.set_item("TestDate", dtm);     listItem.set_item("Score", (score / testQuestions) * 100);     listItem.set_item("QuizID", currentQuizItem.get_id());     listItem.update();     context.load(listItem);  context.executeQueryAsync(function () {         $('#TestUI').fadeOut(500, function () { $('#TestReport').fadeIn(500, null)   How can I save these information into my QuizList? Any suggestion?


I had a question I was hoping for some help on:     Find all of the subgroups of $A_4$   Here is what I know:  $A_4$ is the alternating group on 4 letters. That is it is the set of all even permutations. The elements are:  $(1), (12)(34), (13)(24), (14)(23), (123), (132), (124), (142), (134), (143), (234), (243)$   which totals to 12 elements. Which means, the subgroups should have order 1,2,3,4,6 and 12. The groups of order 1 and order 12 are trivial. I also know the groups of order 2 which are:  $[1,(12)(34)], [1, (13)(24)], [1, (14)(23)]$  but would someone be able to help me find the subgroups of order 3, 4 and 6 and be able to provide a good, easy explanation of how you got to them for me? I'm pretty sure there is no such groups of order 6, but I don't know how to explain why.  Thank you so much for your help in advance, I really appreciate it!


Removing an empty string from an array logic

I am new to node JavaScript and do not understand the syntax too much. My code   console.log(index+ "\t" + output[index]);   Outputs empty strings in my array.  So I have created a new method  var array = removingEmptyString(output[index]); function removingEmptyString(array) {     var newArray = [];      for(var i in array)         {             if(i != "" || i != null || i != " ")                 {                     newArray[i] = i;                 }         }      }   What I do not understand is if I declared my arrays correct? Also if I passed int he array into the removingEmptyString correctly, also if declaring the new array and inserting the non empty string into that array are correct?


After ankle replacement surgery ,the pain was gone. Why can’t we use the article ‘an’ before ankle?

Is the word replacement in my question is uncountable? But how?


How do I verify a block can be shown in the current page?

I created a normal block and configured it using the following settings.         I don't want to show the block on node/2 and node/3, for example. I want to get the block render, but verify first the block can be shown on the current page.  // 1 is the block ID. $block = block_load('block', 1); // I want to verify if the block can be shown on the current page before getting the renderable array. $renderable_block = _block_get_renderable_array(_block_render_blocks(array($block)));   I can verify $block->pages contains the path for the current page, but I think there is a proper way to do that. I am sure there is a core function to which I can pass the block object and the current path.    What core function should I use to verify the block is visible in the current page?


What is needed to make Euclidean spaces isomorphic as groups?

Consider the abelian groups $G_n=(\mathbb R^n,+)$ for $n\geq1$.     Claim: For any $n$ and $m$ the groups $G_n$ and $G_m$ are isomorphic.   This claim is true if one assumes the axiom of choice, and I have sketched a proof below. But this claim seems much weaker than the axiom of choice, which brings me to the following questions:   Are there any milder extensions of ZF that make the claim true? If the claim can be proven with some other axioms, what does the proof look like? Are there any known  axioms that make the claim false? Does the claim have any interesting (set-theoretical) corollaries?   This claim was also considered in  earlier post, but from a different point of view.    A sketchy proof of the claim:  $\newcommand{\Q}{\mathbb Q}$ The groups $G_n$ are naturally vector spaces over $\Q$. It is easy to check that the claim is equivalent with $G_n$ and $G_m$ being isomorphic as vector spaces over $\Q$.  All vector spaces have a Hamel basis; let the basis of $G_n$ be $B_n$. Thus $G_n=\Q^{(B_n)}$ (brackets meaning only finitely many nonzero components). But $|\Q^{(B_n)}|=|B_n|$ since the basis is infinite, so $|B_n|=|G_n|=|\mathbb R|$.  There is a bijection between the bases of the vector spaces $G_n$ and $G_m$ since they have the same cardinality. This gives a linear bijection between them.


Is there a difference between "Joe said" and "said Joe"?

Does the subject/verb order make a difference when writing a dialog tag?  "The sky is blue," Joe said. "The sky is blue," said Joe.  Is one preferable over the other? Does one emphasize the speaker (or the method of speech, such as shout) more than the other? (Personally, I would use the second form to emphasize that Joe made the statement)


Hello I'm trying to make a jar executable using chmod a+x jarname.jar, no errors. But when I try to execute it it's not executable. .. help plz, I'm on Xubuntu, trying to execute the jausing DOUBLE MOUSE CLICK  When e double click it it shows me this:


Which theorem is used to reduce a linear congruence here?

$21x \equiv 49 \pmod{10}$? 21 % 10 = 1 and 49 % 10 = 9 So we can rewrite this as $1x \equiv 9 \pmod{10}$ But which theorem shows that we can substitute the LHS & RHS with the remainder?


Does TexShop have "realtime" pdf previewing?

Is TexShop supposed to have "realtime" pdf previewing? I can press typeset to get a pdf preview but any further edits do not show up. Is there a way to make it happen (I think oveleaf has this feature). Or are there any other latex editors that have this feature? Also random question, but why does the pdf preview in TexShop have a grey background instead of a white one?


linux + how to capture values from xml file

I want to capture all values from this xml file and print the values in file as out1.txt  remark - value from the xml mean the word in the double bracket     more input.txt   <app name="UAT/ECC/Global/MES/1206/MRP-S23"   ear="UAT/ECC/Global/MES/1206/MRP-S23.ear" xml="UAT/ECC/Glal/ME/120/MRP-  S23.xml"/>  <app name="OQ/ediedbn/adSFSF/adSFSF-CL" ear="OQ/ebn/aSF/adSF- CL.ear"  xml="OQ/ediedbn/adSFSF/adSSF-CL.xml"/>  <app name="OQ/ediedbn/adaEBS/adOrBS-HR-CL"  ear="OQ/ediedbn/adOraS/araEBS- HR-CL.ear" xml="OQ/eddbn/aOraEBS/adOEBS-   HR-CL.xml"/>  <app name="UAT/CZ/LIMS/T068_01/LIMS-QA-S03" ear="UAT/CZ/LIS/T068_01/LIS-QA-     .ear" xml="UAT/CZ/LIMS/T068_01/LIMS-QA-S03.xml"/>   .  more out1.txt  UAT/ECC/Global/MES/1206/MRP-S23 UAT/ECC/Glal/ME/120/MRP-S23.xml OQ/ediedbn/adSFSF/adSFSF-CL OQ/ebn/aSF/adSF- CL.ear . . .   please advice how to capture the values in the out1.txt file with awk / perl one liner , bash


I bought an old computer with the wrong adapter

I bought a new second hand computer with probably the wrong adapter. It's a 30 euro laptop with Windows Vista on it. The girl who sold it to me told me you have to wiggle the plug a little and then it charges. It does. But I have an old adapter from my old crashed laptop which plug fits perfectly into the slot. Also if I look at the back side of the laptop, the current there is exactly the current on my old charger. So I am 99% I can try that old charger on that newly bought second hand laptop without the risk of blowing things up, right?  To rephrase the devices are:   Newly bought second-hand laptop: 19V 3.42A The non-fitting adapter I got with it:23V 2.50 A My old adapter I still got from another laptop: 19V 3.42 A   Question 1: Should I try to use my old adapter rather then the non-fitting thing I got with it?  Question 2: How come the non-fitting adapter does charge that?


flush on the board in texas hold'em poker

Sherry:Q◇Q♧  Loren:7♡8◇  Board:10♤9♤2♤A♤3♤  Is this a split or does Sherry win and why?  Thanks Tammy


In which Windows startup mode should I scan for adware?

I think my Acer Windows 7 64-bit PC is infected with adware because even though I customize my browser settings within seconds it changes to the previous setting. Also the message Not Responding shows in the title bar of both Internet Explorer 11 and Firefox. I have deleted Opera and Chrome due to the same issue hoping for a solution but the problem still persists.    I plan to start my PC in either Safe Mode or Safe Mode with Networking to scan my PC using AdwCleaner, Malwarebytes Anti-Malware and Combofix one by one.  Which mode should I use? Should I delete all those displayed in the result log?


CASE Statement Returning NULL instead of Empty String (Oracle 19c)

I'm probably missing something simple here: I have a row where both of the following fields are NULL for id = '123': select current_award_date_from, current_award_date_to from plans_t where id = '123';  Then I have another Select which is a CASE where I need to return a String based on these 2 fields. For id=123, since both fields are NULL, I fall into Case #3 where I should return an Empty String (''). But instead I'm getting a NULL. select ( case when p.current_award_date_from is not null and p.current_award_date_to is not null       then p.current_award_date_from || ' to ' || p.current_award_date_to      when p.current_award_date_from is not null and p.current_award_date_to is null      then p.current_award_date_from || ''      else '' end) from plans_t p where id = '123'  --> returns NULL, not '' when both checked fields are NULL


A good modern introduction to the information theoretic view of entropy?

Jaynes wrote a paper called information theory and statistical mechanics (1957). I tried to read this but found it somewhat hard to follow, and I suspect it's because it's one of the earlier works, and that a modern text might be more refined since we've had time to work it out. On the other hand, what I've read from physics textbooks don't explicitly talk about information theoretic concepts like shannon entropy.  Is there a good modern introduction to the information theoretic view of entropy?


How to write <?php into a answer in Stackoverflow?

I tried to answer a question and putted: "< ? php" (no blanks between it) into a answer here in stackoverflow. But it does not work; i read about the advanced formatting but did not find the hint or explanation how to solve this.  Surely someone will know this.


How do I get the (x, y) pixel coordinates of the caret in text boxes?

I am using jQuery and trying to find a cross browser way to get the pixel coordinates of the caret in <textarea>s and input boxes such that I can place an absolutely positioned div around this location.  Is there some jQuery plugin? Or JavaScript snippet to do just that?


How to execute an .exe file including blank spaces in it

So normally I have several *.bat files to automate some things in my computer.   But I'm kinda stuck in this call...  cd "C:\Users\user\AppData\Local\Programs\program2Execute" start program has spaces.exe   I don't get the app executed, instead I get a cmd window with the cd command result, nothing else. I tried to quote "program has spaces.exe" but it doesn't get executed I get the window duplicated instead.   Apologize if this is kinda dumb to ask, but I have spent quite time looking for the answer.  Thanks in advance.


$f$ differentiable, $c\in(a,b)$ $\Rightarrow \exists x_1,x_2$, $a\leq x_1<x_2\leq b$ : $f'(c)=\frac{f(x_2)-f(x_1)}{x_2-x_1}$.

I've been trying to prove or disprove the following statement:     Let $f$ be a continuous function on $[a,b]$ and differentiable  on $(a,b)$, and let $c\in(a,b)$. Then there exist $x_1, x_2$ such that $a\leq x1<x_2\leq b$ and $f'(c)=\frac{f(x_2)-f(x_1)}{x_2-x_1}$.   Something seems pretty odd here. At first I thought it was just a manipulation of the Mean Value Theorem, but then I saw the difference ("there exists $x_1$ and $x_2$" instead of "there exists $c$"). I tried to think whether this makes the statement wrong or not, but I couldn't think of a counterexample. Of course, the statement might be true.  Thanks!


Adding images in Text Annotations using QGIS?

I would like to add an image in a zone, on the map, to show that an event ocurred. I don't mind if it is in an Annotation Text or any other functionality.  Is it possible somehow in QGIS?


How to center a div vertically from a unknown dynamic height?

In my code there could be hundreds of elements depending on how much images is added to the pages, meaning the height of the page could be between 0 to 1000s or even more.  How would I center a overlay div in the middle of the page. The webpage is more or less trying to mimic Instagram, you can have hundreds of images but once you click on one of them the overlay is still set in the middle of the page.  This is the main div for the overlay of the images. this div works fine as long as the page is no longer than the view height of the page, if the height is too large that you have to scroll down, then it will mess with the position of the vertical. I know this problem is because im setting the bottom to 15% so it takes in consideration the entire height value. But I dont know how I can fix that.  .overlayImgContainer{         position: absolute;         height: 70%;         width: 120%;// (page is set to 960px this add a bit more room)         z-index: 1;         bottom: 15%;         left: -10%;         background-color: rgba(0,0,0,0.5);         overflow-x: hidden;         border-radius: 5px;         text-align: center; }


Did something change in the behavior of blocking users' votes if they don't have sufficient rep to vote?

I've just noticed that if you try to vote without having a privilege to vote, you're greeted with such message:        So, that's interesting. Does it mean that if I gain 125 (or 15, in case I'm upvoting not having 15 reps) rep on that site, my "suggested" vote goes public and until then it would be recorded as it's done with anon feedback?  And until this change, the votes weren't recorded as anonymous, or has the new message saying that it acts as feedback been added just to not upset users?


Ubuntu GNOME. GDM doesn't work after installing nvidia drivers

Installed Ubuntu GNOME 16.10 yesterday, but after installing nvidia driver from software & updates the system wouldn't boot. I get the screen saying (numbers are slightly different):   dev/sda1: clean, 291272/4292608 files, 480345/18174432 blocks   Did some googling, found a few people solving similar issue by switching to lightdm. That worked (I was able to boot), but I was getting a ton of artifacts before and after the login screen, so I've tried to get the GDM to work.  Removed nvidia*, reinstalled it, re-downloaded gdm and ran:  sudo dpkg-reconfigure gdm sudo service lightdm stop       after which the desktop turned off, but I was able to Ctrl+Alt+F1 and  sudo service gdm start   Now that actually worked yesterday, I did reboot a few times and got the login screen every time. However, it's not working today for some reason.  How do I make GDM work with nvidia drivers?  I am very new to Linux, in fact that is the first time I'm installing it.


I have been trying to imitate the gold standard of curries; The British Indian Restaurant (BIR) Chicken Madras and have had some success. I have made the base-curry sauce as per the books and it works out OK but there is a lot of preparation and the taste is not quite there. One thing about BIR Madras is that is it always savoury.  When I follow homemade curry recipes I always find that my curry is too sour from the tomato, so I have taken to adding chicken stock (using Knorr cubes) and my curry is starting to approach my goal. Can anyone suggest ways of making my curry even more savoury? EDIT: This is my recipe, which won't surprise many people.  Marinade chicken breast in yoghurt and lemon for 30 mins in the fridge. Rinse off marinade and partially fry the chicken and set aside. Fry onion in Ghee until it starts to brown. Add garlic and ginger paste.  Wait 2 mins. Add dried kashmiri chillies. Stir in spices; coriander powder, cumin, garam masala, hot chilli powder, tumeric and fenugreek powder.  Wait 1 min. Add 1 mug chicken stock (1 Knorr cube). Add tomato passata. Add chicken back in and cook for 15 mins or so.  EDIT 2: I have seen several places that the garam masala should go in last; I will actually do that next time.


I've been trying to use Pitivi to edit videos, but so far have been completely unable to persuade it to render them at anything like the source file quality  For example: Source file 1 minute length, bitrate 13.5Mb/s, file size 116.6MB.  I have tried numerous settings on Pitivi and no matter how high I set the bitrate it flatly refuses to go above a bit less than 4Mb/s - file size around 19MB.  I'm happy for the output to be .avi, .mkv, .mp4 or anything similar(but not .mov!).  Is Pitivi really incapable of producing high quality videos, or am I missing something?  Thanks


I need to force a selected application to start up each time my Android-based device is (re)started.  Is there anything I can use (configuration setting, external application etc.) to accomplish this task? Or is this kind of behavior limited to home screen managers only?


Package inputenc Error: Unicode character'(\U+0301) error

I am getting the following error in my project while using this .  Despite the error, my pdf is rendering fine. Should I worry about the error even though I do not see the unicode character in the line that the error is talking about?


Javascript Closures. Lexical vs function context.

My question is why the following code prints 1 instead of 500;    When the callback is invoked and it doesnt find the variable count, doesnt it first looked at the context of func1 ?   function func1(cb){   let count = 500   cb() }   let count = 1  function func2() {   console.log(count); }   func1(func2)


Assigning widths to string fields using writeOGR() from rgdal?

I am currently working with MapInfo files in the .tab format. I am using R (3.1.0 for Windows) to read and write files in this format, however, I am encountering an issue with writeOGR() from the rgdal package. When I write a MapInfo file in the .tab format, all the string fields are being assigned a width of 254 characters. This is very problematic for larger datasets with numerous string fields, as it dramatically increases the size of the output .dat file.  Below is an example:  require(rgdal) shape <- readOGR(dsn = directory, layer = "Up") writeOGR(obj = shape, dsn = directory, layer = "Up2", driver = "MapInfo File")   Here's an excerpt from the original Up.tab file:  !table !version 300 !charset WindowsLatin1  Definition Table   Type NATIVE Charset "WindowsLatin1"   Fields 52     ID Integer Index 1 ;     unid_planejamento Char (4) ;     codigo2 Char (4) ;     descricao Char (100) ;   And one from my modified Up2.tab file:  !table !version 300 !charset Neutral  Definition Table   Type NATIVE Charset "Neutral"   Fields 52     ID Integer ;     unid_planejamento Char (254) ;     codigo2 Char (254) ;     descricao Char (254) ;   Note that all the string fields have now been assigned a width of 254 characters. I should also note that the .dat file has gone from 43KB to 93KB.  I understand there are some  when writing MapInfo files, however, it is not clear to me whether or not this can be resolved by somehow controlling the string field width.  I have searched for ways to do so using dataset_options and layer_options, but have not been successful.   Is there a way of controlling the string field width using writeOGR()? And if not, is there a way of using R to write a new .dat file (from my understanding, this is a dBase III DBF file) with the appropriate string widths?


Some time ago, we announced that . This has gone well and we're extremely thankful to everyone for their support and feedback. Because it has been successful so far, we're going to be extending the program to the majority of our graduated sites. Well, we've pretty much already done that, but there are quite a few sites that have ads enabled, yet still display nothing. The thing is, we don't really have an abundance of clients offering products that a  would find relevant, but Amazon has stand mixers, a selection of super fine chinois, deliciously sharp cutlery and enough cast iron to fill the Gulf Of Mexico with . Beginning as early as this week (week of 5 February 2018), our ad team is going to be hand selecting affiliate ads to be displayed on select sites. The use of inventory will of course depend on the availability of relevant ads to display which means:  Some sites might see very few, if any ads. Some topics simply don't come remotely close to orbiting anything worth advertising. Furthermore, while graduated, some sites simply don't have enough activity for ads to make sense.  Since these are hand-selected, it could take a while for ads to appear initially.  These would of course yield to inventory from clients if clients had products that were relevant to any given topic.   Nothing changes when it comes to the . If you're used to occasionally seeing a community promotion ad, you'll just notice that you'll also occasionally see an ad for something that is likely to be of interest to someone interested in the topic that your site covers. In fact, to be clear, this is simply a continuation of the announcement we made in November of 2016. We just wanted folks to know that we're going to be continuing the program where there's good potential to show relevant advertisements, even if we don't have clients lined up with a demand for it. Where can I give feedback about a certain ad on [site]? Open a meta post on your per-site meta and let us know. Please remember, the bulk of advertisements are an effort to get something small back from folks that hit the sites through search engines and are extremely unlikely to ever become contributors. Their soufflé stopped falling, and we'll probably never see them again. Maybe we can get a few bucks once they realized that copper ions help egg whites stiffen properly and buy a bowl or a proper bloom whisk. However, you're the experts on these topics and we're very likely going to listen to you. What sites, specifically? Are any sites exempt? If you're a former Stack Exchange 1.0 site and / or subsequently joined the network under a special charter, nothing changes - don't panic :) For the rest, we're just extending what we're currently doing with ads on graduated sites to also include those where there's an opportunity to make sensible use of affiliate ads. If a site has less than 15k (average) daily visits, or fewer than roughly 50k combined total posts - it might not yet be time to invest in selecting ads to be shown there. But, part of this exercise is also seeing what works best. I don't really have feedback, just some suggestions Ads aren't just an opportunity to sell stuff, they're an opportunity to really show people that we understand a given topic. That, of course, makes suggestions from people that do that stuff every day quite valuable. Post on your per-site meta and our community / ad critters will take a look. Questions? Comments? Kvetches? Let us know in an answer or comment below. If anything about the plan changes, we'll update this post to let folks know.


I'm trying to freshen up for school in another month, and I'm struggling with the simplest of proofs!     Problem:      For any natural number $n , n^3 + 2n$ is divisible by $3.$   This makes sense      Proof:      Basis Step: If $n = 0,$ then $n^3 + 2n = 0^3 +$   $2 \times 0 = 0.$ So it is divisible by $3.$      Induction: Assume that for an arbitrary natural number $n$,   $n^3+ 2n$ is divisible by $3.$       Induction Hypothesis: To prove this for $n+1,$ first try to express $( n + 1 )^3 + 2( n + 1 )$ in terms of $n^3 + 2n$ and use   the induction hypothesis. Got it      $$( n + 1 )^3+ 2( n + 1 ) = (  n^3 + 3n^2+ 3n + 1 ) + ( 2n + 2 ) \{\text{Just some simplifying}\}$$      $$ = ( n^3 + 2n ) + ( 3n^2+ 3n + 3 ) \{\text{simplifying  and regrouping}\}$$   $$ = ( n^3 + 2n ) + 3( n^2 + n + 1 ) \{\text{factored out the 3}\}$$      which is divisible by $3$, because $(n^3 + 2n )$ is divisible by $3$   by the induction hypothesis. What?   Can someone explain that last part? I don't see how you can claim $(n^3+ 2n ) + 3( n^2 + n + 1 )$ is divisible by $3.$


Why is using a wild card with a Java import statement bad?

It is much more convenient and cleaner to use a single statement like  import java.awt.*;   than to import a bunch of individual classes  import java.awt.Panel; import java.awt.Graphics; import java.awt.Canvas; ...   What is wrong with using a wildcard in the import statement?


Do I need a Canada transit visa as an Indian citizen?

I am travelling from US to Bangalore (INDIA) via Canada, in Canada I have to change the flight from Air Canada to Ethihad airways and have layover time of 3 hours. I'm an Indian citizen. Do I need a Canada transit visa? I don't want to visit Canada.


I have seen the files /usr/share/gnome-control-center/keybindings but in these file there are only names...  i.e.  <KeyListEntry name="move-to-workspace-1" description="Move window to workspace 1"></KeyList    Entry>   But how can I find out the key combination (like Ctrl+.....)?


bash for loop to exclude a particular sub directory

I have a script that is performing a backup of directories using duplicity. We want to exclude some sub-directories from the 'for' loop. How do I achieve this?  Current script  backup_volume() { TARGET_URL=$1    for vol in /dir/*; do       VOLUME=$(basename $vol)       duplicitiy backupcommand...    done }   There are some sub directories inside /dir/ that we want to exclude.. any tips would be greatly appreciated!


Java question related to passing by value?

I created this bit of code to try and better understand some concepts in Java.  class S {     private String s;      public S(String s) {         this.s = s;     }      public S c(String s) {         return new S(this.s + s);     }      public void b(S o) {         if (this.s == o.s) {             System.out.println("ok");         }     } }  class M {     public static void main(String[] args) {         S s1 = new S("toto");         S s2 = s1.c("");         s1.b(s2); //1.         s1.b(new S("toto")); //2.     } }   At //1 (Changing it so user can understand) it prints ok as I expected it to, but at //2 it doesn't print ok (nothing) but I don't understand why. Isn't the variable s in S2 the same as the variable s in S1?