Why does Python list initialization method affect indexing?

I recently stumbled on some serious weirdness with python lists if you try to use them like arrays (not by appending):  make a list by duplication:  myLists = 5 * [3 * [0]] print(myLists)   [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]]  run this...you get:  for i in range(5):     for j in range(3):         myLists[i][j] = i + j print(myLists)   [[4, 5, 6], [4, 5, 6], [4, 5, 6], [4, 5, 6], [4, 5, 6]]  why only the last row copied everywhere?  now, create the list contiguously with list comprehension:  myLists = [[0 for i in range(3)] for j in range(5)] print(myLists)   here it is (it's the same structure):  [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]]  run the same loops...now you get:  for i in range(5):     for j in range(3):         myLists[i][j] = i + j print(myLists)   [[0, 1, 2], [1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, 6]]  now it's correct...  I'm guessing some strange linked-list-related pointer details under the CPython hood cause this, but I don't know what they are...  Can anyone help?


I'm a bit confused with a lecture on linear regression given by Andrew Ng on Coursera about machine learning. There, he gave a cost function that minimises the sum-of-squares as:  $$ \frac{1}{2m} \sum _{i=1}^m \left(h_\theta(X^{(i)})-Y^{(i)}\right)^2 $$  I understand where the $\frac{1}{2}$ comes from. I think he did it so that when he performed derivative on the square term, the 2 in the square term would cancel with the half. But I don't understand where the $\frac{1}{m}$ come from.  Why do we need to do $\frac{1}{m}$? In the standard linear regression, we don't have it, we simply minimise the residuals. Why do we need it here?


Can Ubuntu Touch run on a Toshiba Encore Mini WT7-C16 Tablet?


HPLIP gives a error messages when trying to installing plug-in for HP P1102W-printer

I had a HP P1102W-printer installed on my Ubuntu 14.04. I used some program from HP that already had the drivers (no download) and made a successful installation... no issues.  After formatting the HDD and reinstalling the OS I could not find that HP-program again but tried HPLIP instead (3.15.7 and 3.15.6). But HPLIP can not find or download the necessary plug-in.  I have tested the "hp-doctor" that suggest that I should download the missing driver from internet/ HP-server. But all efforts ends with the same error message.  Error message:  Checking for network connection... Downloading plug-in from:  error: Plugin download failed with error code = 8 error:  file does not match its checksum. File may have been corrupted or altered   Any suggestions?? Is this problem with my PC or is it with the HP-server. Can the old installation program from HP be found somewhere (not HPLIP)?  Found additional reference..


I am going through Concrete Mathematics and am having some difficulty understanding this particular spot in the chapter which introduces the Josephus problem.  Hopefully someone can clarify.  So let's suppose that we have 2n people originally. After the 1rst go around, we're left with   **image showing just the odd members left.**  and 3 will be the next to go. This is just like starting out with n people, except that each person's number has been doubled and decreased by 1. That is,        J(2n) = 2J(n) - 1 ; for n >= 1. We can now go quickly to large n. For example, we know that J(10) = 5, so         J(20) = 2J(10) - 1 = 2·5 - 1 = 9 :   Here is what I do not understand:    Similarly J(40) = 17, and we can deduce that J(5·2^m) = 2^(m+1) + 1.   How did we deduce J(5·2^m) = 2^(m+1) + 1.?  It seems to pop out of nowhere to me.


With "find /", skip directories like "/proc", "/sys" and similar

There are some directories that can cause problem with find, and especially find /. These are directories in which the OS creates files which are not really files. Among these directories are /proc /sys /run.  The thing is that if you are doing something like find / -exec grep, you can mess up the system real bad if you crawl some of these systems.  So how can I tell find to skip these directories without listing them. Because someone just may decide to create a new directory like this. Rather then rely on a list I would rather have a test for the directory and an option to exclude directories that fail this test.


I am searching for an easy example of a subgroup which is quasinormal but not normal. Please help.


If some humans inherited 3% of Neanderthal DNA, why are we 99.9% same genome?

Many sources say that humans are 99.5 to 99.9 percent the same.   Also some sources state that some humans have 3.4% Neanderthal DNA and some don't share those genes.   Why is that?


What does the small number when switching characters means?

In GTA 5, when you switch characters, what is the small number beneath their face mean?


I want to count trees in SAGA GIS and I am trying to follow the steps described in  from dominoc925.blogspot.com (05th, March, 2012).  The problem is while I was able to convert the las file into an .asc DEM, I could not retrieve the .asc DSM from the las file. Hence, I can't accomplish step 1 in the workflow above, because I need to import the DSM in SAGA.  How can I convert a las file into DSM?


What does the term saturating nonlinearities mean?

I was reading the paper  and in section 3 were they explain the architecture of their Convolutional Neural Network they explain how they preferred using:     non-saturating nonlinearity $f(x) = max(0, x). $   because it was faster to train. In that paper they seem to refer to saturating nonlinearities as the more traditional functions used in CNNs, the sigmoid and the hyperbolic tangent functions (i.e. $f(x) = tanh(x)$ and $f(x) = \frac{1}{1 + e^{-x}} = (1 + e^{-x})^{-1}$ as saturating).   Why do they refer to these functions as "saturating" or "non-saturating"? In what sense are these function "saturating" or "non-saturating"? What do those terms mean in the context of convolutional neural networks? Are they used in other areas of machine learning (and statistics)?


Single link in (Author, Year) citation style using natbib and hyperref

natbib and hyperref create by default two links to the bibentry in the reference section|chapter of the document:   \begin{filecontents}{\jobname.bib} @book{author08, title = {{A Title}}, publisher = {Alpha}, year = {2008}, author = {Author, A}, address = {London} } @book{buthor90, title = {{B Title}}, publisher = {Bravo}, year = {1990}, editor = {Buthor, B}, address = {New York} } \end{filecontents}  \documentclass{article}  \usepackage{natbib} \usepackage{hyperref} \hypersetup{colorlinks,citecolor=red}  \begin{document}  \noindent citet: \citet{author08}, \citet[see][p. 20]{author08} \\ citep: \citep{author08}, \citep[see][p. 20]{author08}  \bibliographystyle{plainnat} \bibliography{\jobname}  \end{document}     In order to avoid two links to the bibliography (one for the [author] and one for the year [year], respectively), I took  to an older question and added it to my preamble.  \usepackage{etoolbox} \makeatletter  \pretocmd{\NAT@citex}{%   \let\NAT@hyper@\NAT@hyper@citex   \def\NAT@postnote{#2}%   \setcounter{NAT@total@cites}{0}%   \setcounter{NAT@count@cites}{0}%   \forcsvlist{\stepcounter{NAT@total@cites}\@gobble}{#3}}{}{} \newcounter{NAT@total@cites} \newcounter{NAT@count@cites} \def\NAT@postnote{}  % include postnote and \citet closing bracket in hyperlink \def\NAT@hyper@citex#1{%   \stepcounter{NAT@count@cites}%   \hyper@natlinkstart{\@citeb\@extra@b@citeb}#1%   \ifnumequal{\value{NAT@count@cites}}{\value{NAT@total@cites}}     {\ifNAT@swa\else\if*\NAT@postnote*\else%      \NAT@cmt\NAT@postnote\global\def\NAT@postnote{}\fi\fi}{}%   \ifNAT@swa\else\if\relax\NAT@date\relax   \else\NAT@@close\global\let\NAT@nm\@empty\fi\fi% avoid compact citations   \hyper@natlinkend} \renewcommand\hyper@natlinkbreak[2]{#1}  % avoid extraneous postnotes, closing brackets \patchcmd{\NAT@citex}   {\ifNAT@swa\else\if*#2*\else\NAT@cmt#2\fi    \if\relax\NAT@date\relax\else\NAT@@close\fi\fi}{}{}{} \patchcmd{\NAT@citex}   {\if\relax\NAT@date\relax\NAT@def@citea\else\NAT@def@citea@close\fi}   {\if\relax\NAT@date\relax\NAT@def@citea\else\NAT@def@citea@space\fi}{}{}  \makeatother     Which gets me almost where I want to be, but leaves me with two issues I would like to be solved:   while \citet includes pre- and postnotes in the link, \citep doesn't. How can \citep be changed to include postnotes? is there a way to color the brackets and commas that are typeset in black in the unmodified first example also in black in the modified second example without removing them from the link?


Why does a balloon spiral in the air instead of moving in a straight line?

When an air-filled balloon is released without its opening tied up, it moves in a circular path rather than a straight line. Why is that?


Show $E(\frac{1}{2\theta\sum_{i = 1}^n W_i}) = \frac{1}{2(n-1)}$ given the pdf $f(y\mid\theta) = \theta y^{\theta - 1}$

Let $Y_1, \ldots, Y_n$ be a random sample from the pdf $$f(y\mid\theta) = \theta y^{\theta - 1}, 0 < y < 1, \theta > 0 .$$ show that $$E\left(\frac{1}{2\theta\sum_{i = 1}^n W_i}\right) = \frac{1}{2(n-1)}$$  I have showed that $\sum_{i = 1}^n -\ln(Y_i)$ is sufficient for $\theta$, and if $W_i = -\ln(Y_i)$, I have showed that $W_i$ has an exponential distribution with mean $1/\theta$. I have also showed that $2\theta \sum_{i=1}^n W_i $ has a $\chi^2$ distribution with $2n$ degrees of freedom.  My first question can we treat $2\theta\sum_{i=1}^n W_i$ as just 1/y? If so, I got to the following step $$\int_0^\infty \frac{1}{y} f(y) dy = \frac{1}{\Gamma(n)} \frac{1}{2} \int _0^\infty u^{n-2} e^{-u} du$$... I am wondering how to solve $\int _0^\infty u^{n-2} e^{-u} du?$ I know it is going to be $\Gamma(n-1)$ but what is the process for finding it?


Kill time-based action scheduled earlier

How can i deactivate the time based workflow action through code. If a time-based WF action is already schedule to send a mail on a date in near future. Can I change the date or deactivate the action through code.


How can I decide whether it's time to move my own house from rent?

I'm currently renting a home in Budapest and about to reach a point where:  cost of rent + other running costs of it - income from savings > cost of 10 yr loan + running costs of new home  The left side increased because the landlond increased the rent, it's still somewhat below the market price though.  So basically if I were spend my savings into my own home as downpayment  in the suburbs, my net monthly expenses would decrease.  Since I believe my job will always tie me to the capital city, I don't really expect to move away unless there is something really bad happened (like a war or getting kicked out of the EU).  In this situation should I go for it and buy my house or are there any other things I should consider before the purchase?  EDIT: I checked the other question marked as dupe, it doesn't really answer the question I'm asking. That is if the net monthly expenses right would be smaller than expenses of renting, then should I buy now? Also those answers are more than 8 years old now and they are outdated as we are no longer in recession but exactly the opposite. Also the housing prices are skyrocketing in Hungary especially in Budapest and in the suburbs. So there are really lot of money in stake, and I don't want to burn myself. And want to make sure I'm about to do the right decision.


Let $X$ be compact and suppose $f:X\to X$ satisfies   $d(f(x),f(y))<d(x,y)$ whenever $x\neq y$. Show that $f$ has a fixed   point.   $X$ compact and $f$ continuous $\rightarrow f(X)$ compact $\rightarrow f(X)\times X$ compact   we know that,  $d:f(X)\times X \to R$ defined as $(f(x),y)\mapsto d(f(x),y)$ is continuous,  so the image of $f(X)\times X$ is a compact subset of $R$  hence the set $F=\{d(f(x),y)|x,y\in X\}$ is a compact subset of $R$ and therefore contains its infimum, say $\alpha = inf F$  so $\exists x_0, y_0 \in X$ such that $\alpha = d(f(x_0),y_0)$  Now how can I show $\alpha=0$ and $x_0=y_0$ ? or is this not the right approach?


Plural or singular verb when plural subject is separated by an "and"?

A similar question is , in which a comma is used in place of a conjunction like and.   I came across the following quotation of C. S. Lewis which reads,      “What you see and what you hear depends a great deal on where you are standing. It also depends on what sort of person you are.”    Assuming the website which quoted Lewis did not misquote him, should Lewis have used the plural verb, depend? Or is there some arcane rule of grammar of which I am unaware which allows for a plural subject and a singular verb?


Can you stay in Schengen area for longer than your visa expiration date?

We have a Schengen visa valid for 6/19 to 7/19 for trip duration of 20 days. Can we enter say 7/10 and then leave before 7/30? Or does expiration date mean you have to leave Schengen area by then?


Ubuntu 18.04 - Windows Manager (Nautilus) search feature is broken

I've upgraded from 16.04 to 18.04 and I am dissatisfied with the search feature in Nautilus. Previousyly, I could press a letter to jump to a folder that starts with this letter and enter it right away but now, in my opinion it's completely ruined. What happens now is that a search field pops up and it filters all items that start with this letter and shows only the found items. It takes a massive amount of time. For example, previously I could press "w" in my folder and it would jump and highlight the first folder/item that starts with "w" and right now it takes a massive amount of time to search for items starting with "w" and filter them. This made my install Double Commander that has this feature. I will never use Nautiuls again.


How is the "target" of the love potion effect set?

When someone drinks a "love" potion then he/she becomes obsessed with someone for a short time. But how is this someone choosen?  It is not (always) the one who crafted the potion because Fred and George were selling it.


There is a heated debate on a dental hygienist website.  When using RDH or Registered Dental Hygienist when do you use "an" and "a"?  I was taught to write "an RDH" since the letter R in this situation has a vowel sound.  When not using the acronym "RDH", it should be written "a Registered Dental Hygienist" because the letter R has a consonant sound.  Please help.


Produce all solutions for $2a^2 + b^2 = c^2$

I'm trying to generate a stream of tuples $(a, b, c)$ that satisfy the equation  $2a^2 + b^2 = c^2$  The first $10$ results are:  $2,   1,  3$  $4,   2,  6$  $6,   3,  9$  $4,   7,  9$  $6,   7,  11$  $8,   4,  12$  $10,  5,  15$  $12, 1,  17$  $12, 6, 18$  $8, 14, 18$  There is a solution for $x_2+2y_2=z_2$ which is exactly the same but I cannot understand how I can produce all these numbers as a function. For instance, it says $x_3=(a_2+2b_2)t=3$ which is the solution of $c$, in my case, but it includes $x_3$ because $t = \dfrac{1}{2}(x_1+x_3)$. In addition, he gives the values $\{x_1,x_2,x_3\} = \{1,2,3\}$ but I'm not sure which are the next values. Any help please. Thank you in advance!!!


Everytime I try to launch the game (v1.7.4), it starts out normal, then starts getting timeouts half way in while trying to connect to the server, then just says it's assuming that the local file is good, after that I get this:  [17:13:35 ERROR]: Couldn't unpack natives! java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) ~[?:1.7.0_45] at java.util.zip.ZipFile.<init>(Unknown Source) ~[?:1.7.0_45] at java.util.zip.ZipFile.<init>(Unknown Source) ~[?:1.7.0_45] at java.util.zip.ZipFile.<init>(Unknown Source) ~[?:1.7.0_45] at net.minecraft.launcher.GameLauncher.unpackNatives(GameLauncher.java:469) ~[launcher.jar:?] at net.minecraft.launcher.GameLauncher.launchGame(GameLauncher.java:213) [launcher.jar:?] at net.minecraft.launcher.GameLauncher.onDownloadJobFinished(GameLauncher.java:619) [launcher.jar:?] at net.minecraft.launcher.updater.download.DownloadJob.popAndDownload(DownloadJob.java:120) [launcher.jar:?] at net.minecraft.launcher.updater.download.DownloadJob.access$000(DownloadJob.java:12) [launcher.jar:?] at net.minecraft.launcher.updater.download.DownloadJob$1.run(DownloadJob.java:89) [launcher.jar:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.7.0_45] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.7.0_45] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.7.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.7.0_45] at java.lang.Thread.run(Unknown Source) [?:1.7.0_45]


How to prove using AM-GM $ \frac{4}{abcd} \ge \frac{a}{b} + \frac{b}{c} + \frac{c}{d} + \frac{d}{a} $

Let $a, b, c$ and $d$ be positive numbers such that $a+b+c+d =4$, prove that  $$ \frac{4}{abcd}  \ge  \frac{a}{b} + \frac{b}{c} + \frac{c}{d} + \frac{d}{a} $$  I am supposed to prove my using AM-GM, so I tried  $$ a + b+ c+ d \ge 4(abcd)^{1/4} $$ $$ 1 \ge abcd$$    also by AM GM  $$\frac{a}{b} + \frac{b}{c} + \frac{c}{d} + \frac{d}{a} \ge 4 $$ The only way I get the desired result is by dividing the first inequality by second and cross multiplying, but two inequalities can't be divided without sign change.


I am trying to hide a button if a logged in user is a Donor. I have my code like this.   String typ = user.get("type").toString();     Log.d("before checking type", typ);      if (typ == "Donor"){          ne.setVisibility(View.GONE);         //ne.setEnabled(false);     }   In the log, I get the result Donor, so I know the call to the database is working. But the button I need to hide, doesn't hide. Anyone knows why?


I've a weird bug with my username on stack exchange and overflow. When I post a comment or replay a question my user isn't DataHearth but :  a25bedc5-3d09-41b8-82fb-ea6c353d75ae  There's a screenshot          App Version: 1.0.95 Device Manufacturer: Xiaomi Device Model: MI 5s Plus OS Version: 7.0 (V9.5.2.0.NBGMIFA)


Can a deb package contain a PPA dependency and install packages from the PPA?

When creating a .deb package I create a file named control that contains some fields:  Package: my-qt-app-name Version: 0.01 Architecture: all Maintainer: my name <my email address> Installed-Size: 2 Depends: some-package-from-ppa Section: extras Priority: optional Homepage: my homepage Description: some description   some-package-from-ppa is not installed on the computer. It can be installed only adding a PPA, running apt-get update and then apt-get install some-package-from-ppa.  Can a control file from a deb package contain a PPA address and install that package when the deb file is installed?


Property of continuous functions and monotonic functions on disconnected sets

If $S=[0,1)\cup [2,3]$ and $f:S\to \mathbb{R}$ be strictly increasing and $f(S)$ be connected. Then, is $f$ continuous? If so, why?  Am totally helpless. I think the proof/disproof has something to do with the property that image of connected set is connected and the monotonicity. Thanks beforehand.


I have Ubuntu 18.04 and python 3.7. uname -a Linux my-dell-laptop 4.15.0-109-generic #110-Ubuntu SMP Tue Jun 23 02:39:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux  When I run sudo apt-get update I get this error : E: The repository 'http://dl.bintray.com/aluxian/deb stable 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 'https://dl.bintray.com/aluxian/deb dev Release' does not have a Release file. N:  N: See apt-secure(8) manpage for repository creation and user configuration details.


Should I use the t-test or the Wilcoxon rank sum test given these qqplots and Shapiro-Wilk stats

I have 4 groups and I want to test if the pairwise difference in means are significantly different. There are 6 pairwise differences.     The QQnorm plots of the 4 groups look like this: The Shapiro-Wilk p value looks like this:  > round(shapiro.test(G)$p.value,16) [1] 4.784327e-06 > round(shapiro.test(B)$p.value,16) [1] 1.421101e-10 > round(shapiro.test(D)$p.value,16) [1] 2.436e-13 > round(shapiro.test(R)$p.value,16) #HO is normal [1] 0.004189489   Given the qqplots and p-values I think the data is not normal so I was not going to use a t-test to test the pairwise difference in means. Instead I was going to use a Wilcoxon rank sum test?  Is this the correct approach?  JUST FYI when I run the t-test I get these p-values  > round(t.test(B,G)$p.value,6) [1] 0.060317 > round(t.test(B,R)$p.value,6) [1] 0.005074 > round(t.test(B,D)$p.value,6) [1] 0.266044 > round(t.test(G,R)$p.value,6) [1] 0.077648 > round(t.test(G,D)$p.value,6) [1] 0.422073 > round(t.test(R,D)$p.value,6) [1] 0.038625   With wilcox.test I get these p-values  > wilcox.test(B, G, mu=0)$p.value  [1] 3.363941e-05 > wilcox.test(B, R,mu=0)$p.value  [1] 1.010833e-06 > wilcox.test(B, D,mu=0)$p.value  [1] 0.02616785 > wilcox.test(G,R ,mu=0)$p.value   [1] 0.06497015 > wilcox.test(G, D,mu=0)$p.value  [1] 0.05084219 > wilcox.test(R, D,mu=0)$p.value  [1] 0.001667653 >    So should I use the t-test or the Wilcoxon rank sum test?  Note this articel here:    If I assume my shapes are the same then I am testing if there is a shift (i.e. difference in means) so to me it seems like WRS is appropriate as long as I assume shape is same.


Do the new Flag options mean, Question without self effort aren't off-topic anymore?

The options to post a flag as off-topic have changed, as far I noticed right.  So Q's like:     How do I assign a value to a variable in language xyz...   As this is a absolute basic question, which indicates the OPer has raised no effort and just is too lazy to crawl through a book or tutorial.  Wouldn't Any way no more be off-topic? As there isn't a option anymore I could categorize it to.


how to send data from Kafka to Salesforce Streaming Api

i have done with the salesforce to Kafka already , i have some topics in KAFKA like Ptopic1 ,Ptopic2.  so the thing here is i want live data of some latitude and longitude that comes from MQTT. i am able to send it to the Kafka. why i chosen this because , even if my server down or something wrong, Kafka can hold my data and can be order, and later i can take back. i think my point is clear here.   one more thing here is i was able to directly connecting to MQtt on my Visual force page using some libraries and able to get data and able to plot this on my Visual force page.


Just now, I upgraded to IOS level 8.4. Not sure if I'm missing something, but I can't seem to figure out how you shuffle songs. I don't see an icon that says shuffle?  Any ideas? Thanks


Will publishing a first author paper in ICECE2020 conference help me when applying for a PhD admission in the USA?

I am in undergraduate. I wish to apply for scholarship to do PHD in the USA. Will publishing a paper in this conference () help me get funding? It does not seem like a very reputable conference. However, I am not sure if my paper will be accepted in top tier conferences. So, is this conference 'better than nothing'? How much can a paper here help me? thank you.


Getting 'unable to resolve host' error and need to change name. How do I do this?  Hostname is brian-HP-G60-Notebook-PC  $ cat /etc/hosts 127.0.0.1   localhost 127.0.1.1   linux  # The following lines are desirable for IPv6 capable hosts ::1     ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters   Think my hostname is way to difficult to remember :-)   No need for security on this machine.   Beginner in Linux so explicit help would be appreciated.


Using STM32 to transfer a file via bluetooth

So far I have been doing projects with Arduino, RPi, ATtiny etc. But now I have project in mind where these things doesnt seem to suit. I need your help.  OK, now on the project:  I have a file on my android device (an image and a .ppt file). I want to transfer it to a SD card wirelessly (bluetooth or WiFi). I will be providing a USB port to access the data in SD card.  Now, I want to assemble/make all the electronics required around the SD card.   (Q1) Which one to choose Bluetooth or WiFi (my requirement is only short range, no internet involved) I want to know what Bluetooth module should I use (I have read that the HC06 is for SPP and I cannot transfer whole .ppt and do a FTP on that). (Q2) I don't want to use RPi or any ready made development board, I want to make my own minimum development board. Will this be possible using STM32F103 and do the Bluetooth transfer, if not which platform should I choose and how to make my own dev board?  (Q3) Is there a specific bluetooth module for FTP? Or any bluetooth module can be used for FTP.. Because when i see the modules they are specified as being Serial.  Please get me started on this. My question might be incomplete, please ask if any information required. (Please note: I had asked this question else where but I have tried to elaborate the question here, I have deleted the earlier question).


Form what I understand if you have an equation such as:  $$v = v_0 + at$$  then the dimensions must match on both sides i.e. $L/T = L/T$ (which is true in this case), but I have seen equations such as 'position as a function of time' $x(t) = 1 + t^2$, and obviously time is in $T$, but apparently the function gives you position which is $L$... so what happens to $T$ and where does the $L$ come from? I thought dimensions must always match...  Also, let us say that you know the time to reach a destination is proportional to distance i.e. double the distance and you get double the time, now this makes sense to me, but as I said earlier I thought that dimensions must always be consistent or else you can not make comparisons in physics, so if you are giving me $L$ (the distance), how can that become $T$ (time) all of a sudden?


PHP MySQL inner join with same column name

$q = $db->query("SELECT *          FROM people p         INNER JOIN job j                    ON p.job_id = j.id         WHERE p.id = '$id'         ORDER BY j.id ASC");     $maps = array();     while($row = mysqli_fetch_array($q)) {         $product = array(             'id' => $row['id'],             'job_id' => $row['j.id']         )     }   table people  id  table job  id  In the above code I am doing an inner join between two tables. Both tables have an a column called id is there a way to differentiate between the two in my while loop?  I have tried the above but $row['j.id'] doesn't work and if I do $row['id'] then it writes both id and job_id with the same value.


Can we always say, for finite-dimensional spaces, that there is no canonical isomorphism between $V$ and $V^*$?

Let $V$ be a vector space over $F$ with basis $\{v_1,\cdots, v_n\}$, and for every $i$, let  $f_{v_i}\colon V\rightarrow F$ be a linear map satisfying $f_{v_i}(v_j)=\delta_{ij}$. Then $\{f_{v_1}, \cdots, f_{v_n}\}$ forms a basis of the dual space $V^*$.   The map $T\colon v_i\mapsto f_{v_i}$ uniquely extends to a linear injective map from $V$ to $V^*$, and since these spaces have same dimension, $T$ is isomorphism. Thus $V$ and $V^*$ are isomorphic, when $dim(V)$ is finite. However there is a canonical isomorphism between $V$ and $V^{**}$ when $dim(V)$ is finite.  Question: Suppose that $dim(V)$ is finite. Then the above map $T$ is isomorphism which depends on choice of basis. But can we always say that there is no canonical isomorphism between $V$ and $V^*$?  My confusion lies here: I understood above discussion as:      if $dim(V)$ is finite, then there is isomorphism between  $V$ and $V^*$, which can be obtained by considering a basis of $V$ and corresponding basis of $V^*$. But, eventhough, this isomorphism $T$ depends on choice of basis, it may happen that there is another isomorphism $V\rightarrow V^*$, which is independent of choice of basis. How can I conclude that there is no canonical isomorphism between $V$ and $V^*$?


$y^2 = x^3 + mx + c$    An elliptic curve in the form defined in Wikipedia $y^2 = x(x-A)(x+B) = x^3 +(B-A)x^2 + ABx$     Frey's curve  has no term in $x^2$, but $2$. does because from Fermat, $A=a^n$ not equal to $B=b^n$   Question: Is there a simple way to transform Frey's curve with given $A,B$ into form $1$.  (Has it got anything to do with Weierstrass ?)


When you have several desktops open, each program in a different one, let's say Firefox in Desk 1 and Finder in Desk 5. When you open a file in Finder that opens in Firefox, it moves desk 5 all the way over to desk two, shifting everything backwards.   How to you keep this in place so that opening files will open in their programs like normla, but never shift the desktops out of order?


Deriving the equation of the polar axis-aligned ellipsoid

The polar of a convex body $C$ is defined as:  For a convex body $C$, its polar $C^*$ is given by $$C^* = \{x\in\mathbb{R}^n: \langle x,c\rangle \le 1, \forall c\in C\}$$  If I start with an orthonormal basis $(e_i)_1^n$, positive constants $(\alpha_j)_1^n > 0$ and the ellipsoid $$\varepsilon = \left\{x\in\mathbb{R}^n: \sum\limits_{j=1}^n \frac{\langle x,e_j\rangle^2}{\alpha_j^2} \leq 1  \right\}$$ how do I show that its polar ellipsoid is $$\varepsilon^* = S_1 = \left\{y\in\mathbb{R}^n: \sum_{j=1}^n \alpha_j^2 \langle y,e_j\rangle^2 \le 1\right\}$$ Using the definition, I saw that $$\varepsilon^* = S_2 = \{z\in\mathbb{R}^n: \langle z,x\rangle \le 1, \text{for all }x\in \varepsilon\}$$ Also, $\langle z,x\rangle = \sum_i\langle z,e_i\rangle\langle x,e_i\rangle$ I used Cauchy Schwartz to do one side of the proof, i.e. $S_1\subseteq S_2$: $$\left(\sum_i\langle y,e_i\rangle\langle x,e_i\rangle\right)^2 \leq \left(\sum_i\alpha_i^2 \langle y,e_i\rangle^2\right)\left(\sum_i \frac{\langle x,e_i\rangle^2}{\alpha_i^2}\right) \le 1 \implies \langle y,x\rangle \le 1$$ I need help with the other direction, i.e. $S_2\subseteq S_1$. Which other inequality might help?


If a complex function $f$ is Entire, and there exist $k,R > 0$, $n \in N$ such that $|f(z)| > k|z|^n$ for all $|z| > R$, then f is a polynomial.

As in the title, I must prove that: If a complex function $f$ is Entire, and there exist $k,R > 0$, $n \in N$ such that $|f(z)| > k|z|^n$ for all $|z| > R$: Then f is a polynomial.  We've already had a similar question with the inequality reversed, and found that it had to be a polynomial with degree less than n. I was able to show that if it was a polynomial, then it had to have degree less than n, but not that it had to be a polynomial in the first place.  Once again, I'm face with the same problem. I assume this time, the degree of the polynomial will have degree greater than or equal to n, but how do I show that such $f$ must be a polynomial?  It's not like I can go through every other possible function there is, can I? I can show it doesn't work for exponentials, for example, but I just can't think of how to show that this ONLY works for a polynomial...


I watched the latest X-men movie and I am a bit confused about the identity of the person.  Is it Stryker or is it Mystique we see when they fish logan up?  Mystiques blood was obtained in Paris. So there was "time" to expperiment with it and  inject Stryker.  I might be wrong but I can't remember Stryker getting killed in the movie.


100A sub panel from 150A Service at Body shop

I'm running 100' away from 150A main Service panel to 100A sub panel, my question is: what wire gage shoul I use? Thanks


I was recently introduced to LaTeX but I cannot find any resources online for beginners like me. I need a how-to kind of a resource for basic functionality. Pardon my vagueness. I currently have no knowledge of it but I am willing to learn.


Is the usage of "exact same" a redundant phrase?

Is the phrase "exact same" proper?  It seems redundant; if something is the same, isnt it identical?  Or, is it a pleonasm, which raises the question: should pleonasms be avoided?


What's the Windows equivalent to cron, or for those of you unfamiliar with Unix, how does one schedule a program to run at regular intervals?


Could you please suggest me a good anonymous internet browsing application for Ubuntu?


Read specific content file from tar.gz files without extracting

I wish to write the result of these below conditions in a file:    in a specific folder, I have many tar.gz files. each tar.gz file contains .dat file in sub folders. I wish to get the full path of these .dat files, if I find in it a specific word (ERROR24).  all this without extracting the tar.gz files   I have found and tested the below one that writes in a file the result, but I don't how to look in a tar.gz file.  grep -rlw --include="*.dat" -e "ERROR24" /home/tests/logs > /home/files/data/result/listErrors.txt   Can you please help update the previous one in order to get the same result but searching in tar.gz files?


Broadcom Wireless for Compaq 615 on Ubuntu 12.04.4 LTS

I have a problem where after recent updates my Wifi stopped working. I can detect my wireless network but when attempting to join it the wifi icon in the task bar just 'rolls' the wifi signal indicator up and down and never actually connects. It would often ask for the password a few times. I've tried changing the Wifi password, restarting the machine, disabling/enabling the wifi adapter, but nothing seems to be working. I can see the network but just can't connect.  Please help. How can I fix this.  I am using: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)  The 14e4 was Orange/red in the report, not sure if that means something?  Anyone know I can can get my laptop to actually connect to the Wifi again?


The number of subsets of $\{1,2,\ldots,10\}$ with three elements that contain at least one even number and at least one odd number.

What is the number of subsets of $\{1,2,\ldots,10\}$ with three elements that contain at least one even number and at least one odd number?  I know if its either odd or even we can subtract $2^{10}$ with $2^5$, but how do you find the number of subsets with $3$ elements with at least one even number and at least one odd number?


Why the force exerted by a fluid on an object submerged in it is always perpendicular to it's surface?

When an object is immersed in a fluid, say or example water, then the force exerted by the fluid is always perpendicular to the surface. I'm unable to understand why is this so?  My books writes :- (NCERT Class 11 th Physics Part 2)     When an object is submerged in a fluid at rest, the fluid exerts a force on its surface. This force always normal to the object's surface. This is because if there were a component of force parallel to the surface, then the object will also exert force on the fluid parallel to it as a consequence of Newton's third law. This will cause the fluid to flow parallel to the surface. Since the fluid is at rest therefore it cannot happen. Hence, the force exerted by the fluid has to be perpendicular to the surface.      I have some counter-arguments for this explanation.   As you can see from the picture that if the fluid exerts a force F1 then the block would exert a reactionary force -F1 and this should cause the fluid to move upward in a beaker but why don't we observe it in real life?   F3 on block would compel the block to exert -F3 on the fluid which should cause the fluid to flow in the beaker.   I tried to satisfy myself that reactions of F3 and F4 would cancel each other but we also know that pressure i.e. force (if area is constant) varies with depth and therefore I couldn't account for the absence of this upward motion. For sideway motion it is satisfactory that reactions of F3 and F4 would cancel each other out (although I'm not sure over here too).   So, I request to please solve my misconception. Books like these tend to be logical but always ends up being illogical.   At last I want to make another request: Please give a plausible explanation why the fluid force is always normal to the surface?    My question is addressing Newton's third law in explaining the "normal" nature of the fluid pressure.


I failed to safely eject my USB drive and data became invisible… how do I get it back?

My USB was in the USB port and at the time I was copying something to my HDD I decided to cancel it. Immediately afterwards I decided to remove the USB but I forgot to press safe eject.   As a result of this, when I re-inserted my flash drive into the USB port, I saw one folder with some files in it which was one of the many folders I had on my USB, and AUTORUN.INF which wasn't there before. The rest of the files are gone.   The strange thing is that when I check the partition in Gparted it shows that my USB still have some files on it but when I decided to check for hidden files (CTRL+H) there was only one folder .Trash-1000. I also tried to recover some data via Gparted (GPart) but it didn't detect any partitions. According to Gparted the files are still there but I can't see them. I have also checked it on another distro and the results are the same. The file system on my flash drive is FAT32.  What happened to my files and how can I restore them?


Modifying the default user registration page

I previously asked this  about modifying the default user registration form. The default form is largely fine, I just want to add some text and some links above and below the form (i.e. instructional advice etc).  One of the answers to my previous question suggested creating a module with the hook form_alter. I did this, however, it seemed all that achieved was adding adding new text fields to the form. I don't want to add new text fields, just some additional text/html before and after the form.  Is there any way to do this with form_alter, and if so, could you detail the code I'd need to do this (such that is does not add another user visible field)?  If there's another way to modify the page directly (not just the form) could you detail it? Keep in mind I want this to work with all themes, so when I change themes my changes do not disappear (which is why I was hoping to be able to do it in a module).


preserve colors in tikz when changing slide color in beamer

I draw and compile tikz pictures standalone:  \documentclass[tikz]{standalone} \begin{tikzpicture}  \draw [<->,thick]          (0,5) node (yaxis) [left] {$Y$}         |-          (5,0) node (xaxis) [below] {$X$}; \draw[blue,thick] (0,0) -- (4,4); \end{tikzpicture} \end{document}   and then include the pdf in a beamer presentation with the usual white background:  \documentclass{beamer} \begin{document} \begin{frame} \includegraphics{tikz_pic.pdf} \end{frame} \end{document}   and it works fine:     But if I change the slide background to black (via \setbeamercolor{normal text}{fg=white, bg=black}) it inverts the tikz picture too:    How can I preserve the colors in the tikz picture while changing the slide color?   Note that the same thing happens if you line-in the tikz code to beamer:  \documentclass{beamer} \begin{document} \begin{frame}     \begin{tikzpicture}      \draw [<->,thick]              (0,5) node (yaxis) [left] {$Y$}             |-              (5,0) node (xaxis) [below] {$X$};     \draw[blue,thick] (0,0) -- (4,4);     \end{tikzpicture} \end{frame} \end{document}   EDIT  I know you can add [background rectangle/.style={fill=white}, show background rectangle] to the tikz picture call and explicitly color lines black:  \begin{tikzpicture}[background rectangle/.style={fill=white}, show background rectangle]  \draw [<->,thick,black]        (0,5) node (yaxis) [left] {$Y$}         |-          (5,0) node (xaxis) [below] {$X$}; \draw[blue,thick] (0,0) -- (4,4); \end{tikzpicture}   but this also does not work:     Note that this will work if you directly input the tikz code into the frame, but this is very cumbersome when you have many pictures, as it requires completely re-writing a slide deck.   What is odd is that even when the axes are explicitly drawn black, they inherit the beamer text color (white). Yet if you draw the axes in any other color (e.g. gray), they do not inherit the slide text color.


Can reputation across stack exchange sites be pooled?

I ask because things like up-voting require reputation, but in areas where I'm knowledgeable, I don't have many questions, and the ones I do have already been asked, and answered well, making reputation hard to acquire.   (I'm assuming the only practical way to gain reputation is to ask and answer questions).  Across the whole network, I've got more than sufficient reputation, but not on those sites where I have knowledge and would most like to up-vote.


Prove that $\frac{\sum_i a_i}{\sum_i b_i} \leq \arg\max_i \frac{a_i}{b_i}$

I am pretty sure that I have seen this inequality before but I don't remember ever seeing a proof of it, and I can't seem to prove it.


Bone broth ruined because I didn’t fully cool down before I put in the fridge?

I made a great bone broth recipe in slow cooker. Well I strained it and put in an air tight container. It wasn’t cooled to much. So is it ruined? Can I reheat to a certain temperature to make sure there aren’t any bad bacteria?


I want to show that for $\gcd(a,b) = 1$ $a,b \in Z$   $\gcd(a+b, a-b) = 1$ or $\gcd(a+b, a-b) = 2$ holds.      I think the first step should look something like this:      $d = \gcd(a+b, a-b) = \gcd(2a, a-b)$   From here I tried to proceed with two cases. 1: $a-b$ is even, which leads to $\gcd(a+b, a-b) = 2$ 2: $a-b$ is odd, which leads to $\gcd(a+b, a-b) = 1$  My main problem I think is, that I do not know how I should include $\gcd(a,b) = 1$ in the proof.  Any help is appreciated. Thx in advance. Cherio Woltan


java use Regular Expressions to generate a string

i want to generate random String who have this form      [A-Za-z0-9]{5,10}   I don't have any idea how to do it, i should use regular expressions or random function ?


macos screenshot without opening preview application

Is there any way to take a screenshot without opening preview application on macOS Catelina ver. 10.15.5? I was trying to find some information, but all I could find was about disabling Screenshot Preview Thumbnails when record a screen. The problem what I'm facing is that the preview application is automatically opened when I take a screenshot image of screen, that I've never seen in previous version. Could you tell me to solve this issue? Thanks in advance.


Sending mail from a script which is run by Crontab

#!/BIN/BASH # To alert whenever lsof crosses 80%  maxlimit=32000 echo 'Max limit is ' $maxlimit tlimit=$(bc <<< $maxlimit*0.8) echo 'Treshold limit at 80% ' $tlimit a=$(lsof | wc -l) echo 'Current usage ' $a if [ $(bc <<< "$a > $tlimit") -eq 1 ] then         echo 'lsof =' $a 'has exceeded 80% of maximum limit' | /usr/bin/Mail -s "ALERT!!!" "*****@cisco.com" fi     * * * * * bash /root/vasanth/lsef/script.sh   In the above script, the output is to send a mail to the corresponding Mail ID .  When I run it manually it sends the mail.  But, when it is scheduled in cron, the mail is not being sent.  I cant understand what the problem is. How could I debug it?


A site's weekly newsletter includes three standard sections: top new questions, greatest hits, and unanswered.  How are the questions for each section chosen?  I can imagine that "top new questions" might be based on hotness, "greatest hits" might be random within a set of questions that meet some unknown-to-me threshold, and "unanswered" might use the same algorithm as the community bump on the main page.  But that's all guess-work, and I know I've seen newsletters sometimes that have left me scratching my head.  I vaguely recall seeing a meta post that explained how the newsletter content is chosen, but I couldn't find it in the  tag here on MSE or by searching.  So maybe it was on a per-site meta, but if so I don't know which.


Finding all the numbers that fit $x! + y! = z!$

I have the formula $x! + y! = z!$ and I'm looking for positive integers that make it true. Upon  inspection it seems that x = y = 1 and z = 2 is the only solution. The problem is how to show it.   From the definition of the factorial function we know $x! = x(x-1)(x-2)...(2)(1)$  So we can do something like this:  $$ [x(x-1)(x-2)...(2)(1)] + [y(y-1)(y-2)...(2)(1)] = [z(z-1)(z-2)...(2)(1)]$$   we can then factor all of the common terms out on the LHS.  $$ [...(2)(1)][x(x-1)(x-2)... + y(y-1)(y-2)...] = [z(z-1)(z-2)...(2)(1)]$$ and divide the common terms out of the right hand side  $$[x(x-1)(x-2)...] + [y(y-1)(y-2)...] = [z(z-1)(z-2)...]$$  I'm stuck on how to proceed and how to make a clearer argument that there is only the one solution (if indeed there is only the one solution).   If anybody can provide a hint as to how to proceed I would appreciate it.


Convergence of series implies convergence of product

Suppose $a_n$ is a positive sequence, then the product $$\prod_{n=1}^{\infty}(1+a_n)$$ converges iff the series $$\sum_{n=1}^{\infty}a_n$$ converges as well.  Any hints please ?


Intuitive explanation for dividing by n-1 when calculating sample variance?

I understand how to mathematically show that the sample variance (that involves dividing by n-1) is an unbiased estimator of the population variance (which divides by n), and the mathematics has been shown many times here on Math.SE.  I am wondering however if there is an intuitive way to understand this result that I can use to easily explain why this is done to layman.  So far I have seen many derivations but I haven't seen an elegant intuitve explanation for the result.


Activity crashing because ListAdapter equals null

I created this Adapter for my App:  public class DeadlineAdapter extends ArrayAdapter<Deadline> {     private Activity context;     public List<Deadline> deadlineList;      public DeadlineAdapter(Activity context, List<Deadline> deadlineList){         super(context, R.layout.item_deadline, deadlineList);         this.context = context;         this.deadlineList = deadlineList;     }      @NonNull     @Override     public View getView(int position, View convertView, ViewGroup parent) {          LayoutInflater inflater = context.getLayoutInflater();         View listView = inflater.inflate(R.layout.item_deadline, parent, false);          TextView displayDate = listView.findViewById(R.id.display_deadline_date_tv);         TextView displayName = listView.findViewById(R.id.display_deadline_name_tv);         Deadline deadline = deadlineList.get(position);         displayDate.setText(deadline.getDate());         displayName.setText(deadline.getDeadlineName());          return listView;     } }   But every time I try to run the app, my App crashes. The log says the following:     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference   How do I solve this problem?


Adding an Object to an Arraylist results in nullpointerexception

I cannot add any (or maybe just the first?) Objects to my Arraylist  A Bikestore is an Object which contains a name and an Arraylist of all it's bikes  bikes have 3 different attributes (2 Strings, 1 double)  Bikes are added to the Store within an "addbiketocollection()" method and within this method I use the .add function.   public class Bikes      String brand ; String color; double price;  Bike(String brand, String color, double price){     this.brand = brand;     this.color = color;     this.price = price; }  public class Bikestore {  String name; ArrayList<Bike> Collection = new ArrayList<>();  Bikestore (String name, ArrayList<Bike> Collection){     this.name = name;     this.Collection = Collection; }   public void AddBikeToCollection (Bike NewBike) {     Collection.add(NewBike);   }    Mainclass     Bike Bike1 = new Bike ("Cube", "Black", 400);      Bikestore SellingBikes = new Bikestore ("SellingBikes", null);      SellingBikes.AddBikeToCollection(Bike1);  }   when I try to add bikes to the bikestore I get a nullpointerxception Exception in thread "main" java.lang.NullPointerException  I have already googled my problem and watched some videos but none of these contained an arraylist with objects.


Are you allowed to stack Divine Smite and Eldritch Smite on the same attack?

The specific example I'm looking at here is: you are a Paladin 2/Warlock 5 and snagged Eldritch Smite from XGTE as your 5th level Warlock Invocation. This gives you access to both...  Divine Smite Starting at 2nd level, when you hit a creature with a melee weapon attack, you can expend one spell slot to deal radiant damage to the target, in addition to the weapon’s damage. The extra damage is 2d8 for a 1st-level spell slot, plus 1d8 for each spell level higher than 1st, to a maximum of 5d8. The damage increases by 1d8 if the target is an undead or a fiend.  and  Eldritch Smite Prerequisite: 5th level, Pact of the Blade feature Once per turn when you hit a creature with your pact weapon, you can expend a warlock spell slot to deal an extra 1d8 force damage to the target, plus another 1d8 per level of the spell slot, and you can knock the target prone if it is Huge or smaller.  When I hit a target with an attack, can I set them both off at the same time, letting me burn two spell slots to use both features to boost my damage? As was specified , Divine Smite is not treated as a spellcasting, so it doesn't count towards the 'One Spell Per Round' rule. Presumably, neither would Eldritch Smite. As far as I can tell, this appears to be a legal way to burn a ton of resources at once to generate a massive burst of damage. Am I correct? Can these two like-features be used simultaneously?


Fixing syntax highlighting without needed to add language tags to every answer

I answered a question, and noticed that the syntax highlighting was off. It was a Clojure question, but Java was being favored. I have a couple comments in the code that read poorly under Java highlighting, so I'd like to fix the highlighting.  Is there any way to fix highlighting after the fact if it infers incorrectly, besides adding explicit <!-- language-all: lang-* --> tags? The problem with just using the tag is it only effects the question it's in (from my experience). Anyone who adds an answer will need to add the tag too to get good highlighting.


Delete lines in a txt file by taking patterns from another file

I have two txt files :    file1.txt:  user1@domain.fr   user2@domain.fr   user3@domain.fr   user4@domain.fr   ...   file2.txt:  user2@domain.fr   user4@domain.fr     fileIwouldhave.txt:  user1@domain.fr   user3@domain.fr   ...   I'd like to delete addresses in file2.txt to file1.txt.  How can I do it?


If you polymorph yourself into a chair do you instantly break concentration and turn back to normal?


How do I print out a double number with better accuracy?

I want to print out a double number using my bisection method. I dont quite know how. I can return the double with up to 4 digits of accuracy after the decimal, but that's the default I take it. How do I print it out with much more accuracy. As much as I want to print at any time idealy.  void bisection(double start, double end, double tol, double (f)(double) ){      double x = (end + start)/2;     double num = f(x);     if( std::abs(num) < tol) {     //  return x;     printf("Our approximation is: %20.10f", x);      }      if( num == 0){         return x;     }      if( num < 0){         std::cout << "f(x) is less than 0" << std::endl;         std::cout << "f(x) = " << num << std::endl;         start = x;         bisection(start,end,tol, f );     }     else if(num > 0){         std:: cout << "f(x) is greater than 0" << std::endl;         std::cout << "f(x) = " << num << std::endl;         end = x;         bisection(start,end,tol, f );     }  }


I have an add-on with rather a lot of UI options and am trying to find a way to clean it up so that not all the options need to be shown at once. I've noticed that some of the default tools have foldout sections, but I can't figure out what UI component I need to use to get the same behaviour.  Here is an example of what I'm talking about, showing the Color Picker panel open, but Color Palette and Options panels folded up. Is there a simple UI component I can use to emulate the behaviour and visual style of this in my add-on?


Taking a look in internet you can find photos of mutated mammals with 6 legs. Some cows with legs in unnatural positions were shown in website versions of widely known newspapers (you can easily guess here that if the animal gets his additional legs in the back or another unuseful position why a mutation like that wont spread, but the point here it's 2 additional legs in mammals do appear occasionally) . Also there are some dubious photos of sheeps with appparently functional 6 legs, these ones are dubious and hard to confirm if real, some clearly fake but the dubious ones are there and make you wonder. Insects have 6 legs, there are confirmed mutations of mammals with 6 legs, then why did it never appear a mammal species with 6 legs. Is there any known reason why 6 leg mammals are only found in mutations? (how about size and enviroment, is there any reason in those for them not to get 6 legs?)


How can I stop Zombies spawning while letting other Mobs spawn?

My Friend plays Minecraft, and he doesn't want zombies, drowneds or husks to spawn, but he still wants other mobs to spawn. I've tried /tp @e[type=zombie] 0 -100 0 to teleport them into the void (with a repeat command block), which works initially, but then as he plays they always come back, which is especially annoying because I can't target the problem (in my test world I've teleported 5000 blocks away and they still don't spawn. Could someone please point out the problem and maybe how to fix it? Thanks!


How to Solve the Coupled Differential Equations?

I came across the set of following coupled equations while studying cycloid motion in Griffiths' Intro to ED   $\ddot{y}=\omega \dot{z}$  $\ddot{z}=\omega (\frac{E}{B}-\dot{y})$  I am at a loss as to how I may approach the problem to solve. Any help is appreciated.


How do I get help for "echo" or other bash commands?

man echo works. but out of curiosity, does echo have something similar to a --help flag/parameter?


Does Windows Defender update if Windows Update is set to manual?

It looks like the Windows Defender in Windows 8 won't upgrade the signatures automatically, if Windows Update is set to "Notify, but don't install the upgrades".  Is my impression real? Is there is a fix?   I don't like automatic updates as I don't want to install useless updates like the ballot screen or something else, I want to choose.


Is it possible to access source code or a config file of a terminal command, to read how it works and even customize it on local computer?

I am trying to understand Linux and I am often solving my problems on a case by case basis without actually learning how to come up with the answer myself, which of course, I prefer not to do.   For example I have set a keyboard shortcut to select an area and take  a screenshot of it. Everytime I select an area, it always defaults to /Pictures, and I would like to edit either the default directory or the quick dropdown choices it presents me.   I have found an  as usual, however this time I would like to know how do people normally approach this if there was no answer. Surely there must be a logical set of steps to pinpoint how a terminal command works/where it takes its arguments.   For this particular case, I have looked online for which command Ubuntu uses to take screenshots, which turns out to be import.   So my question is, what is/are the approach(es) to    Find where configuration files / location / code level information (like not how to call it but what it specifically does when it is called) of a terminal command How to find out which terminal command a particular action corresponds to. (Figuring out import is called when I took a screenshot for example)   In other words, how could I have figured this out myself if I had no access to internet, or no one knew the answer? :) I am more interested in the approach/logic, however import in this case would be a good example.   Edit:  I do not think my question is the same with the suggested possible duplicate because I am asking for a way to reach source code if that is possible. In other ways, I am asking for a way to read the source code of a command, and files it uses (for example maybe there is a config file for import function and if I could have found it I would have changed default-save-directory). To clarify even further, the file I am trying to find (if it is possible to find it) a code equivalent to the following pseudo code:  <when run> change mouse pointer to + shape ..wait for a click.. on click -> wait for release.. on release -> take the area between click and release coordinates read config file located at ./config and get default-save-directory variable initialize path to default-save-directory ask user where to save the image   This has to be saved somewhere in the operating system. "That is not possible because ..." (maybe it is in assembly level for example) is also an answer, but use man to get instructions on what this function does is not an answer because I want to understand how it works.   In yet another words, if a linux ninja was to modify import command on his local computer, where would he go, and say add a signature in the pictures saved with screenshot.


(j)Unit testing assertions and error messages?

I am currently testing a method, let me call it testedMethod().  The body of the method looks like this  private testedMethod(List<Protocoll> protocolList) {     //so something with the protocolList     if (something) && (somethingElse) {         Assert.isFalse(areTheProtocollsCorrect(p1, p2), "Error, the protocols are wrong");     }      if (somethingCompeletlyElse) && (somethingElse) {         Assert.isFalse(areTheProtocollsExactlyTheSame(p1, p2), "Error, the protocols are the same");     } }   Additional code from the Assert.class:  isFalse:  public static void isFalse(boolean condition, String descr) {     isTrue(!condition, descr); }   isTrue:  public static void isTrue(boolean condition, String descr) {     if (!condition) {         fail(descr);     } }   fail:  public static void fail(String descr) {     LOGGER.fatal("Assertion failed: " + descr);     throw new AssertException(descr); }   Testing what the method should do correctly is allready done. But I would like to test those assertions. This assertions are an important part of the code, and I would like to see if the method is throwing those errors when I provide wrong data to it. How can I do it using JUnit?


Good Mathematical Puzzle Book for Couples

So my partner and I thought it would be great if we could do some maths problems over Skype while we are apart (long distance). We'd like some recommendations on problem books that are ideal for working on together. We know there are quite a few questions online for best puzzle books in general but we'd like to know of any that have been written for or are suited for couple solving.   We are both fairly proficient in general but are not experts in any one topic. Ideally, the book should cover multiple fields with fairly difficult logic/maths problems.  As a starter list, what do people think of:   Raymond M. Smullyan - The Godelian puzzle book Peter Winkler - Mathematical puzzles a connoisseur's collection Raymond M. Smullyan - What is the name of this book?   I'm aware this is a rather strange request but thought it was worth asking just in case.


What can we say about the number of generators in group $\mathbb{Z}^*_p$ ($p$ prime)?

$\mathbb{Z}^*_m = \{a \in \mathbb{Z}_m | \gcd(a, m) = 1\}$. As $\mathbb{Z}^*_p$ is cyclic when $p$ is prime the group contains at least 1 generator. Can we say anything else about the number of generators in such a group?


I am wondering if there is a way to setup a local server to render blends on my network.  Work on a model on client, press a button through some add-on, send that file to the server for rendering. Is there anything like this?


How do I check if a text file has new content in Python?

I'm writing a program in which I need the program to verify if there is new content in a file. If the file HAS content, but the content has already been viewed previously by the user, it doesn't count as a notification, but if it is new, it is shown to the user. How do I do this?


What is the difference between "lay" and "lie"?

How do I know when to use lay and when to use lie, and what are the different forms of each verb? I'm always getting them confused.


How do I create a reflective white material?

I'm pretty new to this and this is my first question here, any help would be greatly appreciated.  So basically what I want to achieve is a floor material as seen in this photo...    ...the reflections are very crisp but dim.  With a glossy shader I get the following results:    First picture: reflections are blurry  Second picture: roughness of the material looks right but reflection is bright red  Third picture: If tinted in any other color than white, it seems to produce the result I want. Reflection is sharp and gets tinted blue. What I need is the reflection to be tinted white.  Thanks for any help.


"Which type of nuts ARE/IS the heathiest?"

It seems that people overwhelmingly prefer to write     Which type of nuts are the healthiest?   to     Which type of nuts is the healthiest?   However, type is singular, so why isn't is the correct choice?  Edit if you type these sentences with quotes into Google (phrase search), you'll see that the first one occurs about 3000 times on the web,  and the second one basically never.


cloning a live drupal website (db) to a local / working mamp version

I have a drupal multi-site project, that I've inherited. I am stuck on the process of trying to clone or import the database from a live server to the local enviroment. Does anyone have any suggestions as to how I might be able to do this?  It would have to be done via the command line, as the I don't have access to phpmyadmin from the live server. I know this can be done, with a series of commands and scripts -- I'm just not sure how...


Should it be      This helps understand something   Or      This helps to understand something   Note that it is not      This helps us understand something,   although this is what I want to express.


Are there any examples of Humans and Aliens producing offspring in Star Wars?

The title is pretty self explanatory, although to expand on the question further I am looking for any examples of inter-species breeding in the Star Wars universe, not just inter-species (ahem) "relations".


Look at this snippet:  void Sample_Compositor::createEffects(void) {     Ogre::CompositorPtr comp3 = Ogre::CompositorManager::getSingleton().create("Motion Blur", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);     {         {             Ogre::CompositionTargetPass *tp = t->getOutputTargetPass();             tp->setInputMode(Ogre::CompositionTargetPass::IM_NONE);             {                 Ogre::CompositionPass *pass = tp->createPass();                 pass->setType(Ogre::CompositionPass::PT_RENDERQUAD);                 pass->setMaterialName("Ogre/Compositor/MotionBlur");                 pass->setInput(0, "sum");             }         }     } }   If this code is legit, how do these blocks work?


How to disable lock screen in Windows 10 Home Anniversary Update

I managed to disable the lock screen in Windows 10 Home before the Anniversary update. After the update, I found ways to disable it but they require me to have Windows 10 Pro.   Any solution for Windows 10 Home?


can i convert an mp3 file with 64kbps bitrate to 192 kbps or 256 kbps etc?

I have downloaded music from youtube and I am wandering wheather or how I can improve the quality of the sound. Is conversion to a higher bitrate possible? Is there anything else I could do? The music I have downloaded has a bitrate og 64kbps. Can I convert it to a higher bitrate and improve quality?


Choosing Shapefile attribute data type to use?

I am trying to figure out when to use (in the Data Type of SHAPEFILE PROPERTIES) - TEXT - SHORT-INTEG - LONG-INTEG - FLOAT AND DOUBLE.    I am using ArcView 9.3 and I know when it is all text or use the date or if it is all numbers what to use.  But, when it is "2N" or "7.5" or "7%" which and what do you use?


Let $X$ be a continuous non-negative random variable (i.e. $R_x$ has only non-negative values). Prove that $$E(X) = \int_{0}^{\infty} P(X>x)\,dx  = \int_{0}^{\infty} (1-F_X(x))\,dx$$ where $F_X(x)$ is the CDF for $X$. Using this result, find $E(X)$ for an exponential ($\lambda$) random variable.   I know that by definition, $F_X(x) = P(X \leq x)$ and so $1 - F_X(x) = P(X>x)$  The solution is: $$\int_{0}^{\infty} \int_{x}^{\infty} f(y)\,dy dx    = \int_{0}^{\infty} \int_{0}^{y} f(y)\,dy dx  = \int_{0}^{\infty} yf(y) dy.$$  I'm really confused as to where the double integral came from. I'm also rusty on multivariate calc, so I'm confused about the swapping of $x$ and $\infty$ to $0$ and $y$.  Any help would be greatly appreciated!


Where do I ask a question about the best way to develop or code something?

I sometimes need to ask code questions on which is the best way to do something or code something.  On Stack Overflow I get downvoted, not sure if there is a community on Stack Exchange where to ask.  To give an example, the question I need to ask is:  "In a PHP / MySQL application which is the best way to save some code snippets? Should I save them in database or would it be better to let the user upload some files with the snippet?"  I'm pretty sure that if I ask this question on Stack Overflow I will get downvoted because it doesn't have any code example or code puzzle to solve, but is a generic question instead.  EDIT: I'm not sure is a best practice question, it may be. I can technically solve it both ways but one may could be the wrong one. Is more like asking if i an store my images in database, technically you can but i would say is the wrong way to do it.


I receive results that I consider inconsistent to simple queries.  -- This returns 3 rows select * from persons where person_id in (12,13,14)  -- This returns nothing select * from documents  where person_id in (12,13,14)  -- This returns nothing !?!? select *   from persons  where persons.person_id not in ( select documents.person_id from documents )   There is a FK on documents.person_id pointing to persons.person_id  Am I missing something? This is my @@version:  Microsoft SQL Server 2016 (SP1-CU1) (KB3208177) - 13.0.4411.0 (X64)   Jan  6 2017 14:24:37   Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows Server 2012 R2 Standard 6.3  (Build 9600: ) (Hypervisor)


How do muggles communicate with their magical children when they're at Hogwarts?

How do muggles with children at Hogwarts (for example, Hermione's parents) communicate with their children while they're at school? The students are able to send owls but does that mean the parents can only send letters when their students send an owl? What if it's an emergency? What if their children never send an owl?


Stop skype from running at startup and after I closed it

I am using the UWP skype app.  I know there are more questions like this, but I think the skype app has changed lately and they are no longer relevant.   I'm dying to prevent skype from running in the background because I'm fighting for memory space, every bit counts.   Skype version 8.37.0.98  Application version 14.37.98.0  Windows 10  No other relevant settings that I can find besides this one:   As you can see after a restart it is still here as suspended:   And it is not in startup:    I don't know what else to do to stop this app.   Thanks!


Were the traps in the Last Crusade made by the three knights?

Were the traps in Indiana Jones and the Last Crusade made by the three knights?  In the  question there is a comment that the "J" shouldn't even exist on the trap, because there isn't a J in the Latin alphabet. Since the answer is spelled out in Latin, that means the trap wasn't written in a language written or spoken at the time of Christ (ie Aramaic or Hebrew).


How to get world-space matrix of any pose bone?

Is there a command for getting world-space matrix of pose bones, same as obj.matrix_world for objects? I found pose_bone.matrix, but it gives weird result for me.


Collinearity problem (Newton-Gauss line)

I had some troubles with this problem :     Let $ABCD$ be a convex quadrilateral. $M$ and $N$ are the midpoints of   the diagonals $AC$ and $BD$. The sides $AB$ and $CD$ are extended   until they intersect. The intersection point is $E$. The sides $AD$   and $BC$ are extended until they intersect. The intersection point is   $F$. Let $P$ be the midpoint of the segment $[EF]$. Prove that $M$, $N$, $P$ are    collinear.     First, I found that a quadrilateral in which the opposite sides interesect is also known as a complete quadrilateral. Then, the line $M-N-P$ is known as Newton-Gauss line and the problem above as Newton's Problem.  I've taught about solving it using areas. I've used the property that median divides the triangle in two echivalent triangles (with the same area). Many properties can be derived from it.  I haven't figure out, but I'm interested in a proof using areas. I would appreciate some suggestions.  Thanks!


I’m a dual US/UK citizen. Can I still enter the UK temporarily on my US passport?

I came to the UK as a US citizen, got indefinite leave to remain, and have just become a naturalised UK citizen. However, I am scheduled to travel abroad in a few days, and do not have time to apply for a UK passport. If I travel as scheduled, will I be able to re-enter the UK on my US passport (now without the biometric residence permit, which I had to destroy and send in when I became a UK citizen), provided that I travel again within 6 months? Or would I be turned away because I am not really a tourist?


Are non-US citizens trading on US stocks/options subject to tax?

I'm a non-US citizen, and not residing in US, who uses an online brokerage firm to trade US stocks and options. Are my capital gains (short term and long term) and dividends subject to taxes? If yes, what are those taxes?


Determine which circuits are parallel and which are in series

I need to find the Equivalent Resistance across A and B. The problem is, I don't know which one's are in series and which ones are in parallel. How do I identify which ones are parallel or series?


Finding an unknown linear transformation given that $T(1,1)=(1,0,2)$ and $T(2,3) = (1,-1,4)$

Let $T\colon\mathbb{R}^2\to\mathbb{R}^3$ be the linear transformation such that $T(1,1)=(1,0,2)$ and $T(2,3) = (1,-1,4)$.       Does such a linear transformation exist?  So far I've worked out that it cannot exist, as the first entry for $T(1,1)$ is 1, whereas the first entry for $T(2,3)$ is 1, which can only be obtained through 3-2, or half of 2.  Is there any way of presenting this formally?


Is there a way to tell if my hardware supports specific instructions?

Microsoft says, for   Minimum: 1.4 GHz 64-bit processor Compatible with x64 instruction set Supports NX and DEP Supports CMPXCHG16b, LAHF/SAHF, and PrefetchW Supports Second Level Address Translation (EPT or NPT) 1   Is there anyway to find out if say if an   HP Workstation xw6200 – Intel E7525 chipset, or a DELL PowerEdge R710 2 x 2.53Ghz E5540   supports these without manually and exhaustively searching the docs on each chip.


Trying to find unused stored procedures, but dm_exec_procedure_stats seems to be resetting

I need to identify stored procedures that are no longer used by our application (~2,000 stored procedures, duplicated in ~1,000 databases).  To do this, I'm querying dm_exec_procedure_stats, which initially seemed to give good results, until I saw some stored procedures that I know are being used a lot.  Subsequent investigations show that if I run the query a few times in a row, I get records dropping out.  Is this a simple indication of memory pressure causing the cache to be cleared? Nobody is running dbcc freeproccache or dbcc freesystemcache.  SELECT database_id, object_id, OBJECT_NAME(object_id, database_id) 'Name',     d.total_elapsed_time, d.execution_count, d.total_worker_time,      d.total_logical_reads, d.total_logical_writes FROM sys.dm_exec_procedure_stats AS d WHERE p.name LIKE '%myinterestingsproc%'   If, for example, that query returns two rows for 'one' stored procedure  (because it's the same name in two db's, I consider it one stored procedure  for the purposes of utilisation), a subsequent run of the query might lose one of the rows. Numbers of the remaining rows do not reset, so it's not a system-wide stats reset.


How to convert a double to long without casting?

What is the best way to convert a double to a long without casting?  For example:  double d = 394.000; long l = (new Double(d)).longValue(); System.out.println("double=" + d + ", long=" + l);


Here's my script  #! /bin/sh  source=/Source/$1 destination=/Destination folderParam=$(basename $source) if /usr/bin/rsync -avh -r $source $destination; then    cp /FolderCopyStatus/Success   /Status/Success_$folderParam;    mysql -h ip -uroot -ppassword  << EOF    use oct_test;    insert into Test(Name,Value,Status) values('rsync',$folderParam,'Ok');    EOF else    cp /FolderCopyStatus/Failure   /Status/Failure_$folderParam;    mysql -h ip  -uroot -ppassword  << EOF    use oct_test;    insert into Test(Name,Value,Status) values('rsync',$folderParam,'Fail');    EOF fi   Error and Warning     /FinalSync.sh: line 18: warning: here-document at line 8 delimited by   end-of-file (wanted `EOF') /FinalSync.sh: line 19: syntax error:   unexpected end of file   I know there is a simple thing that I am missing.Newbie to shell scripting.


Genereic struct c++ (unresolved external symbol)

I have a generic class which in I also have a struct. Like this:  template <class T> class Octree {     public:      struct node     {         typename  T value;         node *child[8];     };      Octree();     template <class T> Octree();     ~Octree();     void clear(T t);      node* root; };   the .cpp file :   template <class T> Octree<T>::Octree() {     root = new node;     root->value = 0;      for (int i = 0; i < 8; i++)         root->child[i] = 0; }  template <class T> Octree<T>::~Octree() {     clear(root); }   and the main:   using namespace std;  int main() {     Octree <int> fasz;     Octree <char> fasz2;     return 0; }   I've just created an object of my tree and I got this error:     Error  LNK2019 unresolved external symbol "public: __thiscall Octree::Octree(void)" (??0?$Octree@H@@QAE@XZ) referenced in function _main Zz  c:\Users....Source.obj   I have tried to write the template declaration in a header file, then implement the class in an implementation file (for example .cpp), and include this implementation file at the end of the header but then I've got an error:     Error  C2995   'Octree::Octree(void)': function template has already been defined   I have seen this link question but it's not what I need.  Have you any idea what the problem is?


This is an excerpt from a newspaper.  It was this reference to the ICC that India said it could not support.  Why author uses that and not which?


Proving the snake lemma without a diagram chase

Suppose we have two short exact sequences in an abelian category $$0 \to A \mathrel{\overset{f}{\to}} B \mathrel{\overset{g}{\to}} C \to 0 $$ $$0 \to A' \mathrel{\overset{f'}{\to}} B' \mathrel{\overset{g'}{\to}} C' \to 0 $$ and morphisms $a : A \to A', b : B \to B', c : C \to C'$ making the obvious diagram commute. The snake lemma states that there is then an exact sequence $$0 \to \ker a \to \ker b \to \ker c \to \operatorname{coker} a \to \operatorname{coker} b \to \operatorname{coker} c \to 0$$ where the morphisms between the kernels are induced by $f$ and $g$ while the maps between the cokernels are induced by $f'$ and $g'$.  It is not hard to show that the morphisms induced by $f, g, f', g'$ exist, are unique, and that the sequence is exact at $\ker a, \ker b, \operatorname{coker} b, \operatorname{coker} c$. With the use of a somewhat large diagram shown , we can even construct the connecting morphism $d : \ker c \to \operatorname{coker} a$. However, I'm stuck showing exactness at $\ker c$ and $\operatorname{coker} a$. I thought Freyd might have had an element-free proof in his book, but it turns out he proves it by diagram chasing and invoking the Mitchell embedding theorem [pp. 98–99]. Is there a direct proof?


Before downloading, there is an option to choose 32 bit or 64 bit, but It says only newer PC's. Can I still install this OS on my old 64 bit PC?


What happens when the Runner stack is empty?

When the corporation R&D is empty the corporation loses.  What happens when the Runner's stack is empty?    I think that: He must finish the game with only the cards on the table.  or  I doubt that: He reshuffles the heap into a new stack.


I'm using Ubuntu 16.04 and I'm new to both Ubuntu and VirtualBox. I've already enabled USB controller for Windows 10 virtual machine, But no devices are available when I click to "add USB filter button". So what should I do now?


Using combinatorics to show that $x^{\overline n}=\sum_{k=0}^{n}{ n\brack k}x^k$

Using combinatorics to show that $$x^{\overline n}=\sum_{k=0}^{n}{ n\brack k}x^k$$ Where $x^{\overline n}$ is defined as $\prod_{i=0}^{n-1}\left(x+i\right)$ and ${ n\brack k}$ denotes .  The left-hand side counts the number of injections from $[n]$ to $[x+n-1]$, however, I don't know what the right-hand side does count and why these two are the same. I know that $\sum_{k=0}^{n}{ n\brack k}=\left|S_n\right|$,but I don't know if that helps.( $S_n$ is the symmetric group on $[n]$)


Does Quantum Mechanics need imaginary numbers?

In quantum mechanics, we assume wavefunctions are complex valued, and that probability amplitudes are given by the modulus of the wavefunction squared. This formalism can correctly explain interference effects, e.g. the double-slit experiment. I understand all of this.  Now, let's consider classical optics. If we have a linearly polarized EM wave, the electric field is defined in all space by a single real number. If we want to find intensity of light at any given point, we time-average the square of the electric field at that point. Alternatively, instead of representing the electric field with a time-varying real number at every point, we can also represent the electric field by a complex phasor which rotates in time. Then then intensity of the light at any point is (up to a factor of $\sqrt{2}$) just the modulus of the phasor squared. And if the light interferes with itself (e.g. in an interferometer) the new phasor at the point of interference is simply the sum of the old phasors, identical to interference in quantum mechanics.  So my question is: if, instead of assuming we have a complex valued wavefunction, we assume we have a REAL wavefunction (which is just the real part of our normal wavefunction), and all our probability measurements are inherently time-averaged (like our intensity measurements for an EM wave), would we run into any contradictions with logic/experiment?  (I realize this wouldn't be a particularly USEFUL formulation of quantum mechanics. Complex numbers are obviously more elegant--we invented phasors for a reason, after all. I just want to know if it's equivalent.)  Edit: I realize complex numbers can be thought of as simply two real numbers. I'm interested in the case of representing the wavefunction as a SINGLE real number. I guess what I'm looking for is a concrete difference between wavefunctions and electric fields.


Calculating ratio between "rows" in ArcGIS field calculator

I have a problem similar to  but that is for QGIS whereas I have to perform it in ArcGIS. I have to calculate the Ratio between rows (sequentially, i.e., row1/row2, row2/row3 and so on) of a specific field based on the ID field and have to assign the results to a separate field. Here is the code and the error message:  def CalcRatio(ID,Frequency):     vDict = {}     with arcpy.da.SearchCursor("Test",['Frequency'],'ID = {}'.format(ID)) as sCur:     for Row in sCur:     vDict[Row[0]]=Row[1] # Dict[id] =Frequency     try: value = ( vDict[1] / vDict[2])     except: value = -1     return value  Message: ERROR 000539: Error running expression: CalcRatio( 1 , 50680) Traceback (most recent call last): File "<expression>", line 1, in <module> File "<string>", line 5, in CalcRatio IndexError: tuple index out of range  Here is the data OID Id  Frequency 0   1   50680 1   2   49740 2   3   48620 3   4   48300 4   5   48004 5   6   45600 6   7   44384 7   8   42720 8   9   41890 9   10  39700 10  11  38530 11  12  38207 12  13  38106 13  14  37303 14  15  37205 15  16  36527 16  17  35301 17  18  31674 18  19  28890 19  20  24612


Let $K$ be a field and $A \in K^{n \times n}$, $A^2=0$. Show that $\operatorname{rank}(A) \leq \frac{n}{2}$.  I have found similar posts  and .  Unfortunately it is still not clear to me how to solve that task. Can someone help me to find the correct proof?  What I have tried:   It seems like A is nilpotent.   If $A^2=0$ then $\det(A^2)=0$. Because $\det(A \cdot B) = \det(A) \cdot \det(B)$ it follows that:   $\det(A^2)=\det(A) \cdot \det(A) \Rightarrow \det(A)=0$.  $\Rightarrow \chi_A = \det(A - X \cdot E_n) = X^n$  $\Rightarrow A$ has Eigenvalue $0$ (n times).  $\Rightarrow A$ has a $n$-dimensional kernel.   $\Rightarrow$ by nullity theorem: $rank(A)=0 \leq \frac{n}{2}$.  Which is wrong. Counterexample:  $A = \begin{bmatrix}0 & 1\\0 & 0\end{bmatrix}$


Change font to only section and subsection of my document

I would change the font of section and subsection of my document. I have created it using book class. I would use this font:    According to Adobe pdf propriety, this font is AvantGarde-Demi. How can I use it in Latex. what command I should use to recreate this in latex. I think I should use titlesec package right?


Contour integral on the function $\frac{\log z}{z-z_0}$

Let the domain $O=\mathbb{C}-(-\infty,0)$, the point $z_0 \in O$ and the circle $\gamma=C(0,r<|z_0|)$ in the positive direction. Compute $\int_C \frac{\log z}{z-z_0} dz$.   So far we didn't see the Residue theorem, so we cannot use this result to do the question. Instead he proposed to us to use the Cauchy formula, but I really don't know how it is possible. Do I have to use the primitive of $\log z$,i.e. $\log' z = \frac{1}{z}$? Is anyone could help me at this point.


syntax error near unexpected token `(' in .bashrc

-bash: /root/.bashrc: line 100: syntax error near unexpected token `(' -bash: /root/.bashrc: line 100: `export PATH=/bin/lscript:/bin/lscript:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_1804.2019.521.0_x64__79rhkp1fndgsc:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/Program Files (x86)/Intel/TXE Components/iCLS/:/mnt/c/Program Files/Intel/TXE Components/iCLS/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/Program Files/Intel/TXE Components/DAL/:/mnt/c/Program Files (x86)/Intel/TXE Components/DAL/:/mnt/c/Program Files/Intel/TXE Components/IPT/:/mnt/c/Program Files (x86)/Intel/TXE Components/IPT/:/mnt/c/Program Files/Intel/WiFi/bin/:/mnt/c/Program Files/Common Files/Intel/WirelessCommon/:/mnt/c/Program Files (x86)/GtkSharp/2.12/bin:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files (x86)/QuickTime/QTSystem/:/mnt/c/Program Files/PuTTY/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/Git/mingw64/bin:/mnt/c/Program Files/Git/usr/bin:/mnt/c/Users/User/AppData/Local/Microsoft/WindowsApps:/snap/bin'


SharePoint modern look is good but seems to have less options for customization.  What should be done to add custom js and css files to the site? Is there a way we could add a section to masterpage , like we could in classic look?  Could anyone share their experience of branding the modern site?  I would like to know how to add styles to Master Page not Site Page.  Thank you.


Two sets of 9-digit numbers on back of Global Entry card

There are two 9-digit numbers on the back of the Global Entry card. The one on the upper left corner is the Known Traveler Number or PASSID. But on the upper right hand corner there is another 9-digit number, slightly larger than the PASSID. What is the purpose of this second 9-digit number?


I am planning to visit Iran for Conference?

I am planning to visit Iran for a conference that will takes place at Tehran. My questions is that if I am visiting Iran, can it harm my visit to U.S.


The command 'which cd' prints nothing in 12.04

The command which cd prints nothing. Same for whatis cd and whereis cd. How can I find out if cd is an alias, function, or bash built-in? I'm using Ubuntu 12.04.


After using custom domain name for WordPress, now Stack Exchange thinks I am a different user

I use my WordPress as open id to log in to Stack Exchange. My URL was like name.wordpress.com. I have upgraded it to use name.com. I can still log it, but now Stack Exchange thinks I am a new user.  How can I link/merge the two accounts?


Any way to make an underscore in source produce an underscore in output when in text mode, but work normally in math mode?

I use LaTeX for keeping a lab/coding notebook, and often I want to refer to variable names containing underscores, like force_compute.  Most of the time I don't want to bother using \verb for this, because it's just a lab notebook, I'm the only one likely to ever read it, and that's several extra characters to type.  But for some reason LaTeX as usually configured doesn't allow one to use the underscore character in text mode.  You have to use \_, which is fine, but, well, twice as many characters as I want to type.  Is there any way to make a single underscore character in text mode output a single underscore glyph in the output, but work as usual in math mode?  (I.e. denote subscript in math mode.)


What is known about the 'Double log Eulers constant', $\lim_{n \to \infty}{\sum_{k=2}^n\frac{1}{k\ln{k}}-\ln\ln{n}}$?

The Euler constant is defined as $$\gamma = \lim_{n \to \infty}{\sum_{k=1}^n\frac{1}{k}-\ln{n}}$$ Let $$q = \lim_{n \to \infty}{\sum_{k=2}^n\frac{1}{k\ln{k}}-\ln\ln{n}}$$ I managed to prove that $$\frac{1}{3\ln{3}}+\frac{1}{2\ln{2}}-\ln\ln{3} \geq q \geq \frac{1}{2\ln{2}}-\ln\ln{3}$$ Is there something known about the constant $q$? For instance, is $q$ expressible in terms of $\gamma$?


How to generate a key using any $m$ passwords out of total $n$?

My application requires an AES-256 key K for some secure operation. In order to avoid saving this key in application, I have implemented following scheme:   There are 5 individuals who enters their passwords in application. Lets call them PW1..PW5 Using these passwords, I have generated the key as:  K = KDF(PW1 || PW2 || PW3 || PW4 || PW5)    The problem is that now I need to modify the application such that it works even if only 3 out of 5 passwords are available (but no less than 3). This is required because even if we lose one or two passwords (accident, person refusing to enter password etc.), we are able to recover from that situation.  Please can you advise how it can be achieved?


myTv+ app returns error code 100 when running on Android TV box

I have installed an app called myTv+ () for Samsung A7 and it worked fine. I tried to install it on the Android TV box (MX9 Pro 4K) but it's simply not working, just getting "Error Code: [100]". I contacted the developer he said this app is designed only for the smartphone and "Error Code: [100]" means that your Android is rooted. I noticed SuperSU on my Android TV box, I went for a full unrooting, yet the app still shows "Error Code: [100]". Is there any way I can force the app to work with the Android TV box?


How do I suppress error messages from cp?

I am currently looking ways to suppress error command in Linux, in particular, the command cp.   I do:   root@ubuntu:~$ cp /srv/ftp/201*/wha*/*.jj ~/. cp: cannot stat `/srv/ftp/201*/wha*/*.jj': No such file or directory   How do I suppress the error message that gets printed on the screen? I.e., I don't want to see this error message in my monitor.


If $A \subset \mathbb{R}^n$ is a open and convex set then $A= int( \overline{A})$

Ok, I'm studying real analysis and I'm trying to make my homework, but there is a question about real analysis which I can't solve.  If $A \subset \mathbb{R}^n$ is an open and convex set then $A = \operatorname{int}(\,\overline{\!A})$  I've proved that $A \subset \operatorname{int}(\,\overline{\!A})$, because $A$ is an open set. For the other way, I guess I need to use that $A$ is a convex set to prove that $\operatorname{int}(\,\overline{\!A}) \subset A$, but I dunno how to use that assumption.  Can you help me?


What does this notification icon mean? Samsung s7

I just bought an galaxy s7 edge, and this weird icon is on my notifcation bar. I cannot seem to figure it out.  Does anyone know what it does or means? Thanks.


Is there a good way to determine the value of magic items in 5e?

In 5e, magic items aren't as common or as varied as in older editions, but that also means it is hard to place prices on them.  As DM, NPC's can't really sell a magic item because we don't know the prices for these items. While it is stated that they are rare and usually unpurchasable and unsellable, but I still have to have some basis on what to price them.  So is there a way to find buying and selling prices for magic items in 5e?


Readonly listbox in html without disabling

Please refer this link    Please help me to make this listbox readonly. Please do not use disable attribute as I need to post it later.   <select size=4 multiple="multiple">     <option selected=selected>Volvo</option>     <option selected=selected>Saab</option>     <option selected=selected>Mercedes</option>     <option selected=selected>Audi</option>   </select>


How do I change the contents of the command prompt?

How can I permanently change the contents of the command prompt under Windows 7? I know about the prompt command, and the , but I'm not sure where to save the custom prompt so that it's used every time. Old web pages say autoexec.bat, but that seems to be an uneditable dummy file under 7.


How does a sponge "suck" up water against gravity?

If I take a sponge and place it in a shallow dish of water (i.e. water level is lower than height of sponge), it absorbs water until the sponge is wet, including a portion of the sponge above the water level. In other words, it seems the sponge pulls some water from the bath up into itself, doing work, and the water gains some gravitational potential energy.  Where does the energy required to do this work come from? My suspicion is that the answer involves physical and/or chemical bonds between the water and the sponge, or possibly the change in the surface area to volume ratio of the water.


What are the restrictions of an unarmed strike?

What are the global restrictions of making an unarmed strike? As it is considered a weapon, I suppose one must have a "hand free" to "punch". However, there are some gray areas I can't find any answers to.  For example, the Monk class allows a player to add an additional unarmed strike to his Attack action, as a bonus action. If one is using a Versatile weapon, can he attack using both hands, making the damage 1d8 and still make use of his additional unarmed strike(s)?  Additional remark: The extra unarmed strike granted by Flurry of Blows has no restrictions regarding the weapon(s) held. Am I missing any implied restrictions here? Or is a Monk somehow able to hold a two-handed weapon and still make use of Flurry of Blows ? If that is the case, I am to believe the unarmed strike from FoB would not be considered as weapons.  Would that also mean that if a monk is wielding a quarterstaff with two hands, he could open with an attack of [1d8 + Dex] damage, followed by an unarmed strike of [1d6 + Dex] damage with a bonus action (using Martials Arts) ?


I want to make a battery indicator where there is only one red LED that would light up when the battery drops below a 3V. Components I want to include in this circuit -Transistor(BJT)(2N3904) -Zener diode pls tell me how do I built the circuit


Lambda with different expression returns same output

Take this code snippet for example: a = [] for x in range(2):     a.append(lambda: print(x)) print(a[0](), a[1]())  The output is: 1 1  But I expected it to be 0 1  How do I fix this?


Understand why the query plan was changed

We had some performance issues with our ERP system. Somewhere around 06:00 the problem started. Long story short; one of my colleagues executed a DBCC FREEPROCCACHE (I know that this is not a preferred action, but that is not the point here). After that, he restarted the whole ERP application, not the database engine. That didn't seem to help. I looked into the Query Store and saw that the query plan was changed somewhere around 06:05. I tried forcing the older plan and the performance issues were gone.   I compared the 2 plan XMLs and I saw that both were based on the same statistics (updated date was exactly the same). The number of changes on the indexes was different, but that did not trigger an update statistics, because else the new query plan would have had a new date for the used statistics. I checked all the statistics of the involved tables, but they were not updated since the last maintenance job. The last maintenance job ran this weekend, which was also the update date of the statistics used in both query plans.  The query is a parameterized query, so why the query plan changed suddenly is a little unclear to me. I would think just the opposite, that a query suddenly runs slow, because the same plan is used for different parameters. This did not seem to be the case here, because I forced the old query plan.  The query comes from some bespoke work that retrieves orders. Now, I suspect that someone issued the parameterized query which would have returned a very large dataset and that slowed down the ERP system. Then, my colleague ran a DBCC FREEPROCCACHE and that triggered the re-compile of the query plan, based on the new statistics from this weekend. The current query just kept running and that is were he decided to restart the ERP application. Now with the new query plan all new queries slowed down until I forced the old query plan.   Could this be the explanation? I am a little skeptical, because SQL Server would trigger a re-compile when statistics have changed, so the plan should already have been re-compiled after the index maintenance job.   I think I am missing something here, but I am not exactly sure what. It is SQL Server 2016 Standard and is a dedicated server for the ERP system.  Edit 15-4-2020 12:17: Now that I write this... I think the issue is just that after the DBCC FREEPROCCACHE the parameters of the first execution of the parameterized query in question used different parameters, which caused SQL Server to recompile the (bad) plan. Or is there still something I am missing?


What's a good introductory text to ZF set theory?

I've done the usual undergraduate coursework and am interested in learning about ZF set theory. What are some texts that would be accessible to me, and what are the most popular texts in this subfield?


WhatsApp actual size is in MBs but in iCloud backup it is several GBs

My actual WhatsApp back total size is 474Mb but when I go to I cloud back up it is showing 10GB, how is it possible? I mean I have deleted all media files from my WhatsApp and in WhatsApp application the total space is 474MB and also in iCloud storage it is 474MB, but when I entered further in to Backups and then choose my phone, it shows total backup size is 14GB and WhatsApp itself is taking 10GB. Can someone help with this?


iOS indicate to user they can use a swipe gesture

I have a puzzle game for iOS where the user can swipe left to skip the current puzzle and try another one.  They can also swipe right to view previous puzzles.  However, I'm having trouble coming up with a way to indicate this feature to users.  Arrows on the left/right side seem like they would get in the way of some larger puzzles.  Here is a screenshot of the main puzzle screen.


How to fetch the columns of the synonyms for linked servers in SQL server

I am using two servers local (SQL Server running on my system) and remote (SQL Server running on another system). I have created synonyms in my local server for a table which is located on the remote server.  Synonym used- CREATE SYNONYM [dbo].[test] FOR remoteserver_name .[database_name].[schema_name].object_name  Requirement   I need to fetch the columns of the synonym.  I can retrieve the columns of the synonym using below query in SQL server.  select * from dbo.test   where  dbo is synonym created schema name (local server schema name) and test is synonym name.  I have tried to retrieve the columns of the synonyms using below query, but I cannot fetch the columns  SELECT sys.schemas.name   AS SCHEMA_NAME,        sys.synonyms.name  AS view_name,        sys.columns.name   AS COL_NAME,        sys.types.name     AS data_typename FROM   sys.columns        INNER JOIN sys.synonyms             ON  OBJECT_ID(sys.synonyms.base_object_name) = sys.columns.object_id        INNER JOIN sys.schemas             ON  sys.schemas.schema_id = sys.synonyms.schema_id        LEFT OUTER JOIN sys.types             ON  sys.columns.system_type_id = sys.types.system_type_id WHERE  sys.types.system_type_id = sys.types.user_type_id        AND sys.schemas.name = N'scehmaname'        AND sys.synonyms.name = N'synonymname'   Can you please suggest some other way to retrieve the columns of the synonym or correct the above query?


$f$ defined $|f(x) - f(y)| \leq |x - y|^{1+ \alpha}$ Prove that $f$ is a constant.

Let $f$ be defined for all real $x$ and suppose that $|f(x) - f(y)| \leq |x - y|^{1+ \alpha}$ for all real $x$ and $y$, where $ \alpha > 0$.  Prove that $f$ is constant.  Proof:  I shall show that the derivative of $f$ is zero.  We have that $0 \leq | {f(y) - f(x)} | \leq |x-y|^{1+ \alpha}$. Dividing through by $|x-y|$ we have $0 \leq |\frac{f(y) - f(x)}{y - x}| \leq |y - x|^{\alpha}$ and letting $y \rightarrow x$, we have shown that $f'(x) = \lim_{x \to y}|\frac{f(y) - f(x)}{y - x}| = 0$.  Therefore $f$ is a constant.


Finding $\int_0^1 \left\{\frac1x\right\}\left\{\frac1{1-x}\right\}\left\{1-\frac1x\right\}dx$ where $\{x\}$ is fractional part of $x$

I was able to evaluate this from $0$ to $\frac{1}{2}$ but the middle part becomes too hard to evaluate under $\frac{1}{2}$ to $1$. I only have a high school level of understanding of maths, please make it easier to understand.  $$\int_0^1 \left\{\frac1x\right\}\left\{\frac1{1-x}\right\}\left\{1-\frac1x\right\}\,\mathrm{d}x=?$$  where $\{x\}$ is fractional part of $x$.