Every connection needs to be opened and closed. But what time is the best or it depends on the situation?   Open connection when initiate a windows(WPF), form(Windows form), webpage(ASP.NET) and close when the user close window/form/webpage. Open connection only when user calls the database. For example the user click "Add" button and we run the SQL "INSERT..." then close the connection ASAP. Then if the user click Add/Edit again we have to reconnect to the database, run the SQL and close it ASAP again?   Both solutions have their advantages. By keeping the connection, we will make the program more performance. By keep connecting and disconnecting, the performance will drop.
I have a .net client application which is connected to a remote database. Is it safe to keep a single connection open for the lifetime of the client (hours)? Does the answer hold if I have multiple (10 or 100) clients running?
RSA leak bits to factor N Is $n^{th}$ root of $2$ an irrational number? Possible Duplicate:          Will every $n^{th}$ root of $2$ be an irrational number? If yes, how can I prove that? Group of even order contains an element of order 2 I am working on the following problem from group theory:     If $G$ is a group of order $2n$, show that the number of elements of $G$ of order $2$ is odd.   That is, for some integer $k$, there are $2k+1$ elements $a$ such that $a \in G,\;\; a*a = e$, where $e$ is the identity element of $G$. How to create automatic dual battery changeover/switching circuit for uninterruptible power? I've search for a solution to my problem both on this site and on Google but I did not find a complete and adequate response.  I need a circuit that switches two 12v sources (one that comes from a lead-acid battery powered by a solar panel and the other source comes from the output of a 220-12v switching power supply) without the final power output being interrupted during switching (this is very important!).  Notes:  - The final power output will be used to power 12v devices (30 Ampere maximum).  - The sources voltage range is 11-14.7v  How can I switch between two 12V sources? How can I (algorithmically) count the number of ways n m-sided dice can add up to a given number? I have an 3TB external disk and Windows XP 32 bit. It works as a USB 2 disk with its enclosure, but I want to use it as an internal SATA disk. I don't want to use it as a boot disk, only as a data disk. I understand that normally I need GPT (GUID partition table), and then I can't use Windows XP 32 bit anymore. I would prefer to avoid this. But what I did not understand by googling around is: can I partition the disk in 2 parts (so that each part is less than 2TB) with MBR and use it in Windows 32-bit? If yes, which tools do I need? How to specify font size less than 10pt (or more than 12pt)? I'm trying to make a document that has a very small font throughout, I tried this:  \documentclass[0.5mm, a4paper]{article} \documentclass[7pt, a4paper]{article}   But it doesn't seem that they allow me to go anything below 10pt.  This hack make it work, but not for the section headers:  \fontsize{4mm}{5mm}\selectfont   Does anyone know any better ways to do this? I often hear people saying that "I am" is the shortest sentence in the English language.  I know that there are also discussions about sentences using the imperative mood such as "Go." that would be shorter, but my question is this:  Why would we (the people saying "I am" is a full sentence) not accept "I'm" as a complete sentence?  Is there some unwritten rule about contractions that says "I'm" wouldn't be correct? Was Kylo Ren's Blaster Bolt Freezing Really Force Telekinesis? In this questions answer its stated that Kylo Ren freezes the blaster bolt in midair with telekinesis:       Because he is extremely skilled in Force telekinesis, Kylo Ren is able   to freeze not just objects but even blaster bolts in midair.   But as a commenter already pointed out, this seems nonsense (even in star wars force physics). The blaster bolt is, as far as I know, a cloud of plasma. If it is stopped by telekinesis, why should it continue its old path with its old speed after it is released? Wasn't it more a completely new force ablility like "time freeze"? While I admit in a case of time freeze the bolt should not have flickered all the time. Also the plasma should have expanded and vanished or simply cooled down releasing its energy to the surrounding air.  So when it was force telekinesis Kylo must have done the following:   Stop every atom in the plasma cloud Keep the cloud compressed and in form and shape. Isolate it to prevent the heat flow or keep it on temperature (is this still telekinesis?) Not just releasing it but accelerate it again exactly on its old path and speed.   This would be indeed a greate never seen mastery of telekinesis. And very ineffective. And if he wanted to be cool, wouldn't it be even cooler to change the path after the "release" so that it hits one of his enemies?  So what was going on there? Pure telekinesis or something else? Did the writers intend this? Or did they just not thinking it to the end? Finding $\lim_{n\to\infty} a_n^n$ where $a_n=\frac{(n!)^2}{(n+k)!(n-k)!}$ What is the best way to clone/deep copy a .NET generic Dictionary? I'd like to declare some new operators using \DeclareMathOperator and some of the names are already taken by other commands (that I do not want to use). Is there an equivalent to the \renewcommand command for \DeclareMathOperator or a different way to overwrite the commands using \DeclareMathOperator? Prove that a non-empty closed convex $S$ has an extreme point iff it does not contain any line I am wondering how to prove the following theorem: Let $S \subset \mathbf{R}^{n}$ be a non-empty closed convex set. Then $S$ has at least one extreme point iff $S$ does not contain any line. Extreme point $x \in S$ means that there is no couple of points $y, z \in S$ and $\lambda \in (0;1)$ such that $x = \lambda y + (1-\lambda)z$. I know that every non-empty closed convex set can be represented as an intersection of all closed half-spaces containing the set but I do not know if it is helpful in proving the theorem. Is "shined" correct? If so, is "he shined X on the tree" also correct? Recently, I overhead a former professor of mine use the word shined, a word that makes me grammatically uncomfortable.  She used it as following: "Then, after we shined a light on the other ball, what happened?..."  My first question is: Is using shined mainstream, over what sounds better to my ear, shone?  If so, is there any historical flip-flopping between the two usages?  Secondly, if shined is in fact legit, can it be used transitively?  Saying something like,      The light shined all throughout the night.   while odd, doesn't sound as bad to my ear as,     He shined the light on the ball throughout the night.   The latter sounds quite bad to my ear.  Indeed, à propos the original question, can shone &mdash; the better sounding alternative to my ear &mdash; be used transitively? A way for "new users" to ask about their post specifically We currently require that new users have 5+ reputation to participate in meta support discussions (bugs, feedback, governance, etc). This is primarily because the use case for meta is not intrinsically obvious, so we require a modicum of "experience" with the site before jumping into it.   But that blocks new users with legitimate questions about their own posts.  Setting aside any arguments about new-users-are-evil-and-suck-the-life-out-of-our-community, I would like to propose a very specific path for new users to ask about their own question provisionally.  Instead of blocking a new user with this message:     You must have at least 5 reputation on &lt;site> to ask a question on meta.   We can change this to:     You must have at least 5 reputation on &lt;site> to post on meta, but you may ask a question about your own post specifically.      Link to your post: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      ask about this post   cancel    The system will check whether the linked question provided belongs to the author. . The user can then proceed with the post provided they leave the template (below) intact:     Title &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      &nbsp;         &lt;!--Do not remove-->   &lt;!--Note: Questions not about your post will be deleted-->      I have a question about the post:       &lt;!-- Your question below: -->   &nbsp;     Not only is this a great and gentle introduction to the proper use of meta, but it stands to help new users just when they need it most (learning to use the community).   Of course this doesn't 100% guarantee that someone won't get it wrong on occasion. But this is an awful lot of in-your-face guidance without simply telling people "read our FAQ" (which they never do). And if a user manages to step over all that guidance and still manages to misuse meta, I have no compunction about summarily removing a question they should never have posted.   But this just-in-time learning is a very effective way of learning a new site in a gentle and thoughtful way. If this is abused more often than not, it is easy to disable. But it's better than assuming clueless newbie every time. Why can't helicopters reach mount everest? In propositional logic, the statement "If pigs can fly, then elephants can lay eggs." validates to true because the antecedent validates to false.  In other words, given $a \rightarrow b$, if a is false, the entire statement is true. Why?  Just because the antecendent is false doesn't mean that another fact depends on it, right? let's say that I have a following file structure:  ~/DIR1 -fileA -DIR2 --fileB   Then, being in ~, I run this script:  cp DIR1 NEWDIR2   And just an error happens:  cp: omitting directory ‘DIR1’   I understand why nothing from DIR1 gets copied (because I didn't use -r switch that would enforce recursion) but I'd expect the DIR1 folder itself copied to NEWDIR2 (so practically a creation of a new "NEWDIR2" in ~ or a creation of ~/NEWDIR2/DIR1).  Could someone explain to me why is my expectation wrong? Print programs with its proper syntax How can I query SEDE for tags I've created? How can I query the  for tags I've created?