I'm running a couple web applications on the same set of servers. In my logs across a number of different queries in both apps (as well as calls to the ASPState session state database) I see errors similar to the following:  System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.) ---System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out&amp;#xD;&amp;#xA;  at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal&amp;amp; connection)  at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource 1 retry, DbConnectionOptions userOptions, DbConnectionInternal&amp;amp; connection)  at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource 1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&amp;amp; connection)  at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource 1 retry, DbConnectionOptions userOptions)  at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)  at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource 1 retry)  at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource 1 retry)  at System.Data.SqlClient.SqlConnection.Open()  at   One web application is fairly heavily accessed (~500 requests/sec) and one is very lightly used. I see the errors in the logs for both apps, so it seems to be an environment issue as opposed to a specific app. The server setup is 4 web servers behind a load balancer connected to 2 SQL servers in an AlwaysOn availability group. All of this is running in Azure.  Lots of searching, but can't seem to find anything that helps either identify the cause or even narrow it down to a SQL configuration issue vs Azure configuration vs network connectivity issue vs clustering issue vs ??? As best I can tell it can't connect either because it can't find the network path or the server can't accept connections. Any help would be appreciated. Thanks!
We're running a couple SQL servers in Azure that are set up with an Always On availability group and Windows Failover Clustering. The servers are Windows 2019 and we're running SQL Server 2019. When we set up the cluster, it was set up to use a Distributed Network Name instead of a static cluster IP address. Thanks to this we shouldn't need an internal load balancer according to these notes: .  I'm struggling to understand exactly how this works though. Based on what I read, it seems like our connection strings will point to the DNS name of the cluster (let's call it AgCluster). If I look in DNS, there is an A record for AgCluster pointing to sql1 and another pointing to sql2. When I use AgCluster in my connection string it seems to always connect me to the primary server, even if I have ApplicationIntent=ReadOnly set. When I query @@SERVERNAME I always get the same server.  So with the Distributed Network Name setup, what should I use in my connection strings to make sure read/write queries go to the primary and read only go to a secondary? Any guides on setting this up in general would be helpful. Thanks!
Exclude lstinputlisting I want to save paper when I print my LaTeX file. That's why I want to hide all my code, inserted wtih lstinputlisting{}  I already know how to exclude tables and images or math but the lstinputlisting{} is a problem.   Hope someone can help me  \usepackage{comment} \excludecomment{figure} \let\endfigure\relax \excludecomment{table} \let\endtable\relax \excludecomment{align*} \let\endalign\relax \excludecomment{lstlisting} \let\endlstlisting\relax   edit: added lstlisting Is denying "Paradoxical Partitioning" equivalent to accepting the Axiom of Choice? In  (to ) it has been noted:     One more point to make about the paradoxical decomposition to more parts than elements [...]   currently we do not know of any model of +$\lnot$ where such decomposition does not exist.    Namely, as far as we know, in all models where choice fails there is some set which can be partitioned into more parts than elements.   (Just for clarification: From the context of the above references the comparison "more parts than" is obviously meant in terms of the  of the suitable  being strictly larger than the cardinality of the suitable initial set itself.)  Now, I find the negation or denial of such "paradoxial partitioning" interesting; i.e. the statement (proposition, "$\lnot$PP"):  "Each partition of each given set has cardinality less than, or at most equal to, the cardinality of the given set."  And I like to further explore how this suggested "proposition $\lnot$PP" (being considered along with ZF, of course) relates to "the standard set theory including Axiom of Choice", . Therefore  My questions:      Are there any models of ZFC known (or could there be any such models, in principle) in which there is some set which can be partitioned into more parts than elements ?  And:  Are there any models of ZF known (or could there be any such models, in principle) in which there is no set which can be partitioned into more parts than elements, and which is not also a model of ZFC ?  (And just for reference: Is there a conventional or concise way of expressing the suggested "proposition $\lnot$PP" in terms of standard notation, such as used in the sources linked above? Has it perhaps been discussed already, by some other name? ...) Pressure variation in a sound wave Gravitational slingshot of light using a black hole/massive object Wikipedia has this page on  using planets. In some cases this effect was used to accelerate the spacecraft to a higher velocity. This diagram shows this in a very oversimplified manner.   That got me thinking that if light is affected by gravity, and if it slingshots around the black hole/massive object, can't it gain a higher speed than $c$? What limitations are stopping it from doing this?  Forgive me if the answer to this question is pretty straight-forward or staring-you-in-the-face kind. I haven't fully understood the mechanics of the gravitational slingshot fully yet, but I couldn't wait to ask this. Note: If it is possible (I highly doubt that!), could you provide an explanation using Newtonian mechanics, I'm not very familiar with general relativity because I'm in high school. What exactly happens when a Weeping Angel is quantum locked? Currently, this site embeds YouTube videos as Flash. (see an example: )  However, this is not the best solution, as now YouTube also supports HTML5, and some users (like me!) prefer to use HTML5 player instead of Flash. Supposedly, it should also work on devices that don't have Flash player (I can't confirm because I don't have one).  The solution seems quite simple: just change the embed code to an iframe, as described at     EDIT:  says:     Note: YouTube &lt;object&gt; embeds were  on January 27, 2015. Please migrate your applications to the , which can intelligently use whichever embedded player – HTML (&lt;video&gt;) or Flash (&lt;object&gt;) – the client supports. Classify all groups with order $pq$, $p$ is not equal to $q$ I am reading the following material:  . At page 5, there is a proof classifying all groups with order $pq$(they are all primes and $p$ is not equal to $q$). I am lost in the last two sentence, which claims the semidirect product are all isomorphic. Could someone help me to understand it? Thanks! Cannot see files in my external HDD The event horizon of a black hole is where gravity is such that not even light can escape. This is also the point I understand that according to Einstein time dilation will be infinite for a far-away-observer.  If this is the case how can anything ever fall into a black hole.  In my thought experiment I am in a spaceship with a powerful telescope that can detect light at a wide range of wavelengths.  I have it focused on the black hole and watch as a large rock approaches the event horizon.  Am I correct in saying that from my far-away-position the rock would freeze outside the event horizon and would never pass it? If this is the case how can a black hole ever consume any material, let alone grow to millions of solar masses.  If I was able to train the telescope onto the black hole for millions of years would I still see the rock at the edge of the event horizon?  I am getting ready for the response of the object would slowly fade.  Why would it slowly fade and if it would how long would this fading take?  If it is going to red shift at some point would the red shifting not slow down to a standstill? This question has been bugging me for years!  OK - just an edit based on responses so far.  Again, please keep thinking from an observers point of view.  If observers see objects slowly fade and slowly disappear as they approach the event horizon would that mean that over time the event horizon would be "lumpy" with objects invisible, but not passed through?  We should be able to detect the "lumpiness" should we not through? I have thus far avoided the nightmare that is testing multi-threaded code since it just seems like too much of a minefield.  I'd like to ask how people have gone about testing code that relies on threads for successful execution, or just how people have gone about testing those kinds of issues that only show up when two threads interact in a given manner?  This seems like a really key problem for programmers today, it would be useful to pool our knowledge on this one imho. I need to prove the following identity:  $\sum_{{{\underset{k-even}{k=0}}}}^{n}{n \choose k}2^{k}=\frac{3^{n}+(-1)^{n}}{2}$  I know that -   $\sum_{k=0}^{n}{n \choose k}2^{k}=3^{n}$  but don't know how to continue. Sometimes it’s possible to use either a noun adjunct or the possessive case.     the shop door   the shop’s door   However, in certain phrases it’s not OK to do so.     the ship’s crew (the ship crew is wrong)   The questions are:   How can one find out what to use in such cases as “the shop(’s) door” when a noun adjunct option and the possessive case option are available?  How can one know which option is wrong in order to avoid the construction “ship crew”? Is there a difference in meaning between (a) the shop door (b) the shop’s door? Intersection of Adiabatic curves Can paths of two adiabatic process intersect on a plot? This question is for both reversible and irreversible processes. There are some , but they mostly address only for reversible adiabatic processes. Also, I want a physical interpretation of the processes that is, if they don't intersect then why don't and what it would be like, physically for a system. What is the best way to save values (like strings) for later use? I'm fairly new to LaTeX and I'm struggling with something apparently simple, but for which I can't find a fair solution. The problem (simplified) is as follows (please take care terms used may not have the traditional meaning in LaTeX):  I need to references to files (many) throughout a text. As example, the files:  "C:/Work/this_file1.c", "C:/MoreWork/this_file1.c" and "D:/MoreWork/another_file2.h".  So, now I would like to create an "alias" to each directory and each name file so I can reference them. A "pseudocode" could be:  % Definition \alias \c_dir = C:/Work/ \alias \d_dir = D:/MoreWork/ \alias \file1 = this_file1.c \alias \file2 = another_file2.h  % Reference in text \c_dir\file1    % For referencing C:/Work/this_file1.c \d_dir\file1    % For referencing D:/MoreWork/this_file1.c \c_dir\file2    % For referencing C:/Work/another_file2.h   My first approach was using \newcommand, but that caused numerous problems due to naming limitations. (I also tried other methods like pgfkeys, but it always gets stuck somewhere!)  Can you suggest a method? How to make a press proof with crop marks and color bars? A standard proof for press needs crop marks and color bars as below    With the package crop, the crop marks can be easily added.  But how about the color bar ?  Is there a way or a package to make it ?  An example is   \documentclass[b5paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage[cross,a4,center,info,axes]{crop}  \title{Test} \author{User} \begin{document} \maketitle \section{Fox} The quick brown fox jumps over a lazy dog. \end{document} Is there BitTorrent software that runs in a terminal? I want to deploy it on my VPS server to download resources quickly.  This could save me a lot of time since some resources are in a foreign country, We have played a 7-team competition, all seven teams met, we eliminated the team with the lowest points. After that the remaining six teams played knock out games and the three winning teams will go direct to semi-finals.  We decided that 4 teams should be picked to go for semi-final and that the best loser will join the other three to make it four teams to battle at the semi-final and final.  During the quarter final games, one team is beaten 2-0, another is beaten 3-0 and the third team is beaten in a penalty shoot-out by 4-0.  Now should you want a best loser to join the other three teams making four teams to play in the semi-final, who among these three teams would be in the best losers position. How do I set the default program? How do I set the default program that I use?  I have tried to open System Info → Default Program → change my program, but it won't work,  Any idea? Or should I use Terminal?   I want to replace the default movie player with VLC media player, because the current movie player is useless to me. Here is some information we got : We know the value of $n$, with size $1043$. We know the value of $p$ (size $20$) and $q$ (size $1023$) as the factors. $e = 65537.$ $\varphi(n)$ = $(q-1)(p-1)$ When I calculated $\gcd$ and $\text{modinv}$, I got : $\gcd(e,\varphi(n)) = 65537$ $modinv(e,\varphi(n)) = 1 $ So we can tell that they are not relatively prime. So, how to compute the d, and get the value of m? I'm not that good with math, so I cant understanding well the theory. so can anyone please make an example implementation or write a clear formula? How to tell if a certain item is in a player inventory? I am trying to create a challenge world where a certain item (e.g. a Netherite Sword) must be collected. How can I check automatically if a player has it (using commands), and then congratulate the winner? This question is specific to Bedrock Edition 1.16. I have tried other solutions so many times and they don't seem to work. See also: