error while copy list to matrix python3
List of lists changes reflected across sublists unexpectedly
Find the value of $a^2-b^2+c^2$ How do I execute for a player wearing armor with a colored name I am working on a command block contraption on my server that involves armor giving you certain potion effects.  /execute if entity @p[nbt={Inventory[{Slot:100b,id:"minecraft:leather_boots",tag:{display:{Name:"{\"text\":\"Frog Boots\"}"}}}]}] run effect give @s jump_boost 1 1 true  However, it only works if the boots are named in an anvil. How would I write the command if I wanted to test if the player was wearing boots named "Frog Boots" in bold and green text? The tag  and meta-tag  syntax generate much nicer looking results than merely surrounding your tag with [square brackets].    However, they only work when you're talking about the site you're on.  On Area51, in Chat, and on Meta sites, this is frequently not the case, leading to attempts at syntax like [[tag:failure]](https://superuser.com/questions/tagged/failure), which produces:    Hmm, must be some subtle syntax thing:   : [tag:failure](https://superuser.com/questions/tagged/failure) []: [[tag:failure](https://superuser.com/questions/tagged/failure)] : [tag:[failure]((https://superuser.com/questions/tagged/failure))] : &lt;a href="https://superuser.com/questions/tagged/failure"&gt;[tag:failure]&lt;/a&gt; : [tag:failure][1] \n\n [1]: https://superuser.com/questions/tagged/failure : [more text is a [tag:failure] too](https://superuser.com/questions/tagged/failure)   I give up!  How can I create a link to a tag on another site with tag markdown? If I'm floating in space and I turn on a flashlight, will I accelerate? Photons have no mass but they can push things, as evidenced by .   Can photons push the source which is emitting them? If yes, will a more intense flashlight accelerate me more? Does the wavelength of the light matter? Is this practical for space propulsion? Doesn't it defy the law of momentum conservation?  Note: As John Rennie mentioned, all in all the wavelength doesn't matter, but for a more accurate answer regarding that, see the comments in  .  Related Wikipedia articles: , Allow moderators to edit/delete comments directly from the per-user comment moderation page A while back, a new dashboard was added to the user moderation tools to .  It's great for scouring a user's comment history to find certain comments, but I can't do anything from this dashboard except filter by flagged1, deleted, or active comments, and visit the posts to which the comments are attached where I can then edit or delete them.  Can we have the ability to edit and delete comments from this dashboard just as we're able to from the flag queue? It gets particularly tedious to have to open 100 tabs just to delete 100 spam comments from the posts they're attached to (and no, I'm not making that number up2...).    1 .  2 Alright, fine, I made that up; the actual number of spam comments I had to delete was 111. Tracking down where disk space has gone on Linux? Scripting `rm` and `rm -i` I want to create a script that whenever there are more than three files being removed, it invokes rm -i by default. I know it will go in initialization files but can't seem to get it working.  So far:  if [$file -ge 3]; then   rm -i    exit 0  else   rm exit 1 For each $y \in \mathbb{R}$ either no $x$ with $f(x) = y$ or two such values of $x$. Show that $f$ is discontinuous. How about newlines within comments? I am aware that comments have only a simple field, with no formatting possible and that is fine (if formatting is needed, your comment should actually be an answer!)  But I find some comments hard to read because they are mainly one giant line (of up to 600 characters!). Any newlines entered during the redaction of the message is stripped from the published comment.    Would it be possible to preserve those newlines? (but may be deleting empty lines, to prevent abuses like a comment taking 600 lines because a prankster could find amusing to post a 600 newlines comment!)    Let's recap:   what we need (and can actually preview while typing a comment, making it more readable, both for the writer -- and the reader, should newlines being kept): declined for newlines (why? no reason given at this time.) what we don't need but is "nice to have" (even though we cannot preview those): granted for bold and italic text. what we really don't need (and cannot not preview): granted for... __code sample__!? Code sample? Seriously? In a comment?   In short: What was an incentive to post a new answer (because of the lack of formatting) is now further diminished. But the comments remain published as one long-hard-to-read-gigantic line. Comparison between bootstrap percentiles confidence interval and BCa confidence interval? I have generated a nonparametric percentiles bootstrap confidence interval ($32.27143, 51.08571$), and a BCA confidence interval ($33.26, 53.49$) with an initial sample size of $n=7$.  Evidently, the BCA interval is larger than the percentiles interval. Shouldn't the BCA interval be better than the percentiles interval (and by "better" I mean "smaller")? I noticed also that when the sample size is larger, for example $n=40$, BCa confidence interval decreases. Recommendations for Numerical Analysis texts? I'm in a numerical analysis course right now and it's pretty rigorous but I'm enjoying it a lot. I took a lower level course before that was more oriented towards implementation of numerical methods, so it's not my first time with the material.  Anyway, my professor wrote his own course notes and they're fantastic but I wanted some reference material since I'm currently outlining my own notes. Just wondering what the big ones out there are  edit: I would say I'm at an advanced undergraduate level Pseudo-terminal message in script How to view monitor refresh rate in macOS? I just purchased a Dell P2175Q monitor for my 15" MBP w/Touchbar. I'm connecting with a USB-C to DisplayPort cable, but when I go to Apple > System Preference > Displays, there is nothing about the Refresh Rate. Pressing the Option key does not show any additional options.  I've seen countless screenshots where this information should appear. Is there another way to check the refresh rate?  I'm on macOS 10.13.4  Thanks. Fibonacci addition law $F_{n+m} = F_{n-1}F_m + F_n F_{m+1}$ This is about the seemingly controversial shield to ground connection. The system is basically a body-worn intel-based computer, powered by a battery. Two USB 3.0 (or 3.1 Gen1) cables come out to a PCB that contains two USB 3.0 hub chips (). Two external cameras plug in to this usb hub PCB (one camera for each hub). So the usb hub PCB has 4 usb connectors (2 upstream and 2 downstream).  The question is, what to do with each of the usb connector shields? The main directive is USB connection robustness.  I have seen many recommendations. For example:  Recommendation 1  TI's TUSB8020B hub reference design  ties all shells directly to ground.    Intel's  also recommends to tie to ground (although this was written for USB 2.0).    Recommendation 2  TI's TUSB8020B EVM (and datasheet) connect shields together, and to ground using RC filter:    Microchip's  also ties shields together and uses an RC filter, but a 3 orders of magnitude smaller R:    Recommendation 3  Cypess  ties each shield independently to ground using either LC or L filter (chokes really):    The cameras themselves (off the shelf) use Cypress recommendation (LC to ground). The embedded computer seems to tie to ground from visual inspection and checking continuity to ground, but I'm not 100% sure (schematics are not available).  Now we face the shield dilemma with the hub PCB (which by the way currently does not have a metallic enclosure, it is a 3d printed plastic enclosure).   What is your say? The Borel-Cantelli Lemma in  seems to be a sort of "corollary" of the .  It says:  "Let $(E_k)_{k=1}^{\infty}$ be a countable collection of measurable sets for which $\sum_{k=1}^{\infty} m(E_k) &lt; \infty$. Then almost all x $\epsilon \ \mathbb{R}$ belong to at most finitely many of the $E_k$'s"  I don't get three things:   "Then almost all x $\in \ \mathbb{R}$ belong to at most finitely many of the $E_k$'s"   What does that mean? Since the Borel-Cantelli Lemma comes after the "almost everywhere" definition, I guess: $\exists \ Z \ \subset \mathbb{R}$ s.t. $m(Z) = 0$ and $\forall x \ \in \ \mathbb{R} \setminus Z$, x belongs to $(E_{j}, E_{j+1}, E_{l}, ..., E_{m})$.   In the proof, one can see the $m(\limsup \ E_k) = 0$ part, stated as $m(\cap_{n=1}^{\infty} [\cup_{k=n}^{\infty} E_k]) = 0$. For some reason, $m(\cap_{n=1}^{\infty} [\cup_{k=n}^{\infty} E_k]) = 0$ implies that "Therefore almost all x $\in \ \mathbb{R}$ fail to belong to $\cap_{n=1}^{\infty} [\cup_{k=n}^{\infty} E_k]$ and therefore belong to at most finitely many $E_k$'s"   Okay, why? What is the contradiction if almost all $x \epsilon \ \mathbb{R}$ belong to all the $E_k$'s? Or a countably infinite subcollection?   What is the significance of this? Why not just state the Borel-Cantelli Lemma as "Let $(E_k)_{k=1}^{\infty}$ be a countable collection of measurable sets for which $\sum_{k=1}^{\infty} m(E_k) &lt; \infty$. $m(\cap_{n=1}^{\infty} [\cup_{k=n}^{\infty} E_k]) = 0$"? How to show $\lim_{x \to 1} \frac{x + x^2 + \dots + x^n - n}{x - 1} = \frac{n(n + 1)}{2}$? I am able to evaluate the limit $$\lim_{x \to 1} \frac{x + x^2 + \dots + x^n - n}{x - 1} = \frac{n(n + 1)}{2}$$ for a given $n$ using l'Hôspital's (Bernoulli's) rule.  The problem is I don't quite like the solution, as it depends on such a heavy weaponry. A limit this simple, should easily be evaluable using some clever idea. Here is a list of what I tried:   Substitute $y = x - 1$. This leads nowhere, I think. Find the Taylor polynomial. Makes no sense, it is a polynomial. Divide by major term. Dividing by $x$ got me nowhere. Find the value $f(x)$ at $x = 1$ directly. I cannot as the function is not defined at $x = 1$. Simplify the expression. I do not see how I could. Using l'Hôspital's (Bernoulli's) rule. Works, but I do not quite like it.   If somebody sees a simple way, please do let me know.    Added later: The approach proposed by Sami Ben Romdhane is universal as asmeurer pointed out. Examples of another limits that can be easily solved this way:   $\lim_{x \to 0} \frac{\sqrt[m]{1 + ax} - \sqrt[n]{1 + bx}}{x}$ where $m, n \in \mathbb{N}$ and $a, b \in \mathbb{R}$ are given, or $\lim_{x \to 0} \frac{\arctan(1 + x) - \arctan(1 - x)}{x}$.   It sems that all limits in the form $\lim_{x \to a} \frac{f(x)}{x - a}$ where $a \in \mathbb{R}$, $f(a) = 0$ and for which $\exists f'(a)$, can be evaluated this way, which is as fast as finding $f'$ and calculating $f'(a)$.  This adds a very useful tool into my calculus toolbox: Some limits can be evaluated easily using derivatives if one looks for $f(a) = 0$, without the l'Hôspital's rule. I have not seen this in widespread use; I propose we call this Sami's rule :). I need Mac OS X 10.6.8 (Snow Leopard) in order to work with some legacy software and I want to buy new Mac Mini computer.  Is it possible to install this OS on a new Mac Mini or it's not compatible with it?  If so, what is the latest model of Mac Mini that I can use in this scenario? Dual VGA Cards Intel/ Nvidia This is my first post in this forum. I am new to Linux, just installed Ubuntu 11.10 on my Sony Vaio VGN-Z12 with two graphic cards Intel and NVidia Geforce 9300 GS.  After the installation the lightdm works on Intel card but with very law display quality. I installed Nvidia driver from the official website as well as this PPA.  sudo apt-add-repository ppa:ubuntu-x-swat/x-updates sudo apt-get update sudo apt-get install nvidia-current       Once I installed the driver and run nvidia-xconfig which creates xorg.conf file, the xserver will not start with error "no screen". If I delete the xorg.conf file then I am able to start the xserver normally but with intel display (bad quality) I'm using Linux Mint. My login shell (cat /etc/passwd | grep myUserName) is bash.  After I start my graphical desktop environment and run a terminal emulator from it, I can see that .bash_profile is not sourced (environment vars that are exported in it are unset). But if I log in from a text console (ctrl+alt+F1) or manually run bash -l from the terminal emulator, .bash_profile works fine.  Am I wrong when I think that .bash_profile should be sourced when X starts and all export'ed vars should be available in the terminal, running from X?  P.S. Placing everything in .bashrc and sourcing it from .bash_profile is not good idea (): environment stuff should be sourced only once.