How to start my Serial key from 1 in PostgreSQL
How to reset postgres' primary key sequence when it falls out of sync?
Are there sets $A$ and $B$ such that $A \in B$ and $B \in A$? I think that the question is clear from the title:     Are there sets $A$ and $B$ such that $A \in B$ and $B \in A$?   My feeling is that the definition of any two such sets will be circular (we can't define $B$ till we define $A$ and we can't define $A$ till we define $B$), and hence will be excluded by some axiom.  On the other hand, I can't see an inherent contradiction, though I wouldn't be surprised if some form of Russell's paradox pops up, pushed behind one more set of braces. Why is $\mathbb{E}[X] = 1 + \sum^\infty_{k=1}\mathbb{P}(X > k)$ true? I'm working through a problem regarding expected values in Markov chains, and at some point it says:     Recall from probability that if $X$ is a positive integer valued random variable, then $\mathbb{E}[X] = 1 + \sum^\infty_{k=1}\mathbb{P}(X &gt; k)$.   I know that by definition $\mathbb{E}[X] = \sum_a a\mathbb{P}(X = a)$, but I can't see how the above equality follows from this, nor am I sure if this is how to approach the problem. Add days to JavaScript Date Dropping one of the columns when using one-hot encoding My understanding is that in machine learning it can be a problem if your dataset has highly correlated features, as they effectively encode the same information.  Recently someone pointed out that when you do one-hot encoding on a categorical variable you end up with correlated features, so you should drop one of them as a "reference".  For example, encoding gender as two variables, is_male and is_female, produces two features which are perfectly negatively correlated, so they suggested just using one of them, effectively setting the baseline to say male, and then seeing if the is_female column is important in the predictive algorithm.  That made sense to me but I haven't found anything online to suggest this may be the case, so is this wrong or am I missing something?  Possible (unanswered) duplicate: where does lspci gather its information from? In  I found "[The   latest   version    of   this   document   ". There I says: "… lspci is a synonym for cat /proc/pci".  Which isn't the case here, on a Crunchbang 10 system (Debian based). No such directory. I do get the basic idea and, as far as I  know, the content of proc is (mainly) created during runtime. (Wrong?). This made me curious:  Question: Where does lspci gather it's information from? And where is this documented? (Where did I miss something?)  &nbsp; Another difference I found: In kernel.org's documentation, under "Table 1-5: Kernel info in /proc"      pci &nbsp;&nbsp;&nbsp; Deprecated info of PCI bus (new way -> /proc/bus/pci/, decoupled by `lspci) I am working on parameter estimation and one of the estimators involves a summation of $_nC_k$ ($n$ choose $k$) expressions. For some iterations, I need to compute expressions like $_0C_1$, $_0C_2$, etc.  In general how do we compute $_nC_k$ when $n$ is less than $k$? Do we still use the formula $\frac{n!}{(n-k)!k!}$ and use the gamma function to compute the negative factorial?  Thanks! What are the Windows A: and B: drives used for? In Windows you have a C-drive. Everything labeled beyond that is with the following letter.   So your second drive is D, your DVD is E and if you put in a USB stick it becomes F and the following drive G. And so on and so forth.  But then, what and where are A and B-drives? What does [&] mean before function? This is a  about Active Directory domain naming.   After experimenting with Windows domains and domain controllers in a virtual environment, I've realized that having an active directory domain named identically to a DNS domain is bad idea (Meaning that having example.com as an Active Directory name is no good when we have the example.com domain name registered for use as our website).   , but I'm still not sure about what other rules there are around naming Active Directory domains.  Are there any best practices on what an Active Directory name should or shouldn't be? What is the relationship between symmetry and degeneracy in quantum mechanics? Let me remind you about the following classical  examples in quantum mechanics.     Example 1. Bound states in 1-dim potential V(x).   Let $V(x)$ be a symmetric potential i.e.   $$V(x) = V(-x)$$   Let us introduce the parity operator $\hat\Pi$ in the following way:   $$\hat\Pi f(x) = f(-x).$$   It is obvious that    $$[\hat H,\hat\Pi] = 0.$$   Therefore, for any eigenfunction of $\hat H$ we have:   $$\hat H|\psi_E(x)\rangle = E|\psi_E(x)\rangle = E\hat\Pi|\psi_E(x)\rangle,$$   i.e. state $\hat\Pi|\psi_E(x)\rangle$ is eigenfunction with the same eigenvalue. Is $E$ a degenerate level? No, because of linear dependence of $|\psi\rangle$ and $\hat\Pi|\psi\rangle.$   Consider the second example.     Example 2. Bound states in 3-dim a potential $V(r)$. Where $V(r)$ possesses central symmetry, i.e. depends only on distance to center.   In that potential we can choose eigenfunction of     angular momentum $\hat L^2$ for basis    $$|l,m\rangle,$$   where $l$ is total angular momentum and $m$ - its projection on chosen axis (usually $z$). Because of isotropy eigenfunction with different $m$ but the same $l$ correspond to one energy level and linearly independent. Therefore, $E_l$ is a degenerate level.      My question is if there is some connection between symmetries and degeneracy of energy levels. Two cases are possible at the first sight:   Existence of symmetry $\Rightarrow$ Existence of degeneracy Existence of degeneracy $\Rightarrow$ Existence of symmetry     It seems like the first case is not always fulfilled as shown in the first example. I think case 1 may be fulfilled if there is continuous symmetry. I think the second case is always true. Removing control chars (including console codes / colours) from script output I can use the "script" command to record an interactive session at the command line.  However, this includes all control characters and colour codes.  I can remove control characters (like backspace) with "col -b", but I can't find a simple way to remove the colour codes.  Note that I want to use the command line in the normal way, so don't want to disable colours there - I just want to remove them from the script output.  Also, I know can play around and try find a regexp to fix things up, but I am hoping there is a simpler (and more reliable - what if there's a code I don't know about when I develop the regexp?) solution.  To show the problem:   spl62 tmp: script Script started, file is typescript spl62 lepl: ls add-licence.sed  build-example.sh  commit-test         push-docs.sh add-licence.sh   build.sh          delete-licence.sed  setup.py asn              build-test.sh     delete-licence.sh   src build-doc.sh     clean             doc-src             test.ini spl62 lepl: exit Script done, file is typescript spl62 tmp: cat -v typescript Script started on Thu 09 Jun 2011 09:47:27 AM CLT spl62 lepl: ls^M ^[[0m^[[00madd-licence.sed^[[0m  ^[[00;32mbuild-example.sh^[[0m  ^[[00mcommit-test^[[0m         ^[[00;32mpush-docs.sh^[[0m^M ^[[00;32madd-licence.sh^[[0m   ^[[00;32mbuild.sh^[[0m          ^[[00mdelete-licence.sed^[[0m  ^[[00msetup.py^[[0m^M ^[[01;34masn^[[0m              ^[[00;32mbuild-test.sh^[[0m     ^[[00;32mdelete-licence.sh^[[0m   ^[[01;34msrc^[[0m^M ^[[00;32mbuild-doc.sh^[[0m     ^[[00;32mclean^[[0m             ^[[01;34mdoc-src^[[0m             ^[[00mtest.ini^[[0m^M spl62 lepl: exit^M  Script done on Thu 09 Jun 2011 09:47:29 AM CLT spl62 tmp: col -b &lt; typescript  Script started on Thu 09 Jun 2011 09:47:27 AM CLT spl62 lepl: ls 0m00madd-licence.sed0m  00;32mbuild-example.sh0m  00mcommit-test0m         00;32mpush-docs.sh0m 00;32madd-licence.sh0m   00;32mbuild.sh0m          00mdelete-licence.sed0m  00msetup.py0m 01;34masn0m              00;32mbuild-test.sh0m     00;32mdelete-licence.sh0m   01;34msrc0m 00;32mbuild-doc.sh0m     00;32mclean0m             01;34mdoc-src0m             00mtest.ini0m spl62 lepl: exit  Script done on Thu 09 Jun 2011 09:47:29 AM CLT Connect to a MySQL server over SSH in PHP Calling Table with custom iterator I would like to remove my Raspberry Pi from my iPhone 8 (running iOS 11.2.1) as a connected bluetooth device.  Normally, I would go into my Settings -> Bluetooth and select the Info button (a small blue circled "i") to show the "Disconnect" and "Forget Device" dialogs:    Unfortunately, iOS does not give me this option for my device. The bluetooth device list does not contain an "i" for the item, and there is seemingly no other way to disconnect.    How do I unpair this device if there is no button to trigger to the unpair prompt?  Due to work restrictions I cannot completely reset the device. Our admins deployed a new version of Notepad++ (version 6.3) on our machines, and this version is highlighting all changes done in a file by default. It does so by setting the background color of every modified line to a bright orange, which I find very distracting.  We  have dozens of plugins installed, but I double checked and we do not have the "Change Markers" plugin (which could be the culprit).  Any idea where I can disable this feature? Changing the highlight color could also be an option. We just got a new laptop (ASUS) though we did have a mac.  We are trying to log onto Mojang to download Minecraft and it keeps saying, "The username and password are not recognized."   We have done all the usual procedures; we have reset the password, we are using the email, not the username to sign in, and it looks like the minecraft login servers are working etc. etc.  We quit Minecraft on the old computer and shut off that computer thinking that was the issue.   Still, we can't get onto Mojang.  We are accessing mincraft through firefox and trying to download it to the new computer but we can't get into the account to do that!  What in the world could be the issue? How to add images in select list? Show $\inf_f\int_0^1|f'(x)-f(x)|dx=1/e$ for continuously differentiable functions with $f(0)=0$, $f(1)=1$. Let $C$ be the class of all real-valued continuously differentiable functions $f$ on the interval $[0,1]$ with $f(0)=0$ and $f(1)=1$. How to show that $$\inf_{f\in C}\int_0^1|f'(x)-f(x)|dx=\frac{1}{e}?$$  I have been able to show that $1/e$ is a lower bound. Indeed, $$\begin{align*} \int_0^1|f'(x)-f(x)|dx &amp;= \int_0^1|f'(x)e^{-x}-f(x)e^{-x}|e^xdx \\ &amp;\geq \int_0^1\left(f'(x)e^{-x}-f(x)e^{-x}\right) dx \\ &amp;= \int_0^1 \frac{d\left(f(x)e^{-x}\right)}{dx}dx  \\ &amp;= f(1)e^{-1}-f(0)e^{0}\\ &amp;=\frac{1}{e}. \end{align*}$$ But how to show this is the infimum? Is there a function $f\in C$ such that we get $\int_0^1|f'(x)-f(x)|dx=1/e$? Ideals in the ring of Gaussian integers What are the proper ideals, prime ideals, maximal ideals of $\mathbb{Z}[i]$, the ring of Gaussian integers.    Check whether $(1+i)$ is prime or maximal ideal.     Can someone help me please. I have no idea how to crack this problem. Thanks for your time. Creating Indexes on DB with Hibernate @Index Annotation