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
39,357
[ "https://physics.stackexchange.com/questions/39357", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/5626/" ]
Is there a way to express $\cos(x(t))$ (or $\sin(x(t))$) as the solution to the Euler-Lagrange equation, in other words is there a sense in which this function is the path of stationary action?
Most naturally, both sine and cosine – I suppose you meant simply $x=\sin(t)$ and $x=\cos(t)$ because $\cos(x(t))$ isn't a particular path, it's a functional of a path – are solutions to the differential equation $$ \frac{d^2}{dt^2} x(t) = -x(t) $$ which is the equation for a harmonic oscillator (with a unit spring con...
If x(t) solves the Euler Lagrange equation for $L(x,\dot{x})$, then f(x(t)) is stationary for $L(f^{-1}x, \dot{f^{-1}x(t)})$. The reason is that the action evaluates to the same thing, so that a small perturbation in either coordinate gives zero action change. This means that in the domain where the function sin(x) ha...
https://physics.stackexchange.com
9,119
[ "https://biology.stackexchange.com/questions/9119", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/3939/" ]
I've recently read a little on Wikipedia about genetics, but I can't find a direct answer to this question. My rough understanding is this: <ul> <li>Both males and females have pairs of chromosomes, one copy from each parent</li> <li>Both produce gametes (eggs in females, sperm in males)</li> <li>The gamete is produc...
Other answers are correct in their own terms, but because of homologous recombination during meiosis, the idea of maternal and paternal chromosomes becomes meaningless. Any chromosome in a gamete will be a mosaic of the maternal and paternal versions. In this sense the chromosome is not the unit of inheritance.
Yes, for all intents and purposes, the assorting of chromosomes during meiosis is random. In fact, it's difficult to imagine a mechanism by which the chromosomes would assort in any <em>non-random</em> manner (i.e., how would the maternal chromosomes "identify" each other so as to assort together during meiosis?)
https://biology.stackexchange.com
3,291,707
[ "https://math.stackexchange.com/questions/3291707", "https://math.stackexchange.com", "https://math.stackexchange.com/users/688539/" ]
Suppose you have a line <span class="math-container">$Ax+By+C=0$</span> We know the perpendicular vector to the line is <span class="math-container">$ A \vec{i} + B \vec{j}$</span> The equation of perpendicular line should be; <span class="math-container">$$ s= (xo,yo) + t ( A,B)$$</span> where t is the parameter and <...
Hint: Write your equation as a system of equations <span class="math-container">$$x=x_0+tA$$</span> <span class="math-container">$$y=y_0+tB$$</span> and eliminate <span class="math-container">$t$</span>
Very simple: if the cartesian equation of the line is <span class="math-container">$$Ax+By+C=0\qquad(C\text{ to be determined})$$</span> and if the line passes through the point <span class="math-container">$(x_0,y_0)$</span>, this equation can be rewritten as <span class="math-container">$$Ax+By=Ax_0+By_0.$$</span>
https://math.stackexchange.com
600,641
[ "https://physics.stackexchange.com/questions/600641", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/282607/" ]
Let's suppose I'm on a carousel rotating with a speed <span class="math-container">$\omega$</span> and start running on it in the opposite direction with a speed <span class="math-container">$v$</span> such that <span class="math-container">$\omega r=-v$</span> where <span class="math-container">$r$</span> is the dista...
As viewed in an inertial frame, no force acts on you. This makes sense, because you are at rest in that frame. As viewed in the rotating reference frame attached to the carousel, two forces are acting on you: the Coriolis force and the centrifugal force. The Coriolis force has magnitude <span class="math-container">...
I assume you mean that you remain stationary while the carousel spins underneath you. This means that the net force acting on you must be zero, or that you would only feel the reaction to your weight from your feet. If you closed your eyes it would feel like you are running on a straight line, except because your feet ...
https://physics.stackexchange.com
137,577
[ "https://physics.stackexchange.com/questions/137577", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/36946/" ]
In Peskin &amp; Schroeder's book on page 297 in deriving the photon propagator the authors say that $$\left(-k^2g_{\mu\nu}+(1-\frac{1}{\xi})k_\mu k_\nu\right)D^{\nu\rho}_F(k)=i\delta^\rho_\mu \tag{9.57b}$$ With the solution given in the next line in equation (9.58) as $$D^{\mu\nu}_F(k)=\frac{-i}{k^2+i\epsilon}\left...
$D_{\mu\nu} = A g_{\mu\nu}+B k_{\mu} k _{\nu}$ with A and B two unknown functions of the scalar k^2. The two tensor after A and B are the only possible Lorentz invariant tensors . Simply plugin and calculate the unknown functions.
It's just tensor equation reads: <span class="math-container">$A_{\mu\nu}D^{\nu\rho}=i\delta_\mu{}^{\rho}$</span>, where <span class="math-container">$A_{\mu\nu}=-k^2g_{\mu\nu}+\left(1-\frac{1}{\xi}\right)k_\mu k_\nu$</span>. What we need to do it to find its Inverse <span class="math-container">$A^{\mu\nu}$</span>. C...
https://physics.stackexchange.com
254,435
[ "https://math.stackexchange.com/questions/254435", "https://math.stackexchange.com", "https://math.stackexchange.com/users/52341/" ]
Need help in finding the integral values: <ol> <li>$$\int\limits (2x^4 + x^3/3 + \sqrt{x})\mathrm{d}x$$</li> <li>$$\int\limits_{\pi/2}^{3\pi/2} \cos(x)\mathrm{d}x$$</li> <li>$$\frac{\mathrm{d}}{\mathrm{d}x}\int\limits_{1}^{\tan(x)} e^t\mathrm{d}t$$ with the usage of the Fundamental Theorem of Calculus.</li> </ol>
<ol> <li> $$\int(2x^4 + x^3/3 + \sqrt{x})\mathrm{d}x=\int2x^4 \mathrm{d}x+ \int \frac{x^3}{3}\mathrm{d}x +\int \sqrt{x}\mathrm{d}x=2\frac1{4+1}x^{4+1}+\frac{1}{3}\frac1{3+1}x^{3+1}+\frac1{\frac{1}{2}+1}x^{\frac{1}{2}+1}=\frac{2}{5}x^5+\frac{1}{12}x^4+\frac{2}{3}\sqrt[3]{x^2}+c $$</li> <li>$$\int\limits_{\pi/2}^{3\pi/2}...
Hint: $\displaystyle\int x^n dx=\frac{x^{n+1}}{n+1}+C$ for any real number $n\neq -1$. Note also that integration is linear in the sense that $\displaystyle\int(f(x)+g(x))dx=\int f(x)dx+\int g(x)dx$. Therefore, we have $$\int\limits (2x^4 + x^3/3 + \sqrt{x})dx=2\int x^4dx+\frac{1}{3}\int x^3dx+\int x^{\frac{1}{2}}dx.$$...
https://math.stackexchange.com
85,099
[ "https://mechanics.stackexchange.com/questions/85099", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/59808/" ]
I have heard something from some mechanics but don't know if it is true or false. They say when you are driving on the highway and your A/C is on, the compressor keeps kicking in and out which puts a tremendous load on the serpentine belt and causes the crank pulley bolt to get tighter than the original torque you had ...
There is <strong>NO WAY</strong> this is the reason the bolt seems tighter upon trying to loosen it, and directly for the reasons jwh20 has stated. There is one more reason why it couldn't happen on most engines. Since almost every engine out there turns clockwise while it's running (yes, there are a few exceptions, li...
Sounds like old mechanics lore to me. I've never experienced this personally and found that in nearly all cases, corrosion aside, that the bolts in question are easy enough to remove but the removal torque is always greater than the torque spec on installation. The pulley on either the A/C compressor or the crank pull...
https://mechanics.stackexchange.com
347,403
[ "https://electronics.stackexchange.com/questions/347403", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/170779/" ]
I have 9v AC(1A, 50Hz) as input to 5v DC(500mA) as output rectifier circuit to power up the development board. But I had a doubt if I use Schottky diode instead of normal diode what happens to the circuit. By watching many videos I understand that Schottky diode can operate at high frequency, lower temperature dissipat...
Traditional diodes are cheaper than schottky diodes and they can usually block a higher voltage in the opposite direction. In most power rectification applications like yours schottky diodes are used to limit voltage drop and power loss. In your case whether or not you need a schottky diode depends if you need to limi...
The high switching speed of Schottky diodes is not especially useful in rectification. "High frequency", in this context, means frequencies measured in MHz or GHz. 50-60 Hz is a low enough frequency that a normal P-N diode will function acceptably.
https://electronics.stackexchange.com
373,511
[ "https://mathoverflow.net/questions/373511", "https://mathoverflow.net", "https://mathoverflow.net/users/94647/" ]
Let <span class="math-container">$X$</span> be a connected CW-complex with <span class="math-container">$\pi_k(X)$</span> trivial for <span class="math-container">$k &gt;2$</span>. Is it known under which circumstances <span class="math-container">$X$</span> is an <span class="math-container">$H$</span>-group? I have b...
The necessary condition is a &quot;additivity&quot;-type condition on the <span class="math-container">$k$</span>-invariant. Suppose <span class="math-container">$\pi_1 X = G$</span> and <span class="math-container">$\pi_2 X = A$</span>. As you correctly point out, <span class="math-container">$G$</span> must be abelia...
I just wanted to add to Tyler Lawson's answer that all the maps <span class="math-container">$\beta\colon K(G,1)\rightarrow K(A,3)$</span> (<span class="math-container">$G$</span> and <span class="math-container">$A$</span> abelian and no action of <span class="math-container">$G$</span> on <span class="math-container"...
https://mathoverflow.net
341,382
[ "https://softwareengineering.stackexchange.com/questions/341382", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/245936/" ]
I'm currently trying to better design a database structure for defaults where a reference to preset defaults is maintained globally, but the system is flexible enough to allow for new defaults to be added. Database: <pre><code>Default Fruits ---------------------------- ID: Name: Colour: --------------------...
The <code>User Fruits</code> table is not pretty. It's redundant to hold information about fruits in two separate places. If you can change the fruit defaults on a per user basis, it would be better if you just had a <code>Fruits</code> table and a <code>User</code> table, and in the <code>Fruits</code> table you had ...
The design seems right. You won't be left with orphans if you add a foreign key constraint to delete refering rows on delete in the parent. <pre><code>ALTER TABLE dbo.User ADD CONSTRAINT FK_T1_T2_Cascade FOREIGN KEY (DefaultID) REFERENCES dbo.Fruits(ID) ON DELETE CASCADE </code></pre>
https://softwareengineering.stackexchange.com
32,205
[ "https://physics.stackexchange.com/questions/32205", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/10597/" ]
Here's a quote from Wikipedia: <blockquote> As an example, the ground state configuration of the sodium atom is 1s<sup>2</sup>2s<sup>2</sup>2p<sup>6</sup>3s, as deduced from the Aufbau principle (see below). The first excited state is obtained by promoting a 3s electron to the 3p orbital, to obtain the 1s<sup>2</sup...
<ol> <li>There's an infinite number of orbitals, and thus an infinite number of possible state transitions. However, the energy of the orbitals asymptotes to a finite value - for example, a hydrogen atom has energy levels given by the formula $E_n = -\frac{13.6\text{ eV}}{n^2}$ (ignoring some very tiny quantum correcti...
A typical highly excited atom has an outer electron that sees a charge +1 remainder far away, essentially at a point, and such a configuration is indistinguishable from a Hydrogen atom, in terms of the transitions of the outer electron. Instead of orbiting the proton, it orbits the core of remaining electrons. The hyd...
https://physics.stackexchange.com
154,301
[ "https://electronics.stackexchange.com/questions/154301", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/61947/" ]
For my circuit, I want to use 110VAC mains power, via a TRIAC dimmer to an LED Driver power supply. For this use case, I am confused on whether to use a constant voltage AC to DC LED driver power supply, or a constant current AC to DC LED driver power supply. When would I use one vs the other? Which supporting compo...
Sorry, Geremy, but you've misunderstood. The module you're looking at will simply not work well with the dimmer turned down. It will ALWAYS try to drive 1400 mA through your LEDs. If the input voltage is too low (because of your dimmer) it will get very unhappy and may do strange things. The 17 to 29 volt range just ...
From further research, I've arrived at the conclusion that in the realm of LED Power Supplies, "Constant Current" is also known as "Constant Current Reduction". If this is the case, I should understand that for a "Constant Current" LED power supply that is advertised as <ul> <li>In: 110VAC</li> <li>Out:17V - 29V, 1...
https://electronics.stackexchange.com
164,073
[ "https://electronics.stackexchange.com/questions/164073", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/71940/" ]
I try to create a GND pin and a VCC pin to connect them to a battery. On my eagle pcb I haven't found them. They should be like 5mm x 5mm. On the schematic I added a ground and vcc pin, but I can't found them on the pcb. I need a place (copper) to solder the battery connectors. Is there a good way to do this easily...
I think your best option would be to use the via tool. Create the drill size to be the minimum of you PCB manufacturer (0.25mm is what I have mine set to) and then make the diameter of the pad to be 5mm. You can then place these wherever you like on the board (making sure that it doesn't overlap anything) and then re...
The correct way to do this is to define a "part" of the size and shape you want. You can then connect it in the schematic editor, it shows up on the PCB, you can move it around, route to it, add a component designator in the silkscreen, etc. This is also useful for defining plated holes for mounting bolts.
https://electronics.stackexchange.com
370,175
[ "https://electronics.stackexchange.com/questions/370175", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/182859/" ]
I am trying to define a look up table that is not a constant on an STM32F103. Basically I want to have a page of flash that acts like a constant lookup table in normal operation, but every once in a while (think days apart) I want to be able to erase that table and write a new one to the page of flash. I believe I unde...
Note: linking is not a part of the C language standards, so each compiler implements linker files differently. You seem to be using GCC, so I will share some code that works with it. linker.ld: <pre><code>MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 31K /*(...
Yes, it would be cleanest to declare a section for your table. But the easiest way is to just reduce the FLASH section by the page size and then: <pre><code>int *table = (int *) (0x0800000 +0x20000 - PAGE_SIZE) </code></pre> Here the "0x20000" is the flash memory size. In /my/ code I use a define MY_FLASH_SIZE defi...
https://electronics.stackexchange.com
105,957
[ "https://physics.stackexchange.com/questions/105957", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/43458/" ]
I want to make a home experiment where I roughly explain the phenomenon of water remaining in a straw if you close one end of the straw. So I'm thinking that the weight of the water is pulling it down, but the pressure underneath the straw is keeping it up. If there was no finger on the top, the pressure would also be...
Yes, what you have formulated is fine. The pressure acting on the water from the bottom of the straw will be equal to the weight of the water times the cross section area. So $101325\pi r^2$ is the force acting from below also. That is precisely why there is an <strong>equilibrium</strong> and the water is not falling....
This is not altogether correct. In particular, it does not matter what the pressure of the room is (unless you reach extreme values), because actually what is holding the water column is not some "high" value of the pressure at the bottom of it, it is the fact that the pressure at the top of the water column (at the wa...
https://physics.stackexchange.com
625,860
[ "https://physics.stackexchange.com/questions/625860", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/272242/" ]
Say we have a harmonic oscillator that obeys the force rule: <span class="math-container">$$F=-kx$$</span> Hence, the equation of motion is: <span class="math-container">$$\ddot{x}+\frac{k}{m}x=0$$</span> which may be solved analytically as: <span class="math-container">$$x(t)=x(0)\cos\left(\sqrt{\frac{k}{m}}t\right)+\...
The period is independent of the amplitude keeping <span class="math-container">$k$</span> and <span class="math-container">$m$</span> fixed (and varying initial conditions). Your calculation tries to keep the initial conditions fixed and vary <span class="math-container">$k$</span> and <span class="math-container">$m....
I'm not sure why you're making this so complicated. Write <span class="math-container">\begin{align} x(t)=A\cos(\omega t)+B\sin(\omega t) \, ,\tag{1} \end{align}</span> where <span class="math-container">$\omega^2=k/m$</span>, <span class="math-container">$A=x(0)$</span> and <span class="math-container">$B= \dot{x}(0)...
https://physics.stackexchange.com
12,692
[ "https://quantumcomputing.stackexchange.com/questions/12692", "https://quantumcomputing.stackexchange.com", "https://quantumcomputing.stackexchange.com/users/12265/" ]
Using classical error correction (or channel coding) as a reference, I'd like to be able to compare QECC's from different constructions. Distance is a reasonable measure and you can argue that an <span class="math-container">$[[n_1,k_1,d_1]]$</span> is a better code than an <span class="math-container">$[[n_2,k_2,d_2]]...
Ok I think I've got it. The first part of my question is correct; the second one no. The big mistake is that I've tried to use eq 2.12 with the elements of vectors and not with the vectors themselves. As I've done before, taking any basis, say <span class="math-container">$|v_{0}\rangle$</span> and <span class="math-co...
A simple explanation is if we look geometrically at what <span class="math-container">$A$</span> is doing, which is a reflection. For orthogonal basis <span class="math-container">$|v_1\rangle, |v_2\rangle$</span> we want to find unitary transform <span class="math-container">$A$</span>, where <span class="math-contai...
https://quantumcomputing.stackexchange.com
149,003
[ "https://cs.stackexchange.com/questions/149003", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/147666/" ]
I have seen examples of how to find the solve the recurrence for T(n) = T(<span class="math-container">$\sqrt{n}$</span>) + n, but how do we go about if there is another T(n/2) in there? So I tried to unfold the recurrence out and this was what I got: T(n) = T(n/2) + T(<span class="math-container">$\sqrt{n}$</span>) + ...
The short answer is, surprisingly, no. The usual &quot;plain vanilla&quot; SA algorithm keeps track of one best known solution and ultimately returns that. What would be the advantage in keeping track of N-1 additional ones? Remember that a lot of those others are likely to be close to the best known optimum anyway. So...
I would agree with your answer. Also, the memory could help when you are stuck in a local minimum and you already visited a deeper minimum.
https://cs.stackexchange.com
149,524
[ "https://mathoverflow.net/questions/149524", "https://mathoverflow.net", "https://mathoverflow.net/users/36961/" ]
We often assume manifolds to be paracompact Hausdorff. Clearly, this implies normal. However, there is a manifold (I mean locally Euclidean Hausdorff space) which is not paracompact. Without paracompactness, they are still regular because manifolds are locally compact, but does it imply normal? The only example of no...
The fiberwise one-point-compactification of the tangent bundle of the long line (pick any smooth structure) is not normal. The two distinguished sections of this $S^1$ bundle (the zero section &amp; the section at infinity) cannot be separated by open subsets.
André's answer is great, but this example might be simpler. Let $\mathbb{L}_+=\omega_1\times[0,1)-\langle 0,0\rangle$ be the longray, and set $\Omega=\{\langle \alpha, 0\rangle\,:\,\alpha\in\omega_1\}\subset\mathbb{L}_+$. Take $M=\mathbb{L}_+\times(-1,1) - \Omega\times\{0\}$. Then $M$ is a $2$-manifold since $\Omega$ ...
https://mathoverflow.net
127,899
[ "https://cs.stackexchange.com/questions/127899", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/123062/" ]
The simple (naive?) answer would be O(n) where n is the length of the shorter string. Because in the worst case you must compare every pair of characters. So far so good. I think we can all agree that checking equality of two <em>equal length</em> strings requires O(n) runtime. However many (most?) languages (I'm using...
In order to discuss the expected time complexity of an operation, you have to specify a distribution on the inputs, and also explain what you mean by <span class="math-container">$n$</span>. One has to be careful, however. For example, consider the suggestion in the comments, to consider some kind of distribution over ...
In addition to what was said before, consider a modern version of &quot;string&quot; that is fully Unicode compatible. Which means a string is a sequence of Unicode code points, and you can't just compare whether code points are equal, because there are cases where a letter can be represented in different ways, sometim...
https://cs.stackexchange.com
132,743
[ "https://dba.stackexchange.com/questions/132743", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/8876/" ]
I am writing a script to insert values from a file into a mysql database. The script reads lines from the file and constructs insert queries from them. Sometimes particular columns are empty, so an insert query might look like this... <pre><code>insert into table (col1, col2, col3, col4) values('abc',100,,'def') </...
No, it's not possible. It would be interesting to see how your script looks like. Maybe you should consider writing the default value ('null') when writing the script? Or do you receive it as it is?
You can use the <code>default</code> keyword instead of <code>null</code>: <pre><code>create table foo ( id int not null AUTO_INCREMENT, name varchar(255), primary key (id) ); insert into foo values (default, 'john doe'); select * from foo; -- result 1, 'john doe' </code></pre> If that's not the problem, you...
https://dba.stackexchange.com
608,125
[ "https://physics.stackexchange.com/questions/608125", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/273611/" ]
Suppose I have the m-dimensional unitary B to prepare the ancillary state: <span class="math-container">\begin{align} B|0\rangle=\frac{1}{\sqrt s}\sum_{j=0}^{m-1}\sqrt{\beta_j}|j\rangle, \text{ where } s\equiv\sum_{j=0}^{m-1}\beta_j \end{align}</span> Suppose there's some <span class="math-container">$|\Phi\rangle$</s...
For force, you need to include mass in your acceleration relationship. The total force in the inertial (ground) frame is different from the effective total force (including fictitious forces) in the non-inertial rotating (merry-go-round) frame. Here I calculate the total force in both frames. Let the positive directi...
Let me restate the setup as follows:<br /> It is as if there is a second merry-go-round on top of the merry-go-round, so that the overall angular velocity of the second merry-go-round is <em>twice</em> that of the first. So: for an object/person stationary with respect to the second merry-go-round the required centripe...
https://physics.stackexchange.com
68,702
[ "https://quant.stackexchange.com/questions/68702", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/59723/" ]
I've seen some ETFs that only hold futures (and some cash) whose options are being priced with a forward price equal to the current ETF price, even for 1 year out options (at least according to Bloomberg). Let's say that oil spot is trading at 46/barrel. The 1 year out future is trading at 50 (10% anual interest rate)....
Not familiar with specific reports like H.15, but as a matter of generality: let's say you are looking at 4 week maturities, and it's Thursday. You could look at the 4 week bill issued two days ago, the 13 week bill issued 65 days (9 weeks and 2 days) ago, and the 52 week bill from 338 days (48 weeks and 2 days) ago. T...
The Fed is showing you the current bills on that page. Yes, the 1month will be more like 28 days at that point. That's why they show the cmt's separately.
https://quant.stackexchange.com
577,161
[ "https://physics.stackexchange.com/questions/577161", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/267796/" ]
We all know that the sun generates its energy from nuclear fusion in the core. The electromagnetic radiation produced slowly travels upwards, while constantly being absorbed and re-emitted by the charged ions, until it reaches the photosphere, where it can basically travel freely (because there are less charged ions), ...
The gamma rays released deep in the core of a star are scattered off of ionized atoms there, which adds energy to the atoms and removes it from the photons. The scattering events are so frequent that it takes a time scale of order ~thousands of years for a photon to rattle its way all the way out to where it can escape...
The energy we receive from the Sun, in the form of photons, comes from the photosphere. This is the very outer layer of the Sun. If it is in equilibrium, i.e. not getting any hotter or colder, then in terms of what we can see when we look from the outside, <em>it does not matter</em> where the energy comes from that he...
https://physics.stackexchange.com
3,540,361
[ "https://math.stackexchange.com/questions/3540361", "https://math.stackexchange.com", "https://math.stackexchange.com/users/741732/" ]
<blockquote> Let <span class="math-container">$T:R^3 \rightarrow R^2$</span> be the linear mapping defined by <span class="math-container">$T(a_1,a_2,a_3)=(a_1-a_2,2a_3)$</span>. </blockquote> I want to verify <span class="math-container">$R(T)=R^2$</span> So <span class="math-container">$R(T)=T(x)=T(a_1,a_2,a_3)=(...
It seems to me that, in order to complete your proof, you need to show that <span class="math-container">$\dim R(T) = 2; \tag 1$</span> you have already shown that <span class="math-container">$R(T) \subset \Bbb R^2 \tag 2$</span> is a subspace; if (1) is established, then we have <span class="math-container">$R(T...
If I'm understanding the question correctly, then we are given that <span class="math-container">$T:\Bbb{R}^3\to\Bbb{R}^2$</span> is defined by letting <span class="math-container">$$T(x_1,x_2,x_3)=(x_1-x_2,2x_3)$$</span> for all <span class="math-container">$x_1,x_2,x_3\in\Bbb{R}$</span>, and we need to show that <s...
https://math.stackexchange.com
94,466
[ "https://security.stackexchange.com/questions/94466", "https://security.stackexchange.com", "https://security.stackexchange.com/users/78566/" ]
I am trying to write a php code test to write an nmap scan (with parameters) scheduled into crontab file. While the nmap is running I would like to get the status of that specific nmap scan. For example: how many IP addresses scanned, is the scan still running, or is it finished? Is is possible to get the status of a...
I'm not sure if there is an easy way to do that, but if you output the nmap results to a text file, and you use the nmap -v parameter for more verbose output, you could search the output text file for the information you need. Fore example, the first time the phrase "Scanning x hosts" appears, refers to the total numb...
Cron daemon only sends email, if executed process outputs something on console - and only <strong>after the job finish</strong>. So basically you can't get such information, when nmap is still running, unless you implement it yourself, eg. by generating log file from nmap and analyzing it from another cron job each min...
https://security.stackexchange.com
133,864
[ "https://electronics.stackexchange.com/questions/133864", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/54197/" ]
<img src="https://dlnmh9ip6v2uc.cloudfront.net/assets/f/1/4/a/b/511568b7ce395f613f000004.jpg" alt="pullup"> I understand that when the button is in its open state the voltage on the input pin should be fairly close to \$ V_{cc} \$ provided \$ R_1 &lt;&lt; R_2 \$ as \$ V_{in} = V_{cc} \frac{R_2}{R_1 + R_2}\$. But, I do...
When you press the button, you connect the input pin, and the bottom end of R1, to ground. Current will flow through R1, and through the button to ground.
The question is written from the voltage divider perspective. So, let's roll with the voltage divider perspective a little further. Imagine that the switch is a resistance, which varies when switch is opened of closed. Open switch has an infinite resistance: \$ R_{sw,open} &gt;&gt; R_2 \$ Closed switch has a very...
https://electronics.stackexchange.com
1,252,615
[ "https://math.stackexchange.com/questions/1252615", "https://math.stackexchange.com", "https://math.stackexchange.com/users/207582/" ]
How do you differentiate a constant $K$ from first principles to show that it equals zero? $f(x) = K$ but what does $f(x+h)$ equal to where $h$ is the change in $x$?
If $f (x)=k $ for all $x $ then $f (x+h)=k $ also.
Your function $f$ is <em>constantly</em> equal to $K$. This means that no matter what value $y$ you plug into $f$, it will always return $K$, i.e. $f(y)=K$. In particular, I can choose $y=x$ to get $f(x)=K$, or I can choose $y=x+h$ to get $f(x+h)=K$.
https://math.stackexchange.com
73,529
[ "https://mathoverflow.net/questions/73529", "https://mathoverflow.net", "https://mathoverflow.net/users/17350/" ]
I am interested in computing the (anti)-canonical class of the (total space of the) projective completion of the tautological bundle over $P^1\times P^1$. That is, the canonical class of $\mathbb P_{P^1\times P^1}(J \oplus \mathscr O)$, where $J$ is the tautological line bundle on $P^1\times P^1$. I believe this can ...
Why not use the Leray-Hirsch theorem? That says that the integral cohomology ring of a projectivized rank $n$ vector bundle $\pi: PE \to B$ is generated, as an algebra over the cohomology of the base $B$, by the first Chern class $h$ of the relative $O(1)$, with relation $h^n + c_1 h^{n-1} + \dots + c_n$, where $c_i$ ...
I like the way you asked to avoid. Forgive me if I describe it in polytope rather than fan language. Step 1: ${\mathbb P}^1 \times {\mathbb P}^1$'s polytope is a square (or any rectangle). The four edges, taken clockwise, correspond to the ${\mathbb P}^1$s giving the classes $h_1,h_2,h_1,h_2$ Michael mentions. (EDIT: ...
https://mathoverflow.net
4,614
[ "https://mechanics.stackexchange.com/questions/4614", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/2212/" ]
<strong>Background:</strong> All my life I drove FWD (Front Wheel Drive) cars. I drove FWD in different conditions with all-season tires and always got good and even predictable handling during winter periods. In short I would say that over steer is always cured by acceleration and under steer with a bit of braking and...
I grew up in Finland, where winters are long and icy. Mostly drove RWD cars, but also, at times, owned FWD and AWD ones. If you look at all the nordic/scandinavian rally champions, they preferred front wheel drive, until the Audi Quattro changed rallying forever. But that is assuming you are a professional rally driver...
Some of what your friends have told you is nonsense. <ul> <li>You will possibly have less chance of getting stuck in the winter in a RWD car, as RWD gives you more grip when trying to accelerate forwards (as weight moves rearward). Whenever I have had to rescue friends in FWD cars, I usually need to use reverse to ge...
https://mechanics.stackexchange.com
271,516
[ "https://math.stackexchange.com/questions/271516", "https://math.stackexchange.com", "https://math.stackexchange.com/users/12686/" ]
Let $f_n : [0,1] \rightarrow \mathbf{R}$ be a sequence of measurable functions such that $\bullet$ $f_n \rightarrow 0$ a.e. on $[0,1]$. $\bullet$ $\int_{[0,1]} |f_n|^2 dm \leq 1$ for all $n \geq 0$. Then I want to show that $\int_{[0,1]} |f_n| dm \rightarrow 0$ as $n \rightarrow \infty$. I tried to combine Egoro...
Egoroff's theorem is a good idea. Fix $\varepsilon&gt;0$, $S_\varepsilon$ a set where $\sup_{x\in S_\varepsilon}|f_n(x)|\to 0$ and $\mu([0,1]\setminus S_\varepsilon)&lt;\varepsilon$. We have \begin{align} \int_{[0,1]}|f_n|d\mu&amp;\leqslant\int_{S_\varepsilon}|f_n|d\mu+\int_{[0,1]\setminus S_\varepsilon}|f_n|d\mu\\ &a...
Since the sequence is $L^2$-bounded, it is uniformly integrable and therefore your result holds.
https://math.stackexchange.com
385,387
[ "https://mathoverflow.net/questions/385387", "https://mathoverflow.net", "https://mathoverflow.net/users/115381/" ]
Do there exist a (non-trivial) globally Lipschitz continuous function <span class="math-container">$g:\mathbf{R}\to\mathbf{R}$</span> and a non-decreasing function <span class="math-container">$f:\mathbf{R}_+\to\mathbf{R}_+$</span> such that the identity <span class="math-container">\begin{equation} g(\alpha f(\alpha)s...
Since <span class="math-container">$f$</span> is non-decreasing, the function <span class="math-container">$\alpha\mapsto \alpha f(\alpha)$</span> is strictly increasing and hence invertible with strictly increasing inverse. Therefore there is a non-decreasing function <span class="math-container">$k$</span> such that ...
<span class="math-container">$\newcommand\R{\mathbf R}$</span>Here we shall interpret the condition that <span class="math-container">$g$</span> be nontrivial as the condition that <span class="math-container">$g$</span> be non-constant. We have <span class="math-container">\begin{equation} g(af(a)s)=f(a)g(s) \quad\tex...
https://mathoverflow.net
227,352
[ "https://mathoverflow.net/questions/227352", "https://mathoverflow.net", "https://mathoverflow.net/users/82510/" ]
Does there exist a <strong>continuous</strong> (differentiable) function $h:[0,1]\times [0,1] \to [0,1]$ such that if $\alpha,\beta\in [0,1]$ are independent and uniformly distributed on $[0,1]$, the random variable $h(\alpha,\beta)$ is uniformly distributed on $[0,1]$ <strong>independent</strong> of $\alpha,\beta$? <...
I think this works for a continuous $h$. Let $f : \mathbb{R} \to [0,1]$ be the "triangle wave" function given on $[0,1]$ by $$f(u) = \begin{cases}1-2u, &amp; 0 \le u \le \frac{1}{2} \\ 2u-1, &amp; \frac{1}{2} \le u \le 1 \end{cases}$$ and extended periodically. Note that for any $t \in [0,1]$ we have $$m(\{x \in [0,1...
Inspired by Nate's answer, here is why it cannot be differentiable. First for each $y \in [0,1]$, there must be some $x \in [0,1]$ such that $h(x,y) = 0$, otherwise by compactness of the unit interval and continuity of $h$, we would have $P(h(\alpha, y) &lt; \epsilon) = 0$ for some small $\epsilon$. Next I claim that s...
https://mathoverflow.net
508,425
[ "https://physics.stackexchange.com/questions/508425", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/210955/" ]
How do you proof that <span class="math-container">$F = - kx $</span>? And why is there (-) on the formula(?)
No. There are two points of view on this. First, it's a definition of what a simple harmonic oscillator/ideal spring is. Second, it's an empirical formula that is approximately correct in many circumstances. It is literally the same thing as searching for the minimum of a function by setting the derivative of the funct...
<span class="math-container">$F = -kx$</span> is the definition of a harmonic oscillator. It's not something that's proven. Most real systems can be reduced to a harmonic oscillator for sufficiently small displacements from the equilibrium; the proof of that involves Taylor expansion. There's a <span class="math-conta...
https://physics.stackexchange.com
224,347
[ "https://physics.stackexchange.com/questions/224347", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/83398/" ]
This sounds like a daft question, but I'm serious. Translation and rotation are clearly different -- the symmetry between them is broken by Newton's Laws. But in the Lagrangian/Hamiltonian frameworks, they look extremely similar! The Lagrangians for free rotation and free translation are exactly the same, up to the r...
I am not sure exactly how to approach this question, but I feel a little side information could help both you or other potential answers narrow down some ideas. Let us take the group $SE(3)$ the special Euclidean group in three dimensions. Here we will denote group multiplication as $(\tilde{\mathcal O},\tilde{r})(\m...
Good question; I don't have an answer for you, however <blockquote> The symmetry is broken by Newtons Laws </blockquote> Formally, I supposed Newtons laws expressed linearly looked very similar to it expressed rotationally; ie in the first law, a particle in uniform motion remains in uniform motion - ditto for a ro...
https://physics.stackexchange.com
222,928
[ "https://stats.stackexchange.com/questions/222928", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/45326/" ]
Let's say I estimate two models, $M_{0}$ and $M_{1}$. The posterior odds ratio for for model $M_{0}$ against $M_{1}$ given the data, $y$, is, $\frac{Pr\left(M_{0}\mid y\right)}{Pr\left(M_{1}\mid y\right)}=\frac{Pr\left(M_{0}\right)}{Pr\left(M_{1}\right)}\cdot\frac{f\left(y\mid M_{0}\right)}{f\left(y\mid M_{1}\right)}$...
The distribution of $X_i^2$ is chi-square (and also a special case of gamma). The distribution of $\frac{X_1^2}{X_1^2 + \cdots + X_d^2}$ is thereby beta. The expectation of the square of a beta isn't difficult.
<strong>This answer expands @Glen_b's answer.</strong> <hr> <blockquote> <strong>Fact 1:</strong> If <span class="math-container">$X_1$</span>, <span class="math-container">$X_2$</span>, <span class="math-container">$\cdots$</span>, <span class="math-container">$X_n$</span> are independent standard normal distribut...
https://stats.stackexchange.com
494,900
[ "https://stats.stackexchange.com/questions/494900", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/260763/" ]
Say I have 4 or more algorithm types (logistic, random forest, neural net, svm, etc) each of which I want to try out on my dataset, and each of which I need to tune hyperparameters on. I would typically use cross validation to try and tune my hyperparameters, but once tuned, how do I avoid generalization error from sel...
As @DikranMarsupial say, you need a nested validation procedure. In the inner e.g. cross validation, you do all the tuning of your model - that includes <em>both</em> choosing hyperparameters and model family. In principle, you could also have a triply nested validation structure, with the innermost tuning the respecti...
Just to add to @cbeleites answer (which I tend to agree with), there is nothing inherently different about nested cross validation that it will stop the issue in the OP. Nested cross validation is simply the cross validated analog to a train/test split with cross validation performed on the training set. All this serve...
https://stats.stackexchange.com
240,968
[ "https://softwareengineering.stackexchange.com/questions/240968", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/45335/" ]
As our team is growing I've noticed that different developers put their class methods in different orders. For instance: <pre><code>var Foo = Backbone.Model.extend({ someVar: {}, initialize: function() {...}, fetch: function() {...}, handleFetchRepsonse: function() {...}, getFoo: function() {.....
Everyone <em>will</em> have their own different preferred standard, but it's important for everyone to put their ego aside for the betterment of the team and stick with a consistent standard. Code reviews are a good way to enforce a coding standard. What the specifics of the coding standard are up to you and your tea...
It's a matter of team policy, just like naming conventions. It <em>is</em> a good idea to have an accepted order for the sake of readability, so long as most people follow it. As you say, there are a couple of options: <ul> <li>No order at all.</li> <li>Properties, methods, and fields grouped by subject (thing, readT...
https://softwareengineering.stackexchange.com
870,501
[ "https://math.stackexchange.com/questions/870501", "https://math.stackexchange.com", "https://math.stackexchange.com/users/131740/" ]
I have what many on here would consider an elementary question, but I would very much appreciate responses that use only elementary ideas, if possible, so that I can understand them. I would also appreciate detailed rather than brief responses. By construction, $\mathbb{Q} \subseteq \mathbb{R}$. The rationals are <e...
In a metric space one can speak of a sequence of approximations which grow arbitrarily precise in the limit. One can phrase this in terms that do not actually assume there is a limit - namely, through the use of Cauchy sequences. A metric space fails to be complete if one can provide such a sequence of approximations g...
$\mathbb R\setminus \mathbb Q$ has the property of being the complement of a proper subgroup of an uncountable group. If $G$ is an uncountable group and $H$ is a subgroup with $H\neq G$, then $G\setminus H$ is uncountable. If $H$ is uncountable, let $a$ be any element of $G\setminus H$, and then $aH$ is an uncountabl...
https://math.stackexchange.com
477,363
[ "https://physics.stackexchange.com/questions/477363", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/230888/" ]
Let's consider a system in state <span class="math-container">$^3$</span>D<span class="math-container">$_1$</span>:<br> <span class="math-container">$$\vec{L}^2=L(L+1)=6 $$</span> <span class="math-container">$$\vec{S}^2=S(S+1)=2$$</span> <span class="math-container">$$\vec{J}^2=J(J+1)=2$$</span> According to Wigner-Ec...
You are misinterpreting W-E theorem. Let me review it for your example. You are given two irreps, the one for <span class="math-container">$\vec S$</span>, of dimension 3, and the one for <span class="math-container">$\vec L$</span>, of dimension 5. Then you build up their direct product, which is of dimension 15 and r...
<span class="math-container">$\let\l=\lambda \def\bJ{{\bf J}} \def\bL{{\bf L}} \def\bS{{\bf S}} \def\cD{{\cal D}} \def\cG{{\cal G}} \def\cV{{\cal V}} \def\ket#1{|#1\rangle} \def\frac#1#2{{\textstyle{#1\over#2}}} \def\half{\frac12} \def\a{^{(3)}} \def\b{^{(5)}} \def\c{^{(7)}} \def\d{^{(15)}} \def\Da{\cD\a} \def\Db{\c...
https://physics.stackexchange.com
33,377
[ "https://stats.stackexchange.com/questions/33377", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/12975/" ]
I have data sets of the returns of two indexes in the same market (two different sets of stocks constituting each index), with 496 observations for each. I want to compare if the means are statistically different. I believe the variances are different, so I think I have to check if the variances are statistically diffe...
At the current moment (version 1.2-10, 2012-05-05) it seems that the unbalanced case is not supported. <strong>Edit:</strong> The issue of unbalanced panel data is solved in version 2.2-2 of plm on CRAN (2020-02-21). Rest of the answer is assuming version 1.2-10: I've looked at the code, and the final data preparation ...
Did you try to convert your data to <code>pdata.frame</code>? I have an unbalanced panel also, but <code>purtest</code> seems to work with unbalanced panel if the data is <code>pdata.frame</code>. But I might be wrong too:) However in <code>?purtest</code> authors write: <pre><code>"object, x Either a 'data.frame...
https://stats.stackexchange.com
4,190,616
[ "https://math.stackexchange.com/questions/4190616", "https://math.stackexchange.com", "https://math.stackexchange.com/users/850628/" ]
<blockquote> <span class="math-container">$$\lim_{(x,y)\to(0,0)} \frac{\sqrt{|y|}\sin^3(x)}{(x^2+y^2)^{1.5}}$$</span> </blockquote> My thoughts and work: <br> First of all I multiplied and dividing by <span class="math-container">$x^3$</span>, so I can get rid of the <span class="math-container">$\sin^3x$</span>. <br> ...
<span class="math-container">$$ \left| \dfrac{\sqrt{|y|} x^3}{(x^2+y^2)^{1.5}}\right|\leq \dfrac{\sqrt{|y|}|x|(x^2+y^2)}{(x^2+y^2)^{1.5}}\leq \dfrac{\sqrt{|y|} \sqrt{x^2+y^2}(x^2+y^2)}{(x^2+y^2)^{1.5}} = \sqrt{|y|}\to 0 \quad(x,y \to 0)) $$</span>
<span class="math-container">$$\frac {|x^{3}|\sqrt {|y|}} {(x^{2}+y^{2})^{1.5}} \leq \frac {|x^{3}|\sqrt {|y|}} {(x^{2})^{1.5}}=\sqrt {|y|} \to 0.$$</span>
https://math.stackexchange.com
102,416
[ "https://security.stackexchange.com/questions/102416", "https://security.stackexchange.com", "https://security.stackexchange.com/users/24305/" ]
I hope this is an appropriate place to ask this question. I've been thinking recently about public and private keys, and I'm wondering what the best practices are related to management of my own personal private keys. Specifically, if I regularly use three different computers (personal desktop, work desktop, laptop), a...
The question is a bit confusing. As I understand it, you're asking about logging in to a server, via SSH set up with <code>PubKeyAuthentication</code>, from any of your three machines. You should generate one pair of keys for each machine. In this way if one private key gets compromised you don't have to regenerate a...
Each keypair represents an <em>identity</em>. Sometimes it can be useful to have a different identity on each machine you use, but somethimes it can be useful to share an identity between devices. When you have a separate key for each device, then: <ul> <li>Your communication partners need to have the public keys for...
https://security.stackexchange.com
664
[ "https://scicomp.stackexchange.com/questions/664", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/549/" ]
I have a fortran 90 code that distributes blocks of computations (from a matrix) to multiple nodes in a cluster using MPI, but in each node, the for loops are executed in parallel using openmp. I tried using the following command: <pre><code>mpif90 mycode.f </code></pre> which produces the following output: <pre><c...
mpif90 is just a wrapper for your underlying fortran compiler, which adds the necessary options for finding the necessary libraries and/or include files/modules. You just need to add the options necessary for compiling/linking with OpenMP; that would be -fopenmp (for the gnu compiler suite) or -openmp (for intel); not...
Totally normally, with OpenMP enabled in the compiler and you including/linking MPI headers/libraries. Then when you start your job with mpiexec (or equivalent) the parts of your code written using MPI will run as MPI, parts marked with OpenMP pragmas (automatically or not) will run as OpenMP. There is nothing special ...
https://scicomp.stackexchange.com
323,614
[ "https://softwareengineering.stackexchange.com/questions/323614", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/235343/" ]
So I have been working on a C# Matrix library. I've been documenting it really good so far. The thing is I don't know if I should document my overloaded operators, I mean, it is kind of obvious, isn't it? Sample code: <pre><code>public static Matriz operator *(Matriz A, Matriz B) { if (A.map.GetLength(1) != B.m...
<blockquote> The thing is I don't know if I should document my overloaded operators, I mean, it is kind of obvious, isn't it? </blockquote> Simple answer: Then it won't take you very long to document it, will it? Just do it! Complicated answer: You're writing this documentation <em>for</em> someone to use, not fo...
An hour of commenting your code saves a week for those trying to add a feature to an existing code. I haven't seen overly-documented code aside from textbook examples. <blockquote> The thing is I don't know if I should document my overloaded operators, I mean, it is kind of obvious, isn't it? </blockquote> It can b...
https://softwareengineering.stackexchange.com
89,396
[ "https://security.stackexchange.com/questions/89396", "https://security.stackexchange.com", "https://security.stackexchange.com/users/6380/" ]
I own a website. Now today I find that when I load the site, Chrome shows "waiting for xxx.com" and some other unknown sites.<br> I never added content or links from these sites.<br> The website is running on WordPress.<br> What can be the cause of this issue?
WPA is the authentication and encryption system preventing people not knowing the right password to access a Wifi network. However, no matter if it is WPA2 protected or not, you may legitimately not trust Wifi networks from hotels and other public places. The usual advice in such condition is to <strong>use a VPN</str...
To check for information about nearby networks using an inbuilt OS X utility called <strong>Wireless Diagnostics</strong>, follow the steps: <code>1. Option+Click on the WIFI Menu Icon. 2. Click on "Open Wireless Diagnostics". 3. As Wireless Diagnostics opens, go to Menu Item "Window" and select 'Scan'.</code> This...
https://security.stackexchange.com
605,250
[ "https://electronics.stackexchange.com/questions/605250", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/305655/" ]
I'm an avid DIY'er recycling some LEDs from a TV. It uses 50 LEDs in series, supplied by 160 V, and the PSU says 160 V @ 400 mA. So my target is to provide 3.2 V @ 400 mA in my own circuit. I would like to drive them with my 12 V constant voltage power supply, which is adjustable from 10 V up to 14 V. I understand how ...
First - under-supplying (starving) the LEDs with no series resistor is <em>not</em> a good idea. The conduction &quot;knee&quot; of an LED is not perfectly square. With no current limiting, the LEDs probably will fail. <blockquote> What I don't understand is what happens to the circuit upon voltage fluctuations. </bl...
Short answer: the lower the voltage drop on your resistor, the more voltage fluctiations in your supply voltage will &quot;hurt&quot;. That's because the voltage drop across the LEDs can be assumed constant. So the whole voltage change will be on your current limiting resistor and the current will change according to o...
https://electronics.stackexchange.com
44,145
[ "https://softwareengineering.stackexchange.com/questions/44145", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/15177/" ]
I'd like to throw this question out there to interestingly see where the medium is. I'm going to admit that in my last 12 months, I picked up TDD and a lot of the Agile values in software development. I was so overwhelmed with how much better my development of software became that I would never drop them out of princi...
Since I got addicted to unit tests more than 10 years ago, in the majority of my workplaces I was the first who has ever heard about these. Nevertheless I kept writing my little unit tests whenever I could, and estimating the cost of unit testing into my tasks. Whenever someone asked about my coding habits, I told what...
This is where I think all developers should also know a little bit of project management. Everything is a trade off between time, money, and resources. Consider yourself the resource. In my 12 years of programming I don't think I have ever completed a project and thought of it as done, or complete in my mind. There ...
https://softwareengineering.stackexchange.com
7,244
[ "https://physics.stackexchange.com/questions/7244", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/2656/" ]
Facts agreed on by most Physicists - GR: One can't apply Noether's theorem to argue there is a conserved energy. QFT: One can apply Noether's theorem to argue there is a conserved energy. String Theory: A mathematically consistent quantum theory of gravity. Conclusion - If one can apply Noether's theorem in String T...
In any theory which includes General Relativity, there is no locally conserved energy. The reason is that energy creates a gravitational field which has energy itself, so "gravity gravitates". There is a local quantity (the energy-momentum tensor) which is <em>covariantly</em> conserved, and there are global quantities...
Within GR, there is a conserved stress energy pseudo-tensor. It is called a pseudo-tensor because it is not a tensorial quantity, it's transformation properties allow you to make the stress-energy of the gravitational field vanish at any point. This quantity can be derived by using Noether's prescription on the Einstei...
https://physics.stackexchange.com
246,488
[ "https://physics.stackexchange.com/questions/246488", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/53007/" ]
Dumb car crash question. I think this is a conservation of momentum problem. <ul> <li>In one scenario, two 4000 lb cars (car A and car B) each traveling at exactly 35 MPH in opposite directions have a perfect head on collision with each other.</li> <li>In the other scenario, one 4000 lb car (Car A) traveling at 35 M...
Your gut feel is correct. Both are exactly the same. Look at the acceleration in both scenarios. 35 mph to 0 in the time it takes for the cars to fold up and stop. Everybody gets this wrong. Good question.
Remember that it is not the speed that kills you, it’s the sudden stop at the end of the road ;) Translated into momentum conservation, this means that in your first scenario the two vehicles are approaching each other with a speed of 70 MPH whereas in the second the approach speed is only 35 MPH. The details of the ...
https://physics.stackexchange.com
1,490,970
[ "https://math.stackexchange.com/questions/1490970", "https://math.stackexchange.com", "https://math.stackexchange.com/users/279872/" ]
Can you explain me what does it mean this property of the supremum and infinum? If $A \subset \mathbb{R}$ and $c \in \mathbb{R}$, then we define $cA = \left\{ cx \: \middle| \: x \in A \right\}$. If $c \geq 0$, then $\sup c A = c  \sup A$, $\inf cA = c \inf A$. If $c &lt;0$ then $\sup cA = c \inf A$, $\inf c A = c \...
The approaches described in the answers already posted are the most natural ones. But the following may be of interest. By expanding, we can show that for any $x$ and $y$ we have $$(x-y)^2+4xy=(x+y)^2.\tag{1}$$ If $xy=1$ and $x+y=2$, then substituting in (1) we get $(x-y)^2=0$, and therefore $x=y$. Now from $x+y=2$ we ...
For the non-trivial way, suppose $x+y=2$, then $y=2-x$ and hence $x.(2-x)=1$, so $x^2-2x+1=0$. Now you can proceed from here.
https://math.stackexchange.com
1,063,894
[ "https://math.stackexchange.com/questions/1063894", "https://math.stackexchange.com", "https://math.stackexchange.com/users/167433/" ]
From what I could find, a <em>singularity</em> is a point at which an equation, surface, etc., blows up or becomes degenerate. And a <em>pole</em> of a function is an isolated singular point a of single-valued character of an analytic function $f(z)$ of the complex variable $z$ for which $|f(z)|$ increases without bou...
Hint: $$\ \frac{1}{3e^u+1}=\frac{1}{e^u(3+e^{-u})}=\frac{e^{-u}}{3+e^{-u}}$$ and now substitution $$\ e^{-u}=t, -e^{-u}du=dt$$
Let $x=e^u$, then you will have $du=\frac{dx}{x}$, thus your integral will reduces to $$\int{\frac{dx}{x(3x+1)}}=\int{\frac{dx}{x}}-\int{\frac{3}{3x+1}dx}=\ln{x}-\ln{(3x+1)}+C=\ln{\frac{x}{3x+1}}+C$$ Thus the solution is $\ln{\frac{e^u}{3e^u+1}}+C$
https://math.stackexchange.com
98,474
[ "https://security.stackexchange.com/questions/98474", "https://security.stackexchange.com", "https://security.stackexchange.com/users/76663/" ]
I want to connect with Firefox to my university campus proxy, in order to access subscribed research journals, but first I need to know, which of the transmitted data through the network are visible to campus admins. Will any of the following show up in their logs? <ul> <li>Other browser's internet activity </li...
If you define the local university proxy in Firefox, every byte of traffic generated by Firefox will be available to them. And that includes: <ul> <li>Time and date of every packet</li> <li>Source IP (that's you) and destination of every connection</li> <li>If not encrypted (SSL/TLS/VPN), every single byte <em>in clea...
If you've configured the proxy settings ONLY in Firefox, then it will not have any impact on the rest of the applications on your system, though system administrators will be able to see any unencrypted web browsing you do in Firefox. If you configure the proxy in Internet Options (either in the Control Panel or Inte...
https://security.stackexchange.com
124,726
[ "https://mathoverflow.net/questions/124726", "https://mathoverflow.net", "https://mathoverflow.net/users/2811/" ]
Let $D$ and $E$ be toposes and let $f_{\ast}\colon D\to E$ be the direct image part of a geometric morphism $(f^{\ast},f_{\ast})$ between them. Considered as categories, we have (covariant) power-object endofunctors on each: $$P_D\colon D\to D \hspace{.5in} P_E\colon E\to E$$ where, for a morphism $\phi$ in $D$ we have...
Since every power object is an internal Heyting algebra, and $f_*$ preserves the structure of internal Heyting algebras, there are trivial examples of such natural transformations corresponding to the constants $\top$ and $\bot$. Of course, this is uninteresting. Let me write $P^{\mathcal{D}}$ and $P^{\mathcal{E}}$ f...
A different way to describe the same answer that Zhen and Todd arrived at is to work in the internal logic of $E$. That way we may pretend that $f_*$ is the global sections functor $\mathrm{Hom}(1,-) : D \to \mathrm{Set}$, as long as we treat $\mathrm{Set}$ constructively. Then we have the components of a putative na...
https://mathoverflow.net
23,204
[ "https://quant.stackexchange.com/questions/23204", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/5888/" ]
I'm searching for information on the best way to generate scenarios to be used in VaR or ES calculations, for CDS spreads. Given that we need significant historical data in order to achieve a decent empirical probability distribution, I wonder what problems could exist. For single name entities. <ol> <li>Is it a pro...
I used to help manage a large CDS portfolio, and (along with the folks at RiskMetrics) we settled on an approach I reckon was pretty decent. First, let me say that market-data only simulations are the <em>wrong</em> way to go. Credit risk is sticky at various levels and then jumps like mad, so any given company's his...
<ol> <li>Market Risk VaR takes one year of history. Thus you wouldn't look 5-10 years of history. </li> <li>If you are using CDS prices only for pricing CDSs you don't need to, but if you have another model that takes CDS prices and links them to bonds, yes</li> <li>You don't need PCA. You can take quotes on CDSs close...
https://quant.stackexchange.com
2,103,952
[ "https://math.stackexchange.com/questions/2103952", "https://math.stackexchange.com", "https://math.stackexchange.com/users/407619/" ]
I am stuck at this question where I have to calculate what is big O of what, $n!$ and $n^\sqrt n$ I tried replacing n! by it's equivalent formula but it makes everything more complicated, I can't even think about doing it by induction. Any help would be appreciated
Note that $n!\ge \left(\frac{n}{2}\right)^{n/2}$. Hence, we have $$\begin{align} \frac{n^{\sqrt{n}}}{n!}&amp;\le \frac{n^{\sqrt n}}{(n/2)^{n/2}}\\\\ &amp;=\left(\frac{2}{n^{1-2/\sqrt{n}}}\right)^{n/2}\\\\ &amp;\to 0\,\,\text{as}\,\,n\to \infty \end{align}$$
A result I got $n!/ n ^ sqrt(n) $ ~ $\sqrt{2*pi * n} * (n/e)^n / n^ \sqrt n$ = $\sqrt{2 * pi } * \sqrt n * (n/e)^n / n^\sqrt n $ = $\sqrt{2 * pi} * \sqrt n * n^n / n^\sqrt n * e^n $ = $\sqrt{2 * pi} * n^{n+1/2} / n^\sqrt n * e^n $ = $\sqrt{2*pi} / n^{\sqrt n-n-1/2} *e^n$ = ?
https://math.stackexchange.com
50,952
[ "https://mathoverflow.net/questions/50952", "https://mathoverflow.net", "https://mathoverflow.net/users/7458/" ]
Sierpinski showed that, on the assumption of CH (in fact, equivalently to it), each point in the plane can be coloured (say) black or white so that every section of the plane parallel to the $x$ axis is "almost" white $-$ in the sense that all but countably many points of it are white $-$ while every section parallel t...
The answer to the last sentence in the question is no, for a silly reason, namely that a plane through the origin and a sphere about the origin have an uncountable intersection, in which only countably many points could be white and countably many black. The obvious way to evade that silliness is to replace planes and...
Here is a way to realize a positive version of the phenomenon: <b>Theorem.</b> If the CH holds, then there is a coloring of $\mathbb{R}^3$ into six colors, such that every line parallel to one of the coordinate axes uses only three of the colors and moreover is almost monochromatic, meaning that it uses only one color...
https://mathoverflow.net
4,287
[ "https://iot.stackexchange.com/questions/4287", "https://iot.stackexchange.com", "https://iot.stackexchange.com/users/1159/" ]
I am developing on an ESP32 devboard (esp8266, wroom). I need to get the partition table <em>of the currently running device</em>. This document contains a quite good documentation of its partition table. I can also read/write flash regions by the <code>esptool.py</code> and <code>parttool.py</code> tools. These can m...
The current tools of the ESP32 have no explicit option for that. However, the existing tools can be easily combined to do this. The partition table is located at <code>0x8000</code> (32768) on older, and on <code>0x9000</code> (36384) on newer systems. Anyways, its location can be found (and be set) at the <code>CONFIG...
I'm trying the following: <pre><code>gen_esp32part.py partable.bin </code></pre> on a file that is called &quot;partable.bin&quot; which is the extracted partition table using esptool. But gen_esp32part.py keeps throwing the following error: <pre><code>gen_esp32part.py: error: the following arguments are required: inpu...
https://iot.stackexchange.com
497,632
[ "https://electronics.stackexchange.com/questions/497632", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/251536/" ]
I'm a software engineer. As a programmer, I have an understanding of what my compiler does for me because I've manually written a close textual representation of what it outputs (e.g. assembly). For precise details of what's output I can look at the ELF/COFF/MachO specifications (e.g. the file type that it translates m...
Just like a procedural programming language goes through several steps (compile, assemble, link) to produce an executable, HDLs must pass through several processes before a usable configuration file for the FPGA is generated. These include <ul> <li>Synthesis --- convert the HDL code into a netlist describing connectio...
The physical primitive of an FPGA is a configurable logic block (CLB). Each logic block is given a dedicated location in memory, so-called configuration memory, that determines how it is configured and where it connects to. HDL ultimately ends up as a bunch of ones and zeroes, a so-called bitstream that is placed in ...
https://electronics.stackexchange.com
446,932
[ "https://stats.stackexchange.com/questions/446932", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/272196/" ]
I'm confused about the real-world interpretation of a certain probability. Say that in 1000 observed cases a certain event occurs 10 times. We can then say that the probability is 10/1000. Now, of course, this only tells us how often something may occur, not when (in a series of 1000 observations) it will occur. So i...
1) If in 1000 cases a certain event occurs 10 times, we wouldn't say that the probability (of the event occurring) is 10/1000=1%. More correctly we would say that this is an <em>estimator</em> of the true probability, and that 1% is actually the observed <em>relative frequency</em>. Chances are that the true probabilit...
this reasoning is correct because we are only estimating the situation. You might want to use a dice and roll it x times. You won't find a perfect 1/6 distribution per side because of imperfections on the dice/material and you might be able to influence the result by throwing the dice in a specific way. However, you...
https://stats.stackexchange.com
1,461,605
[ "https://math.stackexchange.com/questions/1461605", "https://math.stackexchange.com", "https://math.stackexchange.com/users/276322/" ]
I can't seem to prove this equivalence relation statement (Tools of the Trade, Paul Sally): Let $R$ be a relation on $X$ that satisfies: (a) For all a that are elements of $X$, $(a,a)$ is an element of $R$; (b) For all $a,b,c$ that are elements of $X$, if $(a,b)$, $(b,c)$ that are elements of $R$, then $(c,a)$ is a...
<ol> <li>reflexive : (given) all $\left(a,a\right)$ belongs to $R$.</li> <li>symmetric : if$\left(a,b\right)$ belongs to $R$, we know that $\left(a,a\right)$ also belongs to $R$, so by the second definition $\left(a,a\right)$ and $\left(a,b\right)$ belongs to $R$ implies $\left(b,a\right)$ belongs to $R$. so it is symm...
Property (a) already says that $R$ is reflexive, so in order to prove that $R$ is an equivalence relation, you need only show that $R$ is symmetric and transitive. For symmetry, suppose that $\langle x,y\rangle\in R$; you want to show that $\langle y,x\rangle\in R$. From (a) you know that $\langle x,x\rangle\in R$, and...
https://math.stackexchange.com
225,160
[ "https://mathoverflow.net/questions/225160", "https://mathoverflow.net", "https://mathoverflow.net/users/23758/" ]
Let $f\colon X\to Y$ be a surjective morphism of algebraic varieties, defined over an algebraically closed field. We take a morphism $\psi\colon X\to Z$, where $Z$ in another algebraic variety, that satisfies the following condition: for all $x,x'\in X$, $f(x)=f(x')\Rightarrow \psi(x)=\psi(x')$. This yields the exist...
If $f$ is finite surjective and unramified, I think that $\psi'$ is always a morphism. In fact we can prove that $f$ is an effective epimorphism, which means that letting $p_1,p_2:X\times_Y X\to X$ be the projections, any morphism $\psi:X\to Z$ such that $\psi p_1=\psi p_2$ factors uniquely through a morphism $\psi':Y\...
You need to assume that $Y$ is normal (see the counterexample at the end), and you need to assume that the characteristic is $0$, or else Frobenius morphisms are counterexamples. Also, assume that $f$ is quasi-finite (the reduction to the case that $f$ is quasi-finite is at the end). First of all, using Nagata compact...
https://mathoverflow.net
3,132,721
[ "https://math.stackexchange.com/questions/3132721", "https://math.stackexchange.com", "https://math.stackexchange.com/users/400711/" ]
<blockquote> Making use of the Cauchy-Riemann equations verify if the following function is differentiable at least in one point and if it is holomorphic <span class="math-container">$w=|z|\overline{z}$</span> </blockquote> I tried to solve the problem in the following way: <span class="math-container">$|z|\overlin...
It (probably, I can't access the full text of the paper) means "without". So <span class="math-container">$X \setminus \{x \}$</span> means "the set <span class="math-container">$X$</span> without the point <span class="math-container">$x$</span>", but usually the backslash is used for that. The LaTeX command for the s...
Without more context I would assume that the writer used the forward slash '/' instead of the more conventional backward slash '\' to denote set difference. Thus <span class="math-container">$A / B$</span> would denote the set of elements of <span class="math-container">$A$</span> which are not in <span class="math-con...
https://math.stackexchange.com
502,216
[ "https://stats.stackexchange.com/questions/502216", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/306393/" ]
Can you tell just from the statistics from polynomial regression specifically what type of relationship there is? Ive run the two following linear regression models: y= a+ bx_1+ bx_2 +bx_3 + bx_4 y= a+ bx_1+ bx_1^2 + bx_2 +bx_3 + bx_4 The second model gave me a better adjusted R and a lower standard error, however the ...
The obvious analogy here is to use independent estimators <span class="math-container">$Y_1,...,Y_c$</span> with expectations: <span class="math-container">$$\mathbb{E}(Y_i) = X^{p_i} \quad \quad \quad \sum p_i = k.$$</span> In theory this is possible so long as you have a method to construct the required estimators fo...
To illustrate the point that the answer depends on the underlying statistical model: If <span class="math-container">$Y\sim\mathcal E(1/X)$</span>, an exponential variable, then <span class="math-container">$$\mathbb E[Y^k]= X^k\Gamma(k+1)$$</span> meaning that <span class="math-container">$Y^k/\Gamma(k+1)=Y^k/k!$</spa...
https://stats.stackexchange.com
45,101
[ "https://mechanics.stackexchange.com/questions/45101", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/29133/" ]
Stupid? Yes, but not my fault, it was dark. 2001 Hyundai Tiburon, are there any fusible links in the starter/ignition system? Now I only get the interior lights, but no engine lights (oil, gas, on, seat belts). Thank you for your time. That's something I'm running out of.
Sounds like a couple of things are of concern. The motor should run with a low/dead battery and the alternator should provide for most electrical demands, so I would suspect the alternator, new or not doesn't matter, I have gotten brand new bad parts. Second, the car may have a large enough drain on the battery to dep...
In a situation like this, I always verify clean battery connections, and I verify the grounding of the battery. As an example, on a VW TDI (diesel) someone complained of good starting when cold and poor starting when hot. They had a thermostat replaced about 4 weeks before this. She got stranded several times, and o...
https://mechanics.stackexchange.com
158,126
[ "https://dba.stackexchange.com/questions/158126", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/112834/" ]
Say I have tables <strong>organisation</strong>: <pre><code>id | name --------- 1 ACME 3 MGM </code></pre> <strong>org_type</strong>: <pre><code>type_id | org_id ---------------- 1 1 2 1 2 3 </code></pre> How do I query a list of org names where there type is 2, and no other type is l...
This query should help you out. It works with an delivered table named <code>org_type</code> what filters out double <code>org_id</code>. That delivered table will be matched with where filter <code>org_type.type_id = 2</code> to make sure that type_id = 2 <pre><code>SELECT org_type.type_id , org_type.org_id ,...
This is kludgy: <pre><code>SELECT o.name FROM organisation o JOIN org_type ot ON o.id=ot.org_id GROUP BY ot.org_id HAVING GROUP_CONCAT(DISTINCT ot.type_id) = '2'; </code></pre>
https://dba.stackexchange.com
7,990
[ "https://dsp.stackexchange.com/questions/7990", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/1324/" ]
I am confused as why do we need to represent the complex numbers with the imaginary y-axis if we can simply represent them as (x,y) ? I've read that Multiplication by <em>i</em> is an anti-clockwise rotation of a quarter-circle over y-axis. <img src="https://i.stack.imgur.com/1wP8S.jpg" alt="enter image description h...
Yes, in signal processing, complex numbers are usually visualized on the complex plane, as you have said. The reason is that if you put them on a plane, then you are able to measure two important quantities: 1) <em>Magnitude</em>, which is $\sqrt{x^2 + y^2}$ 2) <em>Phase</em> angle between your point and the origi...
For one definition of complex numbers, the symbology "a + ib" and "(a,b)" are equivalent representations as long as the operations on those symbols completely follow the set of rules for complex arithmetic (including multiplication implying a rotation). The meaning is that complex arithmetic using such arithmetic rule...
https://dsp.stackexchange.com
540,081
[ "https://electronics.stackexchange.com/questions/540081", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/5563/" ]
What is the best way to shut down the analog front end of my sensor system for a low-power standby mode. My circuit is battery powered via a 3.3V buck/boost converter I would like my STM32 microcontroller to shutdown the analog circuitry (op-amps) before going into low-power mode. Is this as simple as putting a MOSFET ...
Maybe. You have to realize that the inputs (or even output if there is a pull-up) may power the op-amp through protection networks. If that is not an issue, then a high-side (eg. P-channel) MOSFET or PNP works fine. Some op-amps allow inputs in excess of the supply voltage, which is nice when your supply voltage is zer...
<blockquote> The combined current draw of the analog circuitry is only around 1mA </blockquote> Then, sure you can use a FET, but you can also power it from a microcontroller GPIO used as an output, it won't have any trouble outputting 1mA. Note this saves a FET but it will output the internal VCC of the micro, which m...
https://electronics.stackexchange.com
7,602
[ "https://chemistry.stackexchange.com/questions/7602", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/2003/" ]
According to Werner's theory, metal ions have two types of valency-primary and secondary, where the primary valency is said to be satisfied by negative ions only, and the secondary valency can be satisfied by positive ligand, negative or neutral molecule. My question here is: While formation of complex compounds, whi...
A certain number of ions, atoms or molecules closely associate around a central atom leading to the formation of distinct entity called <em>coordination complex</em>. The groups atoms or molecules linked to the central atom are said to be coordinated with the latter and their number gives the <em>coordination number</e...
Werner's theory proposed by alfred werner in 1898.He was awarded by noble prize in 1913. It explains about the formation of coordinate complex compounds, bonding of coordinate complex compounds, stability of coordinate complex compounds and isomerism of coordinate complex compounds. According to Werners theory each c...
https://chemistry.stackexchange.com
9,262
[ "https://physics.stackexchange.com/questions/9262", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/1876/" ]
Apologies if this question is a bit too chemistry-flavoured. In electron paramagnetic resonance spectroscopy, there's a practically ubiquitous convention of plotting the first derivative of the absorption with respect to field, rather than the simple absorption. Why is this?
Sorry I'm answering my own question, but a major figure in biological EPR popped in and informed me that the reason EPR spectra are taken as first derivatives is largely historical - old EPR spectrometers had large linearly field-dependent baseline shifts which could be eliminated easily by taking the first derivative,...
The first derivative exploits minor differences in the absorption curve that when taken yields a chracateristic curve for a particular species of analysis. The subsequent EPR spectra can be analyzed and can provide information about material and the properties based on the hyper fine splitting and other details.
https://physics.stackexchange.com
21,395
[ "https://physics.stackexchange.com/questions/21395", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7823/" ]
I need some ideas on a problem. The first part says: Whats the posible rise in the temperature of the water falling 49.4 m in the Niagara Falls? That one was easy, with answer 0.112 Kelvin. ($\Delta T = \frac{g*h}{c_{H_2 O}}$) The second part asks what factors tend to prevent that rise in temperature? Im thinking ki...
You're right. The field will indeed extend outside the electric conductor as well. However, since there are very few electrons affected outside the conductor, the field strength will quickly drop outside the conductor. However, inside the conductor, where the field does move many additional electrons, those movements w...
Electric current, by definition, is a flow of charged particles. When someone says it is the propagation of the electric field, usually he means the following: The velocity of the electrons in the wires is very slow (few cm/s if I remember it right), but when one turn on the light he doesn't see any delay. The lamp s...
https://physics.stackexchange.com
340,211
[ "https://physics.stackexchange.com/questions/340211", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/159487/" ]
I am a science fiction writer with an undergrad level of understanding in this particular area. I am trying to figure out how the changes in the atmosphere will affect the higher end of the radiation spectrum. I know that as of now the amount of x-ray to gamma radiation that the atmosphere allows through is minute, but...
Interpretation of equations must be consistent with the physical reality. Your graph shows values of $T$ and $\omega$ which are -ve; the former is not realisable, the latter is not meaningful. The tension in the string is given by $T\cos\theta=mg$. The minimum tension is $mg$ when $\theta=0$ and it grows infinitely la...
I think gravity has its effect because here $T\cos(\theta)=mg$. So we have $\theta=\cos^{-1}\Big(\frac{mg}{T}\Big)$. Now you have pointed out $T=10^4 N$. We can also calculate the inclination angle ($\theta$), plugging the value of $m=0.5$kg and $g=10 m/s^2$ as, $$\theta=\cos^{-1}\bigg(\frac{0.5 \times10}{10^4}\bigg)=\...
https://physics.stackexchange.com
138,355
[ "https://dba.stackexchange.com/questions/138355", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/37869/" ]
I have a table that represents a specific type of action. Let's call it <code>[ACTION]</code>. An action can be performed by a user (<code>[USER]</code>), so I have the relation <code>[USER] 1:N [ACTION]</code>. The user can have children (<code>[CHILD]</code>), so <code>[USER] 1:N [CHILD]</code>. The problem starts by...
I see 2 options to implement this. The first would be what you already have, with a minor adjustment, to enforce this part: <blockquote> What I'm seeking is a solution where an action (investment) cannot be made for a child the user has no relationship to. In other words, the father/mother can only invest for him/he...
If this is about real people then child may became a user some time and may have his/her children. Also a child may have two parent. So i'd better have a PERSON instead of USER, a CHILD_PARENT and ACTION this way (pseudocode). The only but essential difference from ypercube's answer is CHILD_PARENT structure. I also fe...
https://dba.stackexchange.com
541,448
[ "https://physics.stackexchange.com/questions/541448", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
I don't see how this implicit theorem Sakurai states in his book on QM on page 31 can be proven in general <blockquote> Assume that we have found a maximal set of commuting observables; that is, we cannot add any more observables to our list without violating <span class="math-container">$$[A,B]=[B,C]=[A,C]=...=0...
Like all proofs about properties of "maximal" sets in any context, this one too proceeds by assuming that we have a set that lacks the property and then constructing something we can add to the set, showing it was not maximal: Assume we have a set of <span class="math-container">$n$</span> operators <span class="math-...
A physical way to think about this is that, if you have a degeneracy then you have a symmetry. Namely, if <span class="math-container">$|1\rangle,|2\rangle$</span> are states with the same set of eigenvalues <span class="math-container">$\lambda_1,\ldots,\lambda_n$</span> under <span class="math-container">$A_1,\ldots,...
https://physics.stackexchange.com
624,176
[ "https://electronics.stackexchange.com/questions/624176", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/291301/" ]
If the load in Thevenin's theorem happens to be a circuit instead of a single resistor, must this loaded circut contain only resistors or may it contain also voltage or current sources, etc.?
Let's assume you have any circuit named X which contains voltage sources, current sources, resistors, capacitors, inductors and linear amplifiers, but absolutely no parts where currents and voltages depend on each other obeying some non-linear equation. Take any 2 nodes of X, say A and B. Thevenin equivalent of X in re...
It may contain anything, however, the first circuit must be linear.
https://electronics.stackexchange.com
2,341,583
[ "https://math.stackexchange.com/questions/2341583", "https://math.stackexchange.com", "https://math.stackexchange.com/users/458544/" ]
I want to find the value of $x$ in this equation, by using logarithms. $ \ 18^{4x-3} = (54 \sqrt{2})^{3x-4} \ $
HINT: $$18=(3\sqrt2)^2$$ and $$(3\sqrt2)^3=?$$ So, take logarithm in both sides with respect to base $3\sqrt2$
Let's try this way $$18^{4x-3}=3^{2(4x-3)}\times 2^{1(4x-3)}$$$$(54\sqrt2)^{3x-4}=3^{3(3x-4)}\times2^{\frac{3}{2}(3x-4)}$$and$$18^{4x-3}=(54\sqrt2)^{3x-4}$$so $$3^{2(4x-3)}\times 2^{1(4x-3)}=3^{3(3x-4)}\times2^{\frac{3}{2}(3x-4)}$$equating powers of $2$ or $3$ you get$$8x-6=9x-12$$$$x=6$$
https://math.stackexchange.com
19,008
[ "https://physics.stackexchange.com/questions/19008", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/6913/" ]
If we can already predicts accuratelly motion on molecular levels, what stops us from developing small robots to, for instance, navigate through our blood vessels looking for cancerous cells and destroying them? What are the predictions for when we will able to do this? If someone is very interested on this goal and w...
I think the real answer is that when it comes to nanorobots, the materials we're using readily oxidise. Put them out of a vaccum and they're toast the instant they come into contact with the atomosphere. Biology manages to deal with this by using a different material set, and encapsulating everything pretty well so th...
I don't believe that the materials we use for engineering on the macroscopic scales, gears and wheels and metals and so forth, will be appropriate for nano-devices. Macroscopic devices are usually built out of chemically homogenous materials, which do not afford flexibility in knowing where to cut and splice to design ...
https://physics.stackexchange.com
237,737
[ "https://electronics.stackexchange.com/questions/237737", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/110944/" ]
Is there any way to fetch the current time from the 800c GSM module. I tried the following commands: <pre><code>AT+CENG=2 AT+CLTS=1 AT+CCLK? </code></pre> Output: <pre><code>+ceng:"4/01/01,00:35:+22 </code></pre> Not getting the updated date and time from network.
i tried the following commands to get the correct time from the network. <pre><code>AT+COPS=2 AT+CLTS=1 AT+COPS=0 AT+CCLK? </code></pre>
<pre><code>AT+CREG? AT+CLTS=1 AT+CFUN=0 AT+CFUN=1 AT+CCLK? </code></pre> ......Got the time and date perfectly
https://electronics.stackexchange.com
328,675
[ "https://physics.stackexchange.com/questions/328675", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/153969/" ]
I am a layman when it comes to Physics and equations, but I always believed that most police forces in the country viewed speed limit exceeding before prosecution on the basis of 10% + 2. So if you were doing up to 35mph in a [30 area] being ((30 * 1.10)+2) they would not prosecute; similarly in a [70 area] it would b...
The gravity of a black hole is the measure of by which a frame is transported. This is measured by the symmetries of the spacetime, which is with the Killing vectors. The killing vector for the Schwarzshild metric is $K_t~=~(1~-~2m/r)^{1/2}\partial_t$, and $m~=~GM/c^2$. The horizon radius is of course $r_s~=~2m$. The s...
The singularity at the centre of a black hole is indeed a point, the Riemann tensor diverges there. When we talk about the size of a black hole, we usually mean the event horizon, which is a function of the mass. The expression is: $$r = \frac{2GM}{c^2},$$ where $G$ is the gravitational constant, $M$ is the mass of t...
https://physics.stackexchange.com
673,987
[ "https://physics.stackexchange.com/questions/673987", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/317606/" ]
I know since <span class="math-container">$[\hat{L}^2,\hat{L}_x] = 0$</span> and <span class="math-container">$[\hat{L}^2,\hat{L}_y] = 0$</span>, they share the same eigenvectors. So this means spherical harmonics must be eigenvectors of <span class="math-container">$\hat{L}_x$</span> and <span class="math-container">$...
<blockquote> I know since <span class="math-container">$[\hat{L}^2,\hat{L}_x] = 0$</span> and <span class="math-container">$[\hat{L}^2,\hat{L}_y] = 0$</span>, they share the same eigenvectors. </blockquote> This isn't right. The correct statement is that <span class="math-container">$[\hat L^2,\hat L_x]=0$</span> (alo...
By spherical symmetry (if your problem has spherical symmetry), the eigenvalues of <span class="math-container">$\hat L_x$</span> and <span class="math-container">$\hat L_y$</span> must (separately) be the same as those of <span class="math-container">$\hat L_z$</span>. However, the eigenvectors of <span class="math-co...
https://physics.stackexchange.com
179,860
[ "https://softwareengineering.stackexchange.com/questions/179860", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/72210/" ]
The 'continue' keyword in Java (and probably in many other programming languages) is used to skip further execution of the current iteration. Why was the name 'continue' chosen? Why not something more straightforward like 'skip' ?
While most likely not a very big difference and programmers would have been able to handle it just the same: "continue" makes it clear that the loop will go on processing data (stop the details, continue the loop), while "skip" could be thought of as terminating the loop totally (like break in C++). It's one of those ...
I guess it might have to do with history of programming languages. To ask why it is continue in Java is to ask why it is continue in C++, which is to ask why it is continue in C, Algol etc. To my knowledge, Fortran was the first to have a CONTINUE statement, actually a no op. It was just there to make it possible to ...
https://softwareengineering.stackexchange.com
316,923
[ "https://softwareengineering.stackexchange.com/questions/316923", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/187852/" ]
Concise problem definition: <pre><code>given n and {a,b,c}; (1 ≤ n, a, b, c ≤ 4000); Constraint -&gt; a*i + b*j + c*k==n (i,j,k&gt;=0); Objective-&gt; maximize(i,j,k) </code></pre> Examples: <pre><code>n=47 and a=7,b=5,c=8 -&gt; max=9 (i=1,j=8,k=0) == 7*1+5*8+8*0=47 n=7 and a=5,b=5,c=2 -&gt; max=2 (i=1,j=0,k=1) o...
The OP remarked in a comment that he found the problem tagged as "brute force and DP". Which is absolutely ridiculous. Here's the linear time solution: <ol> <li>Observe that the order of a, b, c is quite irrelevant, so sort them to make a ≥ b ≥ c. </li> <li>Calculate g = gcd (a, b, c) (greatest common divisor). If n ...
Take the third loop: It is absolutely unneccessary. You check whether (a*i+b*j+c*k)==n. That means k must be equal to (n - a*i - b*j) / c. So a trivial change is to just calculate this one k and check whether it is a solution. Sort a, b, c such that a ≥ b ≥ c. Now its obvious that as j grows, k must shrink as much or...
https://softwareengineering.stackexchange.com
3,208,991
[ "https://math.stackexchange.com/questions/3208991", "https://math.stackexchange.com", "https://math.stackexchange.com/users/290406/" ]
<blockquote> Let <span class="math-container">$f \in L^2[a,b]$</span> and let <span class="math-container">$\displaystyle M(t)=\int_a^tf(s)dB(s)$</span>.<br> Find the quadratic variation process, <span class="math-container">$[M]_t$</span> , of <span class="math-container">$M(t)$</span>. </blockquote> Here the quad...
Yes this is true as it means that the range of A is the full space and therefore the kernel is reduced to the zero vector (according to rank-nullity theorem). This finally implies that the determinant isn't vanishing.
Let <span class="math-container">$y_i=\begin{pmatrix}y_{i,1}\\y_{i,2}\\\vdots\\y_{i,n}\\\end{pmatrix}\in\mathbb{R}^n$</span> for <span class="math-container">$i=1,2,\cdots, n$</span>, where <span class="math-container">$y_{i,i}=1$</span> and <span class="math-container">$y_{i,j}=0$</span> if <span class="math-container...
https://math.stackexchange.com
295,202
[ "https://softwareengineering.stackexchange.com/questions/295202", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/175261/" ]
We recently had a problem whereby a feature for our webapp (automatic signup) was postponed by management because they felt the start was too "cold" but they wanted all the other features we had been working on to go live. The problem is that this functionality had been merged into develop when it was finished along w...
One approach is feature flagging it. It can live in the code base but be disabled by configuration. Another option it to make a revert commit that reverts the feature merge so that it's not in develop any more. A new branch can be made which reverts the revert, and be left pending to merge later. If you're using Githu...
<blockquote> How could we have avoided this issue? </blockquote> From a process perspective, figure out: <ul> <li>Who was the decision maker to start this work?</li> <li>Why did the decision to release this feature change? <ul> <li>Missed expectations?</li> <li>Miscommunication?</li> <li>Inadequate business suppor...
https://softwareengineering.stackexchange.com
99,065
[ "https://stats.stackexchange.com/questions/99065", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/12492/" ]
As I understand it, Pearsons residuals are ordinary residuals expressed in standard deviations. I ran this Poisson regression: <pre><code>library(ggplot2) glm_diamonds &lt;- glm(price ~ carat, family = "poisson", data=diamonds) </code></pre> I then saved the Pearsons residuals and fitted values from the model: <pr...
The key point is that the standardization method for Pearson residuals is to divide the difference between observed values $y_i$ and the fitted Poisson mean $\hat\mu_i$ by the <em>theoretical</em> standard deviation implied by that fitted mean: $$r_i=\frac{y_i - \hat\mu_i}{\sqrt{\hat\mu_i}}$$ So if the model is badly...
For Poisson regression, you might try using the deviance residual instead of the Pearson residual. Deviance residuals are less biased if there is an unusually high number of zero case counts or mean values that are near-zero. In this case, Pearson is known to underestimate GOF. The likelihood, Pearson, and Deviance ...
https://stats.stackexchange.com
130,322
[ "https://mathoverflow.net/questions/130322", "https://mathoverflow.net", "https://mathoverflow.net/users/33209/" ]
I know that for general linear group <span class="math-container">$\mathrm{GL}(n,p^r)$</span>, one Sylow <span class="math-container">$p$</span>-subgroup is the set of all unitriangular matrices. I need a reference for this theorem. Thank you.
Steinberg's "Lecture Notes on Chevalley Groups" the Corollary of Lemma 54 on page 132. There is possibly a more modern reference. EDIT: Sorry the reference to Steinberg is not sufficient as he does not treat arbitrary finite reductive groups. However all that is needed is to obtain a slightly more general formula for ...
This is in the book Bogopolski, Oleg, Introduction to group theory. Translated, revised and expanded from the 2002 Russian original. EMS Textbooks in Mathematics. European Mathematical Society (EMS), Zürich, 2008. x+177 pp. Bogopolski uses it to prove the Sylow theorems.
https://mathoverflow.net
55,289
[ "https://electronics.stackexchange.com/questions/55289", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/17910/" ]
I'm going to buy a PoE injector kit, and I will supply it with an AC voltage, and with ethernet cable, and at the other end I will design a seperator circuit, but however most PoE injectors just give 40DC, with at most 400mA. I would like to get more amperage at the backend, is it a must to have a battery or any other ...
IEEE 802.11at (PoE+, PoE plus) can provide 25.5 W, about twice that of the previous 802.11af standard. It's common for recent wireless access points to require this higher-power implementation.
There are new standards coming out soon for UPOE for 60W and many non standard devices on the market that will deliver up to 51W. There are also non standard devices that go up to 96W. This is the theoretical limit for keeping the devices at safe voltage and current levels due to ITE standards.
https://electronics.stackexchange.com
102,157
[ "https://dba.stackexchange.com/questions/102157", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/66877/" ]
I use dynamic SQL in a stored procedure and must use a global temp table so the temp table and its data is available outside the instance when <code>sp_executesql</code> happens. I need the stored procedure to be able to be run multiple times simultaneously. Could I do something like this? ... <pre><code>BEGIN TRY W...
Based on your 2nd code snippet in the question, if the table already exists by the time you get to the <code>sp_executesql</code>, then you didn't need a global temporary table (<code>##table</code>) to begin with: a local temporary table (<code>#table</code>) would work just fine. Local temporary tables are available ...
I used Mark Sinkinsons suggestion and used a real table with a GUID field for distinction between data. ** Using @srutzky answer worked much cleaner, while both answers worked @srutzky 's answer was more efficient.
https://dba.stackexchange.com
2,900,170
[ "https://math.stackexchange.com/questions/2900170", "https://math.stackexchange.com", "https://math.stackexchange.com/users/344247/" ]
I am thinking specifically about $\mathbb{R}^2$ so I can visualize things. By "origin" I mean that they start at the same point. When we graphically represnt vectors we don't care where the starting point is (i.e. where the vector begins does not affect the vector; the vector $(1,2)^T$ is the same whether we draw it ...
Actually, if you just position the line segments that represent your vectors somewhere such that they intersect, the geometric angle between those line segments where they cross will be the angle between the vectors. Making the arrows cross right at their origin end is just one extreme of this. (In general there are ...
Define vectors as directed line segments with equality between two vectors holding iff they point in the same direction and have the same length. You can now define the angle without insisting that the two vectors have the same origin.
https://math.stackexchange.com
15,509
[ "https://mathoverflow.net/questions/15509", "https://mathoverflow.net", "https://mathoverflow.net/users/1915/" ]
Let $\Delta_k$ be the k-simplex and $\mu$ a non-negative measure over $\Delta_k$. I want to know if there exists a function $u : \Delta_k \to \mathbb{R}$ such that $u$ is convex, $u(e_i) = 0$ for all vertices $e_i$ of $\Delta_k$, and $M[u] = \mu$ where $M[u] = \det\left(\frac{\partial^2 u}{\partial x_j \partial x_k}\r...
Any set of values of $u$ at the vertices of $\Delta_k$ can be attained just by adding an affine function to $u$, which does not change $M[u]$. To see that the solution of your problem is not unique, consider $u(x,y)=ax^2+a^{-1}y^2+\mathrm{(affine\ terms)}$ with $a&gt;0$. Clearly $M[u]=4$ for any $a$. On the other han...
This is <em>not</em> an answer, but... I don't know of any previous work on this, but it appears to be well worth studying. Techniques inspired by convex geometry, like those used to solve the Minkowski problem, might work. The idea would be to first solve the equation for a finite discrete measure using a piecewise l...
https://mathoverflow.net
616,130
[ "https://electronics.stackexchange.com/questions/616130", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/311503/" ]
For some software I am writing, I coded classes of electrical systems that receive a voltage and return the current response. For the DC case that's easy: I pass a real number as argument, the voltage, and return another real number, the current. Now I need to extend this to the AC case and I need to pass the AC voltag...
<blockquote> Is there any common representation of voltage and frequency as a complex number? </blockquote> You shouldn't do this. First, as others have pointed out, complex numbers are often used to represent the magnitude and <strong>phase</strong> of AC voltage and current signals, so using a complex number to repre...
You have to deal with a voltage or current, a phase shift and a frequency. So you need three numbers, not only two when using complex numbers with the real and imaginary part. So I would try to make a user defined type, either of three real numbers or a complex number and a real number.
https://electronics.stackexchange.com
173,125
[ "https://softwareengineering.stackexchange.com/questions/173125", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/68929/" ]
Suppose you have to rewrite an entire application using Agile methodologies, how would you do it? I guess you could write a big bunch of user stories based in the behavior of your current system. And then implement them in small iterations. But this wouldn't mean that we have the requirements <strong>UP FRONT</strong...
Break it down into high-level epics. Take each functional area of the application, one step at a time. Break one epic down into a group of stories (usable chunks -- anything that improves the application) and manage those as you would if you didn't have an existing application, with one exception: If it is possible, m...
we just got through such an experience (me as scrum product owner). It took us two years to get to something releasable. But still, agile brought us many benefits. First: A total rewrite is by nature not agile at all. You should instead consider refactoring the existing product piece by piece. That has been discussed...
https://softwareengineering.stackexchange.com
246,320
[ "https://physics.stackexchange.com/questions/246320", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/112825/" ]
Can particles have wave nature even when they are at rest? I think this is possible due to the formation of standing waves
In quantum mechanics, particles cannot be at absolute rest due to Heisenberg's uncertainly principle. A quantum mechanical particle is neither a classical wave nor a classical particle. The question should be whether it manifests its particle nature or wave nature and that depends on how you probe it.
Classicly, particles at "rest" have a rest energy due to their rest mass, E = mc^2, and you can associate a frequency f to this energy by E = (hbar)*f as well as an associated wavelength, known as Compton wavelength. However, Quantum mechanicaly, the notion of a particle "beeing at rest" is almost meaningless, by unce...
https://physics.stackexchange.com
102,663
[ "https://mathoverflow.net/questions/102663", "https://mathoverflow.net", "https://mathoverflow.net/users/25005/" ]
Hello everyone, could someone gives the conditions for $\lambda$ that the following inequality is correct for any $0\leq x\leq\alpha$ $$\lambda x-1+e^{-\lambda x}\leq\lambda^2x\sqrt{\alpha x}$$ Here we know $2\leq\alpha\leq 4$ and $\lambda\alpha\geq 1$. Thanks for help!
It is true for any positive $\lambda$. If $x\le\alpha$, the right hand side is greater or equal to $\lambda^2x^2$. Hence it suffices to show that $u-1+\exp(-u)-u^2\le 0$ for positive $u$. It is easy to show that the function $f(u)=u-1+\exp(-u)-u^2$ is monotone decreasing and concave for $u\ge 0$.
We want to prove that $f(x) := \lambda^{2} x \sqrt{\alpha x} - \lambda x + 1 - e^{-\lambda x}$ is nonnegative for $x \in [0,\alpha]$. Assume that $f(\xi)=0$ for some $\xi \in (0, \alpha]$; we shall show that the derivative is positive at this point. Since $f(\xi)=0$, we may write $$ e^{-\lambda \xi} -1 = \lambda^2 \sqr...
https://mathoverflow.net
39,625
[ "https://datascience.stackexchange.com/questions/39625", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/60680/" ]
From a behavioral study data was extracted. The study was about how people change their eating behavior, following visual cues. There were to groups of people: One was shown visual cues and then it was recorded what they chose to eat and the other group was just shown random stuff or nothing and then it was recorded wa...
I think you <em>can</em> approach it as a logistic regression problem, where you will have a on/off (1/0) feature called "exposure_to_image". And your goal will be to detect if that coefficient is statistically significantly different than 0. If yes, then the probability of eating the item was influenced by the exposur...
What you are trying to estimate is the average treatment effect (ATE), i.e. the average effect of showing a random sample of people a picture of a cake on the likelihood that they choose to eat a cake later. There will be people who will eat cake anyway and people who will never eat cake in both treatment and control g...
https://datascience.stackexchange.com
284,572
[ "https://electronics.stackexchange.com/questions/284572", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/130553/" ]
I have the question "Two resistors of resistance, 3 ohms and 6 ohms, are connected in parallel across a battery having a voltage of 12V." <img src="https://i.stack.imgur.com/26LK0.jpg" alt="enter image description here"> I am asked to determine the total circuit resistance. Here is my attempt is this correct ? <img...
Yes, your answers are 100% correct. If you want to do a bit of a cross check, calculate the current through each resistor individually and add them.
Yes, both answers are correct.
https://electronics.stackexchange.com
2,405
[ "https://dba.stackexchange.com/questions/2405", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/1579/" ]
environment sql server 2005 In my stored proc i am calling another stored proc to insert several rows into several tables. The last row inserted i want to pass the identity of that row to the original stored proc. I am doing this by using <code>return scope_identity();</code> My understanding is <code>return</code> is...
All procedures have an integer return value. Your method would work, there is no hard and fast rule against it. Alternatively, you could return an output parameter. Example: <pre> create procedure YourProcedure @ID output as insert into YourTable (bunch of values) select @ID = scope_identity() go </pre> You ...
There are 3 ways: <ul> <li>OUTPUT parameter (as per datagod's answer)</li> <li>RETURN (as you noted)</li> <li>A simple SELECT which can be consumed say with ExecuteScalar</li> </ul> I'd usually use an OUTPUT parameter because it's the lightest way. Note: If you are inserting several rows into one table and only gett...
https://dba.stackexchange.com
5,387
[ "https://iot.stackexchange.com/questions/5387", "https://iot.stackexchange.com", "https://iot.stackexchange.com/users/9194/" ]
I just want to know how many clients are actively connected to my mosquitto server. Or even better, get a list of client ids connected to my mosquitto server. I read some documentation suggesting the topic <code>$SYS/broker/clients/connected</code> will give this information. But this command yielded no response and ...
Bah I figured it out. I need to put single quotes around the topic so that <code>$SYS</code> isn't interpreted as a variable. So like this: <pre class="lang-bash prettyprint-override"><code>mosquitto_sub -h myserver.myserver.myserver -p 9500 -t '$SYS/broker/clients/connected' -u &quot;my-user&quot; -P &quot;my-password...
This seems to work: <pre><code>netstat -ntp | grep ESTABLISHED.*mosquitto </code></pre> Which in my case outputs: <pre><code>tcp 0 0 10.42.0.2:1883 10.42.0.18:56553 ESTABLISHED 448/mosquitto tcp 0 0 10.42.0.2:1883 10.42.0.19:54037 ESTABLISHED 448/mosquitto ...
https://iot.stackexchange.com
17,887
[ "https://cs.stackexchange.com/questions/17887", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/7151/" ]
I'm trying to show that $L=\left\{w^rww^r:w \in \{0,1\}^*\right\}$ is not context free using the pumping lemma. I thought picking the string, $0^p0^p0^p$, would be a good candidate for this, but someone told me I might want to consider another string. Why is this? Any way in which I divide the string and then pump the...
For $p&gt;0$, you can always split $0^{3p}$ into $uvxyz$ such that $u=x=\varepsilon$, $v=0$, $y=0^2$, and $z=0^{3p-3}$. Such a split clearly satisfies $|vxy|\leq p$, $|vy|\geq1$. Finally, for all $n\geq0$, $uv^nxy^nz=0^{3(p-1+n)}$, which is in $L$, since $0^{3m}\in L$ for all $m$. Since you want to show, that for an a...
The string $0^{3p}$ can always be pumped so that it stays in $L$. Recall what the pumping lemma says: there exists a $p \in \mathbb{N}$ such that any $w \in L$ of size at least $p$ can be written as $w=uvxyz$ such that $|vxy| \leq p$, $|vy| \geq 1$ and $uv^ixy^iz \in L$ for all $i \in \mathbb{N}$. In your case, we can ...
https://cs.stackexchange.com
169,591
[ "https://security.stackexchange.com/questions/169591", "https://security.stackexchange.com", "https://security.stackexchange.com/users/95909/" ]
Let's say we want to new users to confirm their email address on a secure website (one that we don't want users making fake accounts impersonating other users). For UX reasons we may want: <ul> <li>Short as possible codes in case user types it in</li> <li>alphanumeric codes for easy typing</li> <li>Does not require us...
Provide a URL with a long identifier, user not having to login, and a short 4-digit code, where the user has to log in, and limit to for instance 5 attempts per 24hr. And it's not like it's hard to get an e-mail account today, so it's of limited overall value.
Put your necessary parameters like <strong>(user's email , request time , user ip , ...)</strong> in an array and add some random data as seed in your array. Then encrypt your array by <strong>AES-256</strong> and add the output to your url.<br> Now just send the unique url to user email.<br> If the received data just ...
https://security.stackexchange.com