I'm trying to calculate complexity of some algorithms but I don't no how to mesure the complexity of the operations with vectors. For example, what is the complexity of push_back()?  In c++ reference I found  "Constant (amortized time, reallocation may happen). If a reallocation happens, the reallocation is itself up to linear in the entire size."  What does it's means? Is the operation of complexity O(n)? (n is the vector length).  Thank you.
What is meant by "Constant Amortized Time" when talking about time complexity of an algorithm?
Double booked - User bookmarking question recorded twice In this  one user is shown as having bookmarked  twice:  This doesn't appear to be the same question as:  or  though it's certainly possible that the cause is the same. Debian : Verify disk encryption password for already mounted system I am working on our Debian server on which we have a Raid drive encrypted with 2 devices. I did this around 1.5 years back and have never rebooted since. Now, we want to reboot for some reasons, but I have to make sure that the password I have is the correct one, or we will be stuck.   How can we verify the password for an encrypted-raid? Thank you.  Raid details :    mdadm --detail /dev/md0    /dev/md0:         Version : 1.2   Creation Time : Thu Feb 11 14:43:40 2016      Raid Level : raid1      Array Size : 1953382336 (1862.89 GiB 2000.26 GB)   Used Dev Size : 1953382336 (1862.89 GiB 2000.26 GB)    Raid Devices : 2   Total Devices : 2     Persistence : Superblock is persistent      Update Time : Fri Mar 10 10:37:42 2017           State : clean   Active Devices : 2 Working Devices : 2  Failed Devices : 0   Spare Devices : 0             Name : HOSTNAME:0  (local to host HOSTNAME)            UUID : 5c450558:44a2b1e9:83cb4361:9c74df8e          Events : 49      Number   Major   Minor   RaidDevice State        0       8        1        0      active sync   /dev/sda1        1       8       17        1      active sync   /dev/sdb1   Thank you.   Update  dmsetup table --showkeys CryptVol: 0 Large_Number crypt aes-cbc-essiv:sha256 RANDOM_TEXT  0 253:0 4096 RaidVG-LVMVol: 0 Large_Number linear 9:0 2048 drush/drush dev-master requires codegyre/robo ~1.0.0-beta1 I'm transitioning a Drupal 6 site to Drupal 8.1 so following the official instructions, I set up a new install in its own directory. Since this is only one site, I followed the instructions to put my database credentials in sites/default/default.settings.php after the declaration of the $databases array.  Running drush --status returns the following.  Drush version          :  8.1-dev                                           Drush temp directory   :  /tmp                                              Drush configuration    :                                                    Drush alias files      :                                                    Drupal root            :  /media/psf/Home/apps/newp                         Drupal Settings File   :  MISSING   Since this Drupal is 8.1-dev that must mean I need to upgrade it. Since this is a global install using Composer, I run composer global update.     Your requirements could not be resolved to an installable set of   packages drush/drush dev-master requires codegyre/robo ~1.0.0-beta1   Checking the drush-ops page on github doesn't show any anomalies like this nor my Google search.   What am I overlooking? Show *realtime* mouse cursor coordinates? (Cursor mod / overlay) Also, copy to clipboard? I'm looking for a solution that would display the current mouse cursor coordinates in realtime (i.e. NOT xdotool and NOT xev).  I need to move the mouse to a certain position, then press Alt-Tab to flip to another window and record the coordinates there. (This would not move the mouse, so the coordinate display would stay the same).  There's a Windows program that works BEAUTIFULLY for this purpose -   ...but it doesn't even start up in Wine.  Alternately, instead of displaying the coordinates, if this solution could copy the coordinates (in XXX,YYY format) to the clipboard, upon pressing a hotkey, that would be even better.  Any suggestions would be much appreciated!  P.S. I'm running Ubuntu 12.04 LTS. Transit visa for Indian citizen traveling through Hong Kong Good Number Theory books to start with? Combinatorial proof of summation of $\sum\limits_{k = 0}^n {n \choose k}^2= {2n \choose n}$ I was hoping to find a more "mathematical" proof, instead of proving logically $\displaystyle \sum_{k = 0}^n {n \choose k}^2= {2n \choose n}$.  I already know the logical Proof:  $${n \choose k}^2 = {n \choose k}{ n \choose n-k}$$  Hence summation can be expressed as:  $$\binom{n}{0}\binom{n}{n} + \binom{n}{1}\binom{n}{n-1} + \cdots + \binom{n}{n}\binom{n}{0}$$  One can think of it as choosing $n$ people from a group of $2n$  (imagine dividing a group of $2n$ into $2$ groups of $n$ people each. I can get $k$ people from group $1$ and another $n-k$ people from group $2$. We do this from $k = 0$ to $n$. How can I send the stdout of one process to multiple processes using (preferably unnamed) pipes in Unix (or Windows)? I'd like to redirect the stdout of process proc1 to two processes proc2 and proc3:           proc2 -&gt; stdout        /  proc1        \           proc3 -&gt; stdout   I tried   proc1 | (proc2 &amp; proc3)   but it doesn't seem to work, i.e.   echo 123 | (tr 1 a &amp; tr 1 b)   writes   b23   to stdout instead of    a23  b23 Show that $1^{p-1} + 2^{p-1} +\ldots + (p-1)^{p-1} \equiv -1 \mod p$ Show that    $$1^{p-1} + 2^{p-1} +\ldots + (p-1)^{p-1} \equiv -1 \mod p$$   So, I use Fermat's little theorem, that is if $p$ does not divide $a$, then $a^{p-1}$ is congruent to $1$ (mod $p$). But I'm still confused. If $1^{p-1}$ is congruent to $1$ (mod $p$), $2^{p-1}$ is congruent to $1$ (mod $p$), and $p$ does not divide $p-1$, so $(p-1)^{p-1}$ is congruent to $1$ (mod $p$). How does that equal $-1$ (mod $p$)? QGIS calculates main soil type of polygons from another polygon layer Mouse cursor flickering and disappearing Area 51 layout breaks when zoomed to 90% How to completely remove desktop? I wanted to switch to Xfce (I had KDE and GNOME installed), and I did this :    sudo apt-get install xubuntu-desktop sudo apt-get remove kubuntu-desktop sudo apt-get remove ubuntu-desktop sudo apt-get autoremove   but to my surprise, I could still pick gnome, kde plasma, etc during the log in.  So, how do I completely remove KDE and GNOME desktops? I am learning P&amp;S's Introduction of quantum field theory. My teacher said that if the mass of neutrino is exactly 0, then we should not observe any right-handed neutrinos and left-handed anti-neutrinos according to Weyl's theory. It is because $$ \left( i\gamma^\mu \partial_\mu - m \right) \psi = \left( \begin{array}{cc} -m &amp;  i\left(\partial_0 + \vec\sigma \cdot \vec\nabla\right) \\ i\left(\partial_0 - \vec\sigma \cdot \vec\nabla\right) &amp; -m \end{array} \right) \left( \begin{array}{c} \psi_L \\ \psi_R \end{array} \right) =0. $$  If we set m=0, then we will have:  \begin{align} i\left(\partial_0 - \vec\sigma \cdot \vec\nabla\right) \psi_L &amp;= 0; \\ i\left(\partial_0 + \vec\sigma \cdot \vec\nabla\right) \psi_R &amp;= 0. \end{align}  And if these formulas can describe neutrinos we must conclude that there are two types of neutrinos.  My confusions are:   It is known that the mass of neutrino is not 0, therefore there are chances (depending on the mass) to find right-handed neutrinos and left-handed anti-neutrinos. But we don't. If I accept that there are only these two types of neutrinos (right-handed anti-neutrinos and left-handed neutrinos), this property of neutrino causes the parity violation, so parity violation must relate to angular momentum and therefore spinor space. Am I write? Are there any reasons why neutrino is so weird that is has mass but still has helicity + Or - 1. This goes against with what I have learned that only when a particle  moves at the speed of light can its spin aligned with its momentum. Give us better search-by-score syntax When should parents stop changing clothes in front of children? I would like to know how to upgrade from my current version of Ubuntu to the next stable from the Command line interface? Is there a deb package to install Firefox ESR? I would like to have  on my system but I would like to install it via apt-get. Is there a special package to install this?  Download link would be: Suppose $G$ is a finer filter than $F$ in a topological space $X$.  Is the net base in $G$ a subnet of the net base in $F$?  I am using the definitions of General Topology of Willard:     Definition 12.15. If $(x_\lambda)$ is a net in $X$, the filter generated by the filter base $\mathscr C$ consisting of the sets $B_{\lambda_0}=\{x_\lambda; \lambda\ge\lambda_0\}$, $\lambda_0\in\Lambda$, is called the filter generated by $(x_\lambda)$.      Definition 12.16. If $\mathscr F$ is a filter on $X$, let $\Lambda_{\mathscr F}=\{(x,F); x\in F\in\mathscr F\}$.   Then $\Lambda_{\mathscr F}$ is directed by the relation $(x_1,F_1)\le(x_2,F_2)$ iff $F_2\subset F_1$, so the map   $P\colon \Lambda_{\mathscr F} \to X$ defined by $P(x,F)=x$ is a net in $X$. It is called the net based on $\mathscr F$.   The definition of subnet used in Willard is the second one from this post:   Thank you What is $n!$ when $n=0$?