qid
int64
1
4.65M
metadata
listlengths
3
3
prompt
stringlengths
31
25.8k
chosen
stringlengths
17
28.2k
rejected
stringlengths
19
40.5k
domain
stringclasses
28 values
154,810
[ "https://dba.stackexchange.com/questions/154810", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/110218/" ]
I'm a developer, but I turn to the dba community for the following question. I'm writing an integration test in C#. In this test, I start a transaction first, and always rollback so nothing is committed to the database, regardless of wether the test succeeds or fails. After starting the transaction, I insert somethin...
I don't know anything about Entity Framework, but in the following basic test using Sql Server Management Studio against a local instance, it appears that the trigger fires upon the completion of the insert to table dbo.Test1 and I can immediately see rows in dbo.Test2 BEFORE issuing the COMMIT <pre><code>USE [Test] G...
There are different types of triggers. Some would fire even before the INSERT But on any case, the INSERT and the related triggers would be part of the same transaction, so you would only see the database status before all transaction is run, or after all of it is run. However, as your test is using the Entity Framew...
https://dba.stackexchange.com
5,912
[ "https://electronics.stackexchange.com/questions/5912", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1225/" ]
I want to use a linear regulator for some application, it's in a SOT-223 (not SOT-89) package. How do I keep it cool, preferably without a bulky heatsink? The regulator may be dissipating 2-3W of heat. I've heard that you can use copper traces under the regulator on the PCB to keep the regulator cool; does anyone have ...
You won't be able to dissipate that much heat with only copper traces to wick away the heat. (A SOT-89 is also a very small package, are you sure that specific part in that specific package is rated for 3W?) I use D-Pak sized packages with lots of copper on the four layers and arrays of vias to try to give the device ...
Its the laws of physics. You need to dissipate 3W through devices with large thermal resistance there will be a temperature rise. Using copper traces can take the heat away from surface mount devices into the printed circuit board. But that heat still needs to be sunk. Looking at a SOT223 device, they have a Rj-a of...
https://electronics.stackexchange.com
193,019
[ "https://electronics.stackexchange.com/questions/193019", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/87127/" ]
Does the concept of RMS VALUE applicz to a non periodic continuous time signal? If yes how to calculate it? If no, why is it not defined? My doubt is : What value does an <strong>ac voltmeter display for an input of non periodic square pulse of say 5V peak?</strong>
<blockquote> Does the concept of RMS VALUE applicz (sic) to a non periodic continuous time signal? If yes how to calculate it? </blockquote> RMS is rigorously defined for an infinite (not necessarily periodic) time-signal as <span class="math-container">$$\lim_{T\to\infty}\sqrt{\frac{1}{2T}\int_{-T}^T (f(t))^2dt}$...
The definition is simple : the RMS voltage is the voltage that would produce the average (i.e. mean) power. There is nothing here that depends on periodicity of the signal. Practically, for an aperiodic signal, the issue comes down to: how do you measure its average value? One approach is to average it over some defin...
https://electronics.stackexchange.com
61,355
[ "https://dsp.stackexchange.com/questions/61355", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/45732/" ]
I have two (audio) recordings of one analog signal, I used two separate devices (smart-phones) recording from two different locations. Each recording device is pretty crappy, lot's of electrical hum and interference etc... My assumption is that each recording contains a unique and distinct noise sample. Is it possibl...
<blockquote> Is it possible to reconstruct the <strong>original pure</strong> signal? </blockquote> No, that is information-theoretical impossible. Also, that signal doesn't exist, probably, to begin with ;) However, you can definitely increase the the SNR simply by averaging; that becomes pretty obvious when you c...
A "pure" signal, No. A less noisy signal? Possible? Yes but there are several complications that may make this impractical. You basically need to align the 2 recordings and then add them. You might gain 3dB in SNR. but <ul> <li>The paths from the source to the 2 locations aren't the same, so they will differ to...
https://dsp.stackexchange.com
108,772
[ "https://electronics.stackexchange.com/questions/108772", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/41182/" ]
It has always been a puzzle for me how a certain type of information can be discarded from a system when it is unused. Say, for example, the Internet Protocol (IP) specification states that packets whose version is neither 4 nor 6 are 'discarded'. Since the packets' representation is a signal of some sort, how is this ...
In this case, the packet is received into a memory buffer of some sort, so that its protocol version field can be examined. If it has a correct value, it is then forwarded to the next stage of processing, typically by copying the data to a different area of memory. If not, then the memory buffer is simply over-written...
I think part of the mental challenge here is remembering that <strong>a packet is not something physical</strong>. The packet information must be sent through a physical medium, though, such as copper wire, fiber-optic cable, radio waves, etc. which is why it seems confusing. A packet can be thought of like a sentenc...
https://electronics.stackexchange.com
124,910
[ "https://cs.stackexchange.com/questions/124910", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/120242/" ]
Is master theorem applicable for this example? <span class="math-container">$$T(n)= 8T \biggl(\frac{n-\sqrt n}4\biggr)+ n^2$$</span>
To follow the strategy you outline, we need to be confident a priori that we have an upper bound on <span class="math-container">$BB(n)$</span>. More snappily, if <span class="math-container">$f$</span> is any function with <span class="math-container">$f(n)\ge BB(n)$</span>, then from <span class="math-container">$f$<...
<blockquote> But this isn't a satisfactory answer because surely decidability isn't about how feasible a procedure is in practice, but whether it's decidable in theory - what if computers were powerful enough to be able to implement this in our current universe where BB(n) is very large? </blockquote> The problem is...
https://cs.stackexchange.com
144,671
[ "https://physics.stackexchange.com/questions/144671", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/31965/" ]
Is there a easy way to rewrite the SU(2) kinetic term as a trace? As in $$\mathcal{L} = -\frac{1}{4}\vec{F}_{\mu\nu}\vec{F}^{\mu\nu}\\[1cm] = -\frac{1}{2}\mathrm{tr}\Bigg[\bigg(\vec{F}_{\mu\nu}\cdot \frac{\vec{\tau}}{2}\bigg)^2\Bigg]. $$ Does this follow from the properties of the Pauli matrices?
Here's what confused me (I was simply too lazy to put in work). What answers my question is the following simple algebra: Starting with the trace, we find* $$\mathrm{tr}\left\{\left(\vec{F}_{\mu\nu}\cdot\frac{\vec{\tau}}{2}\right)^2\right\} = \mathrm{tr}\left\{\left({F}^1\cdot\frac{{\tau}^1}{2}+\cdots\right)\left({F}...
The trace is just the inner product for the Lie algebra. The field strengths are Lie algebra valued, i.e., $\mathbf{F}_{\mu\nu}$ is an element of the Lie algebra, and can be written as a linear combination of generators: $\mathbf{F}_{\mu\nu} = \sum_a F^a_{\mu\nu} t^a$. One usually normalizes the generators such that $\...
https://physics.stackexchange.com
337,788
[ "https://stats.stackexchange.com/questions/337788", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/202355/" ]
Wikipedia defines convergence in probability as A sequence ${X_n}$ of random variables converges in probability towards the random variable $X$ if for all ε > 0 $$\lim_{n\rightarrow\infty} P(|X_n-X|&gt;\varepsilon) = 0$$ I wonder why the limit $X$ is a random variable. I think $X$ as a r.v. can only be a constant, an...
That the sequence of rv's <span class="math-container">$(X_n)$</span> can converge to another rv <span class="math-container">$X$</span> is clear from the example<span class="math-container">$$X_n=X+\upsilon_n/n\qquad \upsilon_n\stackrel{\text{i.i.d.}}{\sim}\cal{N}(0,1)$$</span> where <span class="math-container">$X$</...
Convergence in probability to a constant is a special case of the more general result of convergence in probability to a random variable, so it is somewhat natural to allow for the more general case. It is also worth bearing in mind that once you allow convergence to a constant, or even just convergence to zero, that ...
https://stats.stackexchange.com
724,858
[ "https://physics.stackexchange.com/questions/724858", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/327258/" ]
Imagine that a ball is thrown directly down at a rate of 20 m/s from a height of 100m in Earth's gravitational field. If we were to calculate the time it takes to fall we could use the kinematic equation to get 100m = (20m/s)t + 1/2(9.8m/s^2)t^2 and solving the quadratic equation we would get t = 2.916s. Now imagine th...
You're describing the same physical process using two points of view, in this case two reference systems. Physical processes must be invariant w.r.t. the reference systems, coordinates or parameterization you use to describe it. So, you are right to guess that there is a flaw in your description. And the flaw is that w...
In the reference frame moving down, the ground is moving up. So the equation is not <span class="math-container">$$ 100\mathrm{\ m} = 1/2 \ (9.8 \mathrm{\ m/s^2}) \ t^2 $$</span> but rather <span class="math-container">$$ 100\mathrm{\ m} - (20\mathrm{\ m/s}) \ t = 1/2 \ (9.8 \mathrm{\ m/s^2}) \ t^2 $$</span>
https://physics.stackexchange.com
4,462
[ "https://chemistry.stackexchange.com/questions/4462", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/334/" ]
<blockquote> The density of a gas <span class="math-container">$\ce{X}$</span> is <span class="math-container">$10$</span> times that of hydrogen. In that case, what is the molecular weight of gas <span class="math-container">$\ce{X}$</span>? </blockquote> Well what I've done up to now is this: The molecular mass o...
Indeed you can use Avogadro's law here, but I guess it is useful to give a little bit more insight in Avogadro's Law. What you can do is apply the ideal gas law: <span class="math-container">$$p V = n R T $$</span> Here <span class="math-container">$n$</span> is the amount of substance of gas, which you can also writ...
Assuming equal volume <span class="math-container">$V$</span>, equal temperature <span class="math-container">$T$</span>, and equal pressure conditions <span class="math-container">$p$</span>, we can apply Avogadro's Law: An equal volume of two gasses contain an equal number of molecules at the same temperature and pr...
https://chemistry.stackexchange.com
116,557
[ "https://electronics.stackexchange.com/questions/116557", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1260/" ]
Is there a way to do "jumpers" without actually using a jumper connector on a PCB? Ideally just using holes or pads. For example, one idea for doing it is to use pads on the edge of a PCB then using crocodile clips to do the bridge. Should work ok, but requires the "jumper" at the edge of the board. These jumpers ar...
I just saw this neat trick on a development board. You can design the PCB with pads close together, and connect your traces like so: <img src="https://i.stack.imgur.com/DS312.png" alt="enter image description here"> Then, melt a blob of solder onto the pads, creating a short where you want it. It can be easily chan...
Easiest, use wire. Second easiest, vias or plated holes big enough for a test clip to clip in. Or use pogo pins on test points. The picture below shows plated holes, but some pogo pins come in pointed ends so work on smaller micro vias or simple test points. <img src="https://i.stack.imgur.com/RZSnd.jpg" alt="enter ...
https://electronics.stackexchange.com
384,695
[ "https://electronics.stackexchange.com/questions/384695", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/193535/" ]
I have a 5V 2A DC power supply I plan to power a custom arduino with. However, I'm also using a NRF24l01+, which requires 3.3V. So, I'm in the market for a 3.3V regulator, but I'm unsure of which one to buy. Some have output current of 500mA, and some I've seen that cost more have output of 3A. Does it matter which one...
Higher current output capacity of your transformer or voltage regulator doesn't mean that the actual current will be exactly the same. The important concept for a non-electrical engineer like you is that the amount of Current drawn doesn't depend on the output capacity of the source (although it can limit the current ...
Find out how much current your NRF24I01+ needs and get a regulator that can provide at least that much current. Also, get a <strong>low dropout</strong> regulator that can operate with a 5V input and provide the 3.3V output. After having chosen a regulator, determine how much power it will dissipate and provide adequat...
https://electronics.stackexchange.com
87,912
[ "https://softwareengineering.stackexchange.com/questions/87912", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/23415/" ]
To give light to the situation: I am currently one of two programmers working in a small startup software company. Part of my job requires me to learn a Web development framework that I am not currently familiar with. I get paid by the hour. So the question is: Is it wholly ethical to spend multiple hours of the day r...
If your employer wants you to spend your days learning the framework then great, it's both ethical and legal. I've done this in the past, both as a consultant (my consulting company paid) and as an employee. They do it because it makes you more useful. Win-win, assuming what you're learning is useful. If you were hire...
If it's directly for work, unless there's an understanding otherwise, the company should absolutely pay for it. It doesn't matter if it's all day for two weeks, if that's a reasonable amount of time to learn the framework. If the company hires a programmer with the understanding that they don't already have that skill,...
https://softwareengineering.stackexchange.com
9,311
[ "https://ai.stackexchange.com/questions/9311", "https://ai.stackexchange.com", "https://ai.stackexchange.com/users/20358/" ]
Can the same input for a plain neural network be used for CNNs? Or does the input matrix need to be structured in a different way for CNNs compared to regular NNs?
There is no restriction on how you input a data to a NN. You can input it in 1D arrays and do element-wise multiplication using 4-5 loops and imposing certain conditions(which will be slow and hence <span class="math-container">$nD$</span> matrix notations are used for a CNN). Ultimately, the library you are using (Ten...
<ul> <li>Neural networks generally deal with 1 D data. For example, the data for a NN would be ( 10 , 12 ) , where 10 is the number of samples.</li> <li>Convolutional neural networks generally deal with 1D, 2D and 3D data. For example, a 2D CNN would have input as shape ( 10 , 28 , 28 , 3 ) where 10 is the number of sa...
https://ai.stackexchange.com
371,815
[ "https://electronics.stackexchange.com/questions/371815", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/86793/" ]
As far as I know, a resistor and a heating element are the same thing. But one, the resistor, seems to limit the current in the circuit while the other, the heating element, draws more current and converts it to heat. One wastes watts and the other doesn't, yet they are both resistors. What is the difference between ...
They have most characteristics the same, but the OP is interested in the difference between them. Short answer: Thermal stability. The major difference in characteristics between a resistor and a heating element is that resistors are designed from a material standpoint to have a low thermal resistance change. That ...
A resistor and a heating element are indeed the same thing, just designed for different jobs. In a resistor, heat is generated as an undesired (but unavoidable) side effect, whereas in a heating element, the heat is exactly what it's supposed to do. In fact, resistors can be used as heating elements! I've seen at leas...
https://electronics.stackexchange.com
1,932,937
[ "https://math.stackexchange.com/questions/1932937", "https://math.stackexchange.com", "https://math.stackexchange.com/users/303107/" ]
<blockquote> Show that $f: \mathbb{Z}[i]\rightarrow \mathbb{Z}_{17}; f(a+bi)= \widehat{a+4b}$ is a ring homomorphism and show that the kernel of $f$ is $(4-i)\mathbb{Z}[i]$. </blockquote> I was able to show that $f$ is a ring homomorphism by checking the axioms from the definition but I can't manage to find its ker...
Directly: $$a+bi\in\ker f\iff a+4b=0\pmod{17}\iff a=-4b\pmod{17}$$ $$\iff a=-4b+17k\;,\;\;k\in\Bbb Z\iff a+bi=-4b+17k+bi=$$ $$=(4-i)(-b+4k+ki)\in (4-i)\Bbb Z[i]$$
<ul> <li>$(4-i)\mathbb{Z}[i] \subseteq \ker f$:<br> If $a+bi = (4-i)(x+yi)$, then $a=4x+y$, $b=-x+4y$ and $f(a+bi)=a+4b = 4x+y-4x+16y=17y \equiv 0 \bmod 17$.</li> <li>$(4-i)\mathbb{Z}[i] \supseteq \ker f$:<br> You need to prove that if $17$ divides $a+4b$ then $a+bi = (4-i)(x+yi)$ for some $x,y \in \mathbb Z$.</li> </...
https://math.stackexchange.com
275,787
[ "https://physics.stackexchange.com/questions/275787", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
I've been reading about the difference between electromagnets and permanent magnets and I have a question about the difference between them. If permanent magnets get their magnetic field from the spin of their constituent electrons, isn't this spin still present in the case of electromagnets, since electrons everywhere...
In a permanent magnet it is the electron spin that is responsible for magnetism. A simple explanation is that all of the spins are aligned. Going beyond this simple explanation requires at least some understanding of quantum mechanics; understanding permanent magnets in detail requires a deep understanding of quantum m...
In a permanent magnet the nature of the material is such that the electron spins are 'sticky' in their direction, if one applies a strong enough external magnetic field the 'stickiness' will be overcome and they will align with that field. Similarly, if you get a magnet hot enough, this will also tend to destroy the al...
https://physics.stackexchange.com
88,265
[ "https://physics.stackexchange.com/questions/88265", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/34904/" ]
I've read articles about Descartes' theory of the rainbow and I can understand why there is a dark band of about 8 degrees (Alexander's band) between the primary and secondary bows: for all the water droplets in that area, no light rays are deflected toward the observer after 1 or 2 internal reflections. What puzzles ...
The primary rainbow is at 40.7-42.4 degrees, where ~42 degrees is the <strong>critical</strong> angle for red light to reflect back to the observer, and 40 degrees for blue light. what this means is that for a droplet higher than 40 degrees (assume horizontal sun ray, 0 degrees), it can no longer reflect blue light to ...
I can't comment yet, so I'll provide a different way to explain the answer. But the point I most want to get across is that the internal reflections are never total; in fact, symmetry makes it so that TIR is impossible after sunlight enters a spherical raindrop. By definition, the sunlight enters at less than the criti...
https://physics.stackexchange.com
3,306,096
[ "https://math.stackexchange.com/questions/3306096", "https://math.stackexchange.com", "https://math.stackexchange.com/users/483923/" ]
<blockquote> Let <span class="math-container">$\{a_n\}_{n=0}^∞$</span> be a sequence defined recursively as follows: <span class="math-container">$$\left\{\begin{array}{l}a_0=\sqrt2\\a_n=\sqrt{2a_{n-1}},n\geq1\end{array}\right.$$</span> Show that <span class="math-container">$\{a_n\}_{n=0}^∞$</span> conv...
First, I just want to say, your proof of the hint is indeed correct, but it's... it's so inelegant. What you have here is the fact that the geometric mean of <span class="math-container">$x$</span> and <span class="math-container">$2$</span> lies between <span class="math-container">$x$</span> and <span class="math-con...
First we show that the sequence is increasing and bounded above, so it does converge. Then we show that the limit is in fact <span class="math-container">$2$</span>. We know that <span class="math-container">$a_0 = \sqrt 2 &lt;2 $</span> and if <span class="math-container">$a_{n-1}&lt;2$</span> then <span class="mat...
https://math.stackexchange.com
288,921
[ "https://softwareengineering.stackexchange.com/questions/288921", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/184535/" ]
<strong>Scenario:</strong> I've been working for half a year on a small project with a team of two people. They are working in a foreign country, so most of the time we worked via video conference tool. While those tools work well for providing information, feedback and giving directions, I don't think these are grea...
<blockquote> What is most important for conducting the postmortem of a project, use a conferencing solutions to perform the postmortem remotely or wait for two months until the team can meet in person? </blockquote> Personally, I think meeting people in person breaks down a lot of barriers and empowers each pers...
<blockquote> what is the most important for conducting the postmortem of my project, meeting "physically" or not doing it two months after? </blockquote> Since you are doing everything over video link (I assume using skype or similar), then you should be quite comfortable doing it that way. The physical presence is...
https://softwareengineering.stackexchange.com
2,518
[ "https://security.stackexchange.com/questions/2518", "https://security.stackexchange.com", "https://security.stackexchange.com/users/-1/" ]
Some people think the certificate authorities for a PKI should be the government, but others think certificate authorities should be private entities, such as banks, corporations, or schools. What are the advantages and disadvantages of each approach?
The root certification authority is from where trust comes. What trust ? The whole point of the PKI is to bind public keys to <em>identities</em>. The important point here is the kind of identity we are talking about, and also who will do the trusting part. So a root CA should be operated by en entity which: <ul> <li...
As discussed on the original version on stackoverflow: It all comes down to who you trust. Some organisations will trust government, while some definitely won't. Some will trust a bank in this role, but would a competitor trust them? I have seen many banks set up their own PKIs or use a PKI vendor - and the physical s...
https://security.stackexchange.com
16
[ "https://chemistry.stackexchange.com/questions/16", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/34/" ]
I often hear that water gets purified by being in a silver vessel, which sounds plausible because of bactericidal feature of silver. What doesn't sound plausible, though, is the way it's explained: that silver releases ions into the water. Since silver is a noble metal, why would any "reaction" at all occur with someth...
Silver is not as inert as gold. Tarnish is the name we give to the phenomenon when silver metal is oxidized and becomes a salt. Surfaces made of silver tend to disinfect themselves pretty quickly. As for disinfecting water poured into a silver cup, I imagine that would take a little longer since you have to wait for si...
As far as I know, a chunk of solid silver will not spontaneously react with water. But if you pass an electrical current through silver electrodes immersed in water, the silver will be oxidized according to the following equation: $$\ce{2H2O(l) + 2Ag(s) -&gt; 2Ag+(aq) + H2(g) + OH- (aq)}\qquad E^\circ=-1.63\ \mathrm...
https://chemistry.stackexchange.com
36,124
[ "https://quant.stackexchange.com/questions/36124", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/11917/" ]
You're invited to a one-on-one coin-flip gambling game. Your opponent has 1 million USD on hand (the max you can bet is 1 million USD). The payouts for flipping heads and tails are as follows: <ul> <li>Tails: You win 2x your bet.</li> <li>Heads: You lose your entire bet. </li> </ul> This game is a one-off gamble; no ...
The Kelly criterion gives the fraction, $f$, of the current bankroll to bet in order to maximize the longterm growth. The criterion is given by $$ f = \frac{bp-q}{b}, $$ where $b$ is the winnings received on \$1 bet, $p$ is the probability of winning, and $q=1-p$ is the probability of losing the bet of \$1. In your c...
An alternative approach is to size your bet to maximize your expected utility, which is assumed to be given by a function $u(w)$ of your total wealth $w$. This could be a better approach than using the Kelly criterion, because the Kelly fraction gives the amount to bet if you want to maximize your long-term growth rate...
https://quant.stackexchange.com
156,281
[ "https://softwareengineering.stackexchange.com/questions/156281", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/1130/" ]
I have a weird situation where a client would like a script that automatically sets up thousands of appointments over several days. The tricky part is the appointments are for a variety of US time zones, and I need to take the consumer's local time zone into account when generating appointment dates and times for each ...
I thought of an algorithm I think will work for this I'll start by creating a structure to track appointments as they get set. It can be something as simple as this: <pre><code>class Day { public DateTime Date { get; set; } public List&lt;DateTime&gt; AssignedTimes { get; } // Assigns the next available ...
I figure I would throw my comments together into a full answer: <h2>Data Model</h2> <strong>User</strong> - The abstraction of your user: <ul> <li>UserId</li> <li>TimeZone</li> </ul> <strong>Appointment</strong> - A scheduled appointment: <ul> <li>AppointmentId</li> <li>UserId</li> <li>DateRange (5 minutes startin...
https://softwareengineering.stackexchange.com
1,028,146
[ "https://math.stackexchange.com/questions/1028146", "https://math.stackexchange.com", "https://math.stackexchange.com/users/98534/" ]
I need to be able to calculate and find the true center of rotation (x,y) of an object after it has been rotated by a known angle. Previously I would simply find the center of the object, rotate 180 degrees, find the new center of the object, and calculate the midpoint of the line that connects the 2 centers to find t...
Let point $C$ be the center of rotation.<br> It should belong to the <strong>perpendicular bisector</strong> of the segment $[P, P']$.<br> So if we imagine it as a triangle, $CPP'$ should be a <strong>equilateral</strong> triangle where the angle $C = 15^0$ (Or whatever your rotation angle below 180). Let's assemble i...
The center of the rotation is on the mediatrix of [P,P']. Now, using the half of the angle, and the half of [P,P'], you can determine the position of the center on the mediatrix thx to the formula <pre><code>tg(alpha/2) = PP'/2 / (position of center). </code></pre>
https://math.stackexchange.com
136,271
[ "https://softwareengineering.stackexchange.com/questions/136271", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/37325/" ]
While reading about Java EE applications, somewhere I have seen people saying they're enterprise scalable, I am confused as to what that really mean? Are Java web applications mainly written &amp; suitable for building enterprise management tools, not for the high traffic websites of today's world, that need to scale...
I think that the term "internet scalable" means one thing in particular: ready to grow to meet viral growth. The dream of every person who builds an internet application is that it will touch a nerve and grow through word of mouth, through passionate advocacy of its users. Twitter, Facebook, there are many examples, an...
Enterprise scalability is (at least I perceived it this way) a very fuzzy term (as is internet scale). Both actually refer to the same, i.e., being able to react to changing requirements, load and possibly simple horizontal scalability. <blockquote> Are Java web applications mainly written &amp; suitable for buildin...
https://softwareengineering.stackexchange.com
34,235
[ "https://physics.stackexchange.com/questions/34235", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/11364/" ]
Let us assume that there are two astronauts A and B who are floating in space. A sees B passing by and vice versa. A sends signals to B every minute. According to A since B is moving his clock will be slower. So B will receive the signals prior to the appointed minute. The same argument can be applied for B who will co...
Both are right. Any moving clock is slower than a clock at rest, from the perspective of the frame at rest. Maybe this simplified freehand graphic (apologies for its lack of precision) helps to see that both A and B feel the same about each other's time dilation: <img src="https://i.stack.imgur.com/W4Euc.jpg" alt="e...
The key is to remember that you need to pick a reference frame, and stick with it. So, let's say we are A. We see B pass by us. Let's say, that B intends to travel 4 light years, turn around, and then come back. B accelerates away from us, reaches 80% of the speed of light, and begins his journey. According to us, ...
https://physics.stackexchange.com
377,893
[ "https://softwareengineering.stackexchange.com/questions/377893", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/294599/" ]
I'm building an REST API that exposes a callback method for a 3rd-party service. Let's imagine that there are two similar (but not identical) 3rd-party services. They both call back my API (<code>POST /api/callback</code>), but have different request formats (JSON): Provider 1 <code>{"sender": "Provider1", "field1"...
I would say you could use a bit field. That is you use one bit for each number from 0 to 9,999,999. This is 1.25 MByte of RAM. You read the file once and mark the corresponding bit when a number is read. Then in the second pass you walk over the bitfield and print the index to all entries that have the bit set. This ...
10 million 7 digit numbers with no duplicates sorted are: 0, 1, 2, 3, ..., 9,999,999. Hope that gives you a hint for fewer than 10 million, using 1.25 MB of memory and running in linear time.
https://softwareengineering.stackexchange.com
198,803
[ "https://softwareengineering.stackexchange.com/questions/198803", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/24248/" ]
I have a problem with a ranking system I am using. Scenario: An online game with around 10k players calculates a real time ranking of points when a certain event occurs. Events don't occur that often, around 1 time per minute. This ranking is kept in the cache for quick calculations, sorting and access. Now players ...
A better approach for this sort of thing is to create fake/test data that is operationally real enough without getting into issues like using customers SSNs and email addresses. You can then write the entire test suite against fake data -- and do things like simulate various real operational bugs across the way. Looki...
If you are injecting a repository then you can write tests to your hearts content without worrying about whether the data is real. Remember what it is you are testing! You are testing an atomic unit of functionality. Whether the SSN is real doesn't matter, it's whether the method you are testing handles it correct...
https://softwareengineering.stackexchange.com
99,258
[ "https://physics.stackexchange.com/questions/99258", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/40622/" ]
It makes intuitive sense to me for the apparent frequency of a sound as modified by the Doppler effect to be based entirely on the speed at which the observer and the source get closer or farther apart, regardless of whether the source or the observer is moving, based on the principle of relativity. However, the genera...
The difference is that the classical Doppler effect assumes a static background. In atmosphere, there is a marked difference between a moving observer and a stationary one - a gentle (or not so gentle) breeze. To exaggerate these effects, consider two jets flying above Mach 1. If the first jet is ahead of a second, the...
The two cases are different. When the observer moves toward the source, the increase in frequency heard by the observer is due to the observer's speed being added to the speed of sound, while the wavelength of the sound stays the same. But when the source moves toward the observer, the increase in frequency heard by ...
https://physics.stackexchange.com
44,421
[ "https://dba.stackexchange.com/questions/44421", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/15091/" ]
i have problem here, when im trying to select with query below, i got error message <blockquote> Error Code : 1248 Every derived table must have its own alias </blockquote> <pre><code>SELECT B.BRANCH_CODE, B.BRANCH_NAME, C.COMPANY_CODE, C.NAME, TSK.DATE_CREATE, CASE TB.BULK_TYPE WHEN 1 THEN 'Bulk Transfer' ...
You need to mention an alias for all your inline views / derived tables in MySQL, even when they are nested. In your code you are using a derived table inside another derived table but you seem to have forgotten to mention an alias for your inner derived table. Put an alias before the 4th line from the bottom which is ...
i've solve my problems, its just my fault to forgot the alias on union table <pre><code> ( SELECT REF_ID, SUM(CHARGE) AS TOTAL_CHARGE FROM ( SELECT XTB.REF_ID, SUM(CHARGE) AS CHARGE FROM CB_TRANSFERS XT JOIN CB_TASK_BULK_DETAILS XTBD ON XTBD.BULK_DETAIL_ID = XT.BULK_DETAIL_ID JOIN CB_TASK_BUL...
https://dba.stackexchange.com
8,827
[ "https://chemistry.stackexchange.com/questions/8827", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/4251/" ]
What can I do as a non-professional chemist that is legal? If a license is not required, then what are the advantages to having one, such as ordering compounds, getting a job, etc.?
Note that being a chemist doesn't require any kind of state license or the like in Germany, neither. But buying dangerous* substances and running a chemical lab requires that you** have certain licenses and implement safety standards. Some of these exams a chemist has to pass during studies (e.g. on toxicology and c...
Over here, that is Germany, you will hardly find a job in chemical industry or academia without an academic degree (B.Sc., M.Sc, Ph.D) or a formal technical education (typically three years). Most suppliers nowadys only deliver chemicals to universities, research facilities or other chemical companies.
https://chemistry.stackexchange.com
314,496
[ "https://softwareengineering.stackexchange.com/questions/314496", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/222384/" ]
I am working in some open source project in PHP.<br> My question is, should I make it using some kind of framework, say Laravel, or in plain PHP, in a hope for a large no of programmers using it? Btw, eventually, I do need to setup the routing, filtering, views for my app.
<strong>The things that you should ask yourself are:</strong> <ul> <li>What kind of open source project it is? It is a blog platform, it is a api for dogs name, a package that will give some functionality to others?</li> <li>The number of programmers using it depends in the number of programmers feeling attracted to...
I am currently enrolled in a course on web development. The professor told us that the industry standard is to use a php framework. We are using CodeIgniter which is pretty simple to learn / use and has a rather active community.
https://softwareengineering.stackexchange.com
622,364
[ "https://electronics.stackexchange.com/questions/622364", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/314979/" ]
I'm trying to figure out the simplest design possible. I want a video camera to activate on my truck when I activate either left or right turn signal. Each side mirror has its own camera. So basically I want detector circuit capable of detecting 12 volt pulses and send the output high to activate a relay. Once the turn...
You may create a 2 pole conjugate mechanical system with springs and weights: it doesn't have an inductor or a capacitor. And resonance is also a characteristic of an RC circuit with inductance and capacitance. It's even possible to create mixed systems with a transducer and capacitance or inductance. But it's not poss...
A resonance is observed when there is some cancellation of positive and negative reactive components. A (passive) circuit without inductors can't have positive reactance elements, so no cancellation can occur. Therefore <em>some</em> inductive element is required.
https://electronics.stackexchange.com
11,452
[ "https://datascience.stackexchange.com/questions/11452", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/8237/" ]
Are there random forest implementations which allows for choosing set of columns which will <strong>be always selected</strong> for every tree in the forest ? or implementations allowing for specifying <strong>probabilities of choosing</strong> each column ? Both cases could be simulated by choosing variables (partia...
Ranger in R can do the first request. The <code>always.split.variables</code> argument defines which columns should always be included.
I know that neither xgboost, nor sklearn offer what you want. I have checked R, and didn't find it either. But random forests are easy models to implement, so you can just produce one by yourself: Here, in python using sklearn: <pre><code>import numpy as np from sklearn.tree import DecisionTreeClassifier from scipy....
https://datascience.stackexchange.com
3,080,654
[ "https://math.stackexchange.com/questions/3080654", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
<blockquote> <em>Fibonacci numbers</em> <span class="math-container">$\{F_n\}_n\in\mathbb{N}$</span> are defined by the sequence <span class="math-container">$F_{n+2}=F_{n+1}+F_{n}$</span>, <span class="math-container">$F_1=F_2=1$</span>. Now prove that there are infinitely many prime numbers which are not Fibonacci ...
Analyzing mod <span class="math-container">$11$</span>, you can show that no fibonacci-number has the form <span class="math-container">$11k+4$</span>, but infinite many primes have that form because of Dirichlet's theorem.
Let us assume to the contrary that only finitely many primes are not Fibonacci numbers. Suppose the largest of them is <span class="math-container">$p_{k}$</span>. Then for every n>k, <span class="math-container">$p_{n}$</span> must be some Fibonacci number. Now we know, <span class="math-container">$F_{2n+1}= F_{2n}+F...
https://math.stackexchange.com
1,967,529
[ "https://math.stackexchange.com/questions/1967529", "https://math.stackexchange.com", "https://math.stackexchange.com/users/201890/" ]
I was trying to prove the fibonacci sequence for the golden section. But I am stuck at the following step. $$\lim _{ n\rightarrow \infty }{ \frac { F_{ n+1 } }{ F_{ n } } } =\lim _{ n\rightarrow \infty }{ \frac { F_{ n } }{ F_{ n-1 } } } =L$$ Also the recursive property says that $$F_{ n+1 }=F_{ n }+F_{ n-1 }$$ ...
$$\left(x-\frac{1}{x}\right)^5 = x^5-5x^3+10x-\frac{10}{x}+\frac{5}{x^3}-\frac{1}{x^5} $$ $$\left(x-\frac{1}{x}\right)^3 = x^3-3x+\frac{3}{x}-\frac{1}{x^3}$$ hence $$ \left(x-\frac{1}{x}\right)^5 + 5\left(x-\frac{1}{x}\right)^3 +5\left(x-\frac{1}{x}\right)=x^5-\frac{1}{x^5}$$ and $$ P(z) = \color{red}{z^5+5z^3+5z}.$$
Hint: $$(x-\frac{1}{x})^5=(x^5-\frac{1}{x^5})-5(x^3-\frac{1}{x^3})+10(x-\frac{1}{x})$$ $$(x-\frac{1}{x})^3=(x^3-\frac{1}{x^3})-3(x-\frac{1}{x})$$
https://math.stackexchange.com
59,145
[ "https://quant.stackexchange.com/questions/59145", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/41390/" ]
The portfolio weights vector of the minimum-variance portfolio has a closed-form analytical solution, <span class="math-container">$$\boldsymbol{w} = \frac{\boldsymbol{\Sigma}^{-1} \boldsymbol{1} }{\boldsymbol{1}^\top \boldsymbol{\Sigma}^{-1} \boldsymbol{1}}$$</span> but is there a direct calculation for the same portf...
Let <span class="math-container">\begin{align} a&amp;\equiv \mathbf{1}^T\mathbf{\Sigma}^{-1}\mathbf{1}\\ b&amp;\equiv \mathbf{1}^T\mathbf{\Sigma}^{-1}\boldsymbol{\mu}\\ c&amp;\equiv \boldsymbol{\mu}^T\mathbf{\Sigma}^{-1}\boldsymbol{\mu} \end{align}</span> Then <span class="math-container">\begin{align} \mathrm{E(minVar...
A few more steps beyond your last equation gives the answer. With <span class="math-container">$C = \mathbf{1}^T\mathbf{\Sigma}^{-1}\mathbf{1}$</span>, we have <span class="math-container">$$\sigma_P^2 = [C^{-1} \mathbf{\Sigma}^{-1}\mathbf{1}]^T \mathbf{\Sigma} [C^{-1}\mathbf{\Sigma}^{-1}\mathbf{1}] = C^{-2}\mathbf{1}^...
https://quant.stackexchange.com
38,845
[ "https://electronics.stackexchange.com/questions/38845", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/665/" ]
I am trying to read a serial string which comes through as "R0123" for example then I need the 0123 to be in an int. to send out through another method Here is my code it is not working the way that I think it should <pre><code>void loop() { if(Serial.available()) { delay(100); if(Serial.read() == 'R') ...
What about using atoi()? You will still need to trim of the 'R', and you might have to pad it with a NULL character at the end ('\0'). But then it should work as: <pre><code>int rInteger = atoi(s); </code></pre> when s is a pointer to a null terminated string.
This reads 4 characters after the "R", places them in a <code>char</code> array and appends a <code>null</code> character. Then converts to integer. The code doesn't check if there are at least 4 chars following the "R", or that they are digits, though. <pre><code>#define numberOfDigits 4 char theNumberString[numberOf...
https://electronics.stackexchange.com
222,653
[ "https://mathoverflow.net/questions/222653", "https://mathoverflow.net", "https://mathoverflow.net/users/46573/" ]
We have encountered the following problem that we think that should be true. Let $\{X_n\}_{n\geq 0}$ a sequence of random variables which we know that $\mathbb{E}[X_n]$ tends to infinity. The question is the following: can we assure that the sequence does <em>NOT</em> converge in distribution to a Poisson?
No. It's easy to construct a sequence $Y_n$ with $Y_n \to 0$ a.s. but $E Y_n \to +\infty$. (You can even have $E Y_n \equiv +\infty$ if you wish.) Now let $X$ be a fixed Poisson random variable and $X_n = X + Y_n$.
As Nate Eldridge noted, the answer is no. For a positive result, you need some extra condition. Suppose e.g. the variances $\text{Var}(X_n) &lt; c (E X_n)^2$ for $n$ sufficiently large, with some constant $c \in (0,1)$. Then $X_n$ can't converge in distribution.
https://mathoverflow.net
290,384
[ "https://softwareengineering.stackexchange.com/questions/290384", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/188089/" ]
The client side of my application is written in VB.Net, it accesses a java server. Server logs every request that was made by client, client shows every exception to the user (with an option to send it to support). The question is: would you add logs to the client side? If yes, what information does it make sense to...
I have integrated with a team that used a pure desktop application with the server meaning the "database" - for them it made complete sense to have a client side log because that is where all the code was executed. There was no other way to debug an issue if it ever occurred. In terms of "what" to log - it is subjectiv...
Every code which is complicated enough that it won't be straigtforward to debug should create logs. The fact that it's running on client side is irrelevant. You can skip logging if: <ul> <li>You are not expecting to support the application, that is you are developing a prototype or abandonware.</li> <li>The logic is ...
https://softwareengineering.stackexchange.com
92,603
[ "https://mathoverflow.net/questions/92603", "https://mathoverflow.net", "https://mathoverflow.net/users/5066/" ]
For matrices $X,Y\in [0,1]^{n\times m}$, for n > m, is there a square matrix $W\in R^{n\times n}$ so that $X^TWY$ is diagonal if and only if $Y = X$? Furthermore, $X$ and $Y$ are column normalized so that $X1_m = Y1_m = 1_m$, where $1_m$ is the m-length column vector with all entries equal to 1. I know that if $X$ an...
<b>UPDATE</b> Sorry, previous version was wrong. For $n=m=2$, this computation shows that there is such a matrix. <b>FURHTER UPDATE</b> However, for $m=n=3$, it shows there isn't. Taking $n=m=2$, we see that $X$ and $Y$ are of the form $\begin{pmatrix} x &amp; 1-x \\ 1-x &amp; x \end{pmatrix}$ and $\begin{pmatrix} y ...
The general $n=m$ case: First take $X$ to be the identity, this gives us that $W$ is the diagonal. Then for each pair of entries on the diagonal, look at the set of matrices that are almost entirely the identity, but have a 2$\times$2 block that looks like one of David Speyer's 2$\times$2 matrices and contains those tw...
https://mathoverflow.net
630,064
[ "https://physics.stackexchange.com/questions/630064", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/290895/" ]
In an isothermal process, temperature of a body remains constant. In an adiabatic process, the net heat transfer entering into a body is zero. Since no change in temperature implies than no heat has been transferred, can we say that if we have an isothermal process then we definitely have an adiabatic process as well?
No , an isothermal process and an adiabatic process are quite different. Consider the First law of Thermodynamics: <span class="math-container">$$dQ = dU + dW$$</span> This suggests that when heat is supplied to a system part of it is utilised in doing work while another part is utilised in changing the temperature of ...
<blockquote> Since no change in temperature implies than no heat has been transferred </blockquote> This is a false implication . Remember the first law of thermodynamics. You can have heat transferred into the system and still have no change in temperature, if the system does some work
https://physics.stackexchange.com
78,546
[ "https://dba.stackexchange.com/questions/78546", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/48798/" ]
Hello I have a table called <code>Workers</code> in my database. Also I have a stored procedure that returns a table with <code>Id</code>, xml <code>Data</code> and xml <code>Schema</code> by <code>Worker.Id</code>. I want to select all <code>Worker.Id</code> values and execute this procedure for each <code>Worker.id</...
This should do what you need. <pre><code>DECLARE @Id INT create table #tmpXmlreturn ( Data xml, ) create table #Ids( Id int ) INSERT INTO #Ids select dbo.Workers.Id as Id from dbo.Workers WHILE EXISTS(SELECT * FROM #Ids) BEGIN SELECT TOP 1 @Id = Id FROM #Ids INSERT INTO #tmpXmlreturn Exec dbo.GetB...
Using the <code>WHILE</code> approach for a task like this works fine for a very short list of Ids, but it performs very poorly as the list increases. This is due to the cost of creating the temporary memory table holding the Ids, and its heavy querying and manipulation. You're having to go through the source keys mult...
https://dba.stackexchange.com
3,097,419
[ "https://math.stackexchange.com/questions/3097419", "https://math.stackexchange.com", "https://math.stackexchange.com/users/589373/" ]
How many roots does <span class="math-container">$f(x)=x^2-2^{x-\frac{1}{x}}$</span> have in <span class="math-container">$(0,1]$</span>?<br> Since this function is continuous, I plugged in a couple of values and looked at the signs of the function's values and I concluded that there is a root between <span class="math...
Instead of finding the roots <span class="math-container">$x^2 = 2^{x - 1/x}$</span>, let's consider the roots of <span class="math-container">$f(x) = 2 \ln x - (x - 1/x) \ln 2$</span>. We have <span class="math-container">$$f'(x) = -\frac {\ln 2} {x^2} \left( x^2 - \frac {2 x} {\ln 2} + 1 \right).$$</span> <span class...
Compute <span class="math-container">$$f(0.2),f(0.4)$$</span> and <span class="math-container">$$f(1)$$</span>
https://math.stackexchange.com
96,137
[ "https://mathoverflow.net/questions/96137", "https://mathoverflow.net", "https://mathoverflow.net/users/956/" ]
<h2>Background on the Adèles</h2> The Adèles $\mathbb{A}_K$ of a number field or function field $K$ are defined as a <em>restricted product</em> of the complete local fields $K_\nu$, where $\nu$ ranges over all places of $K$. The restricted product is usually defined as the subset of $\prod_\nu K_\nu$ given by $\math...
I was puzzled by this question as well a while ago. Here is a suggestion, which worked for me: <ol> <li>The product and the co-product of categories are best defined by an universal mapping property.</li> <li>The adeles $\mathbb{A}$ are the inductive limit of all $S$-adeles $$\mathbb{A}(S) = \mathbb{R} \times \prod\...
Personally I think that the restricted product description should be avoided. It is best to define $\widehat{\mathbb{Z}}$ to be the inverse limit of the system of all quotients $\mathbb{Z}/n$ (without gratuitously factoring $n$ as a product of primes) and then put $\mathbb{A}=(\mathbb{Q}\otimes\widehat{\mathbb{Z}})\ti...
https://mathoverflow.net
547,681
[ "https://physics.stackexchange.com/questions/547681", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/236156/" ]
Is it possible to have constant angular velocity since according to <span class="math-container">$\omega=\frac{v_t} {r}$</span> angular velocity is directly propotional to tangential velocity and since tangential velocity is a vector and is always changing directions in uniform rotational motion, therefore we will get...
First of all, in circular motion <span class="math-container">$$\vert\vec\omega\vert=\frac{\vert\vec{v_t}\vert} {r}$$</span> Here the magnitude of angular velocity vector is directly proportional to magnitude of tangential velocity vector.
<span class="math-container">$\omega=\frac{v_t}{r}$</span> is not a vector equation for <span class="math-container">$\omega$</span> the vector equation is <span class="math-container">$\vec v_t = \vec r$</span>x<span class="math-container">$\vec \omega$</span> The direction of <span class="math-container">$\omega$</s...
https://physics.stackexchange.com
115,671
[ "https://security.stackexchange.com/questions/115671", "https://security.stackexchange.com", "https://security.stackexchange.com/users/53572/" ]
I'm trying to secure a REST API, our situation is that every client connecting to this API will also have a certificate signed by our own CA. Because of this, I think we can use the client certificate as an authentication mechanism, and install our root certificate on the webserver for verification and then use mutual ...
I highly suspect this is a self rolled, or at least very outdated method. It is very weak by modern standards and should not be used to protect anything important. Short passwords could be cracked with no more than 2^64 brute force attempts, which is quite possible with even a normal computer. If both halves of the ...
The fact that the length of encoded strings depends on the length of respective passwords suggests a much worse weakness: <strong>passwords seem to be obfuscated rather than hashed</strong>. This means than anyone who knows the internals of the system may be able to instantly decrypt any passowrd! The implications are...
https://security.stackexchange.com
291,517
[ "https://physics.stackexchange.com/questions/291517", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/76804/" ]
I put a charged or uncharged conducting sphere in an initially uniform electric field. I know that the potential is a constant inside and over the surface of the sphere, and approximately the same as the potential due to the external field far from the sphere. But then when should I set the zero of potential if it's no...
In principle you can set it anywhere you like, but since you want some information about the potential on the sphere, you need to choose a point with a finite potential difference to some point on your sphere. The easiest would be a point on the sphere (e.g. if external field is a constant uniform field along the x axi...
Due to symmetry, the general solution for the Laplace equation is \begin{equation} V\left(\theta,r\right)=\sum_{l=0}^{\infty}P_{l}\left(\cos\theta\right)\left(A_{l}r^{l}+\frac{B_{l}}{r^{l+1}}\right) \end{equation} the restriction for our system is \begin{equation} \frac{\partial V}{\partial z}|_{r\rightarrow\infty}=-E...
https://physics.stackexchange.com
148,663
[ "https://physics.stackexchange.com/questions/148663", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/65239/" ]
I read a lot of theories about black holes and cant help but wonder if they are "holes" at all. What if the center of a black hole is just an element that is created by the immense pressure at the time of the supernova? An element so dense would not be able to be seen and would appear as a black spot or hole due to the...
You're focusing too much on the stuff at the center of the hole. The thing about general relativity is that lots of mass in <em>any</em> form will alter the space and time around it. If you bend things enough, the direction we used to unambiguously call "forward in time" bends into "toward the singularity at the 'cent...
Because the gravitational field is so strong, everything (ie all matter and light), if it gets close enough, "falls" into them, just like a hole.
https://physics.stackexchange.com
72,221
[ "https://electronics.stackexchange.com/questions/72221", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/16051/" ]
IC data sheets often give some informations about the circuits over-temperature protection. Lets take a Microchip LDO (MCP1702) for example: "...If the power dissipation within the LDO is excessive, the internal junction temperature will rise above the typical shutdown threshold of 150°C. At that point, the LDO will s...
In short: a comparator-with-hysteresis compares a fixed voltage with a temperature-dependent voltage and shuts down the series transistor while it trips. <ul> <li>A fixed-voltage source is fundamental part of any voltage regulator.</li> <li>A temperature-dependent voltage source can be as simple as a diode. The challe...
The circuit that is used to measure and correct for temperature pf the die is called a bandgap reference cell. The core of a bandgap reference is a PTAT (proportional to absolute temperature) circuit and a CTAT (complementary to absolute temperature). These circuits both output a current and when you sum these curren...
https://electronics.stackexchange.com
3,467,655
[ "https://math.stackexchange.com/questions/3467655", "https://math.stackexchange.com", "https://math.stackexchange.com/users/664490/" ]
I think I'm missing a summation identity or not understanding how to leverage log rules in this equation. If anyone could help that'd be appreciated. <span class="math-container">$\sum_{x=1}^{\infty} \frac{-(1-p)^x}{x\log(p)} = 1, x=1,2..., 0&lt;p&lt;1$</span> so far I've got to <span class="math-container">$\frac{-...
Note that <span class="math-container">$${(-1)^n\over z+n}={(-1)^n(\overline z+n)\over(z+n)(\overline z+n)}={(-1)^n\overline z\over|z+n|^2}+{(-1)^nn\over|z+n|^2}$$</span> The sum <span class="math-container">$\sum{(-1)^n\overline z\over|z+n|^2}$</span> is absolutely convergent, while for each <span class="math-contai...
The simplest way of seeing this is to combine two terms. Note that <span class="math-container">$\frac{1}{z + 2n} - \frac{1}{z + 2n + 1} = \frac{1}{(z + 2n)(z + 2n + 1)}$</span>. Now you can use anything you know to show that the sum <span class="math-container">$\sum_{n = 1}^\infty \frac{1}{(z + 2n)(z + 2n + 1)}$</s...
https://math.stackexchange.com
3,502,854
[ "https://math.stackexchange.com/questions/3502854", "https://math.stackexchange.com", "https://math.stackexchange.com/users/730999/" ]
I am quite confused with this, if I multiply both sides with -1, the sign should be reversed; if I square it first, the sign would not be reversed. May I know what operation should I do? Thank you so much for your reply.
<blockquote> If I square it first, the sign would not be reversed. </blockquote> That is <strong>not</strong> true. For example, consider <span class="math-container">$p = 4, q = 3$</span>. It is true that <span class="math-container">$-p &lt; -q$</span>. However, if you square and don't flip the sign, you get that ...
The function <span class="math-container">$x \mapsto -x$</span> reverses order, so you need to reverse the inequality. The squaring function does not preserve order unless you restrict it to either the positive numbers (preserves) or the negative numbers (reverses).
https://math.stackexchange.com
370,926
[ "https://physics.stackexchange.com/questions/370926", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/144155/" ]
$$ dU = dQ+dW $$ $$ dU=TdS-pdV $$ The equations above are always true for a thermodynamic state of a certain system. Now let's say that we have a situation where $dW=0$, this tells us that $$ dU=dQ $$ $$ dU=TdS $$But still I can't write $ dQ=TdS $, since this only works for a reversible change of my system. So if I don...
In $dS = \frac{dQ}{T}$, the $dQ$ is the heat exchange on a <strong>reversible</strong> path from the initial state to the final state, irrespective of how the process is actually carried out.
Even if dW = 0 (e.g., constant volume), you can't write dQ=TdS for an irreversible process because, for irreversible heating or cooling of a body, T is not constant spatially within the body (i.e., T varies with spatial position). For transient irreversible heating, the temperatures near the boundary are hotter than i...
https://physics.stackexchange.com
1,657,305
[ "https://math.stackexchange.com/questions/1657305", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
We define $f: Z\to Z, f(x)= x^3-2x$ is <em>f</em> injective ? But surjective ? I think f is injective and not surjective, but I'm having a hard time trying to prove it.$..f(3)=21,f(2)=4,f(1)=-1,f(0)=0,f(-1)=1,f(-2)=-4,f(-3)=-21...$.I think f is ascending on $Z-\{1,-1\}$. I can see that there is no $x\in Z$ such that $...
$$f(x)=f(y)\iff x^3-2x=y^2-2y\iff(x-y)(x^2+xy+y^2)=2(x-y)$$ If $\;x=y\;$ we're done, otherwise we get after cancelation $\;x^2+xy+y^2-2=0\;$ . This is a quadratic in $\;x\;$ say, and its discriminant is $$\Delta=y^2-4(y^2-2)=-3y^2+8$$ The above must be non-negative if there is a solution: $$-3y^2+8\ge0\iff y^2\le\...
$f'(x)=3x^2-2&gt;0$ for $x\ge1$, and so $f$ is strictly increasing for $x\ge1$. But $f(2)=4$ and $f(3)=21$, for example, and so no integer value between $4$ and $21$ is attained. Use a similar argument for injectivity. Note $f'(x)&gt;0$ for $x\ne0$, and so you only need to check what happens for $x\in[-n,n]$ with $n$ ...
https://math.stackexchange.com
626,755
[ "https://physics.stackexchange.com/questions/626755", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/245449/" ]
Suppose two particles with masses <span class="math-container">$m_1$</span> and <span class="math-container">$m_2$</span> are interacting via a central force. Lets work in the center-of-mass frame, and let <span class="math-container">$r$</span> be the distance from the masses to the center of mass which lies at the or...
<strong>Potential of one is this and the other is this</strong> is a misnomer at best. The potential energy is stored in the fields and is simply given by- <span class="math-container">$$U=-\dfrac{Gm_1m_2}{r}$$</span> where <span class="math-container">$r$</span> is the distance between them. There is no meaning to the...
If you have two equal masses, each at a distance of , r, from the center of mass, and you move them one at a time out to infinity, then the work to move the first one will be W = Gmm/(2r), but the work to move the second one will be zero, since there is no longer a force on it from the other mass. The initial total pot...
https://physics.stackexchange.com
51,301
[ "https://mathoverflow.net/questions/51301", "https://mathoverflow.net", "https://mathoverflow.net/users/11765/" ]
Let $H$ be a smooth projective hypersurface in $\mathbb{P}^n(\mathbb{C})$ where $n\geq 3$. Then by the Lefschetz hyperplane theorem we have that $H^1(H,\mathbb{C})= H^1(\mathbb{P}^n(\mathbb{C}),\mathbb{C})=0$. It thus follows that $\pi_1(H)^{ab}$ is a finite abelian group. Q.1 Do we have an example of an $H$ such that...
Non-singular projective hypersurfaces are simply connected. By the Lefschetz theorem $\pi_k(X)\to\pi_k(\mathbf{P}^n(\mathbf{C}))$ is an isomorphism for $k\leq n-2$ where $X$ is a nonsingular complex hypersurface: as shown e.g. in Griffiths-Harris (chapter 1, second proof of the Lefschetz hyperplane theorem) if $M$ is a...
Let me supplement Algori's answer a bit. The statement for fundamental groups goes back to Zariski, I believe. Standard Morse theory proofs yield this and more ( Milnor's book gives a nice account). Over any field, there are similar results using the etale fundamental group. See for example SGA2, exp XII, cor. 3.5.
https://mathoverflow.net
39,452
[ "https://security.stackexchange.com/questions/39452", "https://security.stackexchange.com", "https://security.stackexchange.com/users/21916/" ]
I've recieved an e-mail from ubuntuforums.org a couple of hours ago: <blockquote> [...] the attacker has gained access to read your username, email address and an encrypted copy of your password from the forum database. If you have used this password and email address to authenticate at any other website, <strong>you a...
No, this is standard practice and a liability limitation attempt by lawyers. It is entirely possible for someone to reverse a weak password even from properly hashed and salted values if they feel like spending the time. Salts make it slower, but they don't prevent it from breaking on weak passwords. If your passw...
I think it is the duty of the owners of any compromised application to alert its users about the compromise. The email is not directly telling you that their security is bad or not. But instead it warns you about changing passwords if in case of the worst scenario. As long as your password it safe , you don't have a ...
https://security.stackexchange.com
558,972
[ "https://physics.stackexchange.com/questions/558972", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/267294/" ]
Let's assume that the resistance of a wire is zero. Now, suppose the wire has a length of 10 m and is connected to a battery with an emf of 10 V. According to my physics textbook, the electric field should be constant across the wire. Using the equation ΔV = -ʃ<strong>E</strong>·d<strong>s</strong>, the voltage drop fo...
The 'solution' makes essentially zero sense. Indeed, it's of the <em>not even wrong</em> variety. (0) A resistor is only a 'fuse' in the sense that it will overheat and perhaps smoke before opening up if the power dissipated is well above the power rating for some time. But there's no mention of the power rating of thi...
The teacher is wrong. Not even wrong. In a very embarrassing way. You should complain to his supervisor if he is not willing to accept his mistake.
https://physics.stackexchange.com
193,890
[ "https://security.stackexchange.com/questions/193890", "https://security.stackexchange.com", "https://security.stackexchange.com/users/186775/" ]
I'm studying Info Security and was poking around my home router (it's a cheap one) with a python script trying to brute force the admin password for the web interface (it uses HTTP basic and the server is micro_httpd). I discovered that when passing the auth header in with the initial request I was able to bypass the ...
Check if there is a new firmware for you router. If there is, get latest version and test again (the manufacturer may have patched it already). If the vulnerability still exists or there is no version newer than yours, then yes, report it. Usually, in the mid-to-low models, updates are more rare and vulnerabilities ar...
There is no reason not to report it, but unfortunately problems like these are to be expected in cheep and even medium priced products. Wifi router security is currently not in a good state. That being said, there is no reason not to strive to improve that, so IMHO report away.
https://security.stackexchange.com
100,154
[ "https://chemistry.stackexchange.com/questions/100154", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/65992/" ]
What is the name of the compound $\ce{(C_6H_5)-CH=N-CH_3}$ ? I doubt, it is n-methyl benzalamine . Is it correct ? Besides , what could be other names of it?
Benzalamine seems to be an ocassionally and formerly used general name for compounds of the formula $$\ce{C6H5-CH=N(R')R}$$ (where C<sub>6</sub>H<sub>5</sub>- is phenyl; R′ may be H). This name probably came from the fact that they can be prepared by a reaction of <strong>benzal</strong>dehyde with an <strong>amine</...
That is called: N-methyl-1-phenylmethanimine or N-Benzylidenemethylamine or N-methyl-benzaldimine. CAS number is: 622-29-7.
https://chemistry.stackexchange.com
145,312
[ "https://mathoverflow.net/questions/145312", "https://mathoverflow.net", "https://mathoverflow.net/users/-1/" ]
Let $X=L^1\left([0,1]^3\right)$, for numerical purpose, what are the possible basis function for $X$? In finite element method, the basis functions are tooth functions, or polynomial functions.<br> Is there a generalization of this idea to product space? I ask because I would like to numerically find some ball $B(f...
<strong>Edit:</strong> Note that I understood the question for $L^1([0,1]^3)$, c.f. Robert Israels comment. First, the term "basis" for general Banach spaces, especially ugly spaces such as $L^1$, can be complicated. As far as I remember $L^1$ is one of the spaces which do not possess an "unconditional" basis. On $L^2...
Given an upper bound $B$ on the norm of the linear functional $G$, all you need is to find $f$ with $G(f) &gt; B$. But if you can find $f_0$ with $G(f_0) \ne 0$, $f = (B + 1) f_0/G(f_0)$ will do.
https://mathoverflow.net
2,248,823
[ "https://math.stackexchange.com/questions/2248823", "https://math.stackexchange.com", "https://math.stackexchange.com/users/439102/" ]
I'm trying to learn some maths on my own and have come across this problem. Find $dy/dx$: $$ \sqrt{x + y} = \cos(y^2)$$ My working has led me to the below: $$ -\frac{2\sqrt{x + y}}{2\sqrt{x + y}(1 + 4\sin(y^2)\sqrt{x +y})}$$ Is it legal to cancel out... $$ 2\sqrt{x + y}$$ ...from the top and the bottom?
One can show by, say, induction, that: $$A^n=\begin{bmatrix} 1 &amp; 1 \\ 1 &amp; 0 \end{bmatrix}^n=\begin{bmatrix} F_{n+1} &amp; F_n \\ F_n &amp; F_{n-1} \end{bmatrix}$$ Thus, because $A^{2n}=A^nA^n$, one has that $$\begin{bmatrix} F_{n+1} &amp; F_n \\ F_n ...
The object is to derive the expression $f_{n+1}^2+f_n^2=f_{2n+1}$ from the Binet formula, which I'll express here as $$f_n=\frac{\varphi^n-\psi^n}{\varphi-\psi}$$ where $\varphi,\psi=(1\pm \sqrt{5})/2$ and, in addition, $\psi=-1/\varphi$. Expanding the left-hand-side of the expression and rearranging by like terms w...
https://math.stackexchange.com
230,830
[ "https://softwareengineering.stackexchange.com/questions/230830", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/116712/" ]
We need to support 5 languages for our product. This means that in order to have a potentially shippable product we need to translate all text new to the Sprint to all these languages. It doesn't make sense to me because the text might change after a few Sprints during which the users will use the application and give...
Put simply this, like many process questions, comes down to a cost-benefit decision. Quite a few of the practices described in the agile processes are about reducing the time spent in the "last mile" - this is an example of one of them. Unlike practices with other aims (quality, correctness, etc), the practices aimed...
Apply the "potentially shippable" rule as far as it makes sense. Use your common sense where it doesn't. (Common sense is sometimes called "rule 0" in agile) A team should avoid to commit work that is beyond their own power. Translations typically rely on translators outside the team. So the team shouldn't commit to t...
https://softwareengineering.stackexchange.com
91,277
[ "https://mathoverflow.net/questions/91277", "https://mathoverflow.net", "https://mathoverflow.net/users/22156/" ]
I would like to prove the equivalence of the two most common definitions of a composite integer $n &gt; 1$ being a Carmichael number: $a^n \equiv a \mod n $ for all $a$ $\iff a^{n-1} \equiv 1 \mod n$ for all $a$ such that $\mathrm{gcd}(a,n)=1$. I do not see how to prove the right-to-left statement (that is, why if th...
Korselt's criterion uses that $p^n = p$ for any $p|n$, but $(p,n)=p\ne 1$, so I still don't see to get ou of this. Maybe my proof of Korselts's criterion is out of date.
The obvious step you're missing is this: If a^(n-1) = 1 (mod p^e), simply multiply both sides of the congruence by a.
https://mathoverflow.net
80,540
[ "https://stats.stackexchange.com/questions/80540", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/36585/" ]
I need to calculate the average LOS (Length Of Stay) over 15 years. My formula is the following: <code>total number of days in hospital (for each patient) / total number of patients discharged</code> Because I need to express this average per patient/year I was thinking to do the following: <code>{total number of da...
In an ANCOVA, you typically model $$E(Y|T,X)=\gamma T+X \beta$$ where $Y$ is your outcome variable, $T$ is your treatment indicator ($T=0$ to indicate control, and $T=1$ to indicate treatment), and $X$ is a covariate (or a vector of covariates). Then $\gamma$ is the average treatment effect (ATE) conditional on $X$. ...
I think a good starting point with this issue is to think logically about the meaning of a covariate adjustment in such situations. If the expected value of the CV is conditional on the group how is there any way to remove variation associated only with the CV? Surely a CV adjustment removes group effects as well! What...
https://stats.stackexchange.com
237,329
[ "https://softwareengineering.stackexchange.com/questions/237329", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/128427/" ]
Given a set {1,2,3} output { {}, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3} } I have only been able to find as fast as O(2^n), is there any techniques for achieving faster results (besides parallelizing)
No. Since there are <code>2^n</code> subsets for a set with <code>n</code> items in it, and you have to print them all, your algorithm MUST perform the print step <code>2^n</code> times (even if you tried to combine all the prints into one you would still have to "generate" the opening and closing braces <code>2^n</co...
In response to generating subsets without actually printing I believe you mean finding the subsets and then storing them one by one into a result list/array. In that case the runtime would be O(n*2^n). The O(2^n) is from finding all the subset. After finding them you THEN need to store them into an array and to do that...
https://softwareengineering.stackexchange.com
147,398
[ "https://softwareengineering.stackexchange.com/questions/147398", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/53392/" ]
I am contemplating a direction to take an application. The application is written in PHP which implements a MVC framework. Some of my clients will require web services. I was thinking even building the basic PHP web interface on top of these web services (SOAP) and stopping the PHP application from accessing the data...
Brad Cox and friends added a thin layer of <em>Smalltalk</em> on top of C. Objective-C thus has much more in common with Smalltalk's highly dynamic message-sending style OO than C++'s. One major difference is that in Objective-C you don't worry too much about what class something is: you care about what messages some...
Others have pointed out that Objective-C is a SmallTalk style OO layer added to C, I'll add that C++ started as a Simula style OO layer added to C (and then templates were added to make a good measure).
https://softwareengineering.stackexchange.com
9,804
[ "https://cs.stackexchange.com/questions/9804", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/6885/" ]
Can someone help with this: $L=\{a^ib^j \mid i,j \ge 0 \text{ and } i \ne 2j\}$ I'm trying to write a grammar for this language? I don't know how to do this. I tried this:<br> $S \rightarrow aaAb \mid aA \\ A \rightarrow aA \mid a$
Consider the two languages:<br> $L_1 = \{a^ib^j \mid i, j \ge 0 \text{ and } i &gt; 2j\}$<br> $L_2 = \{a^ib^j \mid i, j \ge 0 \text{ and } i &lt; 2j\}$ Convince yourself that $L = L_1 \cup L_2$. In $L_1$, the number of $a$'s are <em>more</em> than double of $b$'s, so there has to be atleast one $a$ (when there are no...
Start with a grammar for $\{a^i b^{2 i} : i \ge 0\}$: $$ S \rightarrow a S bb \mid \epsilon $$ Now hack it so that there are more $a$ than $bb$: $$ \begin{align*} S &amp;\rightarrow a S bb \mid A \\ A &amp;\rightarrow a A \mid a \end{align*} $$ The modificaton to force more $b$ is similar, and left to you. It adds a no...
https://cs.stackexchange.com
2,744,972
[ "https://math.stackexchange.com/questions/2744972", "https://math.stackexchange.com", "https://math.stackexchange.com/users/554213/" ]
There are 100 different gormiti cards. One of those 100 is Magmion and anohter is Electricon. I pick randomly 2 cards of those 100, without replacement. What's the probability of 1 of those 2 cards i randomly picked, to be Magmion? What's the probability of picking Magmion and Electricon? Should i use hypergeometric d...
There is one "Magmion" card out of 100. The probability that the first card drawn is "Magmion" is 1/100. The probability the "Magmion" card is not the first card drawn is 99/100. Then there is one "Magmion" card out of 99. Under these conditions the probability the second card drawn is "Magmion" is 1/99. The probab...
Well, yes, you <em>may</em> use hypergeometric distribution if you wish. &nbsp; It is just using combinatorics to count equally probable outcomes in events. When selecting 2 from 100 cards, the probability for selecting 1 from 1 special card and 1 from 99 other cards is ... When selecting 2 from 100 cards, the probab...
https://math.stackexchange.com
138,579
[ "https://softwareengineering.stackexchange.com/questions/138579", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/10869/" ]
I'm trying to understand if security is a real concern, or if distribution actually does a better job with security. See, the access to the main source repository could be layered and inherently managed by a network of trust, and could still have centralized user management integrating users from an LDAP/Active Directo...
On the contrary, a DCVS can be far more secure, and here is why: Whereas a given developer having source code in any form on their workstation can do anything they want to do (steal it, share it, post it to facebook), you have to address <strong>that</strong> issue outside of version control. So it's the same playing...
There are two aspects to security: reading and writing. If you have read permissions on centralized source control, you have enough permissions to convert it to a DVCS repo no one else knows about. Therefore, security from unauthorized distribution is a wash either way. While in theory CVCS has robust and fine-grai...
https://softwareengineering.stackexchange.com
472,524
[ "https://physics.stackexchange.com/questions/472524", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/227832/" ]
Assume that a negative charge in the space near of it a small positive charge, Then for sure that the negative charge will attract the positive charge naturally <strong>because it has an electric field around it</strong> ,So the point which the positive charge at will have an electric potential that equal to <span clas...
Okay, I'll ellaborate my comment with the purpose of making it clearer. It's true it was very chaotic, but that's because I wanted to address many thing in few words. I think there are many issues here. I'll try to clear them up. <hr> <strong>1.- Potential energies can start wherever you want.</strong> The other a...
As per @FGSUZ's answer, it's not the electric potential that matters: it's the potential difference. Think of it in these terms: Let's say you have a ball on a horizontal platform, 1 meter above the ground. The ball represents a charge inside the conductor. The horizontal platform represents the conductor. The ball ce...
https://physics.stackexchange.com
50,444
[ "https://electronics.stackexchange.com/questions/50444", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/8903/" ]
There are microcontrollers (for example all the ATmega chips as far as I know) that allow ports to be set to "output", "input tristate" or "input internal pull-up resistor". What are the advantages/disadvantages of either of those options in case of not connected pins? As I know, leaving them on output is the worst s...
When you have a not connected pin, the first thing you need is to clamp it to a rail, either Vcc or ground. You need this because a floating state may cause an intermediate state in the input buffers, leading to static power absorption. To force a level, you can either set the pin as <strong>output</strong> or <strong...
An old FPGA hack is to connect unused pins to the ground plane on the PCB, and configure them as outputs driving 0. This improved the ground connection, and reduced ground bounce from the outputs you were switching fast. This certainly doesn't matter for low power micros like the AVRs, I would leave the pins unconnect...
https://electronics.stackexchange.com
202,168
[ "https://electronics.stackexchange.com/questions/202168", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/70502/" ]
Simple question, the curiosity is killing me. Why do microcontrollers (and other IC also, like RAMs) have pins not grouped together? Like in STM32, for example you have portA and it has 8 bits on one side of IC and the other 8 bits at the opposite corner of IC... Why? It make routing PCB much harder. What is the reas...
In RAM chips, you often want all address/data lines to have the same length (the shorter the better), so that the signals travel along simultaneously and the clock frequency could be higher. Address and Data lines have to cover the entire area of the chip, so they are grouped by the physical location of the storage cel...
Also there is a lot of history involved. Many chip layouts are designed to be a close match for previous generation chips so they can be used optionally on the same or next board revision. The 1 kB to 64kB ROM/PROM/SRAM/EPROM/EEPROM chip layouts spanned many generations and the early generations had chip design rest...
https://electronics.stackexchange.com
204,133
[ "https://dba.stackexchange.com/questions/204133", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/149241/" ]
I have the following schema: <strong>table_1</strong><br> id, updated_at <strong>table_2</strong><br> id, updated_at <strong>table_3</strong><br> id, updated_at and in total there are about 12 tables that I want to get the <em>updated_at</em> column and determine the MAX() aggregate value from all of them, based on...
Get the maximum <code>updated_at</code> for a given <code>id</code> from each table, combine the results into one row set and then get the maximum from it <pre><code>SELECT MAX(updated_at) FROM ( SELECT MAX(updated_at) AS updated_at FROM table1 WHERE id = @param_id UNION ALL SELECT MAX(updated_at) FROM...
First select and <code>union</code> all table data and then use <code>max()</code> with <code>group by id</code> <pre><code>select max(t.updated_at) from( select id,updated_at from table1 union select id,updated_at from table2 union select id,updated_at from table3 union select id,updated_at from table4 ...
https://dba.stackexchange.com
184,837
[ "https://mathoverflow.net/questions/184837", "https://mathoverflow.net", "https://mathoverflow.net/users/60675/" ]
I know that the Torelli morphism $t_g:\mathcal{M}_g\rightarrow \mathcal{A}_g$ between the stacks of smooth curves of genus $g$ and principally polarized abelian varieties of dimension $g$ is of order 2 ramified on the hyperelliptic locus. I also know that the natural map $\sigma:Aut(C)\rightarrow Aut (J(C),\Theta)$ w...
Look at the definition of fiber product in the category of stacks: For a scheme $S$, the $S$-points of the fiber product $X \times_Z Y$ are triples $(x, y, \sigma)$ where $x \in X(S), y \in Y(S)$and $\sigma$ is a (iso)morphism between the images of $x$ and $y$ in the groupoid $Z(S)$. Let $c:Spec\ k \to \mathcal{A}_g$...
It's not so much that it's two points of the stack, it's that the point of $\mathcal{A}_g$ has inertia, that is, the map restricted to a point (corresponding to a general curve) looks like $*\mapsto */\mathbb{Z}/2\cong B\mathbb{Z}/2$. The key is that a point of a moduli stack "looks like" $*/Aut$ where $Aut$ is the au...
https://mathoverflow.net
345,941
[ "https://physics.stackexchange.com/questions/345941", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/116954/" ]
Continuity says Q=AV, and we know that velocity and pressure are inversely related. So if we are in a closed system, like vasculature for example, Q is constant and any decrease in vessel radius would be expected to raise velocity, which would result in <em>lower</em> pressure. If we look at Poiseuille's Law, on the o...
Bernoulli is a statement of the law of conservation of energy for an ideal (non vicious) fluid. Poiseuille relates to situations where fluid friction is present so you cannot expect the results to be the same. If you use Bernouilli for an ideal fluid through a horizontal tube of constant cross sectional area, no pr...
Pressure always increases when velocity decreases (and vice-versa) only for an inviscid fluid. If the fluid is viscous, then this is not necessarily the case. For flow of an inviscid fluid through a pipe of constant cross section, the pressure is constant. For flow of a viscous fluid through a pipe of constant cross...
https://physics.stackexchange.com
269,365
[ "https://dba.stackexchange.com/questions/269365", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/124998/" ]
I am trying to establish a (logical) replica of a database on a remote site. Therefore we established a permanent VPN connection to that site where we are running two machines. One is an Ubuntu 18.10 box we use for maintenance and client operations. The other one is a Debian 9.11 which is actually running the replica P...
That is a networking problem. The message and the lack of server log entries prove that you didn't reach the database server. You'll have to use standard network debugging techniques to solve this problem.
Finally solved it! Our IPS (Ubiqity Firewall) identified this particular connection as a threat and disconnected it every time. Why it identified one client as a threat and not also the other one too, we don't actually know. Accepting Laurenz Answer as his first intention was oviously right.
https://dba.stackexchange.com
181,626
[ "https://security.stackexchange.com/questions/181626", "https://security.stackexchange.com", "https://security.stackexchange.com/users/53024/" ]
I’ve watched the Pluralsight course on web security, which states that to mitigate CSRF attacks, the website should return two “paired” CSRF tokens to the client, one in a hidden form field and another in a cookie, that are associated to the user’s session. These tokens are issued whenever the user visits a page with, ...
The pattern you are describing is known as "double submit cookie", and it is a common way to defend against CSRF. The point here is that it doesn't require the server to remember the token. The client sends the token in both a cookie and some other way, e.g. in a form field. The server checks that both tokens are ident...
One token is enough provided it is the hidden form field, and is per request (meaning you receive a token in every response to be sent in next request). Please note that the token should not be stored in a cookie since cookies are sent automatically. There are different ways to do things (and some are framework speci...
https://security.stackexchange.com
134,694
[ "https://mathoverflow.net/questions/134694", "https://mathoverflow.net", "https://mathoverflow.net/users/35564/" ]
In an attempt to resolve a question posed by Cain in his paper on Automaton Semigroups (open problem 6.12), I would like to know if there exists a finite semigroup $S$ satisfying the following properties: <ol> <li>$S$ is self-dual (anti-isomorphic to itself)</li> <li>$S\neq S^2$</li> <li>$S^2$ is a band</li> <li>$S$ h...
I believe I have an example but you should check the details of whether it works. Maybe GAP can be used. Let $X=\{1,2,3,4,5\}$ and $X'=\{1',2',3',4',5'\}$. Let $a,b\colon X\to X$ be given by $$a=\begin{pmatrix} 1 &amp; 2 &amp; 3&amp; 4 &amp;5\\ 2&amp; 3&amp; 3 &amp;4&amp; 5 \end{pmatrix}\qquad b=\begin{pmatrix} ...
Not an answer, but a question based on a previous attempt of finding a solution, for which Benjamin Steinberg pointed out a foolish mistake in the comments below. Is there an "enlarge-and-shrink recipe" to extend a semigroup $\mathbb A = (A, \cdot)$ for which Conditions 1, 3 and 4 hold true to a larger semigroup $(S, \...
https://mathoverflow.net
12,090
[ "https://security.stackexchange.com/questions/12090", "https://security.stackexchange.com", "https://security.stackexchange.com/users/7983/" ]
I manage about 20+ Linux servers and I am considering using an md5 scheme similar to following to generate the admin passwords: <pre><code>echo 'masterpassword' 'serverhostname' | md5sum </code></pre> Which returns <strong>4db2430f9b5f788077fd36636002e391</strong> using the above example. My question is: Given that...
A few ideas: <ul> <li>Use a scheme that allows you to easily "bump" the passwords to a successive value for when the passwords need to be changed. If you ever need to give someone your server password (which does happen in certain types of emergencies), then you'll want to change the password in order to revoke access...
<ul> <li>The server hostname is not a secret</li> <li>MD5 is essentially compromised (https://en.wikipedia.org/wiki/MD5#Security). I am unsure as to whether MD5's particular weaknesses are exploitable in this scenario though, as they are mostly collision vulnerabilities.</li> </ul> The problem you're trying to solve, ...
https://security.stackexchange.com
17,676
[ "https://quant.stackexchange.com/questions/17676", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/2576/" ]
Is there any basic materials (books, papers) to read on Statistical Arbitrage? I certainly understand much of the useful information is in the industry. I just want to get some understanding on the basic mathematical tools and their applications in finance.
it's a model-free result. The conditions are $d\leq 0, r\geq 0.$ The proof is that for a european $$ C_t &gt; S_t - Ke^{-r(T-t)} \geq S_T - K $$ and the American is worth at least as much so you never early exercise. So it's worth the same as European. To prove the inequality, observe if $B_T =1,$ take $K$ units of...
It can also be proved by Jenson's inequality. It can only be optimal to exercise the American option if the option is below its intrinsic value; but since the "max" function is convex, the European price satisfies the following inequality: $$c(S_t, t)=e^{-rT}\mathbb{E}[(S_T-K)^+]&gt;=e^{-rT}\left(\mathbb{E}[S_T]-\math...
https://quant.stackexchange.com
253,392
[ "https://mathoverflow.net/questions/253392", "https://mathoverflow.net", "https://mathoverflow.net/users/36952/" ]
Let $(A,g)$ be a compact surface with boundary, diffeomorphic to the standard annulus $\{z\in\mathbb{C}:1\le|z|\le 2\}$, equipped with a smooth metric $g$. <blockquote> Does there always exist a conformal (bijective) map $\phi:A\to\{z\in\mathbb{C}:1\le|z|\le R\}$, for some $1&lt;R&lt;\infty$? </blockquote> A pos...
An alternate proof that interior of A is not biholomorphic with punctured disc or punctured plane is to notice that that there is a harmonic function on the interior of A which is 0 and 1 on the different boundary components respectively . Such functions do not exist on the punctured disc or the punctured plane. In fac...
Yes. I assume that by "compact surface diffeomorphic to a closed annulus" you mean a bordered surface. Then by definition of a bordered surface, each boundary component has more than one point. Now an open Riemann surface homeomorphic to an annulus is conformally equivalent to $\{ z: r&lt;|z|&lt;R\}$, where $0\leq r&lt...
https://mathoverflow.net
312,838
[ "https://stats.stackexchange.com/questions/312838", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/182937/" ]
What is the difference between <strong>conv layers</strong> and <strong>FC layers</strong>? Why cannot I use <strong>conv layers</strong> instead of <strong>FC layers</strong>?
A convolutional layer applies the same (usually small) filter repeatedly at different positions in the layer below it. E.g. if the input layer has dimensions 512 x 512, you could have a conv layer that applies the same 8 x 8 filter (specified by 64 filter coefficients), at each point in (e.g.) a 128 x 128 grid overlaid...
You can use conv layers for instead of FC. However, due to the nature of conv layers where weights are shared, there will be much less parameters. It may cause that your network may not be capable enough to learn the stuff. But it all depends on your network.
https://stats.stackexchange.com
1,795,464
[ "https://math.stackexchange.com/questions/1795464", "https://math.stackexchange.com", "https://math.stackexchange.com/users/334450/" ]
Suppose $G$ is a group of order $4$ and $x^2=e$ for all $x$ in $G$. Prove that $G$ is isomorphic to $Z_2\oplus Z_2$. My attempt: <br><br> (1) Show that $G$ is abelian.<br> \begin{align*} \text{Take }x,y\in G.&amp;\text{Then }xy\in G.\\ (xy)^2&amp;=e\\ \text{Thus } (xy)^{-1}&amp;=xy\\ \text{Also by socks-shoe property...
<blockquote> <strong>Claim.</strong> The elements of <span class="math-container">$G$</span> can be written as <span class="math-container">$\{e,a,b,ab\}$</span>. <em>Proof.</em> Since <span class="math-container">$G$</span> is a group the identity element <span class="math-container">$e\in G$</span>. Since <span class...
You can easily show the group contains two normal subgroups of size $2$. There is a criterion that states that if $K$ and $H$ are normal subgroups of $G$ with $K\cap H =\{e\}$ and $KH=G$ then $G\cong K \times H$.
https://math.stackexchange.com
145,999
[ "https://security.stackexchange.com/questions/145999", "https://security.stackexchange.com", "https://security.stackexchange.com/users/134093/" ]
We have received a phishing email trying to get money from us, this email came from an account that was spelled closely to our work email but not quite the same. I have looked up the domain and found it was apparently set up yesterday. My true concern is that the e-mail was RE:&lt;SUBJECT&gt; where the subject and r...
Have you already considered that it might just be coincidence? If the subject was something common, it might not even be a compromise, just a lucky guess. If it wasn't something that obvious, how about these? In decreasing order of probability: <ul> <li>One of your employees is doing the phishing</li> <li>Do you have...
I have two hypothesis, but eventually I think this question will lead to a guess game, unless you have more relevant data. 1) No one got access to your email, but to your workstation (or your coworker's). This is the most common vector of intrusion to an infrastructure. 2) Maybe the phisher is just one of your cowork...
https://security.stackexchange.com
425,387
[ "https://physics.stackexchange.com/questions/425387", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/30506/" ]
I read (for instance in Landau/Lifshitz III) that if I know the wave function of a quantum state, I have the maximal information of the state available, in different words, the description of the state is complete. I actually wondered what that means, but I guess, it means that if I apply a number of operators on the w...
Imagine we have a system $X,$ which may be a subsystem of a larger composite system that is entangled, or simply a system about which we have insufficient information (or a noisy/lossy system), such that we don't really know in which state our system has been prepared in, we only know at most the set of states $|a\rang...
The state space of a mechanical system is a convex and compact set which is closed in the ultraweak topology. As such, the Krein-Milman theorem ensures that it is generated as the convex hull of the set of its extreme points. The extreme points correspond to <em>pure states</em> as they cannot be represented, by defini...
https://physics.stackexchange.com
364,051
[ "https://softwareengineering.stackexchange.com/questions/364051", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/293466/" ]
<em>First off, I am aware that many questions have been asked about VCS as a solo developer, but they are often too broad. This concerns only branching, and still it has been marked as a duplicate...the supposed duplicate is, again, marked as another duplicate of another question that is too broad and doesn't concern b...
The advantages are mostly the same as for groups of developers. By using an always release-ready master branch, and feature branches for developing new features, you can always release off the master. Find an important bug while working on a feature? Switch branch, fix, release, switch back and continue developing. Or...
<strong>Long running development</strong> Branching for a single person team would be useful for a long-running development feature that otherwise does not fit into your release cycle. You can take a branch for your multi-month spanning change and still be able to push whatever day-to-day bug fixes or changes from yo...
https://softwareengineering.stackexchange.com
39,819
[ "https://mechanics.stackexchange.com/questions/39819", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/19648/" ]
Ultimately - I've been driving two cars - an old 2003 1.6l 4 door type affair, and a newer Vauxall Corsa 1l. Even on the smallest of inclines (hills) - the old 2003 car will stall if you lift the clutch up slowly without any gas (therefore you always have to be on and off the handbrake on any type of incline, even so...
You've exposed a combination of two things: high torque at low engine RPMs + high mechanical advantage => forward motion without requiring additional throttle (where "high" is defined to be "high enough to move the car"). There's another way to investigate the same problem that is likely easier on your clutch. First,...
Part of the reason could be the engine management system : as you increase the load slowly it is increasing the engine power to keep the idle speed within limits. If you increase the load too fast, then it stalls the engine.
https://mechanics.stackexchange.com
56,830
[ "https://electronics.stackexchange.com/questions/56830", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/15955/" ]
I am builing a homemade reflow oven, but I cant find a good and cheap temperature sensor that can survive the temperatures necessary for reflow (~250ºC or 482ºF). Does anyone have a recommendation? I will be reading the output in a PIC ADC to control a relay.
In my home-brew reflow oven I used a PT-1K (1K Ohm at 0C) sensor. Much easier to interface than a thermocouple. I preferred it over the more common PT-100 type (100 Ohm at 0C) because the resistor values can be higher, which avoids self-heating, and makes wiring resistance less of a problem.
Thermocouples (such as type K) are good, cheap and (depending how their wires are insulated) easily cover more than the range of interest. They do need a stage of amplification before the ADC, however. Suppliers and circuit examples should be easy to find.
https://electronics.stackexchange.com
75,730
[ "https://electronics.stackexchange.com/questions/75730", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10456/" ]
I'm studying timers for use in scheduling and embedded systems but I don't understand the detail, does the time count upwards or downwards? Is the timer like a hardware timer like the ones we learnt how to build when we took digital design? The info about timers in book says <blockquote> Basics: Timers Microcontrol...
Microcontrollers have many different styles of timers. Some only count up, some only count down, some can be programmed to do either or even alternate counting up and down, some are automatically reset to zero each time they reach a programmable limit, some automatically reload a start value each time they reach zero,...
<blockquote> A programmable interval timer (PIT), the most common type, simply counts down from some value to zero. </blockquote> <hr> <blockquote> Note: the timer counts down in one clock cycle, and sets the Time-Out flag in the next cycle if the counter reached zero. </blockquote> <hr> <blockquote> If this ...
https://electronics.stackexchange.com
224,403
[ "https://physics.stackexchange.com/questions/224403", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/101517/" ]
If the sun suddenly slowed down would pluto's orbit immediately speed up? If so, then isn't the information pertaining to the sun's angular momentum change being carried to Pluto faster than light? Would it also suggest that if a massive star in a distant galaxy suddenly slows down every other rotating body in the uni...
The theory of influences that the question assumes is known as <em>telekinesis</em>. Objects arbitrarily act on other objects and transmit their angular momentum (or momentum) to them. But according to physics, telekinesis isn't possible. An object A may only transfer the angular momentum (or ordinary momentum) to ano...
The sun (or any body) can't just "slow down" - there has to be a torque applied. And whatever is applying the torque gets the additional angular momentum. That is how conservation of angular momentum works - there is no "magic at a distance".
https://physics.stackexchange.com
953,336
[ "https://math.stackexchange.com/questions/953336", "https://math.stackexchange.com", "https://math.stackexchange.com/users/294464/" ]
Full Disclaimer, this is a homework problem. Negate the following logical expression and transform it so that negations only appear before individual predicates: ∀x∃y∀z, P(x) ∧ ¬Q(x) → R(x) ∨ (R(y) ∧ ¬Q(z)) I'm not sure how to start with this problem. I thought that it would make sense to try to bring out the indivi...
Here is an explanation in words rather than logical symbols: <blockquote> The negation of &quot;for every/for all&quot; (<span class="math-container">$\forall$</span>) is &quot;there exits&quot; (<span class="math-container">$\exists$</span>). </blockquote> <strong>Example:</strong> The negation of the statement &quot;...
Firstly, negate your quantifiers. <pre><code>Negation of Universal quantifier: </code></pre> $$\neg \forall s: S(s) \quad\equiv\quad \exists s: \neg S(s)$$ <pre><code>Negation of Existential quantifier: </code></pre> $$\neg \exists s: S(s) \quad\equiv\quad \forall s: \neg S(s)$$ Note that these iterate, thusly: ...
https://math.stackexchange.com
295,552
[ "https://physics.stackexchange.com/questions/295552", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/36793/" ]
Non-renormalizable field theories contain non-renormlizable operators whose couplings have negative mass dimension (for example, Fermi coupling in the Fermi theory of weak interaction). These couplings provide an energy scale $\Lambda$ built into the theory, and it is said that the predictions above energy $E\geq \Lamb...
Don't forget the acceleration! You can split $N$ into two components, yes: $$N_y=N\cos A\qquad\text{ and }\qquad N_x=N\sin A$$ But <em>equating</em> the first one to gravity $w$ is wrong. If you set the upwards and downwards y-forces equal to each other, then you are applying Newton's 1st law, which <strong>is not t...
It looks like the point of your question is solely “How do you find the normal?” First, you did an excellent job decomposing the gravitational force. Students often try to make the hypotenuse of the triangle along the ramp and end up with nonsensical numbers. You instead did the right thing, making mg the hypotenuse...
https://physics.stackexchange.com
118,503
[ "https://mathoverflow.net/questions/118503", "https://mathoverflow.net", "https://mathoverflow.net/users/29992/" ]
Suppose that $X$ is an algebraic variety over $\mathbb C$, <em>not necessarily smooth</em>. Is it still true that each $\mathcal D_X$-module ($\mathcal D_X$ is of course the sheaf of differential operators) that is coherent as an $\mathcal O_X$-vodule must be locally free as an $\mathcal O_X$-module? Thank you in adva...
[Edited to correct errors pointed out by David Ben-Zvi and to answer a query by serge_I. These corrections reduce this ``answer'' to the status of a comment.] (1) (Over $\mathbb C$) Under strong assumptions on the singularities of $X$ (namely, that $X$ should be cuspidal, Ben-Zvi and Nevins, arXiv 0212094v3), if $\ma...
No, you can generally only get locally freeness on an open dense set. This is Lemma VII.9.3 in <em>Algebraic D-modules</em> by Armand Borel et al. EDIT: just realised that Lemma talks about where $\mathcal{D}_X$-coherent modules are $\mathcal{O}_X$-locally free, not whether $\mathcal{O}_X$-coherent ones are. A $\mathc...
https://mathoverflow.net
373,577
[ "https://physics.stackexchange.com/questions/373577", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/177297/" ]
Energy of light is proportional to its frequency.So if light loses energy on reflecting off a surface then why doesn't it change its colour?
<blockquote> Energy of light is proportional to its frequency. </blockquote> The energy of a photon is proportional to its frequency. The power of a light beam is determined by the photon energy and the number of photons it delivers per unit time. <blockquote> So if light loses energy on reflecting off a surfac...
Often it does not lose much energy on being reflected. It loses energy on being absorbed. Each reflected photon has the same energy as before. Some colors may be preferentially absorbed or reflected. So a beam may lose energy and change color when some of it is reflected from a colored surface. Light may lose or ga...
https://physics.stackexchange.com
2,225,057
[ "https://math.stackexchange.com/questions/2225057", "https://math.stackexchange.com", "https://math.stackexchange.com/users/433612/" ]
$(x - 3)$ is a factor of $x^3 - 8x^2 + ax + 42$ where $a$ is an integer Show that $a = 1$ I don't know where to start with this... Any insight?
As $x - 3$ is a factor of the given equation, and since $x - 3 = 0$ when $x = 3$, put $x = 3$ in the equation: $(3)^3 - 8(3)^2 + a(3) + 42 = 0$ $27 - 72 + 3a + 42 = 0$ $3a - 3 = 0$ $3a = 3$ $a = 1$
Hint: If $x-3$ is a factor of $x^3-8x^2+ax+42$, then $x^3-8x^2+ax+42$ can be written as $(x-3)$ times something. Importantly, this means that when $x=3$, $x^3-8x^2+ax+42=0$. Use this to find $a$.
https://math.stackexchange.com
903,761
[ "https://math.stackexchange.com/questions/903761", "https://math.stackexchange.com", "https://math.stackexchange.com/users/17278/" ]
Ok, so we know that if we have an arbitrary point, $p$, and a normal perpendicular to an arbitrary plane, $n$, the distance from the point to the plane can be computed as follows: $$distance = p \cdot n - d $$ where the operator '$\cdot$' represents the dot product between two vectors, and $d$ is the distance of the ...
Refer to the following diagram: <img src="https://i.stack.imgur.com/8Sahe.gif" alt="enter image description here"> It seems more immediate to regard the point $P$ as being represented by the vector $p=\overrightarrow{OP}$ since it uses the coordinates of $P$ directly. Then if $n$ is a normed normal vector to the plan...
I guess I think of it as tail at the point, and the head at another arbitrary point in the plane. Then, the projection of that vector, onto the normal line ( from same point to plane) is the distance. <pre><code>a \dot b </code></pre> but is really: <pre><code>a hat dot b hat </code></pre> so think about the diff...
https://math.stackexchange.com
143,468
[ "https://softwareengineering.stackexchange.com/questions/143468", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/49863/" ]
I am joining a software company very soon as a fresher. But I am afraid that no one knows me and also every one there will be professional. So I want to know, what precautions should be taken in communication, behavior and other things?
When adapting to any new technical environment, I prefer focusing on deeply understanding problems instead of advocating solutions. Deeply understanding problems allows us to stay humble and understand when solutions are no longer appropriate. Becoming too strongly attached to a specific solution to a problem, or a sol...
I have some other approach to this... Be yourself..The truth always comes up eventually. If you are a selfish SOB ,sorry mate but they will get you :) If not, then you can be humble and <strong>express</strong> your opinion. If you do it in this way people will take you seriously... There will always be people that ...
https://softwareengineering.stackexchange.com
1,427
[ "https://cs.stackexchange.com/questions/1427", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/1192/" ]
Let A and B be languages with A ⊆ B, and B is Turing-recognizable. Can A be not Turing-recognizable? If so, is there any example?
This is something that confuses many students. The point here is that being subset of another language does not imply much about their difficulty of computation. You can always consider the trivial language $\emptyset$ and $\Sigma^*$ and any other language is between them w.r.t. set inclusion. Therefore just knowing t...
When a Turing-recognizable language $X$ is <em>not</em> decidable, it implies that it is not co-Turing-recognizable (in other words: $X^c$ is not recognizable). Since $X^c$ is a perfectly valid subset of $\Sigma^*$, this supports the fact that for a language $A \subseteq B$ where $B$ is Turing-recognizable, $A$ may ver...
https://cs.stackexchange.com