Under the 0-1 loss function, the Bayesian estimator is the mode of the posterior distribution

My notes are rather light when it comes to this topic. I understand that the bayesian estimator, defined as (for sample space $\hat{x}$):  $E[\Theta | \hat{x}] = \int_{ \forall \Theta}yf_{\theta|\hat{x}}(y|\hat{x})dy $ (ie. the mean of the posterior distribution).  You can then look at loss functions where the form of the loss function determines that of $\theta^{'}$ (the estimator of $\theta$). By setting the loss function as a quadratic, absolute error or zero-one you get $\theta^{'}$ as the mean of the posterior, the median of the posterior and the mode of the posterior respectively.   The first two proofs make sense to me but it is the 3rd that I am not sure about. This is my understanding:  $E[l] = \int l(\theta^{'}, \theta)f(\theta|\hat{x})d\theta = \int (\theta^{'} - \theta)f(\theta|\hat{x})d\theta $  If $\theta^{'} = \theta \Rightarrow E[l] = 0$  If $\theta^{'} \neq \theta \Rightarrow \int (\theta^{'} - \theta)f(\theta|\hat{x})d\theta = 1 $ (as integrating over whole domain of $\theta$).  This proof obviously isn't rigorous, (and it could be incorrect too). What I can't see regardless is how this can be regarded as the 'mode' of the posterior distribution.   Thanks in advance!


Let $P(x)$ be a polynolmial with degree $2009$ and leading coefficient unity such that $P(0)=2008,P(1)=2007,P(2)=2006,\ldots,P(2008)=0$,then the value of $P(2009)=n!-a$ where $n!$ is $n$ factorial,$n,a$ are natural numbers.Find $n+a.$    If i let $P(x)=a_{2009}x^{2009}+a_{2008}x^{2008}+a_{2007}x^{2007}+\cdots+a_1 x+a_0$ with $a_{2009}=1$,then it is very difficult to find $P(2009)$ with the given data.What should i do?


Is a totally ordered set well-ordered, provided that its countable subsets are?

Let $(X,⪯$) be totally ordered set, prove that if every non empty countable subset of $X$ is well ordered then X is well ordered.   It does seem obvious that any subset should have a minimum but I am not sure of how to prove it. Any help would be appreciated, and sorry I put up the same problem earlier but forgot to include the 'countable' subset.


I'm trying to load a page and put it inside a div.  code :   $("#test").load("page.php");   The problem is that once it's loaded, sometimes when I re-execute this script, it seems that the file 'page.php' is not really reloaded, seems that this file is keep in a cache or something like this.  It's really a problem because I have a PHP request inside this file it doesn't execute it.


How to perform a test using R to see if data follows normal distribution

I have a data set with following structure:  a word | number of occurrence of a word in a document | a document id    How can I perform a test for normal distribution in R? Probably it is an easy question but I am a R newbie.


How do I log the actual script's name in csvlog?

I have PostgreSQL CSV-log its errors according to this structure:  Sadly, from what I can tell, it neither includes in that example, or supports at all, dumping the actual script's file path as a field. This means that while I do know the application_name and other fields, I don't know which actual script caused the error, meaning my neat little HTML table which I create from this table is "blind" as to what exactly caused the error. For example:  could not receive data from client: An existing connection was forcibly closed by the remote host.  I can tell roughly which script caused that from the application_name, but I cannot build a link which would open the relevant script immediately, or make statistics about which scripts cause the most errors/log entries, to know what to prioritize fixing first. I first thought that I could just add my own column to the table, but then I realized that this won't help, since my script which does the COPYing of the csvlog data into my table has no idea from where the entries origin, since they are not logged by PG. I can't see any logical way around this unless PG after all does support a "file path" CSV log field. But since it's not included in the example, and not mentioned on that page (that I can see), the chances seem slim. It seems like a crucial field to me, though...


Is it possible to install a full copy of UBUNTU on a USB stick?

I want to run an identical ubuntu on USB that allows me to update. Afaik a live USB with persistent storage does not allow system file mods or updates.


Tricky question about binomial expansions.

State the binomial expansion of $(1+x)^n$  So I can do this $$(1+x)^n=\sum_{i=0}^{n} {n\choose i}x^i$$  Then given $n=2k$ is even. Derive an expression for   $$\sum_{i=0}^{2k} (-1)^i{2k\choose i}$$ this is where I am stuck cause this is the same as above with $x=-1$ so is the answer just  $$(1+(-1))^{2k}=\sum_{i=0}^{2k} {2k\choose i}(-1)^i=0^{2k}=0 ~\forall k\in \mathbb{N}$$?


Can/do you know what you are Counterspelling?

When I cast Counterspell I need to see the spellcaster and be in 60feet. But do I know what he is casting? If not can I at least get the School from which the spell Comes?


Bash Tab Completion: '-bash: unexpected EOF while looking for matching `)' -bash: syntax error: unexpected end of file

I'm trying to go into an irb session with specific environment variables from a file with this command:  $ env $(cat env.sh) irb   But when I try press Tab after I type env. to complete it, I get this following error:  $ env $(cat env.-bash: unexpected EOF while looking for matching `)' -bash: syntax error: unexpected end of file   Another interesting thing is that if I'm logged in as root, this error does not occur.   Here's the output of find ~ -uid 0:  $ find ~ -uid 0 /home/(redacted)/.rpmdb /home/(redacted)/.rpmdb/Group /home/(redacted)/.rpmdb/Conflictname /home/(redacted)/.rpmdb/Installtid /home/(redacted)/.rpmdb/Sha1header /home/(redacted)/.rpmdb/Providename /home/(redacted)/.rpmdb/__db.002 /home/(redacted)/.rpmdb/Requirename /home/(redacted)/.rpmdb/Sigmd5 /home/(redacted)/.rpmdb/__db.001 /home/(redacted)/.rpmdb/Obsoletename /home/(redacted)/.rpmdb/.dbenv.lock /home/(redacted)/.rpmdb/Name /home/(redacted)/.rpmdb/Basenames /home/(redacted)/.rpmdb/Triggername /home/(redacted)/.rpmdb/Packages /home/(redacted)/.rpmdb/Dirnames /home/(redacted)/.rpmdb/__db.003   Can anyone explain to me why this is happening and if so, how do I fix it in when I'm not a root user?


What do we mean by a ring and what is ringlike about it?

I see that a ring is a triple $(R,\cdot,+)$. I am confused by the terms abelian group and semigroup. Does this mean for $x \in R$ and $y \in R$, $x \cdot y$ and $x+y$ are defined?  If so, how is this a ring? When I imagine a ring, I think of some kind of cycle data structure. Like a matrix that is looped shape. Does this sort of thing come into play?  Of course, I should point out that I have not studied ring theory or anything. I just noticed the concept and I find it strange that a "ring" does not seem to be something resembling a loop.


Is there a way to query our internal DNS entries to discover all the CNAME entries that point to a particular server?  Edit: We're a Windows environment, Server 2003.


Conditional probability formula for continuous random variables

Let $V,T$ be two random variables with supports $\mathcal{V},\mathcal{T}$, respectively. Let    $P_{V|T}$ denote the probability distribution of $V$ coditional on $T$ $P_{V,T}$ denote the probability distribution of $(V,T)$ $P_{T}$ denote the probability distribution of $T$, $P_{V}$ denote the probability distribution of $V$ $P_{T|V}$ denote the probability distribution of $T$ coditional on $V$   Suppose that $\mathcal{V}$ and $\mathcal{T}$ are finite. Then,  $$ E(V|T=t)= \sum_{v\in \mathcal{V}} v P_{V|T}(v|t)= \sum_{v\in \mathcal{V}} v \frac{P_{V,T}(v,t)}{P_{T}(t)}=\sum_{v\in \mathcal{V}} v \frac{P_{T|V}(t|v)P_V(v)}{P_{T}(t)} $$ Moreover,  $$ \underbrace{E(V|T=t)\geq 0 \leftrightarrow \sum_{v\in \mathcal{V}} v P_{T|V}(t|v)P_V(v)\geq 0}_{(*)} $$ Now, I want to write condition $(*)$ (and in particular the right hand side)  when $V$ and $T$ are continuous random variables, without using probability density functions but only probability measures or cumulative distribution functions. Could you help?    My attempt: I managed to write $(*)$ when $\mathcal{T}$ is finite and $V$ is a continuous random variable: $$ E(V|T=t)\geq 0 \leftrightarrow \int_{\mathcal{V}} v P_{T|V}(t|v)dP_V(v)\geq 0 $$ But I'm struggling to extend to the case when also $T$ is a continuous random variable.


I am beginner in java and would like to clear an idea about variable initialization. Here is the code --  public class NumberSequence {   private static int n;   public static void main(String[] args) {     print(myTest());     print(myTest());   }    private static int myTest() {     n++;     return n * n;   } }   with two successive calls of the method myTest() the outputs are 1 and 4. So I understand that the default value of n is 0. So for the first call of myTest(), n would be incremented by one resulting 1 and then the multiply line will be executed, that is, 1 * 1 which is 1.  For the next call of myTest(), n will be initially 1, then it will be incremented to 2, then the multiplication, that is 2 * 2 which is 4   Now I am trying to do this --  public class NumberSequence {   public static void main(String[] args) {     int m;     m++;      int n = m * m;     print("n = " + n);   } }   Here it gives complier error that m is not initialized which is obvious. So my question is -- how come compiler doesn't complain in case of the first option where I created myTest() method. There I do not initialize the value of n. Is it the case that compiler is doing the initialization? I would like to get this clarification.


Russia (2000) contest:Prove the existence of a pair of rows and columns with intersections differently coloured

We have a $100\times100$ board divided into $10^4$ unit squares. These squares are coloured with four colours so that every row and every column has $25$ squares   of each colour. Prove that there are $2$ rows and $2$ columns such that their $4$ intersections are painted with different colors.   My attempt:  I first counted number of pairs $\mathcal P$ $(r_1,r_2)$ such that $r_1,r_2$ belongs to same row, but different in colour. This can be done in $$\binom 42\times25\times 25$$ ways. So, in $100$ rows, this number is $$100\times\binom 42\times25\times 25$$ Now, we can find a pair of columns in $$\binom{100}2$$ ways.  So, by Pigeonhole Principle, we can find at least a pair of columns containing $$\left\lceil\frac{100\times\binom 42\times25\times 25}{\binom{100}2}\right\rceil\\=\left\lceil\frac{100\times75\times 50}{50\times99}\right\rceil\\=76$$ of those pairs $\mathcal P$.    But unable to proceed anymore. And this approach too seems misleading, because in every pair of columns, we can always find $\binom42\times25\times25$ pairs from $\mathcal P$. So, this approach makes no sense, I think.  What should be correct approach? And also, "if we pour $nk+1$ objects into $n$ urns, then there is an urn with $k+1$ objects", can this concept be plugged in this question?


Laptop battery drains faster in Ubuntu 16.04 when compared to other OS

The battery backup of my Lenovo G50-45 laptop is very low of around 3hrs on full charge.   This was approximately double when I was working with Windows 8.1. Can you please suggest the possible fixes to overcome this issue?


How to prove $\int_0^1\frac{\mathrm{d}x}{x^x}=\sum_{k=1}^\infty \frac1{k^k}$?

I've found this wonderful identity .  On the first spot it seems for me true, but I don't have any idea, how could it be proven. In simpler form: "how the hell...?" :-)


Which is correct "women's clothing" or "womens clothing"?

When I typed the search into Google most of the responses were websites selling clothing and the ratio of womens versus women's was about 1:1. Searching for mens versus men's and the version with apostrophes appears almost 90% of the time. For boys versus boy's or girls versus girl's it is a 3:2 ratio in favor of no apostrophes.  So there's a general trend for leaving the apostrophe out. But "womens" looks wrong.  I suppose the same question applies to public bathrooms as well. Is the women's room or the womens room?


If $a$, $b$, $c$ are the roots of $x^3-6x^2+3x+1=0$, find all possible values of $a^2b+b^2c+c^2a$

Let $a$, $b$, $c$ be the roots of $$x^3 - 6x^2 + 3x + 1 = 0$$ Find all possible values of $a^2 b + b^2 c + c^2 a$. Express all the possible values, in commas.  I've already tried to bash out all the roots, Vieta's Formula, and try to manipulate the equation to become easier to work with. However, Vieta's didn't get me anywhere, and I couldn't find a way to make the equation simpler or anything. Any hints to start this problem?


so I'm writing a little text adventure and have lots of nested if statements. However, there comes times where I want to terminate the program in one of these if statements to give a "GAME OVER". I've tried quit() and exit(), but at best they still output an error message:  Traceback (most recent call last):   File "<string>", line 9, in 0 SystemExit: 0   I'm not using any try/except statements, just if statements. For example:  import sys if True:     print "Hello guv'na"     if True:        print "Good day, Good day"        sys.exit(0) if True:     print "What's all this then?"   yields:  Hello guv'na Good day, Good day Traceback (most recent call last):   File "/Users/austin/test.py", line 6, in 0 builtins.SystemExit: 0   I just want the program to terminate after "Good day, good day" without a message. is this possible?


How would you prove that the graph of a linear equation is a straight line, and vice versa, at a "high school" level?

This is something I've been wondering about. Namely, I've always accepted "on intuition" that the equation  $$ax + by = c$$  is, when graphed, a line. You can plot the points $(x, y)$ satisfying the equation and see that yeah, they do indeed form a line.  But when I came across this, I realized was that I had accepted this idea without proof:       There is enough material in the text to convince the students empirically that a line in the   plane is represented by a linear equation, and that the graph of a linear equation is a line.   However, these two fundamental theorems on linear functions are not justified mathematically.   (pg. 5)   and     Important theorems on linear functions are not proved. Relevant to the above two   standards are two fundamental theorems: A line in the plane is represented by a linear equation   and the graph of a linear equation is a line. Neither of these theorems is proved.   (pg. 16)   Which made me wonder (I haven't seen the texts) -- just how would you not only "justify" this mathematically, but in a way a high-schooler would understand? And not only that, but in a manner which is actually enlightening? In addition, this criticism is leveled against all four high school geometry/algebra books.  For example, consider if we were using, say, Hilbert's axioms as our axiom set for Euclidean geometry. Then we could show that the equation is a line by something like this: find three points A, B, and C satisfying it so that $A * B * C$ (the "betweenness" relation), then show that for any point $D$ which is not $A$ or $B$, then one of $D * A * B$, $A * D * B$, or $A * B * D$ must hold. Going the other way (the converse), to show the line is given by the equation, you'd show that for any points A, B, C with $A * B * C$, then every point $D$ with $D * A * B$, $A * D * B$, or $A * B * D$ satisfies some equation of the form $ax + by = c$. However, it seems this kind of proof is fairly tedious (you have to check three cases in both implications), and relies on quadratic functions and radicals since you have to use the distance formula as that's how you'd define the "betweenness" relation for three points.  I suppose the details would vary with regard to the axiom set we use (I don't know if Hilbert's would necessarily be the best for "high school geometry") -- but it seems no matter which one we use, we need some way to determine that three points A, B, and C "lie on the same line" (which is what the "betweenness" relation does, although it does more, since it also orders the points), and a way to express this with regards to coordinatized points as well as points in the axiomatic geometry which the coordinate plane models. It seems that any formula I've seen for that fact using Cartesian coordinates requires a quadratic polynomial expression, for one. Any proof along these lines seems like it would be tedious, or require additional motivation, and so might not be enlightening at this lower level of the person's mathematical development. The "message" seems to easily get lost as one gets bogged down in mechanics.  How would you solve this problem? What's a good way to justify this at such a level?


I am getting NullPointerExecption in my Java program

I just started learning java and I'm trying to count the number of times a word appeared in a string which I passed it. I'm using the HashMap class, the words I pass are the key and their count is the value. I can't figure out why I keep getting a NPE exception in the counter, the for loop looks right to me, did I use the split function incorrectly?        import java.util.HashMap;  public class WordCount {      private HashMap<String,Integer> map;      public WordCount() {         map = new HashMap<String,Integer>();     }      public WordCount(String words) {         String[] list = words.split(",");          for(int i = 0; i < list.length; i++) {             if(!map.containsKey(list[i]))  {                 map.put(list[i],1);             } else {                 map.put(list[i],map.get(list[i])+1);             }         }     }      public void addWord(String toAdd) {         if(!map.containsKey(toAdd)) {             map.put(toAdd,1);         } else {             map.put(toAdd,map.get(toAdd)+1);         }     }      public void startOver() {         if(map.isEmpty()) {             return;         } else {             for(String s: map.keySet()) {                 map.remove(s);         }     } }  public int countWord(String word) {     return map.get(word); }   }   /***************************************/  public class Main {     public static void main(String[] args)     {         String s = "hello,bye,how,are,you,ok";         WordCount wordC = new WordCount(s);          System.out.println("Number of Words: " + wordC.countWord("how"));     }  }


Minimal BASH like line editing is supported GRUB Error

I was trying to dual boot Kali Linux as a second OS then changed my mind and aborted the installation after renaming a disk partition.   After aborting the installation, I booted Ubuntu the normal way, but I got a GRUB error. What should I do after I identifying the partition with Ubuntu?


Adding formatting tools to the 'ask question' page on the mobile site

The biggest problem on the mobile site (not app) for any Stack Exchange website  is there are no formatting tools at all. This makes asking and answering far more difficult since I have to use the 'full site' option, which is very inconvenient on a 5.2" screen. I am hoping a developer reads this message and adds formatting for mobile-reliant users like me.


$a^2=e~\land~a\ast b^2\ast a=b^3\implies b^5=e~~\textrm{for }(G,\ast)~$?

I'm stuck on this seemingly easy problem in elementary group theory.  Q. Let $(G,\ast)$ be a group and $a,b\in G$. If $a^2=e$ and $a\ast b^2\ast a=b^3$, prove that $b^5=e$. ($e$ denotes the identity element of $(G,\ast)$)  Attempt:  $$a\ast b^2\ast a=b^3\implies a^2\ast b^2\ast a^2=a\ast b^3\ast a\implies a\ast b^3\ast a=b^2\tag1$$  Using $(1)$ and the given two equations in the question, we get,  $$b^5=b^2\ast b^3=a\ast b^3\ast a^2\ast b^2\ast a\implies a\ast b^5\ast a=b^5$$  This is the most progress I think I have done for this problem. I had tried different approaches but they all went in vain.  I'd like hints on this problem rather than a complete solution. Thanks.


EDITED AGAIN and ADDED MORE DATA: I have two sets of data and assigned them into two variables named Caifornia_shp and Houses. The information of these two variables are as follow: head(California_shp)        NAME 1   Alameda 2    Alpine 3    Amador 4     Butte 5 Calaveras 6    Colusa  head(Houses)   houseValue income houseAge rooms bedrooms population households latitude longitude 1     452600 8.3252       41   880      129        322        126    37.88   -122.23 2     358500 8.3014       21  7099     1106       2401       1138    37.86   -122.22 3     352100 7.2574       52  1467      190        496        177    37.85   -122.24 4     341300 5.6431       52  1274      235        558        219    37.85   -122.25 5     342200 3.8462       52  1627      280        565        259    37.85   -122.25 6     269700 4.0368       52   919      213        413        193    37.85   -122.25  I merged Houses and California_shp using the following codes: pts.poly <- point.in.poly(Houses,California_shp)  head(pts.poly@data)  houseValue income houseAge rooms bedrooms population households latitude longitude 1     452600 8.3252       41   880      129        322        126    37.88   -122.23 2     358500 8.3014       21  7099     1106       2401       1138    37.86   -122.22 3     352100 7.2574       52  1467      190        496        177    37.85   -122.24 4     341300 5.6431       52  1274      235        558        219    37.85   -122.25 5     342200 3.8462       52  1627      280        565        259    37.85   -122.25 6     269700 4.0368       52   919      213        413        193    37.85   -122.25      NAME 1 Alameda 2 Alameda 3 Alameda 4 Alameda 5 Alameda 6 Alameda  head(tapply(pts.poly@data$houseValue,list(pts.poly@data$NAME),mean))   Alameda    Alpine    Amador     Butte Calaveras    Colusa  208747.39 118700.00 117146.43  89611.54 107893.75  77731.25  I want to plot the following thematic map of houseValue variable.  To plot it, I used the following codes: tm_shape(California_shp)+tm_borders("Blue",lwd = 2)+tm_fill("houseValue")  Unfortunately, I receive the following error: Error: Fill argument neither colors nor valid variable name(s)


Why can $R^2$ be negative in linear regression -- interview question

I was asked an $R^2$ question during an interview, and I felt like I was right then, and still feel like I'm right now. Essentially the interviewer asked me if it is possible for $R^2$ to be negative for linear regression. I said that if you're using OLS, then it is not possible because the formal definition of $R^2$ is $$ R^2 = 1 - \frac{SS_{res}}{SS_{tot}} $$ where $SS_{tot} = \sum_i^n (y_i - \bar{y})^2$ and  $SS_{res} = \sum_i^n (y_i - \hat{y_i})^2$. In order for $R^2$ to be negative, the second term must be greater than 1. This would imply that $SS_{res} > SS_{tot}$, which would imply that the predictive model fits worse than if you fit a straight line through the mean of the observed $y$. I told the interviewer that it is not possible for $R^2$ to be 1 because if the horizontal line is indeed the line of best fit, then OLS fill produce that line unless we're dealing with an ill-conditioned or singular system. He claimed that this isn't correct and that $R^2$ can still be negative, and that I could "see it easily in the case where there is no intercept." (note that all of the discussion so far was about the case WITH an intercept, which I confirmed at the beginning by asking if there are any constraints about the best line passing through the origin, which he stated "no") I can't see this at all. I stood by my answer, and then mentioned that maybe if you used some other linear regression method, perhaps you can get a negative $R^2$. Is there any way for $R^2$ to be negative using OLS with or without intercept? Edit: I do understand that you can get a negative $R^2$ in the case without an intercept.


In here, , the degree of freedom is defined as "the number of independent parameters that define its configuration." So, if $N$ particles are in the system, the degree of freedom is $3N$.  But here, ,  defined as "The set of all dimensions of a system is known as a phase space, and degrees of freedom are sometimes referred to as its dimensions." In this sense, the degree of freedom is $6N$.  What is the definition of the degree of freedom?


Is there a way to force "Yes" to any prompts when installing from apt-get (from a bash script)?

I am trying to make a bash script that automates the installation of several packages that I use on any ubuntu machine.  I frequently create virtual machines either through Amazon AWS or Digital Ocean and would like to just run one script to install all the packages I use.  Some of the packages I would like to install are Emacs and Node.js  The normal way I install these would be to run apt-get install Emacs, and while doing this I am always prompted with a warning about how much space this app will take up and if I am sure I want to continue.  Is there a way to automate this process, from a script, and always say "yes" to these prompts?


Proving that the $\frac {\xi +\zeta\eta}{\sqrt {1+\zeta^2}}$ has normal distribution (0,1)

The task: $\xi, \eta, \zeta \sim N(0,1)$ and independent. Prove, that $\frac {\xi +\zeta\eta}{\sqrt {1+\zeta^2}} \sim N(0,1).$ (1)  It is clear, that with fixed $\zeta$ we get, that (1) has expected value = 0 (as the sum of normal distributed values) and variance = 1 (as the sum of $(\frac {1}{\sqrt {1+\zeta^2}})^2$ and $(\frac {\zeta}{\sqrt {1+\zeta^2}})^2$). And what to do with un-fixed value I don't know. There was a small tip -imagine, that $\zeta$ is discrete value (for example getting 3 different values) and use the full probability formula $(P(B)=\sum P(B|A_{j})P(A_{j}))$.


Rigorous proof of the argument that one cannot square $-1$ in complex number problems

I would like to ask a fundamental question with regards to the imaginary number and it is something many beginners are told are wrong, but I would like to seek a rigorous proof of why it is wrong. It is a question I faced when my student asked me this. Take for example, $(-1)^{1/6}$. We can compute this in 2 different ways: $$(-1)^{1/6}=[(-1)^{2}]^{1/12}=1$$ or $$(-1)^{1/6}=[(-1)^{1/3}]^{1/2}=(-1)^{1/2}=i$$ I understand both the methods above are wrong, and the typical response is that you cannot square $-1$. Is there a rigorous proof as to why this method is flawed? Perhaps using abstract algebra or Galoise Theory?  Thank you!


Streetnames and background in layer are very pixelated (wms/wmts)

I am pretty new to Qgis, so I don't know much yet.  Anyways, I have a map open where you can see a background map + streetnames of  a country. THe problem is that the streetnames and the water and everything is  very low quality.  You can't even read it. Is there a way to make it higher quality ?


Since I came to Ubuntu I have been facing a problem with full screen videos in Firefox. It looks like the display is synchronized with my graphics card. The strangest is that out of full screen the problem does not occur. (I have an Nvidia 1050 GPU, if it helps)   Thank you for any help.


Best transportation option from San Jose Del Cabo airport to Cabo San Lucas

It appears they have a taxi cartel in that area and all the prices are very high for transportation.  What are the best options for me to get a ride for 2 people from San Jose Del Cabo airport to Cabo San Lucas?   My airbnb host offered to give us a ride for $70. I scoffed at that but now that I see the limited options, it might be the best choice?  Edit: To be more clear on what I'm looking for, my number 1 priority is saving money, and number two priority is timeliness. So I want a good deal, but not if it will turn the 30-40 minute trip into anything greater than 60 minutes.


Convergence of $ \sum_{n=1}^\infty\left(\exp(\frac{(-1)^n}{n})-1\right)$?

Consider the series   $ \sum_{n=1}^\infty a_n $ where   $$ a_n:=\left(\exp\left(\frac{(-1)^n}{n}\right)-1\right).  $$   Show that it is convergent but not absolutely convergent.      I tried the alternating test but I'm not sure if $\{|a_n|\}$ is decreasing or not. And I don't see how other tests might help. Any ideas?    [Disclaimer: this question, asked on Jan 9 '14 at 16:01, is NOT a duplicate of the , which was asked much later on Jul 19 '15 at 20:32]


Why did the Hunter x Hunter manga go on hiatus?

I think the Hunter x Hunter manga has been on hiatus for months now; does anyone know the reason for the hiatus? Is the author planning to continue the series?


Some time ago I created these two questions: "" and "". The first one is mor general, the second one refers to a concrete way of the solution. Anyway, the questions don't duplicate each other.  Now I've finally found a solution for the second question and it's also a possible solution for the first one. I want to post it as answer. Is it allowed to post the same solution for diferent questions? If not -- why?


Sci-fi film about terraforming Venus, inadvertently killing the native worm-like Venusians

I have been searching for the name of a short sci-fi film for decades.  The story is about a team of scientists who figured out a way to terraform Venus by sending algae plants there in a rocket which changes the atmosphere so that humans can live there.  At the end, it works, but the first people that arrive on Venus discover that the algae has killed the native Venusians, a race of worm-like creatures.  The final shot (as I remember it) is of an astronaut finding a half-sphere with writing on it, and he says “it wasn't much, but it showed that they were intelligent…”  I saw it on TV in probably the late seventies or early eighties, possible as an HBO short take that they would show to fill time in between movies.  Does this sound familiar to anyone?


Let $F:\mathcal{C} \longrightarrow \mathcal{D}$ be a functor between two categories and $d$ be an object of  $\mathcal{D}$. Does the following hold:  $(F \downarrow d)^{op} \cong (d \downarrow F^{op})$  If yes, how can I prove this?


Is a jug of milk left out for 12 hours at room temperature safe to drink?

I left milk out in a jug, bought brand new, for twelve hours.  Is it still safe to drink?


How do I show that the mean of the posterior density minimizes this squared error loss function?

This exercise comes from Koop's Bayesian Econometrics. Given $\theta$, the parameter(s) of a model (in this case $\theta$ is a scalar), $\tilde{\theta}$, the point estimate of $\theta$, and constants $c_1 > 0, c_2 > 0$, the goal of the exercise is to show that $\tilde{\theta} = E[\theta \mid y]$ minimizes the expected loss of the squared error function $C(\tilde{\theta}, \theta) = (\tilde{\theta} - \theta)^2$, where, to quote the book, "the expectation is taken with respect to the posterior of $\theta$", i.e. $\theta \mid y$.    Per , I'm including my solution as a separate answer, both for feedback on that solution and for other people to post their own solutions.


Why does my /fill command output "That position is not loaded"?

I am creating a type of adventure map. Once you enter the map, you step on some pressure plates that are supposed to seamlessly close the wall behind you. For some reason this command does not work when in a command block or just in text. Here is the command:  /fill -17 4 -109 -18 5 109 minecraft:light_gray_concrete   The output it gives me is "That position is not loaded". I am on a singleplayer superflat world in 1.14.3. Any help would be very appreciated!


Here is the proof I tried to weave while trying to prove this theorem:     Theorem. Every infinite subset of a countable set is countable.      Proof. Let $A$ be a countable set and $E\subset A$ be infinite. Then $A\thicksim\mathbb{N}$. This implies that there is a sequence $\left\{x_{n}\right\}_{n\in\mathbb{N}}$ where $x_{n}\in A$. Construct a sequence $\left\{n_{k}\right\}_{k\in\mathbb{N}}$ where $x_{n_{k}}\in A$, $n_{1}$ is the smallest positive integer such that $x_{n_{1}}\in A$, and $n_{k+1}>n_{k}$. Then      $$ E=\bigcup_{k=1}^{\infty}x_{n_{k}}, $$      and $E$ is countable, because $E\thicksim\mathbb{N}$. $\blacksquare$   Is it convincing?


Rounding a double to two decimal places with a placeholder

I have seen plenty of questions on how to round to two decimal places using Math.Round(), but not when using placeholders. This is my best attempt but the program is still giving me around 14 decimal places:  Console.Write("\n\nPercentatge Weight: {0}% ",      G[ArrayCount] * 100 / RayTotal,     Math.Round(RayTotal, 2));   After this runs I am getting a percentage such as 14.3256941565.  I just want it to be 14.33  Should add that I don't already have the value it is dependent on what the user enters.


I am newbie in C# and recently I tried to make a MD5 hash calculator. But everytime  i check some file, the data remains in RAM until i close the program. In 50kb files or so it doesnt matter, but bigger files may not work. Any clues how can it be disposed or cleared after showing the result ? Thanks  private void button1_Click(object sender, EventArgs e)     {         MD5 md5hash = MD5.Create();         string inputMD5;         if (openFileDialog1.ShowDialog() == DialogResult.OK)         {             string fileloc = openFileDialog1.FileName;             byte[] block = File.ReadAllBytes(fileloc);             byte[] data = md5hash.ComputeHash(block);             StringBuilder sBuilder = new StringBuilder();             for (int i = 0; i < data.Length; i++)             {                 sBuilder.Append(data[i].ToString("x2"));             }             inputMD5 = sBuilder.ToString();             MessageBox.Show(inputMD5);         }


Maximal ideals of polynomial rings in infinitely many variables

Let $k$ be an algebraically closed field. Nullstellensatz states that the maximal ideals of the polynomial ring $R=k[X_1,\dots,X_n]$ are precisely those of the form $\langle X_1-a_1,\dots,X_n-a_n\rangle$, with $(a_1,\dots,a_n)\in k^n$.     What if we are working with infinitely many variables, say $\{X_i\}_{i\in I}$, being $I$ an infinite set? Again, the ideals of the form $\bigl\langle\{X_i-a_i: i\in I\}\bigr\rangle$, with $(a_i)_{i\in I}\subseteq k$ are maximal (even if $k$ is not algebraically closed), but what about the converse?


How can the central limit theorem hold for distributions which have limits on the random variable?

I've always taken issue with, and never been given a good answer, for how it is possible that the central limit theorem - the classical version where the distribution of sample means approaches normality - can apply to say a Poisson or Gamma distribution, where $P(x<0)=0$. Or, for that matter, any other distribution for which $\exists X:X \neq -\infty ,F(X)=0$, or perhaps $\exists X:X \neq \infty, 1-F(X)=0$.  As an example, given a Gamma distribution, as the number of samples $n \rightarrow \infty$, $P( \bar{X} = \alpha) \rightarrow 1$, $\forall \alpha \geq 0$, for some $\bar{X}_i$. But if $\alpha<0$, $P(\bar{X}=\alpha)=0$. There simply will never, EVER be an $\bar{X}_i<0$. This suggests to me that the distribution of $\bar{X}$ cannot be, nor approach, normality because $f(\bar{X})$ must necessarily be $0$, $\forall \bar{X}<0$, which does not meet the requirements of a normal distribution where $f(y)>0, \forall y \in R$.  I'd feel much better about life and anything based on the CLT if someone could help me understand where my logic has gone astray.


If $\varphi \in E'$ and $A$ is convex and open then $\varphi (A)$ is an open interval

Let $E$  be a real normed space and $\varphi \in E'$, $\varphi \neq 0$.   Suppose that $A \subset E$ is an open convex not empty subset.   Show that $\varphi(A)$ is an open interval.   Since $A$ is connected and $\varphi$ is continuous,  $\varphi(A)$ is an interval. How could I show that $\varphi(A)$  is open?   I tried to apply the geometric form of Hahn Banach theorem but it didn't work.  I appreciate if you could give some hints. Thanks.


If $ax^2-bx+c=0$ has two distinct real roots lying in the interval $(0,1)$ $a,b,c$ belongs to natural prove that $\log_5 {abc}\geq2$

If $ax^2-bx+c=0$ has two distinct real roots lying in the interval $(0,1)$ with $a, b, c\in  \mathbb N$, prove that  $\log_5 {abc}\geq2$.  The equations I could form are:     1) $f(0)>0$ and $f(1)>0$       2) $\frac{b}{2a}$ lies between $0$ and $1$, because: $\frac{b}{2a}-\frac{\sqrt{\Delta}}{2a}<\frac{b}{2a}<\frac{b}{2a}+\frac{\sqrt{\Delta}}{2a} $.       3) $\Delta=b^2-4ac > 0$


This is not a duplicate, see bolded parts; please vote to re-open I am attempting to execute an external application via C#. I wish to pass stdin into the started application, and capture the result. The equivalent bash command would be: echo Typist 1 . 0 | figlet-2.2.5/figlet -f Slant  In C#, how can I run the above command and store its stdout into a variable?  I have tried using Process.Start("figlet-2.2.5/figlet", "-f Slant"), but this doesn't work because the application:  needs data via stdin requires parameters to be supplied and provides output via stdout


an asymmetric encryption scheme with multiple distinct private keys

Is there a asymmetric encryption scheme that allows for multiple private decryption keys?  where m= plaintext message and c= cyphertext message  c = Ek(m) where K is the public encryption key.  and   m = Dj(c) where J is the private decryption key.  nothing out of the ordinary here, RSA satisfies this basic scenario.  In addition I also want the message to be decrypted by any number of additional keys, ( Dj1 ...  Djn ) such that:  eg.  m = Djn(c)   does such a scheme exist?  note: I am NOT referring to the way GPG/PGP broadcasts a message to many parties.  edit: looks to be similar to   in particular see D.W.'s answer


For every $R>0$, prove that there is a positive integer $n$ such that $1 + z + \frac {z^2}{2!} +...+\frac {z^n}{n!}$ has no zeros in $|z|<R$.

The problem is exactly that of the title.  I attempted to apply Rouché's theorem, by setting another function $f(z)=e^z$ and comparing the modulus of $f(z)$ and $f(z)-P_n (z)$ at the circle $|z|=R$, but I failed to proceed anymore. Is my approach correct? Or is there another solution?


When am trying to stop a running thread, most of  the methods to stop the thread are being shown "deprecated" in eclipse. I am using either of the methods stop(),destroy(),suspend(). Is there a new method for stopping a thread?  Thanks.


I am writing an article that is focus on websites and web applications. I also need to refer to the rest software products. But I don't know how to properly name them. I could say "non-web software", but it sounds awkward. I also thought about "desktop software", but apparently, this is not inclusive because non-web software also contains server software, mobile software, etc. Could you please share your opinions and suggestions? Thank you!  The context: I am using this in the computer science field. More specifically, I want to talk about websites and web application vulnerabilities (e.g. SQL injection, XSS ...) versus non-web software vulnerabilities (e.g. buffer overflow, ...).


Why is it that in python, some calculations are so much more imprecise than others? Ex. x=0.1 y=x+x+x print(y==0.3) print(y)  returns False 0.3000000000004  Whereas if I start with x as 0.25 or 0.5, print(y==0.75) and print(y==2.25) both return True.


When does $\lim_{n\to\infty}f(x+\frac{1}{n})=f(x)$ a.e. fail

We know that if $f\in L^1(\mathbb{R})$, then $\|f(\cdot+1/n)-f(\cdot)\|_{L^1}\to 0$ as $n\to \infty$, which implies that there exists a subsequence $f_{n_k}=f(x+\frac{1}{n_k})$ such that $f_{n_k}\to f$ a.e.   My problem is that  Is there any $f\in L^1(\mathbb{R})$  function such that the almost convergence result  $$ f(x)=\lim_{n\to\infty}f(x+1/n)\quad \text{a.e.} $$  is NOT valid?   I intend to believe that there exits such function. Otherwise, there would be a beautiful statement such that $f(x)=\lim_{n\to\infty}f(x+1/n)$ a.e. for any $f\in L^1(\mathbb{R})$.   Thank you for the long commenting below @David C. Ullrich. This question has been reduce to find a compact set $K$ such that for any $x\in K$, there are infinite $n$ such that $x+\frac{1}{n}\not\in K$.


Wrong place for hyperref link in scaled tikz picture

I have a TikZ picture with a node containing a minipage with an itemize environment; each item is a hyperref to other sections of the document.   When scaling the image (for example with \begin{tikzpicture}[scale=.7, transform shape] I've a strange behavior: links in itemize are not in the right place: they present a somewhat vertical offset, as if they don't scale as the rest of image.   Here the MWE:  \documentclass[a4paper]{article} \usepackage{tikz} \usepackage[pdftex]{hyperref} \begin{document}  Here something interesting\label{text:interesting-one} \newpage  Here something interesting, too\label{text:interesting-two} \newpage  and here there are very very interesting stuff\label{text:interesting-three} \newpage  \newpage Now the problem: links rectangles have some offset, making links unusable in case of long itemize  \begin{figure}[htb] \begin{tikzpicture}[scale=.7, transform shape] \node at (0,0) (mynode) { \begin{minipage}{4cm} \begin{itemize} \item \hyperref[text:interesting-one]{First link} \item \hyperref[text:interesting-two]{Second link} \item \hyperref[text:interesting-three]{Third link} \item \hyperref[text:interesting-one]{First link again} \item \hyperref[text:interesting-two]{Second link again} \item \hyperref[text:interesting-three]{Third link again} \end{itemize} \end{minipage} }; \end{tikzpicture} \end{figure} \end{document}   And here a snapshot of the problem    Note: This is evident using the default settings of hyperref package, which draws the red rectangle around links, but it took me some time to found it when only the text is coloured, i.e. when using \usepackage[linkcolor=blue,colorlinks=true]{hyperref}


Can anyone provide a concise distinction between anonymous method and lambda expressions?  Usage of anonymous method:  private void DoSomeWork() {     if (textBox1.InvokeRequired)     {         //textBox1.Invoke((Action)(() => textBox1.Text = "test"));         textBox1.Invoke((Action)delegate { textBox1.Text = "test"; });     } }   Is it only a normal lambda expression being cast to a strongly typed delegate or there is more of it undercover.  I'm well aware that a strongly typed delegate like follow  UpdateTextDelegate mydelegate = new UpdateTextDelegate(MethodName)   suffice as a parameter of type System.Delegate, but the idea of anonymous method is rather new to me.


I have to prove that if $\Omega$ is convex, $f$ is holomorphic on $\Omega$ and $\text{Re}(f')>0 $ then $f$ is injection.  Any ideas?


Is it fine to use recently with the past simple tense in the following sentence?     Did you read any books recently?   Is it grammatically correct?  Or do I have to use:     Have you read any books recently?


I want to print all permutations of 123 in python?

123 132 213 231 312 321  How to get all permutations as a seperate numbers?


Why Process Builder doesn't work on Delete Scenario?

As most of the time we have to think of requirement to accomplished using out-of-Box feature like e.g process builder which we think of an alternative to trigger, but suppose I have to handle scenario of Delete using Process Builder then there is limitation!(e.g calculation of roll-up on Delete) so I am curious about what is that limitation because of which Delete scenario is not handled in Process Builder.


Put decimal points in exam class different than 0.5

I am using the exam class to create exams, but in my country grades usually go from 0 to 10, then sometimes I need point like 0.2, 0.25, 0.75 ... How I do that? Thank you in advance.


Colors in Photoshop CS6/CC look different than in browser?

One of my friends, a graphic designer told me recently that sometimes colors in Photshop look slightly different than the ones rendered in browser.  I know it is possible when you save a file and then use it on a website due to palettes, but he uses given color in PS, for example #b81e1e, then he creates a DOM element and sets its background to #b81e1e and the color is rendered differently in browser than in PS (I guess it's not that subtle as he can easily spot it). It's not a regular thing and it doesn't happen always, but he states it happened to him a few times, although he can't really tell me with witch colors.    Is it even possible? Because I have never really heard about anything like this & nothing like this ever happened to me...


How to get more than 100mA from a USB port

I heard that the current limit for a USB port is 100mA. However, I also heard that some devices can get up to 1.8A from a port. How do you get past the 100mA limit?


How much is VLIW power- and area-efficient then superscalar anyway?

Most of texts say VLIW, which is lack of hardware to detect hazards and schedule the instructions. But I haven't see any evaluation about how much VLIW can save area(h/w complexity) and power compared to matching superscalar.  When VLIW came out, the advancement of technology node size was slowing down, but not anymore. I want to know it's still valid to say VLIW can be considered to be efficient enough in power/area compared to equivalent superscalar.


Be notified of an update to an app that is not installed

Is there any way to receive an update/new version released notification from the Play Store for an app that is not installed in my phone? I'm using 4.3 on a Nexus 4.


How do RPG games like Titan Quest, Diablo, WoW or similiar ones handle XP distribution?

For my own game I'd like to know if any of you have an idea about how some popular RPG games handle XP distribution? What I'd be particularly interested in is how the amount of XP a certain enemy gives the player after it's defeat is determined.   For my game I'm struggling to find a proper algorithm/formular to determine that specific amount, since it's a rather small game with not that many enemies types it might be okay to set a value for each enemy type by hand. At first I was experimenting with a formular which takes certain stats of an enemy and then calculates the amount of XP the enemy is 'worth' but as I already said I could not achieve a satisfying result by this.  Nonetheless it would be interesting to know how large games handle this determination. I'd assume that it's not done by hand because you have too many different enemies but I also might be wrong. If anyone could give me any insights or good reads on this I'd be very thankful.  Another thing I'd be interested in is how the XP gaining for the player with a level difference is handled. For instance: If the player is 10 levels ahead of an enemy he should gain 100% less XP from that enemy. If he is 5 levels ahead he only should get 50%. Of course that's a bit depended on my game and the entire design but would that be a common approach to deal with farming low level enemies and still gaining full XP from that? Or are there other approaches such games usually use?  Thanks for any hints, comments and opinions!


How to create a directory behalf on root user?

I have a script:  [postgres@LaHarch ~]$ cat mkrundir.sh  #!/bin/bash mkdir /run/postresql    With attributes:  [postgres@LaHarch ~]$ ll mkrundir.sh  -rwsr-sr-x 1 root root 74 Aug 26 18:53 mkrundir.sh   But when I run it I get:  [postgres@LaHarch ~]$ ./mkrundir.sh  mkdir: cannot create directory '/run/postresql': Permission denied   Why SUID didn't help me? And what is best practice for such a task?


First, this is a homework, StackOverflow has now different type of questions and I chose "I need help with a homework problem".  The program print all the prime numbers from range(k to n) from this expression:  ((1 + sin(0.1*i))*k) + 1, i = 1, 2, ..., N.   The code only works for the first test case. I get "Terminated due to timeout" on the 2nd and final case. The homework is uploaded to HackerRank, I don't know how to fix this. I did all the things that the task wants.  Constraints:  k <= 10^18  n <= 10^3       Input Format:      No more than 100 examples. Every example has 2 positive integers on the same line.      Output Format:      Print each number on a separate line.      Sample Input:      4 10      500 100      Sample Output:      5      17   #include <iostream> #include <cmath> using namespace std;  int main() {     long long k, n;     int j;     while (cin >> k >> n) {         if (n>1000 && k>1000000000000000000) continue;          int count = 0;         for (int i = 1; i <= n; i++) {             int result = ((1 + sin(0.1*i)) * k) + 1;             for (j = 2; j < res; j++) {                 if (result % j == 0) break;             }             if (j == result) count++;         }         cout << count << endl;      }     system("pause"); }


Biblatex only printed the reference lists which cited in main body

I am new to LaTeX, and I am using biblatex for my project.  I have created a Reference.bib file which listed all the references regardless of whether they have been cited in the main body or not. And I want the whole references list printed by the command \printbibliography.  Nevertheless, after compiling, it only printed the reference lists which were cited earlier in the main body. I am wondering is there anyone who might give me some advice? Any help is highly appreciated.  The preamble I used in my project is as below:  \usepackage[backend=bibtex,             style=numeric,                isbn=false,                            pagetracker=true,                     maxbibnames=50,                        maxcitenames=3,                        autocite=inline,                     block=space,                            backref=true,                           backrefstyle=three+,                  date=short]{biblatex} \addbibresource{Reference.bib}


Python how to open any file without explicit application call

I was wondering if there was a way to open a file and have the OS/Python handle what applications to use to open it like how the OS typically does.  For example if I have the path of a pdf file, it would automatically open the pdf file with the default pdf reader like adobe. If it is a mp4 file, it would use default video player like VLC. Or if it is a text file it would use notepad.  Do I have to explicitly handle each file extension or is there an easier way?


When I want to move my model It doesnt go smooth

When I try to move it around with G it doesn't go smooth, it makes like big jumps and not smoothly... I'm in pose mode trying to make an animation.


Let p>5 be the prime number. Prove that the expression $p^{4} - 10p^{2} +9$ is divisible by $1920$

I broke the given expression $p^{4} - 10p^{2} +9 as (p-3)(p+3)(p-1)(p+1)$ and now for all prime numbers grater than 5 the condition is true but I checked it by putting values. Is there any proper or trick to prove this condition. I am trying. Thanks for your time.


Why don't edits in math show up "rendered"?

When looking at suggested edits that involve changes to LaTeX code, I can't see the rendered output, only the code.  E.g. I was looking at the suggested edits for .  It would be much easier to approve or reject if I could see the LaTeX code worked out as it would be when the question is displayed, but this doesn't seem to be available.


if (counter & (1<<j)) .what does this statement mean and how it works?

i was working on an algorithm of sub sequences. please tell me the meaning of this statement. program is as below.  void printSubsequences(int arr[], int n) {     unsigned int opsize = pow(2, n);      for (int counter = 1; counter < opsize; counter++)     {         for (int j = 0; j < n; j++)         {             if (counter & (1<<j))                 cout << arr[j] << " ";         }         cout << endl;     } }


I have a bash script and I have an else statement which I want it to do nothing.  What is the best way to do this?


SQL and C# Error: Error on SQL procedure: Error converting data type nvarchar to datetime

I am working on a SQL Server database program which has 2 dateTimePickers on its interface to choose DOJ (Date Of Join) and DOB (Date of Birth). Everything seems to be working well except the dateTimePickers, it keeps coming up with:     Error converting nvarchar to datetime   I have tried changing it to nvarchar(50) and nvarchar(MAX) but then it comes up with a different error along the same lines. The form looks like this, with also said error coming up:   This is the SQL Server stored procedure:  SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO  ALTER PROCEDURE [dbo].[StudentAdd]     @FirstName varchar(50),     @LastName varchar(50),     @CourseEnrolled varchar(250),     @Level int,     @DOJ datetime,     @DOB datetime AS     INSERT INTO tblStudent (First_Name, Last_Name, Course_Enrolled, Level, DOJ, DOB)      VALUES (@FirstName, @LastName, @CourseEnrolled, @Level, @DOJ, @DOB)   C# code:  using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.SqlClient;  namespace final_assessment {     public partial class Form4 : Form     {         public Form4()         {             InitializeComponent();         }          string connectionString = "Data Source=DESKTOP-SQ1V840;Initial Catalog=UserRegistration;Integrated Security=True";          private void button1_Click(object sender, EventArgs e)         {             try             {                 using (SqlConnection sqlCon = new SqlConnection(connectionString))                 {                     sqlCon.Open();                      using (SqlCommand sqlCmd = new SqlCommand("StudentAdd", sqlCon))                     {                         sqlCmd.CommandType = CommandType.StoredProcedure;                          sqlCmd.Parameters.AddWithValue("@FirstName", textBox1.Text.Trim());                         sqlCmd.Parameters.AddWithValue("@LastName", textBox2.Text.Trim());                         sqlCmd.Parameters.AddWithValue("@CourseEnrolled", textBox3.Text.Trim());                         sqlCmd.Parameters.AddWithValue("@Level", textBox4.Text.Trim());                         sqlCmd.Parameters.AddWithValue("@DOJ", dateTimePicker1.Text.Trim());                         sqlCmd.Parameters.AddWithValue("@DOB", dateTimePicker2.Text.Trim());                          sqlCmd.ExecuteNonQuery();                     }                 }                  MessageBox.Show("Registration successful");             }             catch (Exception ex)             {                 MessageBox.Show($"Error in the SQL Server \"StudentAdd\" procedure: {ex.Message}");             }         }     } }


$$\sum_{k=1}^{n} \frac1{k(k+1)}$$ I know the answer is $\frac{n}{n+1}$ but how do I get there?


Fontsize of captions of the whole dissertation

I am using my university template. I noticed that the captions may have the same fontsize as the text. I don't know how to set fontsize of captions of all figures and tables throughout the dissertation as 11pt instead of 12pt.


\tableofcontent[currentsection] in article or scrartcl?

Is there a handy way to display only the subsections corresponding to the current section in scrartcl like \tableofcontent[currentsection] does in beamer?


What happens to Mjolnir (Thor's hammer) at the end of Endgame?

In Avengers: Endgame, Thor brings back Mjolnir (his hammer) from the past to his "future" self through the quantum tunnel. Later in the movie, Captain America gets hold of it being worthy.  However, I don't remember if Cap takes it back to the past in the climax. If he doesn't - that would break the spacetime continuum, Mjolnir being destroyed in the past.  If he does bring it back, how come he knows the exact time and place to return?


When making a a variable local to a function, every time the function is called the array is  reallocated and 10 things are stuffed into it. In a more complicated situation this can take up time.  This closure apparently solves that problem by returning a function. The function it returns is assigned to digit name and the function is invoked immediately. I cannot wrap my mind around this. Now I somewhat understand what a closure is, but I have no idea how it is working.   var digit_names = (function() {     var names = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];      return function (n) {       return names[n];   }; }());  alert(digit_names(3)); // 'three'   Please explain in detail what is going on here. How is the returned function being invoked before the array is allocated? When I call the function, how is it ignoring var names before it gets to the returned function? Or is that question even accurate?


I don't much like the look of desktop icons, so I decided I wanted to disable them. I googled the issue, and everything that came up told me to hit alt+f2, type gconf-editor and hit enter to open the config. From there I could find the option to disable them. Well, Ubuntu told me this wasn't a valid command. Someone else suggested to try entering it into the terminal, I did and it didn't work but informed me I could enter   sudo apt install gconf-editor   to get it working.   I did, and after this when  I tried to enter gconf-editor in the alt+f2 menu, it did work. However, the configuration editor for me is very bare bones and does not contain much, including the option to disable dekstop icons spelled out in the other post:


Update multiple ubuntu installation throw lan

I have ~15 Ubuntu Desktop PC connected to a same router.  I want to update them (with apt or something else like it) with single download.  for example: I update admin PC packages and another PCs updated automatically or update with my commands but don't download anything and use admin's downloaded packages.  so How do I setup this process?


What is dev-sda.device in systemd-analyze, can i disable it?

I have Ubuntu 16.04 installed on my Laptop alongside windows. In systemd-analyze blame a service called 'dev-sda7.device' is taking too much time. How to resolve this problem or should i disable it ?  Result of systemd-analyze time  Startup finished in 4.207s (firmware) + 4.576s (loader) + 3.466s (kernel) + 33.899s (userspace) = 46.149s   Result of  systemd-analyze blame           16.326s dev-sda7.device          12.859s ufw.service          11.263s systemd-tmpfiles-setup-dev.service           7.935s NetworkManager-wait-online.service           3.203s keyboard-setup.service           2.736s vboxdrv.service           2.467s accounts-daemon.service           2.349s apache2.service           2.239s NetworkManager.service           2.163s ModemManager.service           1.963s lightdm.service           1.843s nmbd.service           1.749s samba-ad-dc.service           1.599s systemd-fsck@dev-disk-by\x2duuid-B053\x2dA56B.service           1.367s thermald.service           1.127s polkitd.service           1.112s systemd-journald.service           1.066s teamviewerd.service           1.007s udisks2.service            975ms apparmor.service            926ms plymouth-start.service   Result of cat /etc/fstab  # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point>   <type>  <options>       <dump>  <pass> # / was on /dev/sda7 during installation UUID=493cc833-193e-435d-840a-b862ca367fba /               ext4    errors=remount-ro 0       1 # /boot/efi was on /dev/sda2 during installation UUID=B053-A56B  /boot/efi       vfat    umask=0077      0       1 # swap was on /dev/sda6 during installation UUID=a49f56b1-53c3-4eaf-9460-0a221e59957a none            swap    sw              0       0


What exactly is the actual coverage probability?

I am confused about the difference between the nominal and the actual .  Say we are trying to estimate the fraction of the current population of the US that has been diagnosed with cancer.  We get a sample (e.g. 10,000 individuals) and then estimate this fraction ($f$) and a confidence interval around it $[a,b]$ with $\alpha$ (confidence level) $=0.95$.  At this point, if I understood things correctly, the nominal coverage probability is $\alpha$, i.e. $0.95$.  But what about the actual coverage probability? To me, there is only one true value of $f$, e.g. say $5\%$, and it doesn't make sense to talk about the actual probability that $f$ is  within the interval $[a,b]$. It either is or it isn't within $[a,b]$.   What's wrong with this reasoning? And how would one obtain the actual coverage probability in practice?


How can Cyclops' optic blasts burn or melt objects?

I read recently that Cyclops' optic blasts don't produce heat. I found this very surprising. I watched X-Men: The Animated Series growing up, and re-watched it not that long ago as an adult. I definitely came away with the impression that he was shooting eye-lasers, which burnt and melted things.  Then, in X-Men: Apocalypse, Scott blasts apart a tree when asked to fire at an archery target. Xavier's favorite tree. I recall the tree burning, or at least glowing. But I can find neither a picture of the tree nor a clip of the scene to confirm my memory.   I believe there are other examples of this sort of thing occurring in other comics, shows, and movies. I'd appreciate additional examples, if anyone is aware of any. I'll add any more I come across.  So what's the deal? Do the blasts produce heat or not? If not, why was the tree burning?


Boot error: "Failed to start network time synchronization"

When I boot ubuntu then it shows error  [Failed] : "Failed to start network time synchronization" See 'Systemct1 status systemd-timesyncd.services' for details


Convergent or divergent series: $\sum_{n=1}^{\infty} \sqrt{a_n \cdot a_{n+1}}$?

suppose that $\sum_{n=1}^{\infty}a_n$ is a convergent series of positive terms. Prove that $\sum_{n=1}^{\infty} \sqrt{a_n \cdot a_{n+1}}$ is also convergent. Demonstrate that the converse is false.


Some questions in the exam were very easy.   Some of the questions in the exam were very easy.   Most students in our class are very nice.   Most of the students in our class are very nice.  The question is why we can use both forms "in general way" and "in definite way". Linked question doesn't explain this case. It explains usage of "all" qualifier. We can use "All of the + noun" and "All the + noun", but this is another case.


Is the opposite position of the definition of set equality hold?

Let $a,b$ are sets. If $a=b$, then for all set $x$,  $a\in x$ iff $b\in x$? I'm sure this will hold true, but I'm curious how to prove it.


Find Nearby Accounts migration to Google Maps API v3

we have been using the Find Nearby Accounts app from appexchange for a while now. The app uses the Google Maps API vs 2 which is now deprecated and hence has rendered the app ineffective. I have tried migrating the Google maps API version for the app from v2 to v3 by generating a v3 API key. The URL for my salesforce instance was included in the creation of the Client ID under API Access. After all these steps, I still get the error "Problem with Address. I know the address is right.   Has anyone been able to get this working? Thanks.


I am trying to make a custom microsip project. But, it gives me the error of  LNK1104, cannot open file opus.lib  I don't have the lib, nor I can find it online. I have downloaded from , but can't make the build out of it. How am I suppose to? there are just some .exe files and html files.


JavaScript object property reference problem

i make stack2[0].matrix refer to stack1[0].matrix, but after i change stack2[0].matrix, the stack1[0].matrix is changed too. why is this happen? and how can i keep stack1[0].matrix value?  thank you     let Number = function(){     this.matrix = [         [1, 2, 3],         [4, 5, 6]     ] }  stack1 = []; stack2 = [];  stack1.push(new Number); stack2.push(new Number); stack2[0].matrix = stack1[0].matrix; stack2[0].matrix[0][0] = 5;  console.log(stack1[0].matrix); console.log(stack2[0].matrix);


LuaTeX: Line break problem with microtype + geometry (bindingoffset)

I have a problem with the combination LuaTeX + package microtype + option bindingoffset from the geometry package when typesetting the following example:  \documentclass[11pt,a4paper]{article}  \usepackage[showframe, inner=25mm, outer=25mm, bindingoffset=12mm]{geometry} %\usepackage[showframe, inner=37mm, outer=37mm, bindingoffset=0mm]{geometry}  \usepackage[final]{microtype}  \begin{document}  Functions. According to 1, the free rotator's points are selected in two anyhow  selected \emph{resulting} point 4 and any \emph{not-resultant} sept 2 which  belongs to the rest of the system.  \end{document}   The first line does not break correctly, so a part of the text is written outside the main text frame. This problem only occurs if bindingoffset is set AND microtype is used. It also only occurs with LuaTeX, pdfTeX compiles it correctly. Here are the results of the tests I made:  TeX       bindingoffset  microtype   result ---------------------------------------------- pdfTeX     0mm           yes         ok pdfTeX    12mm           yes         ok LuaTeX     0mm           yes         ok LuaTeX    12mm           yes         WRONG! pdfTeX     0mm           no          ok pdfTeX    12mm           no          ok LuaTeX     0mm           no          ok LuaTeX    12mm           no          ok   I used the following software:   pdfTeX 3.14159265-2.6-1.40.15 (TeX Live 2014) LuaTeX beta-0.79.1 (TeX Live 2014) (rev 4971) package geometry: version: 5.6 (revision: 19716) package microtype: version: 2.5a (revision: 30755)   Is this a bug in geometry, microtype or LuaTeX?


How to create a separate theme for webform

I have a created a webform in drupal, now i want to create webform.tpl.php for this webform. How to do this? Any suggestion


Find the PDF of Y given Y=X(2-X) and X's PDF

Suppose that the continuous random variable $X$ has probability density function  $f_X(x)=\begin{cases}\frac{1}{2}x & \text{if } 0<x<2\\0&\text{otherwise}\end{cases}$  Let $Y=X(2-X)$. Calculate $P(Y>y)$ and hence find the probability density function of $Y$.  So far I have tried expressing $P(Y>y)$ as $P(X(2-X)>y)$ but the quadratic inside has me stuck. Sorry - I am revising for an exam and it has been a long time since I have answered questions like this.


I found this command that allows you to insert an Adobe font like Helvetica  \renewcommand{\stitlefont}{\fontfamily{phv}\fontsize{14pt}{14pt}\selectfont}  I have more questions:   phv is an abbreviation? Are there others? Similarly I can insert font ttf? Just change the name between braces, like {berasans}?   Thanks!


How is a struct in C sized? For example with the below: struct Person {     char* name;     char age; };  int main(int argc, char* argv[]) {     struct Person person1;     person1.name = "John Smith";     person1.age = 40;     printf("The size of the Person object is: %lu.\n", sizeof(person1)); }  This gives me a size of 16 and not 9. How is a struct aligned then or is it dependent on the architecture or C implementation? For example, is it on 16-byte boundaries, 8-byte boundaries, etc.?


No more turn left to get focus at infinity (hit the lens limit)

Academic question:  If I run out of turn attempting to achieve an infinity focus (close, but no cigar) would I:   Move the lens away from the sensor? OR Move the lens closer to the sensor?


How to add up all the 1s in a binary representation of a number

I have this code that gets the binary representation of a number. I am trying to add up all the 1s that the number has. My problem is that when instead of adding up all the 1s it is just printing them out.  what I am trying to get  99 = 01100011  there are 4 1's     What am getting  there are 1111 1's     #include <iostream> using namespace std;  int binary(int N) {     if (N == 0)     {         return 0;     }     else;     {         binary(N/2);         int num = 0;         if (N % 2 == 1)         {         num++;          cout<<num<<endl;         }        } } int main() { int number; cout << "Please enter a number that is greater or equal to 0: "; cin >> number;  binary(number);  }


How to get direct link of images on Imgur?

It was possible to get the direct link some months ago but now, since Imgur was updated, I am unable to find the direct link. See:


Unsafe downcasting of Object to Comparable type causes trouble

I'm implementing a set of data structures and decided to try an implementation of a maxheap through an array, since it is one of the common implementations for maxheaps. To do that, I have an interface called MaxHeap<T> which accepts Comparable types T and the following class signature:   public class ArrayMaxHeap<T extends Comparable<T>> implements MaxHeap<T> {   T has to be Comparable, or else I won't be able to compare the elements with one another when doing additions and removals from the heap. The problem lies with the constructor of the class:  public class ArrayMaxHeap<T extends Comparable<T>> implements MaxHeap<T> {      private T[] data;     private int last;     private static final int INIT_CAPACITY = 10;      /**      * Creates an empty ArrayMaxHeap with the default capacity.      */     public ArrayMaxHeap(){         data = (T[])(new Object[INIT_CAPACITY]);         last = 0;     }   The type casting of data is throwing a ClassCastException, because the downcasting from Object, which is not Comparable, is unsafe. I've hit a wall with this and am not sure how I would go about implementing the constructor. Any help would be appreciated.


I know this is going to be crazy easy for someone, but I forget... what was the book series where the aliens attacked earth, wiped out a bunch of people, thought they were going to rule it so gave us a disease where girls were just as horny as guys so we could repopulate really quickly?


Why it is not possible to possible on ubuntu to install antivirus or other software just by downloading exe file instead of using command line?  Im having all the pains to install free AVG 2014 on ubuntu 12.04 Thanks


I have downloaded the latest version of Drupal 8 my project structure looks like:  private/   EntityOne.php    EntityTwo.php   Test.php => Test Script (Eventually AUT) public/   index.php => Drupal Engine   Inside Test.php I wish to begin building a series of entities which at first will be used externally and eventually be moved into Drupal modules.  I have Googled and spent hours trying to get Doctrine to start letting me build tables with my entities, but I am doing something wrong.    Is of no help, there is no "vendor/autoload.php"  but there is a "core/vendor/autoload.php"  I can include this file in Test.php and everything is fine but when I start adding code:    include '../public/core/vendor/autoload.php';    use Doctrine\ORM\Tools\Setup;   use Doctrine\ORM\EntityManager;    // Create a simple "default" Doctrine ORM configuration for Annotations   $isDevMode = true;   $config = Setup::createAnnotationMetadataConfiguration(array(__DIR__."/src"), $isDevMode);   I get an error:  Fatal error: Class 'Doctrine\ORM\Tools\Setup' not found in ...\private\index.php on line 10  There is no "Doctrine/ORM"  What am I missing???  Alex


Custom off topic dialog allows incomplete sentences from the prefill

In   comments, the user has been able to submit a custom off topic reason that says:     This question appears to be off-topic because it is about   While it's not really feasible to check for complete sentences, can the system at least detect when the user does not add anything of significance to the custom off topic reason and act accordingly? Maybe it can open up a dialog saying "Please enter a custom comment", or let the vote through without leaving the autocomment.


Is the argument used by the Numberphile video to show that $1 + 2 + 3 + 4 + \dots = -1/12$ valid?


I don't want to be associated with my question. How can I hide it?

One of my highest voted questions on stack exchange, while interesting, is not something I want to be associated with when someone decides to look at my profile. I'd be happier if I had more questions voted above it (quite a few more), or if it simply didn't appear in my list.  Can I make it not appear in my list? Can I decouple myself from the question, or otherwise make my involvement invisible? Specifically for anyone looking at my profile on careers (which hasn't really been developed, precisely because I'm not keen on them seeing this question), but, if not, then generally?


C++ error LNK2019: unresolved external symbol "public: __thiscall

I am sure this has something to do with my templates.  I am very rusty on that particular feature, but it could be something else, mostly due to not understanding what this error really means.  I have 4 errors  1>universe.obj : error LNK2019: unresolved external symbol "public: __thiscall LL<class Solar_System>::LL<class Solar_System>(void)" (??0?$LL@VSolar_System@@@@QAE@XZ) referenced in function "public: __thiscall Universe::Universe(class std::basic_fstream<char,struct std::char_traits<char> > &)" (??0Universe@@QAE@AAV?$basic_fstream@DU?$char_traits@D@std@@@std@@@Z) 1>universe.obj : error LNK2019: unresolved external symbol "public: __thiscall LL<class Solar_System>::~LL<class Solar_System>(void)" (??1?$LL@VSolar_System@@@@QAE@XZ) referenced in function __unwindfunclet$??0Universe@@QAE@AAV?$basic_fstream@DU?$char_traits@D@std@@@std@@@Z$0 1>universe.obj : error LNK2019: unresolved external symbol "public: __thiscall LL<class Empire>::LL<class Empire>(void)" (??0?$LL@VEmpire@@@@QAE@XZ) referenced in function "public: __thiscall Universe::Universe(class std::basic_fstream<char,struct std::char_traits<char> > &)" (??0Universe@@QAE@AAV?$basic_fstream@DU?$char_traits@D@std@@@std@@@Z) 1>universe.obj : error LNK2019: unresolved external symbol "public: __thiscall LL<class Empire>::~LL<class Empire>(void)" (??1?$LL@VEmpire@@@@QAE@XZ) referenced in function "public: __thiscall Universe::~Universe(void)" (??1Universe@@QAE@XZ)   universe.h  #ifndef UNIVERSE #define UNIVERSE  #include <fstream> #include "solar_system.h" #include "empire.h" #include "LL.h" #include "race.h"  using namespace std;  class Universe{ public:     Universe();     Universe(fstream &save);     ~Universe(); protected: private:     LL<Solar_System> list_uni_systems;     LL<Empire> list_uni_empires;   };  #endif   LL.h  #ifndef EA_LINKEDLIST #define EA_LINKEDLIST  #include "LL_Node.h"  template <class A> class LL{ public:     LL();     ~LL();     void add(LL_Node<A>);     void remove();     void next();     void prev();     void search(LL_Node<A>, LL_Node<A>*);     bool find(LL_Node<A>);     A get(); protected: private:     LL_Node<A> *head, *curr, *tail;     int LL_ID_CODE; };  #endif   if you need any of the other source let me know.  any help or guidance or ideas would be a great help, thanks


How does regurgitated food go to the 3rd stomach chamber instead of going to the 1st?

Ruminants are known for their regurgitation of food; the food goes through the 1st and 2nd stomach chambers, then returns to the oral cavity in cuds. The cuds then come back into the stomach, but this time they go through the 3rd and 4th chambers, instead of going to the 1st and 2nd again.  How is it ensured that the regurgitated food doesn't go through the 1st and 2nd chamber by a mistake?


How can I undo Edit steps in Object Mode?

From time to time I lose all edits because of undo in Object Mode. If I enter immediately after Undo in Edit Mode I can't redo, and switching again in Object results in losing all edit history.  How can I resolve this? Separating undo history by mode or linear/unified will both be acceptable.  Edit:I think the most preferable solution will be to disable/skip edit undos when in object mode through an addon.


Why was Lily Potter not punished by the Ministry for turning teacups into rats during the vacation?

In Harry Potter and the Sorcerer's Stone there is following tirade from Petunia Dursley:     "Knew!" shrieked Aunt Petunia suddenly. "Knew! Of course we knew! How   could you not be, my dratted sister being what she was? Oh, she got a   letter just like that and disappeared off to that - that school- and   came home every vacation with her pockets full of frog spawn, turning   teacups into rats. I was the only one who saw her for what she was - a   freak! But for my mother and father, oh no, it was Lily this and Lily   that, they were proud of having a witch in the family!"   Why would Lily do this? Didn't she have the Trace at that point? Or was the Trace and the restriction for underage magic introduced later (unlikely since everyone knew about it)?


How to model with polygons, the hinges of Medical 3-Spring Aluminium Chart Holder?

Medical 3-Spring Aluminium Chart Holder Provides Strong 3-spring closure form medical  histories.• As shown in the figure below.


Ubuntu 14.04.3 - Qualcomm Atheros WLAN - not working - Lenovo Z51-70

I'm new to ubuntu. I have installed Ubuntu 14.04.03 LTS in my Lenovo Z51-70 laptop with Windows 10 dual boot. But the Ubuntu 14.04.3 - Qualcomm Atheros WLAN is not working. not able to connect to WiFi. Help Me.


What is the difference between a customizable framework and a library?

I'm working with  and I'm wondering if it's rather a library than a framework, the author himself describes SlateJS as:      A completely customizable framework for building rich text editors   Okay so it's a library at the end ? ReactJS is also a completely customizable creator of web application in a some point of view _  Just to review theses concepts,  any hint would be great, thanks


$f:(0,\infty)\to \mathbb{R}$ is differentiable such that $f'(x)\to l$ as $x\to \infty$. Prove that $ \frac{f(x)}{x}\to l $ as $x\to \infty$.


"Police have found what appear to be human remains." versus "– What's in the box? – Chocolates to die for!" Why the different agreement?

In my CD-ROM version of the Longman Dictionary of Contemporary English, an example sentence for the verb 'to appear' is:  "Police have found what appear to be human remains."  Gruesomeness apart, what I find shocking is the agreement of 'appear' with a 'what' that is plural, 'human remains', whereas in the sentence "– What's in the box? – Chocolates to die for!" the agreement is in the singular even though 'what' also represents a plural noun: 'chocolates'!  Why the different agreement?


If maximum value of $\int_0^1 (f(x))^3dx$ under the condition $-1\le f(x) \le 1$;$\int_0^1 f(x).dx=0$ is $\frac pq$, find $p+q$

If $-1\le f(x) \le 1$, then $-1\le (f(x))^3 \le 1$ (I think, I am not sure what changes cubing will bring because it is <1) So the maximum value of $\int _0^1 (f(x))^3$ should also be 1, but that is not the right answer I have no other way to think on this. How to solve it properly?


I'm trying to open a catalog AI file with 32 pages and need to adjust each page in Illustrator CS6. How do I open the AI file in one single AI files with all artboards within it?


Find minimum value in a row and return corresponding column name

How do I find the minimum value in a row and return corresponding column name?  Month   Price 1   Price 2   Price 3 Jan     10,000    20,000    9,000   So in the end I wish the formula to return Price 3 in a particular cell on a separate worksheet


Elegant way to search for UTF-8 files with BOM?

For debugging purposes, I need to recursively search a directory for all files which start with a UTF-8 byte order mark (BOM). My current solution is a simple shell script:  find -type f | while read file do     if [ "`head -c 3 -- "$file"`" == $'\xef\xbb\xbf' ]     then         echo "found BOM in: $file"     fi done  Or, if you prefer short, unreadable one-liners:  find -type f|while read file;do [ "`head -c3 -- "$file"`" == $'\xef\xbb\xbf' ] && echo "found BOM in: $file";done  It doesn't work with filenames that contain a line break, but such files are not to be expected anyway.  Is there any shorter or more elegant solution?  Are there any interesting text editors or macros for text editors?


I'm highly curious to know why a particular answer which was flagged by me as "Not an Answer" was rejected with the status disputed?   I'm talking about.  Just to be sure, I double checked this link,  and found that the answer which I had flagged did not fit the bill at all.  Is that just because the answer was big(more than 3 lines is considered big these days) with a code snippet, that my NAA flag was disputed or what?   If you look at the answer, the person who posted the answer has also put an edit saying Edit: I didn't read this carefully enough, your code already has it.. How can such an answer actually be an answer(or even come close to answering that question)?


I was wondering which tense should be used in the following indirect questions? First case:  1.1. Where are you going? → I asked where you are going  1.2. Where are you going? → I asked where you were going  Second case:  2.1. Why are you crying? → He asked me why I am crying  2.2. Why are you crying? → He asked me why I was crying  I think since the tense of main verb within the indirect question is simple past, the correct sentences would be "#1.2" and "#2.2". I wonder if you could correct me if I am mistaken.


can insert new row in null cachedrowset?

There is SQLException java.lang.NullPointerException when moveToInsertRow() method called.  rsStock.moveToInsertRow();  rsStock.updateInt(1, 1);  rsStock.updateInt(2, 1);  rsStock.insertRow();  rsStock.moveToCurrentRow();


How to find the 25th, 50th, and 75th percentiles also know as the 1st, 2nd, and 3rd quartiles of the data-set?

Here is the data-set:   I understand that the cum per sums all the previous data up until that point. So 153 / 1655 = 19.8%, or if looking at the cum freq a total of 328 people scored 4 or less on the vocabulary test. But how does one determine if this is the 25th percentile? At what point in the range of cum per would one know it it's the 25th percentile, 50th percentile or 75th percentile?  Please help Thank you


I have a simple question. I have calculated the area of the polygons in my shapefile, but the number seems confusing for me. I need the area to be shown in km2 but instead I get numbers like:0.004008  What are the units of this number?  When I used the "measure area" icon, that is, when I measured the same polygon manually the size of the polygon shows me: 50.342km2  See, the two numbers are completely different. How is that??  Thanks for any help!!


Are Ubuntu 16.04 & 18.04 compatible with Canon MG3650 all in one printer, or suggestions please


How should we handle a question which was deleted and reasked?

A user has asked  which did not receive much attention, and thus the user deleted the post. After some time, the user asked the  (with just slight changes to the title and a tag change), so that it could receive a bit more attention. The strange thing is that the question was not downvoted or poorly written, and yet the user deleted the original post. Now, since the original question was deleted, I could not mark the new one as a duplicate (it threw an error). My question is, how do we handle such questions? Just let them be as such or let the user know about it or is there another way to handle such situations?


Let $R =\{f:\{1,2,3,4,\cdots ,10\}\to \mathbb{Z}_2 \}$ be the set of  all $\mathbb{Z}_2$ -valued functions on the set $\{1,2,3......10\}$  of the first ten positive integer. Then $R$ is a commutative ring with point-wise addition and multiplication of functions. Which of the following is true?     1) $R$ has a unique maximal ideal.      2) Every prime ideal of $R$ is also maximal.      3 ) The number of proper ideals of $R$ is $511$.      4 ) Every element of $R$ is idempotent.   R is finite commutative ring so  every prime ideal  is maximlal ideal ,so I think option  2 is true   .But for the other options   I am  helpless  .


Suddenly, Snap Store does not start. When started from the terminal, it displays the message: /snap/snap-store/518/usr/bin/snap-store: symbol lookup error: /snap/snap-store/518/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined symbol: atk_plug_set_child  Did some recent update maybe break something? How to fix it? (I can use GNOME Software as workaround, that works correctly)


I want to draw a perfect rectangle. How can I do that with QGIS v.3+?  .  Is there a similar solution for the latest QGIS version?


This is a neat little problem that I was discussing today with my lab group out at lunch. Not particularly difficult but interesting implications nonetheless  Imagine there are a 100 people in line to board a plane that seats 100. The first person in line realizes he lost his boarding pass so when he boards he decides to take a random seat instead. Every person that boards the plane after him will either take their "proper" seat, or if that seat is taken, a random seat instead.  Question: What is the probability that the last person that boards will end up in his/her proper seat.  Moreover, and this is the part I'm still pondering about. Can you think of a physical system that would follow this combinatorial statistics? Maybe a spin wave function in a crystal etc...


529 College Savings Plans - How flexible is it, and can I withdraw (and pay taxes) if unused?

My US-born daughter has triple citizenship - Brazil, US and UK. We live in Texas and I would like to start saving for her education. My wife and I are also considering sending her to private elementary/middle/high school, and as far as I know, under the new tax rules the 529 savings (or part of them) can be used for that purpose as well.   If my daughter goes to university in Brazil (where many universities are free), can I get the money out of the 529 plan back to myself as a regular investment provided that I pay the income tax that was deferred for all these years (and possibly a penalty)? i.e. can I "convert it" back to a regular investment account? More importantly, would it be worth it? I know some universities in some countries (Canada, for exampe) accept 529 plans for the tuition costs. However, if she goes to university in another country that doesn't officially accept a 529 plan, is there any way I can withdraw the money to pay for her tuition, provided that I present proof to the 529 administrator? If I never use the money to pay for college tuitions, is it OK if I use the 529 account for the sole purpose of paying for private school? I know there's a limit of how much I can use for that purpose. For my specific situation, how do 529 plans compare to Roth IRAs?


I have some songs which are in mp4 format and I want to convert them into mp3 format.   I am new to Ubuntu/Linux. So please explain the step by step process or give any software which can do the above job.


Proving that the radical of an ideal is an ideal

I'm trying to solve problem 1.18 in Fulton's 'Algebraic Curves', which is illustrated in the attached image, but I'm having some difficulties understanding the first part.  The ring R is assumed to be commutative and unital, so the first thing that came to mind was to consider the binomial expansion of $(a+b)^{n+m}$, but I don't see why powers of $a$ which are less than n, or powers of $b$ which are less than m should be contained in the ideal.  An explanation as to how I can show that $Rad(I) $ contains $a+b$ would be appreciated, particularly I'd like to know if one can indeed be guaranteed the containment (in I) of the aforementioned terms from the binomial expansion.  I suspect that I may be missing or forgetting some ring theoretic fact.


Why did Thor go dipping in some pool in cave?

I watched Avengers : AoU and there was this scene where Scarlet Witch messes up Thor's mind. So after few scenes he finds Erik Selvig and they go inside a cave where they find a pool. Thor baths in this pool and starts sending out electric bolts and the images of bad dreams that Scarlet Witch gave, start appearing. What was this scene all about? What was this pool made of? How did Erik Selvig know about it.  I assume it was some anomaly that occurs where various realms meet as shown in Thor 2.


Sharing setup details between QGIS users?

We have just started using QGIS on windows at my work and I am the application responsible. I want my users to have a predefined setup with a couple of extensions and some WMS servers as a starting point. (If they want to add something afterwards, that's fine with me)  How do I do this?   I would prefer not to send out a description with open this menu and do that.   Is it possible to distribute some qgis-project or some type of .ini or .reg file with this information?


Converting survey results from a 1-4 scale average to a 1-5 scale average

I'm completely new at analyzing survey answers, and it will be great if anybody can help me out here with conversion technique. Survey participants were provided answer choices on a ranking scale of 1-4 and we got the average.  We're trying to change the ranking scale to 1-5. I understand that there are different schools of thoughts that participants would have responded differently if they'd been given a different range of scale, but it needs to be converted.   I keep thinking that there must be a formula that can be applied to this, but I cannot come up with it. For instance, if average score is 3.4, what kind of arithmetic formula should I use to get an average score on the 1-5 scale?   Any insight will be greatly appreciated & thank you so much!


How does a Reverse DNS lookup work with regards to spam filters?

I have heard that most spam filters use a reverse DNS lookup on the originating IP address of the sending SMTP server (or something like that) as part of the verification process.  I want to make sure my emails will pass this check.  How exactly can I verify that my emails are OK?  In researching it, I've noticed that if I look at the header of a valid email message coming from Gmail, I will see something like this:  Received: from mail-pz0-f185.google.com (mail-pz0-f185.google.com [209.85.222.185])         by mx.google.com with ESMTP id 10si2346996pxi.164.2009.07.22.22.26.19;         Wed, 22 Jul 2009 22:26:19 -0700 (PDT)   When I do an nslookup on 209.85.222.18, it responds with mail-pz0-f185.google.com, which is what I would expect.  If it responded with a different domain, then I assume that would indicate a problem and it would fail the check.  Is this what the reverse DNS lookup is all about or am I barking up the wrong tree?


Discreteness of set of energy eigenvalues

Given some potential $V$, we have the eigenvalue problem   $$ -\frac{\hbar^2}{2m}\Delta \psi + V\psi = E\psi $$   with the boundary condition   $$ \lim_{|x|\rightarrow \infty} \psi(x) = 0 $$   If we wish to seek solutions for   $$ E < \lim_{|x|\rightarrow \infty}V(x), $$   I find textbooks like Sakurai and others assert that (without proof) set of all such eigenvalues $E$ that admits nontivial solutions is discrete, which gives us liberty to index them with natural numbers (principal quantum numbers). Can anyone help me with a little elaboration of this mathematical fact ? As a student of mathematics, I know that compact operators have discrete spectrums, so for the operator $ T : L^2 \rightarrow L^2 $given as  $$ T(\psi) = -\frac{\hbar^2}{2m}\Delta \psi + V\psi. $$   Are there methods to show that $T$ is compact? Or possibly other ways to establish discreteness of its eigenspectrum?


Creating a new FTP user and giving him only the right to 1 folder

I have a Linux Debian machine that I own (root access).   I would like to create a new user called "testuser" and give him the right to view, edit and delete files from only one specific folder located in  /var/www/html/specificfile   I do not mind if the user can see which other files exist in /var/www/html/ (or anywhere else). But the user definitely can only view, edit and delete the files contained in the folder /var/www/html/specificfile.  The user ("testuser") isn't created yet.   How do I  perform this action?  The user will access the machine only over FTP.


Double Sideband Suppressed Carrier modulator List

I am using ring modulator for DSB-SC  am modulation in a transmitter circuit. Can anyone please tell me about more DSB SC modulator for am modulation? I want to know which one to use where?


19.10 Nautilus Terminal causes failure to fetch launchpad.net

So I just got into Linux (or more specifically into Ubuntu) last week. I really like the ability to customize everything, so I got ahead and started to mod my OS a bit. I really wanted a terminal built in my nautilus file explorer. The only option that really worked was from launchpad.  Only each time I try sudo apt update I get this error message:  E: Failed to fetch http://ppa.launchpad.net/flozz/flozz/ubuntu/dists/eoan/main/binary-amd64/Packages  404  Not Found [IP: 2001:67c:1560:8008::15 80] E: Failed to fetch http://ppa.launchpad.net/flozz/nautilus-terminal/ubuntu/dists/eoan/main/binary-i386/Packages  404  Not Found [IP: 2001:67c:1560:8008::15 80] W: Some index files failed to download. They have been ignored, or old ones used instead.   I tried to add a [trusted=yes] in the /etc/apt/sources.list.d files belonging to the packages which cause the problem.  I tried uninstalling the nautilus terminal, and reinstalled it according to the instructions on git-hub but it did not resolve the issue.  What shall I do?


What Percentage is considered a good flagging history standard?

What would be a good standard for helpful flags? If 95%+ of your flags are deemed helpful is that good? or should it be higher?


Show "countable complement topology" is a topology

I'm teaching my self topology with the aid of a book. I'm trying to prove the following is a topology:     Let X be an infinite set. Show that $\mathscr{T}_2=\{U \subseteq X : U = \emptyset $ or $ X\setminus U $ is countable$ \} $ is a topology.   My book calls this set the ""  Please let me know if my proof is valid.     corollary [A]: The union of countable sets are countable.    proof: I'm going to take as a given that that the union of finite set are finite, and just prove the case of . A set is countable infinite if there is a bijection between the set and the natural numbers. Let $A$ and $B$ be a countable infinite sets. Now let $f$ be the bijection between $A$ and $\mathbb{N}$ and $g$ be $B$'s bijection.  $f:\mathbb{N}  \rightarrow  A$  $g:  \mathbb{N}  \rightarrow B$  There can always exist a bijection $h$ that maps $A \cup B $ to $\mathbb{N}$. To account for non disjoint sets, let $B' = B \setminus A$; (note: $A \cup B = A \cup B'$)  $h:  \mathbb{N}   \rightarrow  A \cup B'$  $ h(x) = \left\{         \begin{array}{ll}             f(\frac{1}{2}x); & \quad x \in 2\mathbb{N} \\             g(\frac{x+1}{2}); & \quad x \in 2\mathbb{N}+1         \end{array}     \right. $   $h^{-1}(x)$ would map $A$ to the even numbers, and $B'$ to the odd numbers.  Therefore, The union of countable sets are countable. (QED)  Now to verify the definition.     (i) X and Ø are elements of $\mathscr{T}$.   Ø is given in the definition of $\mathscr{T}_2$. Also, the empty set is considered finite, with cardinality zero. Thus $X$ is in $\mathscr{T}_1$ because its complement is finite, and finite numbers are countable.      (ii) $\mathscr{T}$ is closed under finite intersections.   Let:$V_k \subseteq X$ be any countable set. (ie: $V_1, V_2...$ are all countable sets)  So Then, $U_k = X \setminus V_k$, would be the subsets of $\mathscr{T}_2$.  $U_k \cap U_j = X \setminus (V_k \cup V_j) $, due to De Morgan's law.   Thus, $U_k \cap U_j \in  \mathscr{T}_2$, since the Union of two countable sets is also countable[A]. And This reasoning can be extended to any finite amount of intersections.       (iii) $\mathscr{T}$ is closed under arbitrary unions.   Let $A=\bigcup_{i \in I} U_i$ be an arbitrary union of sets whose complements are are countable.Then by De Morgan's law, $A=X \setminus (\bigcap_{i \in I}V_i)$, for some countable sets $V_i$. By the definition of intersection, $\bigcap_{i \in I}V_i \subseteq V_i$ for all $i \in I$. Since $V_i$ is countable so is any of its subsets.  Hence the complement of $A$ is countable.


Ubuntu 16.04 wifi not working with Realtek RTL8821AE wireless card

Restarting network manager corrupted my network manager, after that I reinstalled fresh ubuntu I also tried , but nothing works for me Wicd is also not robust My Kernel version is (4.10.0-28-generic) Here is my output of network details:     sudo lshw -C network  *-network                   description: Ethernet interface    product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:02:00.0    logical name: enp2s0    version: 10    serial: d0:17:c2:12:1b:d7    size: 10Mbit/s    capacity: 1Gbit/s    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation    configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168g-3_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s    resources: irq:47 ioport:4000(size=256) memory:b2104000-b2104fff memory:b2100000-b2103fff *-network    description: Wireless interface    product: RTL8821AE 802.11ac PCIe Wireless Network Adapter    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:03:00.0    logical name: wlp3s0    version: 00    serial: b0:c0:90:69:0e:6d    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless    configuration: broadcast=yes driver=rtl8821ae driverversion=4.10.0-28-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11    resources: irq:51 ioport:3000(size=256) memory:b2000000-b2003fff *-network    description: Ethernet interface    physical id: 1    logical name: enp0s20u8    serial: 7e:b3:cd:e0:18:61    capabilities: ethernet physical    configuration: broadcast=yes driver=rndis_host driverversion=22-   Aug-2005 firmware=RNDIS device ip=192.168.42.238 link=yes multicast=yes   Here is the output of lsusb  Bus 001 Device 004: ID 138a:0010 Validity Sensors, Inc. VFS Fingerprint sensor Bus 001 Device 003: ID b49a:04f2   Bus 001 Device 002: ID 8087:8001 Intel Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 003: ID 0bda:57bc Realtek Semiconductor Corp.  Bus 002 Device 002: ID 24ae:2000   Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   Output of dkms status  The program 'dkms' is currently not installed. You can install it by typing:   sudo apt install dkms  here is the output of networks when it is not showing in network manager Applet using command    sudo iwlist wlp3s0 scan | grep -i SSID  ESSID:"Error" ESSID:"Sagar_Network"                   ESSID:"USER_5EE147"                     ESSID:"CPH1701" ESSID:"Moto E\xC2\xB3 POWER 4025" ESSID:"AAAAAHz2tmkAQwHVRedmi" ESSID:"Rconsultant"