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
25,577
[ "https://security.stackexchange.com/questions/25577", "https://security.stackexchange.com", "https://security.stackexchange.com/users/15505/" ]
Our firewall only allows HTTP port 80 but we have detected that a user accesses some other protocols and ports that we deny in our firewall. We know that he has developed an application (Console mmc.exe but using HTML) in his server that open other protocols via HTTP. He showed me his PC's desktop and I see that he ...
Very possible. This is why a firewall alone is not total security. For instance, if you allow port 80, but do not enforce only HTTP on port 80, then the port could be used for any type of traffic (ssh, irc, etc). All you need is a server on the other side of the firewall to re-route the traffic to the expected port on ...
It is certainly possible. It sounds like he did it in a rather convoluted way though. This is by definition the point of a proxy server which would do the job far more easily. A willing client and server can establish a connection on any port number and even if you are using a content aware firewall, it is a simple ...
https://security.stackexchange.com
112,651
[ "https://softwareengineering.stackexchange.com/questions/112651", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/16411/" ]
My application has an icon file which is stored in version control. Now tomorrow I might decide to change the icon. I'm debating between two possible naming conventions for the icon file: <ol> <li>Keep the filename fixed, e.g., application.ico</li> <li>Have the filename reflect the nature of the image, e.g., happyf...
<blockquote> Option 1 doesn't say what the file is. It could give the illusion that two wildly different images are somehow different "versions" of the same thing </blockquote> Well, it is, isn't it? I know that it might have changed from a smiley face to a corporate logo, but it's still different versions of a ...
Personally, I have always used a descriptive name for all my files, including icons, and even if it resource names have to be changed. In your case, I would actually take a third choice: <ul> <li>If the application was called XYZZY, then I would name the icon for the application "XYZZY.ico". No matter what the icon ...
https://softwareengineering.stackexchange.com
183,685
[ "https://softwareengineering.stackexchange.com/questions/183685", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/57589/" ]
<strong>Background</strong> <em>Software engineering is the application of a systematic, disciplined, quantifiable approach to the design, development, operation, and maintenance of software, and the study of these approaches; that is, the application of engineering to software.</em> My instructor, when explaining th...
"Operation" has to do with deploying, configuring, starting/stopping, and monitoring the software. For example, at my shop, development builds a tarball of the application and stages it to a specific location on the production server. Another group takes the tarball, expands it into the target directory, sets up Kerb...
SE is mostly BS, because software is not a physical artifact. Real engineering disciplines (electrical, civil, mechanical, chemical) are applied science. They accumulate knowledge about the limitations of materials and use that to build systems that are safe and effective. We estimate the time and cost of physical co...
https://softwareengineering.stackexchange.com
562,392
[ "https://physics.stackexchange.com/questions/562392", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/141502/" ]
I am currently studying <em>Principles of Optics: Electromagnetic Theory of Propagation, Interference and Diffraction of Light</em>, 7th edition, by Max Born and Emil Wolf. Chapter <strong>1.1.2 Material equations</strong> says the following: <blockquote> Metals are very good conductors, but there are other classes of ...
In a metal, the number of charge carriers is almost unaffected by temperature. There is an enormous number of free electrons per unit volume (compared to a semiconductor like germanium), so Fermi Dirac statistics applies. As the temperature increases, the scattering events of the electrons with the phonons increase bec...
The characteristic feature of metals is that the valence electrons of the atoms delocalise across the crystal lattice- this is an intrinsically quantum mechanical phenomenon. In essence, the electrons propagate as plane waves and this delocalisation lowers the energy of the electrons. As you increase the temperature, v...
https://physics.stackexchange.com
74,807
[ "https://cs.stackexchange.com/questions/74807", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/71401/" ]
Considering that there no cycles in the graph. I have seen the posts where the negation of the weights is suggested and to use Bellman-ford. But I was wondering if the inverse is possible.
Suppose you had a problem such that for any $x \in L$, there was a verifier $v$ such that $v$ could be checked against $x$ by a nondeterministic polynomial time algorithm. For a valid $(x, v)$ pair, there is some verifier $v'$ such that it takes polynomial time to check $((x, v), v')$ is a correct verification. But th...
If a problem has a verifier you can guess it with nondeterministic TM so it is automatically in NP.
https://cs.stackexchange.com
258,842
[ "https://math.stackexchange.com/questions/258842", "https://math.stackexchange.com", "https://math.stackexchange.com/users/52339/" ]
I'm trying to figure out some math problems. In particular I have this "In an office you have 6 clerks. How many ways can you select a team of 3 clerks?" and the solution given is: $$\binom{6}{3} = \frac{6!}{3!*3!} = 20.$$ I don't really understand how that works, so I'm trying to find some tutorial, but how exactly ...
So, since Henry told me that I wasn't wrong, I continued and got a really simple answer. Thanks! <pre><code>x = 2 * arctan(sqrt(y)/sqrt(1 - y)) sqrt(y)/sqrt(1 - y) = tan(x/2) 1/(sqrt(1 - y) * sqrt(1/y)) = tan(x/2) 1/tan(x/2) = sqrt(1/y - 1) 1/(tan(x/2))^2 + 1 = 1/y y = (tan(x/2))^2/((tan(x/2))^2 + 1) </code></pre> Th...
Two hints: <ul> <li><code>sqrt(y)/sqrt(1 - y) = 1/sqrt(1/y - 1)</code> i.e. $\dfrac{\sqrt{y}}{\sqrt{1 - y}} = \dfrac{1}{\sqrt{1/y - 1}}$ if $y \not = 0$</li> <li><code>(tan(x/2))^2 = (1-cos(x))/(1+cos(x))</code> i.e. $\tan^2\left(\dfrac{x}{2}\right) = \dfrac{1-\cos(x)}{1+\cos(x)}$ if $\cos(x) \not = -1$</li> </ul>...
https://math.stackexchange.com
17,826
[ "https://softwareengineering.stackexchange.com/questions/17826", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/7331/" ]
I see that most of the good programmers have the habit of reading big books for learning about technology. What does it really take to read technical books, apart from the real interest on the technology? How can I improve my ability to read these books?
We have really BIG eyes. All kidding aside, I'm one of the people who finds reading to be very difficult. If I'm working my way through a very large book, I try to read early in the morning, when I first wake up, when my mind is free of distractions. I find that I'm able to get engrossed much easier at that time of da...
How to eat an elephant? One bite at a time.
https://softwareengineering.stackexchange.com
364,360
[ "https://electronics.stackexchange.com/questions/364360", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/38261/" ]
I am looking at some SMA connectors. Now, I am using mostly 75 Ohm SMA connectors. Most of the connectors (cable mount) are 50Ohms. So, wat exactly is the difference between these 2 connectors. Apart from the impedance factor, how is the impedance controlled to make it 50 or 75 ohms ? Is it some special coat or the com...
The 75 ohm version of a 50 ohm connector (at least for the SMA, N and BNC types that I've studied) raises the impedance in two ways, while keeping the mechanical interface identical. a) Reduces the diameter of the pin through the connector, while keeping the diameter of the mating part. This increases the ratio outer/...
The ratio of root (L/C) = Zo Is controlled by Precision geometry ratio of the signal diameter to the inner diameter of the outer conductor for a given dielectric constant which is usually Teflon for PTFE
https://electronics.stackexchange.com
274,675
[ "https://electronics.stackexchange.com/questions/274675", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/110214/" ]
I created a simple Verilog module that displays random numbers. This module has a counter that counts up at every clock edge and at the press of a button, whatever the number is in the counter at that time is displayed. Here is my code: <pre><code>module counter (input wire in, input wire clock, input wire reset, outp...
Your problem lies in that you are describing an asynchronous circuit which requires its previous state. <pre><code>// output always @ (*) begin if (in) number = cur_state; end </code></pre> When <code>in</code> is high, all is well - <code>number</code> is assigned to the value of <code>cur_state</code>. However,...
The Combination of @Tom Carpenter and @toolic answers are almost correct. You need the non-blocking assignments if you would like to avoid simulation issues of combinational events happening after sequential events. Non-blocking assignment makes sure of that. Another thing that is important to add is that the in input...
https://electronics.stackexchange.com
431,604
[ "https://softwareengineering.stackexchange.com/questions/431604", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/396556/" ]
I have been assigned a ticket to update all node packages and dependencies in a react project to the latest possible version without breaking the application monolith as it is now; no further meaningful development of features is planned for this application. Although I plan to finish the task without much questioning,...
Updating a dependency generally grants you some benefits: <ul> <li>New features;</li> <li>Bug fixes;</li> <li>Security updates.</li> </ul> Even if you are not actively adding new features to your application, it may still be affected by bugs or security vulnerabilities caused by its dependencies, which may be fixed by ...
Generally speaking, I would advise to not update packages if you have no need for the update, purely because it runs the risk of breaking something you already had locked in as working. The big exception to this is security updates, if relevant for your particular package. To a lesser extent, performance upgrades might...
https://softwareengineering.stackexchange.com
10,493
[ "https://mathoverflow.net/questions/10493", "https://mathoverflow.net", "https://mathoverflow.net/users/2947/" ]
I am interested in the general form of the Kirchoff Matrix Tree Theorem for weighted graphs, and in particular what interesting weightings one can choose. Let <span class="math-container">$G = (V,E, \omega)$</span> be a weighted graph where <span class="math-container">$\omega: E \rightarrow K$</span>, for a given fie...
A very interesting weighting is obtained by just working with directed multigraphs (dimgraphs). 7 or 8 years ago, I applied the matrix-tree theorem applied to dimgraphs in conjunction with the BEST theorem to provide a structure theory for the equilibrium thermodynamics of hybridization for oligomeric (short) DNA stran...
For signed graphs we have an interesting matrix-tree theorem. A signed graph is a graph with the additional structure of edge signs (weights) being either +1 or -1. We say that a cycle in a signed graph is <i>balanced</i> if the product of the edges in the cycle is +1. A signed graph is <i>balanced</i> if all of its...
https://mathoverflow.net
415,190
[ "https://stats.stackexchange.com/questions/415190", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/252404/" ]
I would like to test the difference between treatments. Anova worked fine, but i have unequal variances (the normality according to shapiro test was OK). Actually one can see that treatment S has a zero variance. I tried Welch.test but it does not work. Please explain me why Welch Test does not work and how can i test ...
First, there are some puzzling anomalies in your data. <ul> <li>You have one missing observation out of four for each of the first two groups.</li> <li>Also, of particular interest is that some observations are to the nearest integer and some are to the nearest tenth. As you say, there is 0 variance in the last group,...
If one of the treatments has the same value for all replicates (e.g., R1= 9.0, R2= 9.0, R3= 9.0, R4= 9.0), the oneway.test shows p-value = NA. Like, treatment S in your example has the value of 100.0 for all replicates.
https://stats.stackexchange.com
538,540
[ "https://stats.stackexchange.com/questions/538540", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/-1/" ]
Bayesian model averaging is justified using the law of total probability which requires the the set of models that we average over to be exhaustive. Shouldn’t we prove that the set of models are exhaustive first? Even if you were to claim that this marginal density is an approximation; can w e prove that there exists ...
This can be formally viewed as conditioning on another event <span class="math-container">$C$</span> that asserts (i.e., another modeling assumption) that the true model is one of the models under consideration. <hr /> For simplicity, let's assume that we are interested in finding <span class="math-container">$P(A)$</s...
Clearly, such an assumption will realistically never hold (I'm sure there's some rare situations where it does - e.g. decay of atoms perhaps?). However, it may approximately hold (i.e. there's a couple of plausible models that might approximate the real data generating process pretty closely). Another justification for...
https://stats.stackexchange.com
255,290
[ "https://electronics.stackexchange.com/questions/255290", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/122349/" ]
How can a microcontroller-based device prevent battery drain while the product is on the store shelf? We are creating a waterproof, sealed in product without any buttons. This means the battery is attached to the PCB in production and can't be accessed after production. What I'm looking for is a way to prevent battery...
If your product has a microcontroller which consumes tolerable amounts of current in sleep mode, you could simply wake up every minute (or whatever interval is appropriate) and check if the box is open using whatever sensors you like (Hall for magnetic field, photoresistor for light, etc). The check can take very littl...
I've seen several on-the-shelf products lately that have a pliable plastic strip that is between one pole of the battery and its contact. The plastic strip is exposed to the outside, usually with "PULL ME" printed on it. Pull the plastic piece out, the battery contacts close and it's on. However, this would break yo...
https://electronics.stackexchange.com
149,120
[ "https://math.stackexchange.com/questions/149120", "https://math.stackexchange.com", "https://math.stackexchange.com/users/32016/" ]
Compute the series $$\sum_{k=0}^{\infty}\left(\frac{1}{4k+1} - \frac{1}{4k+2}\right)$$
One way is as follows. Note that \begin{align} \sum_{k=0}^{\infty} \left(\frac1{4k+1} - \frac1{4k+2} \right) &amp; = \sum_{k=0}^{\infty }\int_{0}^{1} (t^{4k} - t^{4k+1})dt\\ &amp; = \int_0^{1} \sum_{k=0}^{\infty} t^{4k} (1-t) dt\\ &amp;= \int_0^1 (1-t) \dfrac{1}{1-t^4} dt\\ &amp; = \int_0^1 \dfrac{dt}{(1+t^2)(1+t)} \en...
And more generally, if $a+b+c+d=0$, $$\sum_{k=0}^\infty \left(\dfrac{a}{4k+1} + \dfrac{b}{4k+2}+\dfrac{c}{4k+3}+\dfrac{d}{4k+4}\right) = \dfrac{a-c}{8} \pi + \dfrac{a+c-2d}{4} \ln(2) $$ EDIT: The generalization is that for positive integers $n$, if $\sum_{j=0}^{n-1} a_j = 0$ then $$ \sum_{k=1}^\infty \sum_{j=0}^{n-1}...
https://math.stackexchange.com
255,791
[ "https://mathoverflow.net/questions/255791", "https://mathoverflow.net", "https://mathoverflow.net/users/170703/" ]
I posted the following question on stackexchange but didn't get any replies; I'm hoping perhaps someone can help me here. I understand that for many iterative methods, convergence rates can be shown to depend on the condition number of the coefficient matrix $A$ in the linear equation $$Ax=y.$$ Therefore, if a precon...
The Frobenius norm remains the same if we do the orthogonal transform, so $$ \min_{P,Q} \left\| AP^{-1} - Q \right\|_F = \min_{P,Q} \left\| Q^{-1}AP^{-1} - I \right\|_F $$ which is essentially nothing more than a two-sided preconditioning. While for some reason you consider only right-sided in the beginning (usually I...
The answer is that looking for a matrix such that $AP^{-1} \approx I$ is a simplification. The convergence speed of Krylov subspace methods depends heavily on the clustering of eigenvalues of $AP^{-1}$ (in the normal case at least; in the non-normal case it's not that clear but clustering eigenvalues seems to be a good...
https://mathoverflow.net
224,778
[ "https://security.stackexchange.com/questions/224778", "https://security.stackexchange.com", "https://security.stackexchange.com/users/61739/" ]
I'm aware of multiple ways to store an encryption key, some very bad, such as in your codebase or elsewhere on the same server, and others much better such as where the encryption/decryption is done away from your application or is bound to specific hardware (e.g. with a H.S.M.). It strikes me that whatever method is ...
<blockquote> It strikes me that whatever method is used, if an attacker gains access to your codebase, they can simple write a script that would decrypt and export the database. </blockquote> <em>Preventive controls</em> - like securing the encryption key with an HSM - attempt to prevent that from happening. Bu...
When your software is user-facing, then a common technique is to give a password to the user they need to enter when launching the application. You use that password to derive the encryption keys for any other secrets. The password itself is stored nowhere except the head of the user. That means an attacker will need u...
https://security.stackexchange.com
396,494
[ "https://mathoverflow.net/questions/396494", "https://mathoverflow.net", "https://mathoverflow.net/users/306090/" ]
If <span class="math-container">$1\leq p&lt;\infty$</span>, it is easy to find nice necessary and sufficient equality conditions for the convolution inequality <span class="math-container">$$\lVert f*g\rVert_p\leq\lVert f\rVert_1\lVert g\rVert_p\qquad (f\in L^1(\mathbb{R}^n),\,g\in L^p(\mathbb{R}^n)),$$</span> for comp...
Here is a fairly simple condition. It uses the following notion: A family of functions <span class="math-container">$f_t\in L^1$</span> depending on a parameter <span class="math-container">$t$</span> in a measure space <span class="math-container">$X$</span> is said to <em>tend to <span class="math-container">$f$</spa...
Let <span class="math-container">$\theta_f = \frac{|f|}{f}$</span> (with any convention for <span class="math-container">$\frac{0}{0}$</span>, it doesn't matter), let <span class="math-container">$A_\epsilon = \{t \in \mathbb{R}: |f|(t) \geq \epsilon\}$</span>, and let <span class="math-container">$g_s$</span> be the s...
https://mathoverflow.net
147,885
[ "https://dba.stackexchange.com/questions/147885", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/100442/" ]
I have a staging (RAW) table that contains one field for to hold a person's first name, and another for a person's last name. I want to insert those value on a production (DBO) table, where the person's forename and surname will be concatenated: <pre><code>INSERT INTO [dbo].Test SELECT firstname + ' ' + lastname ...
<pre><code>INSERT INTO [dbo].Test select firstname + ISNULL(' ' + lastname,'') ,field1 ,field2 ,fieldn FROM RAW.Test </code></pre> Try this. It will concatenate empty string to firstname in case of NULL in lastname In case we are talking about Firstname that can be null your query should be: <pre><code>...
Liya has a nice solution. This is another that handles both the null case and the empty string last name case as well. <pre><code>INSERT INTO [dbo].Test select LTRIM(RTRIM (COALESCE(firstname,'') + ' ' + COALESCE(lastname,''))) ,field1 ,field2 ,fieldn FROM RAW.Test ; </code></pre> EDIT: Modified to allow...
https://dba.stackexchange.com
5,493
[ "https://mechanics.stackexchange.com/questions/5493", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/1776/" ]
I have a 1998 Acura Integra with 204k miles on it. Some mornings after the car has been parked in my driveway facing up a slight slope overnight with the handbrake set, the first time I apply the brakes while backing out causes this very loud metal on metal noise that reverberates through the car. The brakes are fine...
How humid is it outside when this happens? It could just be surface rust getting scraped away. This usually isn't very loud, but kind of a low metal on metal slushing/grinding sound. It may also be that your brakes are "resonating", which is a term I just invented to describe the somewhat loud, low reverberations that...
Honda's and Accuras are famous for using wear indicators that are shaped/oriented a specific way that causes them to grind only when you reverse. In all likelihood you have a worn brake pad and probably some rotors that need to be replaced at the same time.
https://mechanics.stackexchange.com
571,800
[ "https://physics.stackexchange.com/questions/571800", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/261812/" ]
I am reading the book <em>Scattering Amplitudes in Gauge Theory and Gravity</em> from Elvang and Huang. In section 2.6 they seem to suggest that the mass-dimension of the kinematic part of the amplitude is in 1-to-1 correspondence to the number of derivatives in the interaction term in the Lagrangian. For example, for ...
To quote from Griffiths (section 2.4.4 in third edition) <blockquote> <span class="math-container">$$ W=\frac12\sum_{i=1}^nq_iV(\mathbf r_i) \tag{2.42}$$</span> <span class="math-container">$$ W=\frac{\epsilon_0}{2}\int_\text{all space}E^2\,\text d\tau \tag{2.45}$$</span> </blockquote> <blockquote> Equation <span class...
I think that this misunderstanding is simply due to different contexts/definitions for the equations. The first equation, properly written as <span class="math-container">$$W = \frac{\epsilon}{2} \int E^2 d\tau$$</span> refers to the electrostatic potential energy stored by an electric field <span class="math-container...
https://physics.stackexchange.com
73,885
[ "https://mathoverflow.net/questions/73885", "https://mathoverflow.net", "https://mathoverflow.net/users/-1/" ]
Let $V$ be a real vector space. A bilinear form $\langle \rangle:V\times V\to {\mathbb{R}}$ induces a linear functional $\theta$ on the tensor product $V\otimes V$ given by sending the finite sum $\sum_i v_i\otimes w_i $ to $\sum_i \langle v_i,w_i\rangle$. Is there a name for this induced linear functional? In additi...
The correspondence you describe is part of the definition of the tensor product: $V \otimes W$ is defined to have the universal property that for any $U$, we have $$\operatorname{Hom}(V \otimes W, U) = \operatorname{Bil}(V \times W, U).$$ I wouldn't even give it a different name: the bilinear form is the same as the m...
I don't know a specific name for that, but I would call it associated. I wouldn't call it induced, because the map <span class="math-container">$\text{Bil}(V) \to (V \otimes V)^*$</span> is one-to-one, since every linear <span class="math-container">$T \in (V\otimes V)^*$</span> induces a bilinear form on <span class="...
https://mathoverflow.net
70,016
[ "https://softwareengineering.stackexchange.com/questions/70016", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/1711/" ]
It is common for software vendors to offer automatic updates. The research and installation of these updates can be done <ul> <li>at application startup</li> <li>through a service or process in the background (which often can be seen in the icon tray)</li> <li>Sometimes at the opening of a session or boot</li> </ul> ...
I'm sure each vendor has their own answers but here are a few guesses : <ul> <li>Consistent update mechanism across different operating systems</li> <li>Certain actions, like adding an item to Task Scheduler, requires Admin permissions on the box, which is something most users in the corporate world do not have.</li> ...
The reason software vendors write software on windows to perform their own software update checks is that they are full of software developers. Programmers write code to solve problems. The product needs to be updated. So it needs an updater. So they write an updater. Windows scheduler service is quite capable of do...
https://softwareengineering.stackexchange.com
1,433,132
[ "https://math.stackexchange.com/questions/1433132", "https://math.stackexchange.com", "https://math.stackexchange.com/users/86120/" ]
Consider tossing a cubic die once and let $n$ be the smallest number of dots that appear on top. Define two random variables $X$ and $Y$ such that: <ul> <li>$X=1$ if $n \in \left \{1,2 \right \}$, $X=2$ if $n \in \left \{3,4 \right \}$ and $X=3$ if $n \in \left \{5,6 \right \}$ and </li> <li>$Y=0$ if $n \in \left ...
<strong>Tabulate:</strong> $\boxed{\begin{array}{r|r} n &amp; 1&amp; 2&amp; 3&amp; 4&amp; 5&amp; 6 \\ \hline X &amp; 1&amp; 1&amp; 2&amp; 2&amp; 3&amp; 3 \\ \hline Y &amp; 1&amp; 2&amp; 0&amp; 1&amp; 2&amp; 0 \\ \hline (X{-}\mathsf E(X))(Y{-}\mathsf E(Y)) &amp; 0 &amp; -1 &amp; 0 &amp;0 &amp;1 &amp;-1 \end{array}}$
I think I've figured it out. The support of $E(XY) = \left \{0,1,2,3,4,6 \right \}$. So $E(XY) = \frac{1}{3} (0) + \frac{1}{3} (1) +\frac{1}{3} (2) + \frac{1}{3} (3) + 0 + 0 = 2$ So $Cov(X,Y) = 2-2=0$.
https://math.stackexchange.com
5,617
[ "https://stats.stackexchange.com/questions/5617", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/253/" ]
Let's say we have two factors (A and B), each with two levels (A1, A2 and B1, B2) and a response variable (y). The when performing a two way ANOVA of the type: <pre><code>y~A+B+A*B </code></pre> We are testing three null hypothesis: <ol> <li>There is no difference in the means of factor A </li> <li>There is no di...
I think it's important to clearly separate the hypothesis and its corresponding test. For the following, I assume a balanced, between-subjects CRF-$pq$ design (equal cell sizes, Kirk's notation: Completely Randomized Factorial design). $Y_{ijk}$ is observation $i$ in treatment $j$ of factor $A$ and treatment $k$ of fa...
An interaction tells us that the levels of factor A have different effects based on what level of factor B you're applying. So we can test this through a linear contrast. Let C = (A1B1 - A1B2) - (A2B1 - A2B2) where A1B1 stands for the mean of the group that received A1 and B1 and so on. So here we're looking at A1B...
https://stats.stackexchange.com
361,145
[ "https://mathoverflow.net/questions/361145", "https://mathoverflow.net", "https://mathoverflow.net/users/125868/" ]
For a Serre fibration of pointed topological spaces <span class="math-container">$f:X \to B$</span>, there is an action of <span class="math-container">$\pi_1\left(B,b_0\right)$</span> on the fiber <span class="math-container">$F$</span>. The construction of this action I'm familiar with uses a lift <span class="math-c...
(This answer is written in a model-independent fashion -- translate to your favourite formalism). For every path <span class="math-container">$\gamma:[0,1]\to B$</span> you get an isomorphism in the homotopy category <span class="math-container">$X_{\gamma0}\xrightarrow{\sim} X_{\gamma1}$</span> (where with <span clas...
Let <span class="math-container">$f:E\to B$</span> be a map of based spaces, and let <span class="math-container">$F$</span> be the homotopy fiber. Here is another way of constructing the action of <span class="math-container">$\Omega B$</span> on <span class="math-container">$F$</span>. By definition, there is a homot...
https://mathoverflow.net
171,739
[ "https://electronics.stackexchange.com/questions/171739", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/77064/" ]
I'm attempting to build a crystal radio, <img src="https://i.stack.imgur.com/0Va0H.jpg" alt="enter image description here"> and I have an old telphone cable with four copper wires, similar to the one pictured. <img src="https://i.stack.imgur.com/Sv9onm.jpg" alt="enter image description here"> I would like to use ...
Yes it will work. Many transformers are wound the same way. Each colour wire will be a winding on the inductor - connect them in series to create the largest inductor. You will need to use a variable capacitor to tune the frequency with this wire, rather than the picture shown which uses variable inductance. Also the...
This is the wrong type of wire. You need to use enameled wire for an adjustable inductor of that type, because you need to lightly sand off the insulating coating in the area which the wiper will contact.
https://electronics.stackexchange.com
146,509
[ "https://dba.stackexchange.com/questions/146509", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/103319/" ]
I have two mySQL queries. Individually, they give me what I'm looking for. However, I prefer to combine the results into a single set. First query. Simple selection from table 'profile'. <pre><code>SELECT id, first, last, TIMESTAMPDIFF(YEAR, dob, NOW()) AS age FROM profile WHERE active = 'Y' </code></pre> Results: ...
Try this : <pre><code>SELECT received_quantity , delivery_qty , unit_cost FROM tbl_inward_list WHERE datediff(current_date,date(date_created)) BETWEEN 31 AND 60; </code></pre> Similarly <pre><code>SELECT received_quantity , delivery_qty , unit_cost FROM tbl_inward_list WHERE datediff(current_date,date(d...
<pre><code>WHERE date_created &gt;= CURDATE() - INTERVAL 60 DAY AND date_created &lt; CURDATE() - INTERVAL 30 DAY WHERE date_created &gt;= CURDATE() - INTERVAL 90 DAY AND date_created &lt; CURDATE() - INTERVAL 60 DAY </code></pre> No, don't use 31 and 61; use the inequality. <code>CURDATE()</code> will...
https://dba.stackexchange.com
23,523
[ "https://softwareengineering.stackexchange.com/questions/23523", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/9087/" ]
I am currently a 3rd year computing science student at a Canadian University. I find it quite challenging, and extremely interesting. One thing that i have noticed is that each person i speak to that took a class 3 or so years ago learned much less than i did in the same class, and people who are taking 1st year class...
I don't know if it's harder or easier, but definitely different. I'm only a couple years out, but I've noticed that current students appear to me to have a more abstracted knowledge base, but lack fundamentals which cause them to falter on simple tasks. It's the whole 'calculator debate': "They can do higher order ...
Things change. 30 years ago, in computer graphics class, if you could light up a dot on a screen, you were doing good. Today, recursive ray tracing in C++ is a routine undergraduate programming assignment - and the images some of the kids produce are IMPRESSIVE. Teaching methods change. 30 years ago, the introducto...
https://softwareengineering.stackexchange.com
73,156
[ "https://chemistry.stackexchange.com/questions/73156", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/40365/" ]
I have been preparing lessons for some of my students about preparing acidic and basic solutions, and I keep finding pre-made labs in which the students "standardize a basic solution" by titrating it with an acid of "known" concentration. The problem is that the students create a solution of NaOH by measuring a certa...
Usually, if we're doing these for basic application or experimentation, standardization doesn't really matter. But when it comes to anything analytical where you start to involve calculations, standardization is a must. This is done with NaOH because it's hygroscopic and readily sucks up the moisture in the air. So wha...
Nope, it will not introduce, it will decrease the error. There are a list of compounds which are used for preparation of various standard solutions and appropriate protocols. The chemical structure for such compounds does not depends on external factors (following the protocol) and can be used to determine the concent...
https://chemistry.stackexchange.com
107,503
[ "https://softwareengineering.stackexchange.com/questions/107503", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/36465/" ]
At a web startup, is it more common to have an engineer working the front-end AND back-end of the feature (basically in charge of the whole feature)? Or have engineers separated between the back-end and front-end? Which ones are more beneficial and for what situations? The downside, I've noticed, regarding having one...
Here is my wisdom from 14 years experience: <ul> <li>if you have a startup, don't assign roles. Better hope that you assembled a good self organizing team. If everybody knows each other, everybody knows who does what the best. A project manager will only stand in the way.</li> <li>later on, the distinction between fro...
The best answer is from @Shark, but only the last part "It depends." In my experience, ~16 years or so, I've seen both options attempted in a variety of different configurations. Being a full stack developer myself, here's what I've come to learn: *(BE = Back End, FE = Front End) <h3>General Caveats Of Split Stack ...
https://softwareengineering.stackexchange.com
58,667
[ "https://math.stackexchange.com/questions/58667", "https://math.stackexchange.com", "https://math.stackexchange.com/users/14830/" ]
Prove that $x \neq 0,y \neq 0 \Rightarrow xy \neq 0$. Suppose $xy = 0$. Then $\frac{xy}{xy} = 1$. Can we say that $\frac{xy}{xy} = 0$ and hence $1 = 0$ which is a contradiction? I thought $\frac{0}{0}$ was undefined.
The proof is valid in any field $\rm\: K$ (though it might be circular depending on the context). Namely, $\rm\:0\ne x,y\in K\:$ $\:\Rightarrow\:$ $\rm\: 1/x,1/y\in K\:$ $\:\Rightarrow\:$ $\rm\:(1/x)(1/y) = 1/(xy)\in K\:$ $\:\Rightarrow\:$ $\rm\:xy\ne 0\:.$ The OP's proof is simply this proof recast into a proof by con...
The fault occurs immediately: "Suppose $xy=0$. Then $\frac{xy}{xy}=1$." This is not true, as the property $\frac{a}{a} = 1$ holds only when $ a\neq 0 $, and we have just assumed that $xy$ is indeed $0$. However, we can still go along the road of contraction. Suppose $xy=0$. By assumption $x\neq 0 $ so we may divide $...
https://math.stackexchange.com
220,972
[ "https://stats.stackexchange.com/questions/220972", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/121493/" ]
I would like to know if someone knows of a way to group the number of levels of a feature that has 100's (even 1000's) of levels to a smaller number of levels - also, what number levels it should reduce to e.g. should it reduce from 200 levels to 10, 15 or 20?
I think what the OP is asking is whether or not you 'retain the same information' (or most of it) if you reduce the number of levels of a factor, and how to code such a thing. But let me back up. Your statement: "With PCA you can reduce the number of features from 5000 to 10 and maintain a very similar accuracy betwee...
It is hard to say how to group the levels based on the information you provided. <ul> <li>It can depend on how much data you have. Suppose you have $1000$ data points, then you may want to group into $10$ levels from $100$ levels. However, if you have $1,000,000$ data points, may be you want to group into $100$ levels...
https://stats.stackexchange.com
18,487
[ "https://quant.stackexchange.com/questions/18487", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/15198/" ]
I am studying the Arbitrage Pricing Theory using Pairs Trading: Quantitative Methods and Analysis.In page 44 the author gives an example on how to calculate the covariance between two stocks. I will tell how the author do it first. There are two stocks using two factor model, for stock A, the two factor model is (0.5,...
Your questions is unclear but I guess you mean that for the return of stock A you find a model $$ r_A = (0.5, 0.75) (r_F^1, r_F^2) + \epsilon_A $$ where $r_F^i$ are the factor returns and $\epsilon_A $ is an uncorrelated error. Let us denote $e_A = (0.5, 0.75)$, the exposure of stock $A$ to the factors. For $B$ you h...
The factors are the same for both stocks, so there is just one factor covariance matrix for both A and B. Factor models are a way to <em>reduce</em> the dimension of a problem. If every stock had its own set of factors, this would increase the problem dimension.
https://quant.stackexchange.com
4,415,014
[ "https://math.stackexchange.com/questions/4415014", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1026367/" ]
Let <span class="math-container">$f(x)=e^{-1/x^2}$</span>, <span class="math-container">$x \not=0$</span>. Without using the chain rule, find <span class="math-container">$f'(x)$</span>. This is an easy problem using the chain rule, however, I am curious to see how one might do it with the definition of the derivative:...
<span class="math-container">$$\begin{align*} \frac{d}{dx} e^{-\frac1{x^2}} &amp;= \lim_{h\to0} \frac{e^{-\frac1{(x+h)^2}} - e^{-\frac1{x^2}}}{h} \\[1ex] &amp;= \lim_{h\to0} \frac{e^{-\frac1{(x+h)^2}} - e^{-\frac1{x^2}}}{-\frac1{(x+h)^2} - \left(-\frac1{x^2}\right)} \times \lim_{h\to0} \frac{-\frac1{(x+h)^2} - \left(-\...
The formula for the derivative, <span class="math-container">$\frac{2}{x^3}e^{-1/x^2}$</span>, is only valid for <span class="math-container">$x\neq 0$</span>, since the function <span class="math-container">$e^{-1/x^2}$</span> is not even defined at <span class="math-container">$0$</span>. However, if we define <span ...
https://math.stackexchange.com
271,214
[ "https://stats.stackexchange.com/questions/271214", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/155521/" ]
I've run a Kruskal Wallis test, and for some of the questions the p value is not significant. Would I report this in the same way as if it was significant, stating the df, test statistic and p-value? So it would be something like this a Kruskal Wallis test was conducted but the results were found not to be significant ...
Yes, non-significant results are just as important as significant ones. If you are reporting any result, always include the df, test statistic, and p value. And in that case, you should state the exact p-value, rather than generalising to >0.05
If you are publishing a paper in the open literature, you should definitely report statistically insignificant results the same way you report statistical significant results. Otherwise you contribute to underreporting bias.
https://stats.stackexchange.com
59,034
[ "https://chemistry.stackexchange.com/questions/59034", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/31622/" ]
So my chemistry teacher, when she talks about liquid substances she talks about them in reference to 3 words. She refers to liquid substance with one of these 3 words- 1)Aquesous form 2)Solution form 3)Molten form Can anyone please tell me the difference between these terms?
Take table salt, sodium chloride, for example. If you take table salt and dissolve it in water, you are making a salt solution. Any solution that uses water as the solvent is an aqueous solution. If, for example, you dissolved salt in ethyl alcohol, that would still be a solution but it would not be aqueous. Now ima...
so I will explain you. will aqueous is the term used for those solutions in which water is used as a solvent. solution consists of two components that is solvent and solute and it is a type of mixture. molten state is used for those when a solid substance is heated and it is melted and when cooled again it changes into...
https://chemistry.stackexchange.com
9,957
[ "https://mathoverflow.net/questions/9957", "https://mathoverflow.net", "https://mathoverflow.net/users/2795/" ]
A metric space <i>(V,d)</i> will be called distance regular if for every distances <i>a&gt;0, b, c</i> a nonnegative integer <i>p(a,b,c)</i> is defined, so that whenever <i>d(B,C)=a</i>, there are precisely <i>p(a,b,c)</i> points <em>A</em> such that <em>d(A,B)=c, d(A,C)=b</em>. The Euclidean plane is an example: <em...
Note that any metric with unique infinite geodesics on $\mathbb R^2$ has this property. In particular, hyperbolic plane as noted by Heather Macbeth. It also includes Minkowski plane with smooth ball and all complete negatively curved Riemannian metrics on $\mathbb R^2$. So it is better to ask: <ul> <li>Is it true ...
It all would be nice if not for the following. Using the transfinite induction, you can easily construct a set in $\mathbb R^3$ that intersects each circle by any number of points greater than 2 you want depending on the radius of the circle only. Indeed, the cardinality of the set of all circles is continuum. Now take...
https://mathoverflow.net
243,825
[ "https://electronics.stackexchange.com/questions/243825", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/51619/" ]
I have seen different micro controllers have different output file formats for flashing like 8051 has .hex file format, some have .out file format some have .s12 format and etc. What are the factors on which this output file format depends like the controller architecture or it is up to the micro controller manufacture...
It all depends on the tool, i.e. software, you use to program the microcontroller. The tool on the other hand might depend on the microcontroller manufacturer. But there may be more than one possible tool or one tool may work with several formats.
The <em>file</em> format does <em>not</em> correspond in any way to the µC itself. It just stores the data on the PC for programming software to read. It is this software which is responsible to provide data and instructions in a format suitable for both the programmer hardware and the target device, not the input file...
https://electronics.stackexchange.com
67,247
[ "https://mechanics.stackexchange.com/questions/67247", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/49046/" ]
I bought a new battery that ran flat after two weeks. Took it back to the garage and they disconnected negative from my battery whilst the engine was running to check my alternator but now I have brake light and ABS warning lights on the dash. When I start the car they disappear as normal but reappear if I rev the ca...
The same happened to me. Turned out to be a bad alternator. My alternator was generating 19v. Abs module is a complex system including a motor. When it sense overvolts, it shuts it down itself tl prevent further damage.
Just wanted to update what the problem was. The day after I asked this question my battery was flat again. I bought a multi meter and there was a 5 amp drain on the battery when the car was off and locked. I traced the parasitic drain to the alternator itself. Also when the car was started it was charging the battery...
https://mechanics.stackexchange.com
278,630
[ "https://mathoverflow.net/questions/278630", "https://mathoverflow.net", "https://mathoverflow.net/users/27962/" ]
Let $G$ be a finite non-abelian $p$-group, where $p$ is an odd prime, $N$ be a normal subgroup of $G$ of order $p$, where $\frac{G}{N}$ is non-abelian. Does there exist an element $g\in G$ such that $\langle g\rangle$ is NOT normal in $G$ and $N\langle g\rangle$ is normal in $G$?(Note that $G$ and $\frac{G}{N}$ ar...
Let $G = \langle x,y,z \rangle$ be a $3$-generated group of order $p^6$ of exponent $p$ and class $2$. So $Z(P) = [P,P]=\Phi(P)$ is elementary abelian of order $p^3$, and so is $G/Z(P)$. Let $N = \langle [x,y] \rangle$. So $N \lhd G$ with $|N|=p$. Then $Z(G/N) = Z(G)/N$, so for $g \in G$, we have $$\langle g \rangle \...
Here's an easy example: take $G$ to be of class $3$ and exponent $p$ (take $p\gt 3$ just to be sure it is regular). Say $$K=\langle x,y\mid x^p=y^p=[y,x]^p=[y,x,x]^p=[y,x,y]^p=[y,x,x,x]=[y,x,x,y]=[y,x,y,x]=[y,x,y,y]=1\rangle.$$ Every element of $K$ can be written uniquely as $x^ay^b[y,x]^c[y,x,x]^d[y,x,y]^e$, with mult...
https://mathoverflow.net
7,951
[ "https://mathoverflow.net/questions/7951", "https://mathoverflow.net", "https://mathoverflow.net/users/382/" ]
Is there a poset P with a unique least element, such that every element is covered by finitely many other elements of P (and P is locally finite -- actually, per David Speyer's example, let's say that it satisfies the descending chain condition), and P has countably infinite automorphism group? The question is motivat...
It seems unlikely (once you assume d.c.c.). Define the height of an element $x$ in $P$ to be the length of the shortest unrefinable chain from $x$ to $0$. Let $P_n$ denote the elements of $P$ whose height is at most $n$. Since each element has a finite number of covers, the number of elements in $P_n$ is finite. ...
What about $\mathbb{Z} \cup \{ - \infty \}$? Here $- \infty$ is less than everything, and $\mathbb{Z}$ has the usual order. You probably want some sort of descending chain condition, to rule this out.
https://mathoverflow.net
96,200
[ "https://electronics.stackexchange.com/questions/96200", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/22074/" ]
<img src="https://i.stack.imgur.com/LBPi7.png" alt="Schematic" />I have 1 computer, 1 laptop and usb powered arduino ( MCU ). Arduino is connected to laptop via USB cable. Laptop is connected to 220 V wall or runs from batteries. One pin from Arduino is connected to PWM input (to control fan speed) in computer to contr...
<blockquote> have 1 computer </blockquote> They use a switching supply that is connected to mains ground so the ground of the USB or any of the internal supply connectors is essentially connected to the mains ground <blockquote> 1 laptop </blockquote> Also uses a switching supply that may or may have not a co...
I do not share this opinion. Laptop switching supplies are indeed troublesome and the strict definiton of ground is not true here. In fact, once connected, each of these elements are sharing the same ground. BUT, juste before connecting to laptop USB ground, hundred volts can be on this LAPTOP USB and sometimes are abl...
https://electronics.stackexchange.com
285,355
[ "https://softwareengineering.stackexchange.com/questions/285355", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/181877/" ]
It's clear that the dependency inversion principle and the use of interfaces makes software components less coupled and promotes maintainability. On the other hand, these principles make using static methods and factories necessary. I think static methods should be out of any good object-oriented design, since they pol...
<blockquote> On the other hand, these principles make using static methods and factories necessary. </blockquote> Since when? <blockquote> I think static methods should be out of any good object-oriented design, since they pollute the code with imperative programming practices that don't have anything to do with ...
Static methods are bad – not because they are “pre-OOP”, but precisely because they themselves are dependencies that cannot be inverted. I was recently trying to test a codebase that involved a call such as <pre><code>void foo() { ... Time now = Clock::getCurrentSystemTime(); ... } </code></pre> It makes ...
https://softwareengineering.stackexchange.com
11,027
[ "https://electronics.stackexchange.com/questions/11027", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1225/" ]
I'm trying to understand this mechanical drawing. (Another one. I asked a question about mechanical drawings a while back.) <img src="https://i.stack.imgur.com/QDyvL.png" alt="enter image description here"> I can work out most of the dimensions, but the mount pads are confusing me. They have two numbers (0.7 and 1.2)...
The 0.7 is the distance from the center of the smaller (contact) pads to the edge of the larger (mechanical) pad. <img src="https://i.stack.imgur.com/eecPU.png" alt="enter image description here"> The 1.2 is the width of the larger pad. <img src="https://i.stack.imgur.com/bTi5i.png" alt="enter image description he...
They are actually 1.2 x 1.8. <img src="https://i.stack.imgur.com/wCGr4.png" alt="enter image description here"> The dimensioning could be a lot clearer. I wish that they would dimension to the pad centres That is how most PCB packages work.
https://electronics.stackexchange.com
18,339
[ "https://softwareengineering.stackexchange.com/questions/18339", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/7420/" ]
I am using the following structure to save the images that users are uploading for their items: <ul> <li>Images <ul> <li>User_dir1 <ul> <li>Item_dir1 <ul> <li>Picture_file1</li> <li>Picture_file2</li> </ul></li> </ul></li> <li>User_dir2 <ul> <li>Item_dir2 <ul> <li>Picture_file3</li> </ul></li> <li>Item_dir3 <ul> <li>P...
Well, how much time does it take to create a thousand folders over the course of say a month? I would argue not a lot. It would take a lot of time if you were regularly removing and creating folders, but it seems to me the only files that will be changed regularly will be the picture files themselves (or at worst, th...
Unless you'll need more than 65534 folders per directory you should be okay (apparently this is the maximum for NTFS)
https://softwareengineering.stackexchange.com
2,668,253
[ "https://math.stackexchange.com/questions/2668253", "https://math.stackexchange.com", "https://math.stackexchange.com/users/459561/" ]
I'm not sure how to go about this. I know if a sequence $\{a_n\}$ converges to $L$, then given $\epsilon &gt; 0$: (1) $\exists N$ such that for $n \geq N$, $|a_n - L| &lt; \epsilon$. Somehow, I must show: (2) for large $n,m$, $|a_m - a_n| &lt; \epsilon$. I think by (1), we can choose $m &gt; n \geq N$ such that $|a...
Yes. In this case $A_n$ is increasing and bounded above, hence convergent, hence Cauchy. Likewise, $B_n$ is decreasing and bounded below, hence convergent, hence Cauchy.
Yes, both of them are Cauchy sequnces. This is so, because they are both monotonic and bounded. Therefore they converge and therefore they are both Cauchy sequences.
https://math.stackexchange.com
4,191
[ "https://stats.stackexchange.com/questions/4191", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/1795/" ]
MCMC algorithms like Metropolis-Hastings and Gibbs sampling are ways of sampling from the joint posterior distributions. I think I understand and can implement metropolis-hasting pretty easily--you simply choose starting points somehow, and 'walk the parameter space' randomly, guided by the posterior density and pro...
Yes, you are right, the conditional distribution needs to be found analytically, but I think there are lots of examples where the full conditional distribution is easy to find, and has a far simpler form than the joint distribution. The intuition for this is as follows, in most "realistic" joint distributions $P(X_1,...
I think you've missed the main advantage of algorithms like of Metropolis-Hastings. For Gibbs sampling, you will need to sample from the full conditionals. You are right, that is rarely easy to do. The main advantage of Metropolis-Hastings algorithms is that you can still sample one parameter at a time, but you only n...
https://stats.stackexchange.com
40,917
[ "https://biology.stackexchange.com/questions/40917", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/1721/" ]
This might be a very stupid question, but I am worried about RNase/DNase contamination of my samples. Since I use 37% HCl and 10M NaOH to pH almost all my buffers, this is a potential source. I have read however, that both NaOH and HCl should hydrolyze the peptide bonds in amino acids at high concentrations. For HCl, ...
You are safe here. RNase is much more stable than DNase (of any flavor). Extreme pH would destroy even RNase, especially considering time (it has to sit in the bottle with all that acid/base..) Also, consider this: it is highly unlikely that high-tonnage chemicals like HCL or NaOH could be contaminated with organic enz...
Treatment with NaOH is one of the methods used to prepare equipment that needs to be RNAse free. DEPC is preferred in my experience, but NaOH certainly works as well. Highly concentrated NaOH like in your case will certainly destroy any RNAses present. I'd assume the same for concentrated HCl. RNAse is very stable for...
https://biology.stackexchange.com
71,377
[ "https://physics.stackexchange.com/questions/71377", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/25706/" ]
The Hamiltonian for one-dimensional Ising model is given by, \begin{equation} \mathcal{H} = -J\sum_{&lt;ij&gt;} S_iS_j; \quad i,j=1,2,...,N+1 \end{equation} where $&lt;ij&gt;$ denotes that there is nearest neighbor approximation. The partition function is given by, \begin{equation} \mathcal{Z}=\sum_{\{S_i\}} e^{-\beta ...
1. \begin{equation} \mathcal{Z}(N+1,+)= \sum_{S_1}...\sum_{S_N} e^{K(S_1S_2+S_2S_3+...+S_{N-1}S_N}e^{KS_N} \end{equation} where $K=\beta J$. We define new variables, \begin{equation} \eta_i =S_i S_{i+1}; \quad i=1,2,...,N-1 \end{equation} The $\eta_i$s take value: \begin{equation} \eta_i= \left\{ \begin{array}{l l} ...
See Ising's paper of 1925 in Zeit. fur Physik. His equation shows the density of states (DOS) and has a parameter for s(N+1) that can be set to +1 or -1. Near the end of the paper he sums over this parameter. In your question, try multiplying the DOS by the Boltzmann factor to get the partition factor.
https://physics.stackexchange.com
4,555,670
[ "https://math.stackexchange.com/questions/4555670", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1106714/" ]
Question: Other than the zero map, what linear map has the same matrix <span class="math-container">$A_{E,F}$</span> with respect to all <span class="math-container">$E$</span> and <span class="math-container">$F$</span>? For linear map <span class="math-container">$T:\mathbb{R}^n \rightarrow \mathbb{R}^n$</span>, giv...
If <span class="math-container">$T \ne 0$</span>, then there exists <span class="math-container">$v \in \mathbb R^n \setminus \{0\}$</span> such that <span class="math-container">$w = T(v) \ne 0$</span>. There exists a basis <span class="math-container">$E =\{e_1,\ldots,e_n\}$</span> of <span class="math-container">$\m...
It is only the zero map. For any linear map <span class="math-container">$T:\mathbb{R}^n \rightarrow \mathbb{R}^n$</span>, given a basis <span class="math-container">$E$</span> for domain and basis <span class="math-container">$F$</span> for codomain, we can find a unique corresponding matrix <span class="math-contain...
https://math.stackexchange.com
58,655
[ "https://mechanics.stackexchange.com/questions/58655", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/13825/" ]
I have often heard that high viscosity oil (higher than what the manufacturer recommends) is good for old engines, engines that are nearing the end of useful life. So, for example let's consider a 1989 Opel Vectra (a car I used to have). The manufacture recommended 5W-30 for this particular car. However, when nearing ...
The reasoning behind this is that as your engine's internals wear on each other, a thicker oil would find it harder to seep through into places it shouldn't be than a thinner oil. On the other hand though, those parts that have not worn out will suffer because the thicker oil may not always lubricate them properly. Al...
IF the engine bearings are worn as indicated by lower than specified oil pressure : then a somewhat higher viscosity may help , like 10W 40. It will not help low compression / worn rings.
https://mechanics.stackexchange.com
2,889
[ "https://physics.stackexchange.com/questions/2889", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/1247/" ]
Consider an electromagnetic wave of frequency $\nu$ interacting with a stationary charge placed at point $x$. My question concerns the consistency of two equally valid quantum-mechanical descriptions of the electromagnetic wave. First I will describe the classical picture, then the two quantum mechanical descriptions, ...
Lubos's answer is 100% correct, but it is missing the subtle error in OP's thinking. The OP is imagining that if you have two charges that repel according to Coulomb's law, and you slowly shake one, the response of the other is as if it were repelled from the retarded position of the charge. If this were true, then th...
first of all, the quantum mechanical description 1 in its current form is impossible. A charged particle can't simply absorb a real photon. This is most easily seen in the final particle's rest frame. There is no photon left so the total energy is just the rest mass of the particle, times $c^2$, but the initial state h...
https://physics.stackexchange.com
364,395
[ "https://softwareengineering.stackexchange.com/questions/364395", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/81198/" ]
I have open source C# .NET project at GitHub with Appveyor CI + code coverage. There are configurations like <strong>Release</strong> and <strong>Debug</strong>. There's also platforms like <strong>x86</strong>, <strong>x64</strong> and <strong>Any CPU</strong>. This results to following: <pre><code>Configuration |...
This has nothing to do with &quot;a common view in the field&quot; - this is all about what makes sense most. Running unit tests (or any kind of automated tests) using only one configuration and only one platform is fine as long as the code under test as well as the test itself don't show any indications for behaving d...
Unit tests are for verifying that you have the correct algorithm and that you haven't had a regression on a fixed bug. The first should generally be testable in debug mode, the second might not -- if you have an error that only occurs in a particular build (optimized release for instance, or different level of optimiz...
https://softwareengineering.stackexchange.com
11,414
[ "https://quantumcomputing.stackexchange.com/questions/11414", "https://quantumcomputing.stackexchange.com", "https://quantumcomputing.stackexchange.com/users/10454/" ]
In the application of QFT for quantum phase estimation (QPE) of a unitary <span class="math-container">$\mathbf{U}$</span>, one has to perform successive controlled operations using powers of <span class="math-container">$\mathbf{U}$</span>. In order not to break the complexity, each of the controlled <span class="math...
As a general rule, just because you can produce controlled-<span class="math-container">$U$</span>, it does not mean that you can produce controlled-<span class="math-container">$U^{2^k}$</span> with the same complexity. Modular exponentiation is a very special case where it turns out that you can. It is probably wort...
<strong>Partial answer:</strong> If a operator <span class="math-container">$U$</span> is a single qubit rotation around axis <span class="math-container">$a$</span> for angle <span class="math-container">$\theta$</span> (denote <span class="math-container">$R_a(\theta)$</span>) you can use additivity of such operator...
https://quantumcomputing.stackexchange.com
19,814
[ "https://bioinformatics.stackexchange.com/questions/19814", "https://bioinformatics.stackexchange.com", "https://bioinformatics.stackexchange.com/users/4401/" ]
I have been having some trouble with running command line BLASTn remotely. Therefore, upon recommendations, and considering I have &gt;100 searches planned, I am considering just downloading the nt database (thankfully possible). My issue is that one of the settings that proved valuable with my data in WebBlast is runn...
In principle one should simply not align paired-end reads as if they were single end reads, not only because you are not taking advantage of the forward/reverse information contained in the reads, but also you are not taking into account the expected distance between the two pairs, both of which result in better mappin...
I tried to give me this explanation: with single-end alignment of paired-end reads, losing the directionality of the reads and also the expected fragment length, the R2 no longer maps if it maps the R1, but can map as a single reads anywhere, or don't map at all. I thought that therefore I don't see alignment (in tumor...
https://bioinformatics.stackexchange.com
213,895
[ "https://electronics.stackexchange.com/questions/213895", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/97725/" ]
I have configured an RTC module on a uC to generate interrupts every second (~32 kHz module clock with a 0x7FFF prescaler in between the counter and the clock - I hope so, seems like ~32k is the default value, and it would be a shame if the error arises from an incorrect clock being connected to the module). However, i...
The interrupt flag is not cleared automatically for this particular interrupt/uC. The RTC counter works fine, however, once an interrupt is issued, if the flag is not cleared at the end of the handler routine, upon returning from exception handling, the processor will see that the flag is raised and enter the same rout...
That sounds like you have selected the wrong clock source. Some microcontrollers allow you to use the CPU clock as input to the timer block, to allow for high-precision timers.
https://electronics.stackexchange.com
1,716,335
[ "https://math.stackexchange.com/questions/1716335", "https://math.stackexchange.com", "https://math.stackexchange.com/users/190918/" ]
<blockquote> If $f(x)=x^2 -6x+14$ and $g(x)=-x^2 -20x -k$, determine the value of $k$ so that there is exactly one point of intersection between the two parabolas. </blockquote> How do I do this? If I did $x^2 -6x+14=-x^2 -20x -k$, I don't think it would work. $$$$ $$x^2 -6x+14=-x^2 -20x -k$$ $$2x^2 +14x+14 = -k\...
Since you just need a few terms, setting $$y=\sum_{n=1}^6 a_i x^i$$ (because of the condition $y(0)=0$) you could develop $e^y$ as a Taylor series around $x=0$ and get $$e^y=1+a_1 x+\frac{1}{2} \left(a_1^2+2 a_2\right) x^2+\frac{1}{6} \left(a_1^3+6 a_2 a_1+6 a_3\right) x^3+$$ $$\frac{1}{24} \left(a_1^4+12 a_2 a_1^2+...
The answers provided are excellent, but I'll offer what I think is the easiest solution: Just take derivatives of the equation, plug in $0$ and get as many $y^{(n)}(0)$'s as you want, then finally construct your taylor series: $$y=\sum_{n=0}^\infty \frac{y^{(n)}(0)}{n!}x^n.$$ $$y'+e^{y}+\frac{1}{2}\sinh(x)=0, \quad\...
https://math.stackexchange.com
178,961
[ "https://softwareengineering.stackexchange.com/questions/178961", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/43289/" ]
Making new inheritance hierarchy with the help of C++ I think about: <blockquote> Why there is no inheritance from the class objects? Abstract example (on abstract C++): <pre><code>struct Foo { int v; Foo(int a) : v(a) {} }; struct Buz : public Foo(2) { ... } </code></pre> So, the <code>Buz</code> is inherited...
C++ has what you're describing, but the initialization is done as part of the constructor: <pre><code>struct Buz : public Foo { Buz() : Foo(2) { ... }; }; </code></pre>
<blockquote> Is there any possible implementations or related ideas? </blockquote> Many languages that use prototype inheritance do things like this. The issue you run into is that from a logic point of view, the concept is only useful in very dynamic languages where 'inheritance' doesn't mean much and the syntax ...
https://softwareengineering.stackexchange.com
547,731
[ "https://physics.stackexchange.com/questions/547731", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/262541/" ]
I have a problem regarding the Pauli exclusion principle which as far as I understand states that two or more identical fermions cannot occupy the same quantum state. So is the position (<span class="math-container">$r_1$</span>) of an electron in an atom part of its quantum state ? <ol> <li>If yes, why do two elect...
If you look at the periodic table, which has ordered the elements according to their behaviour, you can see that there are 2, 2+8 and 2+8+8 electrons in the first three periods. The amazing thing is that you can imagine (please only for yourself) the electrons as bar magnets. In helium they are standing head to foot op...
Electrons don't have a single well-defined position. They have a position <em>wavefunction</em>, which is related to a <em>probability distribution</em> that an electron will be at a particular position. The Pauli exclusion principle says that two fermions cannot have the same <em>state</em>. The state includes the par...
https://physics.stackexchange.com
28,658
[ "https://stats.stackexchange.com/questions/28658", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/9490/" ]
Assume a set of nodes is scattered over a 2D surface $\mathcal{S}$ so that for any given $\mathcal{A} \subset \mathcal{S}$, the number of nodes inside $\mathcal{A}$ follows a Poisson distribution with parameter $|\mathcal{A}| \rho$, where $|\mathcal{A}|$ shows the area of the subset $\mathcal{A}$ and $\rho$ is the inte...
<strong>There are at least two interpretations:</strong> one concerns the actual points generated by this process and the other concerns the process itself. If a realization of the Poisson process is given and pairs of points are to be chosen from that realization, then there is nothing to be done except systematicall...
<strong>This problem can be solved by decomposing into parts and using the properties of a Poisson process</strong>. It helps to recall how to generate a Poisson point process of intensity $\rho$ on a bounded subset $\newcommand{\A}{\mathcal A}$ of $\mathbb R^2$. We first generate a Poisson random variable $N$ with ra...
https://stats.stackexchange.com
133,045
[ "https://dba.stackexchange.com/questions/133045", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/75651/" ]
This old SQL Server 2000 instance has a 14Gb disc for data and a 30Gb disc for backups. Even though it is old, it still has tons of users doing transactions so the log file of the only database that is on this server fills the data drive everyday. I figured I would put it in simple recovery and flush the transaction ...
First a quick note on moving to <code>SIMPLE</code> recovery. This is a business decision. It is not in any way a technical decision. Your business needs to weigh the cost of staying in <code>FULL</code> (which may mean a new server with additional space, archiving current data to free up some space, etc) vs the cos...
You are right, you cannot recover a database that in has a SIMPLE recovery model beyond the last full backup. Furthermore, you pointed out the reason you should have this DB in FULL recovery model: "it still has tons of users doing transactions so the logfile of the only database that is on this server fills the data d...
https://dba.stackexchange.com
1,570
[ "https://physics.stackexchange.com/questions/1570", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/551/" ]
Hey, trying to finish an assignment but having some trouble with it. I will show all my work. The topic is on wave/particle dualty, uncertainty principle (second year modern physics course). So the question is: <blockquote> Calculate the de Broglie wavelength of a 5.7 MeV α particle emitted from an atomic nucleus ...
When the kinetic energy is given (5.7 MeV) and the mass is known, calculating momentum is very straightforward. I would like to point to the part of the assignment that you missed which is the nucleus diameter. It tells you something about the position of the particle and thus prevents you from knowing the momentum (an...
Normally I'd knock on you for simply asking a homework question, but in this case you're dealing with a poorly-worded problem. The rest mass of an alpha particle is 3.7 GeV; you can't have an alpha particle with less energy than its rest mass. The 5.7 MeV is supposed to be interpreted as the kinetic energy of the a...
https://physics.stackexchange.com
3,406
[ "https://scicomp.stackexchange.com/questions/3406", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/1069/" ]
To compute the eigenvector corresponding to dominant eigenvalue of a symmetric matrix $A\in\mathbb{R}^{n\times n}$, one used Power Iteration, i.e., given some random initialization, $u_1\in\mathbb{R}^n$, one iteratively computes $$u_1\leftarrow Au_1,$$after which a normalization is applied to $u_1$. Now, suppose that e...
In exact arithmetic you shouldn't need to reorthogonalize regularly, but practically you do. Your u1 and u2 are close to (but not exactly) the true eigenvectors, so your initial deflation almost (but not entirely) removed the true eigenvectors from u3. The tiny components you left behind will be amplified by repeated m...
In theory, yes. In practice, rounding errors will usually result in (initially slow) convergence to $u_1$. At essentially the same cost one can run the Lanczos algorithm, which will have much faster convergence, and produce the three dominant eigenvalues unless two of these eigenvalues are essentially the same. For La...
https://scicomp.stackexchange.com
15,008
[ "https://dsp.stackexchange.com/questions/15008", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/7737/" ]
I am trying to understand how this works, specifically, what the DTFT of each step looks like in each step of the chain (for understanding). I am not looking for an answer like because the input signal has a frequency of $\pi/3$, it will be reconstructed correctly. <img src="https://i.stack.imgur.com/xx9Wr.png" alt="I...
<strong>Downsampling</strong> can be defined as follows: $s_{out}[n]= s_{in}[n\cdot M]$ (taking every <em>M-th</em> signal sample) After applying Z-transform we obtain: $\bar{s}_{out}[z]=\dfrac{1}{M}\sum_{m=0}^{M-1}\bar{s}_{in}\left[ z^{1/M} \cdot w_{M}^{m} \right]$, where $w_{M}=e^{-2\pi i /M}$ By substituting $z=...
if you start with the original spectrum, then you have spectra at pi/4 and -pi/4. you will also have spectra either side of 2pi, i.e at 7pi/4 and 9pi/4. when you down sample by 3, these spectra (just consider the positive frequencies for now) will move from pi/4 to 3pi/4, the one at 7pi/4 will move down to 5pi/4. when ...
https://dsp.stackexchange.com
32,459
[ "https://chemistry.stackexchange.com/questions/32459", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/8208/" ]
With optimal conditions can we supercool any compound or is it that just water and a certain set of others can be supercooled? If not, why?
Supercooling is a general phenomenon and it is not limited to any particular substance, although the degree you can supercool something will vary. The idea in thermodynamics is that at the melting point the free energy of the solid and the liquid is equal and a lower temperature will favour the formation of the solid. ...
So called 'drop tubes' have been used for decades to study the nucleation rate vs temperature of supercooled molten droplets of (mainly) metals in vacuum or inert environments. An (admittedly old) example is 'A review of long drop tubes as a supplement/alternative to space experiments', R. J. Bayuzick et al., Advances...
https://chemistry.stackexchange.com
22,403
[ "https://mechanics.stackexchange.com/questions/22403", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/7132/" ]
Is there any terminial command I can use to set the polling interval on an elm327 device? I know that for example obdwiz allows setting the polling interval through it's graphical interface, but I want to do it manually from the command terminal.
The plain white connector with two wires, black and brown with a white stripe, go to a switch in the seat belt buckle. This turns off the warning light on the dash. The yellow connector is for the side impact airbag inflator located in the outer seatback side bolster. These wires are carefully protected and colored y...
The most common problem with the Chevrolet with an airbag light on and the dealership that doesn’t want to tell you the codes is the clock spring is defective which is located in your steering wheel and activates your airbag. Sometimes they just crap out other times they are defective because of front end work and the ...
https://mechanics.stackexchange.com
549,160
[ "https://physics.stackexchange.com/questions/549160", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/208833/" ]
I read that velocity for a particle with four vector (<span class="math-container">$\vec{p}$</span>, E) is <span class="math-container">$c^2 \vec{p} \over E$</span>. Why is this so?
The energy-momentum four-vector is <span class="math-container">$\left(\vec{p},\frac{E}{c}\right)$</span>.<br> Relativistic momentum <span class="math-container">$\vec{p}=\gamma m\vec{v}$</span>, while relativistic energy <span class="math-container">$E=\gamma m c^2 $</span>, with <span class="math-container">$\gamma =...
The energy-momentum four-vector has to be parallel to the velocity four-vector. (If it weren't, then we could transform into the frame where the particle is at rest, and it would still have some momentum, which would violate rotational invariance.) Velocity is by definition the ratio of the spacelike part of the veloc...
https://physics.stackexchange.com
1,524,615
[ "https://math.stackexchange.com/questions/1524615", "https://math.stackexchange.com", "https://math.stackexchange.com/users/186012/" ]
I'm trying to solve some task and I'm stuck. I suppose that I will be able to solve my problem, if I'll find elementary way to calculate $\lim_{x \to \infty}\sqrt[x-1]{\frac{x^x}{x!}}$ for $x \in \mathbb{N}_+$.<br> My effort: I had prove, that $x! \geq (\frac{x+1}{e})^x$, so (cause $x^x&gt;x!$): $$ \left(\frac{x^x}{x!...
Elementary solution to this problem:<br> Fact: $$\lim_{n\to\infty}\frac{a_{n+1}}{a_n} = g \in \mathbb{R} \Longrightarrow \lim_{n\to\infty}\sqrt[n]{a_n} = g$$ So, we can take $a_n = \frac{n^n}{n!}$, then $\frac{a_{n+1}}{a_n} = \frac{(n+1)^{n+1}}{n^n}\cdot\frac{n!}{(n+1)!}=(1+\frac{1}{n})^n (n+1) \cdot \frac{1}{(n+1)} = ...
Say $y=\sqrt[x-1]{\frac{x^x}{x!}}$ Then, $\ln y=\frac{\ln(\frac{x^x}{x!})}{x-1}=-\frac{x}{x-1} \cdot \frac{\ln(\frac{x!}{x^x})}{x} =-\frac{x}{x-1} \cdot \sum \limits_{i=1}^{x} \ln{\frac{i}{x}}\cdot\frac{1}{x} \xrightarrow{x \to \infty} (-1) \cdot \int \limits_{0}^{1}\ln x ~dx=(-1) \cdot(-1)=1$ But, $\lim \limits_{x ...
https://math.stackexchange.com
2,607,310
[ "https://math.stackexchange.com/questions/2607310", "https://math.stackexchange.com", "https://math.stackexchange.com/users/463567/" ]
I'm not sure whether or not the set, $S= \{x : x^2 &gt;3\}$, has an upper or lower bound. At first, I was thinking that the set, $S= \{x : x^2 &gt;3\}$, consists of all the real numbers greater than both $\sqrt3$ and $-\sqrt3$, so basically the real numbers greater than $\sqrt3$. And so I thought that $\sqrt3$ and even...
You are almost there: $x \in \mathbb{R}:$ $x^2 &gt;3 $ $\iff $ $x&lt;-√3$, or $x &gt;√3.$ Hence $S=${$x| x&lt;-√3$}$\cup ${$ x| x&gt;√3$} , not bounded. Note: $x^2-3 &gt; 0$ $\rightarrow:$ $(x-√3)(x+√3)&gt;0.$ Both factors are positive or negative implies: $x&lt;-√3$ or $x &gt;√3.$
Suppose $l$ is a lower bound for $S$. Then for all $x \in S$, we have that $l \leq x$. Now either $- \sqrt 3 &lt; l$, or $l \leq -\sqrt3$. In the first case, any $y &lt; -\sqrt 3 &lt; l$ satisfies $y^2 &gt; 3$. In the second case, any $y &lt; l \leq - \sqrt 3$ also satisfies $y^2 &gt; 3$. In either case, we have that t...
https://math.stackexchange.com
383,766
[ "https://mathoverflow.net/questions/383766", "https://mathoverflow.net", "https://mathoverflow.net/users/85934/" ]
Let <span class="math-container">$\pi: M^{n+k} \to N^n$</span> be a fibre bundle with fibre <span class="math-container">$F$</span> between compact smooth manifolds. What are “mild” sufficient conditions on the topology of <span class="math-container">$M$</span>, <span class="math-container">$N$</span> and <span class=...
A sufficient condition with <span class="math-container">$\mathbf{Q}$</span> coefficients should be that the fiber <span class="math-container">$F$</span> has non-vanising Euler characteristic. Consider the Gysin map (aka as fiber integraion) <span class="math-container">$$\pi^{!} = \int_{\pi}\colon H^{\ast}(M;\mathbf{...
As pointed out by Nicolas Tholozan in the comments, the map <span class="math-container">$\pi^{-1}:H_p(N)\to H_{p+k}(M)$</span> which sends <span class="math-container">$[S\subset N]$</span> to <span class="math-container">$[\pi^{-1}(S)\subset M]$</span> is Poincaré dual to the map <span class="math-container">$\pi^*:H...
https://mathoverflow.net
514,897
[ "https://electronics.stackexchange.com/questions/514897", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/217746/" ]
For capacitive reactance, I am presented this formula: <span class="math-container">$$X_C = -\frac{1}{2\pi fC} $$</span> Where clearly, the capacitive reactance is inversely proportional to the capacitance. This confuses me. We usually talk about capacitive reactance in relation to capacitors, which have a rather high ...
The same formula applies. Wires have low capacitance to their surroundings so they have high Xc. Capacitors have high capacitance in comparison so they have low Xc. Thus the wires are a smaller AC load (less current flows) and capacitors are a larger AC load (more current flows). It is no different from resistance, hig...
A straight wire will, as you say, have a very low capacitance and therefore a very high capacitive reactance (dependent on frequency). What you may be overlooking is that the capacitive reactance is only one part of the wire's impedance (R + jX), the other parts being inductive reactance and resistance. As the resistan...
https://electronics.stackexchange.com
6,549
[ "https://cs.stackexchange.com/questions/6549", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/4198/" ]
From my Googling, it appears that call by value-result is similar to call by reference in that it changes values in the caller, but it's different in that the changes don't take place until the callee exits, and that if the same variable is passed as more than one argument, it'll be treated as separate values in the ca...
<strong>EDIT:</strong><br> An addendum: if you want to "simulate" call by value-result in Pascal (or in another language that supports only call by reference); you can use this trick: <pre><code>procedure p(var x, y : Integer); // simulates call by value-result var xtmp, ytmp : Integer; procedure p_hidden(var x, ...
I'm not very familiar with Pascal, but there are some scoping issues. The 2nd line of <code>p</code> modifies global variable <code>a</code>. When you pass by reference, line 1 of <code>p</code> also modifies <code>x</code> which is the same as global <code>a</code>. When you pass by value, line 1 does not modify g...
https://cs.stackexchange.com
17,417
[ "https://security.stackexchange.com/questions/17417", "https://security.stackexchange.com", "https://security.stackexchange.com/users/7149/" ]
I'm trying to work out what the current phone number is for an Android device based solely off a disk image. I've looked in the mmssms.db and the contacts2.db but neither seem to store the details of the current phone number. Is there a database or log file that would store this sort of information? Its just a stock...
It's not guaranteed to be stored anywhere in the phone, since the SIM provides the phone number. However, some applications might log the phone number. No idea which ones might though, sorry. At best, you could probably write a script to scan for phone numbers. Unfortunately, you have no idea how one might be stored, ...
was the image compressed from a Nandroid back-up? (Via ClockworkMod Recovery?) if you can find out / tell me the version of Android it's running then I can give you a clear answer. For Froyo the devices stores the users number in the system settings under, "About Phone," and same goes for ICS, (4.0.X) with the added me...
https://security.stackexchange.com
40,509
[ "https://quant.stackexchange.com/questions/40509", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/29869/" ]
I am looking for info regarding pricing, and hedging (notably vega and delta) of derivatives on funds. Could you please confirm/complete the below information I believe I've understood so far, or guide me to books/papers that could be of any help? 1- Delta hedging: since it is impossible to short funds, any derivati...
For Q1 in order to create a negative delta product you would have to offset it by selling a positive delta product to someone else, which is certainly possible. Q2 I agree with the proxy solution , but it is not very reliable since the fund manager can change the volatility of the fund by changing the composition o...
Q1: Correct. Q2: There are some variance / volatility swaps quoted in the IDB markets for major mutual funds. Some big hedge funds are also keen to sell volatility. Q3: Almost impossible. Q4: Calibration with historical volatility. Eventually with Avenalleda model (uncertain volatility) where you define a min/max ...
https://quant.stackexchange.com
13,409
[ "https://datascience.stackexchange.com/questions/13409", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/23208/" ]
I have a model which has many categorical variables. For each categorical variable there are many levels, like 50~. But not all of them have significant counts. I got these counts using the function <code>value_counts()</code> in Python: <pre><code>A 50 B 38 C 26 D ...
It is a linear transformation. For example, lines that were parallel before the transformation are still parallel. Scaling, rotation, reflection etcetera. With regard to neural networks, it is usually just the input matrix multiplied by the weight matrix.
Affine transformation is of the form, <span class="math-container">$$ g(\vec(v) = Av+b $$</span> where, <span class="math-container">$A$</span> is the matrix representing a linear transformation and <span class="math-container">$b$</span> is a vector. In other words, affine transformation is the combination of lin...
https://datascience.stackexchange.com
127,870
[ "https://dba.stackexchange.com/questions/127870", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/86027/" ]
For my website's users, I want to implement a worldwide geo / spatial / proximity search with php and mysql. I want to do this as simply and minimally as possible. What is the minimum data I should capture (Country, State, City, Postal Code, etc.)? There are dozens out-of-the-box and open-source solutions out there,...
This error would be where I would start looking: <blockquote> SQLServer Error: 27, Registry information is corrupt or missing.<br> Make sure the provider installed and registered correctly. [SQLSTATE 08001] </blockquote> If you are able to perform a repair of the installation, that should resolve this.
Set the SQL Agent service to <code>Automatic(Delayed)</code>. The first thing it will do is try to connect to SQL Server, and if SQL Server hasn't finished starting yet, SQL Agent can fail. Delaying the start for SQL Agent will give SQL Server the chance to finish.
https://dba.stackexchange.com
387,403
[ "https://softwareengineering.stackexchange.com/questions/387403", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/309026/" ]
I'm building a user license portal, store, SSO, and mini CRM and admin for internal people to manage those users for a niche 3D software company, similar to Autodesk. Licenses are sold to both companies and single users. What is the best way to avoid company data duplication <ol> <li>Not all companies have tax Id and ...
Your CRM reflects your knowledge about each buyer or user of your product at a certain point in time. When the number of entries in the CRM grows beyond a certain limit (somewhere between 10 and 50), you will not be able to affort to keep that information always up-to-date. You won't get automatically informed if a per...
The obvious solution to me would be to have a shared database with tax info for all countries. <em>Maybe</em> you could use local settings for tax settings specific to the country where the software is installed, but I think it may surprise you to know that the tax laws <em>within the same country</em> can vary accord...
https://softwareengineering.stackexchange.com
61,037
[ "https://physics.stackexchange.com/questions/61037", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/16191/" ]
A yoyo on a horizontal table is being pulled by a string to the right, the table is not frictionless. If we only know that the object doesn't slip, how do we know if the string is winding up or unwinding? My reasoning is initially the friction is not ever effect so the force pulling the yoyo to the right will act a tor...
I think that a sketch says more than equations and words <img src="https://i.stack.imgur.com/mT0xh.png" alt="Yoyo"> The yoyo will, in an infinitesimal sense, have to move around the red dot (but is kept from doing so by the table). The direction in which the yoyo will move, depends on the angle of the string, and thu...
If the outside radius is $r_O$ and the inside where the string attaches $r_I$ then the no-slip condition is $v + \omega r_O =0$. The string lengthening rate is $\dot{l} = \omega r_I$ so the end of the string motion is $\dot{x}=v+\dot{l} = v + \omega r_I$. Together they make $$ v = \frac{r_O}{r_O-r_I} \dot{x} $$ $$ ...
https://physics.stackexchange.com
625,536
[ "https://math.stackexchange.com/questions/625536", "https://math.stackexchange.com", "https://math.stackexchange.com/users/108145/" ]
Im reading Chapter1 of Rudin's Principles of Mathematical Analysis, 3rd ed and a little confusing on his construction of $R$ from $Q$, <img src="https://i.stack.imgur.com/OVoaN.jpg" alt="enter image description here"> <img src="https://i.stack.imgur.com/bqAJt.jpg" alt="enter image description here"> See the step3. "D...
You misread the order. When we say $\sup A$, we don't mean in the rational numbers, we mean in the new world, $R$ whose ordering is $\subsetneq$. The claim, if so, is that a union of a bounded set of cuts is a cut itself. And that cut is their supremum.
$\gamma$ is a union of subsets of $Q$ and therefore is a subset of $Q$. In step 3, the author is showing that $R$ has the least upper bound property. To do so, he takes some subset $A \subset R$ and tries to show that $\gamma= \bigcup_{\alpha \in A} \alpha$ is both an element of $R$ and the desired upper bound. Does th...
https://math.stackexchange.com
4,265
[ "https://cstheory.stackexchange.com/questions/4265", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/3178/" ]
Standard accounts of Turing Machines in the literature assume an infinitely long tape in at least one direction (and indeed infinitely time long to perform its computations). Clearly in practice no computer could have an infinite amount of cell storage either from the commencement of computations (even if we disregard ...
Yes it makes a huge difference! A Turing machine with a finite tape is just a finite automaton, which we know are much less powerful. For example, a TM with a finite tape cannot compute a context free grammar. All of this is in theory, of course.
Let me mention linear bounded automata (LBA) which can compute a proper subset of the function Turing machines can handle. LBA do model real computers <em>better</em> than Turing machines in the sense that no computation can use an infinite amount of space but there is no (constant) bound on space either. Of course, re...
https://cstheory.stackexchange.com
2,069,724
[ "https://math.stackexchange.com/questions/2069724", "https://math.stackexchange.com", "https://math.stackexchange.com/users/256412/" ]
I have this differentiation problem, taken from James Stewart's Calculus Early Transcendentals, 7th Ed. Page 205, Exercise 9. Find the derivative of the below using chain rule. Given: $$F(x)=\sqrt{1-2x}$$ My solution: $$\sqrt{1-2x}=(1-2x)^{1/2}$$ $$\frac{d}{dx}(1-2x)^{1/2}=\frac{(1-2x)^{-1/2}}{2^{-1/2}}(-2)$$ Rec...
Here is the mistake: $$\frac{d}{dx}(1-2x)^{1/2}=\frac{(1-2x)^{-1/2}}{2}\cdot(-2)$$ <em>Ps:Remmember that $(x^{1/2})'=\frac{1}{2}\cdot x^{-1/2}$</em> Beeing more specific and using chain rule: $$(f(g(x)))'=g'(x)\cdot f'(g(x))$$ On your case you can choose $g(x)=1-2x$ and $f(x)=x^{1/2}$ so, $$g'(x)=-2$$ $$f'(x)=\f...
The denominator of $2^{-\frac{1}{2}}$ is incorrect. The derivative of $x^\frac{1}{2}$ is $\frac{1}{2}x^{-\frac{1}{2}}$, so it should be mulitplied by the constant $\frac{1}{2}$ instead. Now just substitute $1 - 2x$ into $x$ above and multiply throughout with the derivative of $1 - 2x$ to effect the chain rule.
https://math.stackexchange.com
70,969
[ "https://mathoverflow.net/questions/70969", "https://mathoverflow.net", "https://mathoverflow.net/users/10400/" ]
Given a measure space $(X, \mu)$ and a measurable integral kernel $k : X \times X \rightarrow \mathbb{C}$, the operator $$ K f(\xi) =\int_{X} f(x) k(x,\xi) d \mu(x),$$ the operator $K$ is Hilbert Schmidt iff $k \in L^2(X \times X, \mu \otimes\mu)$! Q1:The main point of this questions, what are necessary and sufficie...
There are many results of the kind you ask about in the book I. C. Gohberg and M. G. Krein, Introduction to the theory of linear nonselfadjoint operators. Providence, RI: American Mathematical Society, 1969. It contains both necessary and sufficient conditions, and counter-examples.
It may be worth noting the phenomena that can appear in Hilbert spaces, where study of the things is more decisive, both positive and negative. First, I like the "definition" of "trace class" $T:X\rightarrow Y$ with Hilbert spaces $X,Y$ to be that $T$ is a composition of two Hilbert-Schmidt operators (which are define...
https://mathoverflow.net
3,851
[ "https://softwareengineering.stackexchange.com/questions/3851", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/666/" ]
How would you consider that a programmer is bad at what he or she is doing? If possible... How should he/she improve?
When they fail to learn from their mistakes and from peer reviews. We are all green at some point; however, if you're not getting better or attempting to get better then you're a bad programmer.
A programmer who doesn't know what he doesn't know and isn't interested at all to find out.
https://softwareengineering.stackexchange.com
33,560
[ "https://softwareengineering.stackexchange.com/questions/33560", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/6605/" ]
I believe any programmer has several ideas that she/he considers as innovative or at least valuable. It may be an idea of a new product which will make this world better or a new development approach, etc. But a great idea must be implemented and promoted/advertised. This requires a lot of work (proofs of concept, pro...
Ideas left unimplemented might as well be predictions of what someone else is going to implement. I think that it is rare, especially in this day and age for <em>only</em> a single person to come up with an idea. If you thought of it, chances are that someone else has as well. Fortunately, I work in a company that tre...
I keep my ideas on a list I maintain with a mind mapping software. The fact I have that list creates lot of frustration in my life because of my inability to implement all of them. I don't care about money, so the ideas are all about <strong>doing</strong>, not collecting dollars. Sharing the idea is not a problem at ...
https://softwareengineering.stackexchange.com
169,145
[ "https://physics.stackexchange.com/questions/169145", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/74880/" ]
I am in an introduction to engineering physics course and just trying to see if my understanding of angular motion is correct or if I have the wrong idea. So as I understand it, angular velocity is the rate of change of angular position, <em>not physical distance traveled</em>. Arc length is the physical distance trave...
<blockquote> 1) Does this mean that for any particle on the rotating body the angular velocity is the same? </blockquote> On a rigid rotating body, yes, the angular velocity is the same for every point in that body. <blockquote> 2) Does this mean that when angular momentum is described, we are technically still d...
Think of a rotating disk. The disk is rotating on its center 1. Since the angular velocity, as you've mentioned, is the rate of change of angular position, then every point on the disk will experience the same angular velocity. If the disk change in shape as it rotate, then the angular velocity might not be the same an...
https://physics.stackexchange.com
39,997
[ "https://mechanics.stackexchange.com/questions/39997", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/14105/" ]
My old Fiat Marea Weekend had instructions for defogging the windshield on the inside of the driver's visor: <blockquote> <ul> <li>Turn the blower on max</li> <li>Turn the heat on max</li> <li>Turn the recirculation off</li> <li><strong>Put down the visors</strong> <em>(emphasis mine)</em></li> </ul> </blo...
I think the visor is right… When you put the visors down (or at the "right" angle) they stop the airflow from the defroster vents from being able to move across the headliner. They may even deflect the heated air down in a way that causes a "rotor" of warm air in the vicinity of the windshield. This both helps to warm...
I would assume the visors would help to create / trap a column of slightly warmer air at the top the of screen instead of is dissipating across the headliner and into the cabin of the car.
https://mechanics.stackexchange.com
100,105
[ "https://cs.stackexchange.com/questions/100105", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/34779/" ]
Can addition (or subtraction) of polynomials of degree <span class="math-container">$&lt; n$</span> be done in constant time ? I am quite new to algorithms. I thought about using sorted arrays for storing the coefficients. But the addition of two sorted arrays appears to be <span class="math-container">$\in O(n)$</s...
Because the set <span class="math-container">$\{1,x,\ldots,x^{n-1}\}$</span> is a base for polynomials with degree <span class="math-container">$&lt;n$</span>, by definition of base, no element in this set can can be expressed as a combination of others, i.e. no element can be “ignored”. Therefore, we know that our a...
Storing the coefficients of the polynomial terms as arrays is the right way to go, but you will need to traverse both arrays (in one pass) to add the coefficients, and hence your running time will be <span class="math-container">$O(n)$</span>. The only way I can see this being faster is in one very limited case. If y...
https://cs.stackexchange.com
40,939
[ "https://mathoverflow.net/questions/40939", "https://mathoverflow.net", "https://mathoverflow.net/users/4333/" ]
Let $X$ be a regular integral noetherian scheme of dimension 2 and let $D$ be a simple normal crossings divisor in $X$. EDIT: Let $U = X-D$. Consider a finite etale morphism $V\longrightarrow U$ with $V$ connected. Let $\pi:Y\longrightarrow X$ be the normalization of $X$ in the function field of $V$. So $Y$ is a $2$...
Let $k$ be a field of characteristic prime to $n$ and $\zeta\in k$ a primitive $n$-th root of unity. Let $a\in \mathbb{Z}$ and let $Y$ be the quotient of $\mathop{\rm{Spec}}k[u,v]$ by the automorphism $(u,v)\mapsto (\zeta u,\zeta^a v)$. Then $Y$ is a tame cyclic cover of $X=\mathop{\rm{Spec}}k[u^n,v^n]$ etale away f...
I think the answer is in general <strong>no</strong>, because of the following example. Take $10$ lines in $\mathbb{P}^2$ all passing through a point $p$, and let $D$ be their union. There exist a covering $Y \to \mathbb{P}^2$ of degree $5$ branched on $D$, and $p$ is the only point of total ramification. The only sin...
https://mathoverflow.net
77,885
[ "https://softwareengineering.stackexchange.com/questions/77885", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/11216/" ]
I have never been very clear on this concept. Please help: At the end of the day, we should want to identify useful problems for which we don't have polynomial solution so far and only have exponential solutions.We want to keep finding if we can find a polynomial solution to these problems and the use of reductions is...
There's nothing obvious about determinism and non-determinism that leads to this. It's a bit technical. A deterministic automaton corresponds to what we can actually build, either in hardware or in software. A non-deterministic automaton tries all possible solutions, but to be in polynomial time it has to be able to...
NP takes it's name from the fact that it can be solved in <strong>polynomial</strong> time by <strong>non-deterministic Turing machine</strong>. The trick is that non-deterministic in that case means, as if it can magically evaluate all branches in parallel. It's a theoretical model, you should not attempt to compare i...
https://softwareengineering.stackexchange.com
432,250
[ "https://math.stackexchange.com/questions/432250", "https://math.stackexchange.com", "https://math.stackexchange.com/users/78852/" ]
How does one [easily] calculate $\sum\limits_{n=1}^\infty\frac{\mathrm{pop}(n)}{n(n+1)}$, where $\mathrm{pop}(n)$ counts the number of bits '1' in the binary representation of $n$? Is there any trick to calculate the sum? From what I already have, it definitely converges.
For $k \in \mathbb{N}$, consider the function: $$\theta_k(n) = \begin{cases}1&amp;\text{ if }k^{th}\text{ bit of }n\text{ is set}\\0,&amp;\text{ otherwise.}\end{cases}$$ We have: $$\sum_{n=1}^{\infty} \frac{\operatorname{pop}(n)}{n(n+1)} = \sum_{n=1}^{\infty}\sum_{k=0}^{\infty} \frac{\theta_k(n)}{n(n+1)} = \sum_{k=...
Personally I think you will struggle to find an exact formula because of the difficulty in establishing an expression for $\text{pop}(n)$. Here's a first attempt at some bounds... $$1\le\text{pop}(n)\le\lfloor \log_2(n)\rfloor+1\le \frac{\ln(n)}{\ln(2)}+1,$$ $$\sum_{n=1}^{\infty}\frac{\text{pop}(n)}{n(n+1)}\le\frac{1...
https://math.stackexchange.com
14,394
[ "https://security.stackexchange.com/questions/14394", "https://security.stackexchange.com", "https://security.stackexchange.com/users/3825/" ]
I was discussing software trial time limit enforcement with a colleague and the idea of CIA came up. Do stricter enforcement techniques increase confidentiality at the expense of availability? (for example when an application MUST phone home to authenticate and therefore cannot be used offline) Or is this integrity? Ma...
It's a matter of point of view. DRM technology is sold by security vendors to content vendors (distributors, not necessarily producers). The interest of content vendors is to limit the distribution of the content, hence what they buy is confidentiality of the content. Availability is not important to content providers,...
No. DRM doesn't really guarantee anything. <strong>Confidentiality</strong> is the guarantee that an unauthorized user cannot access the protected information. DRM doesn't guarantee this because decryption keys are necessarily distributed to the very person you're trying to prevent access to. <strong>Integrity</stron...
https://security.stackexchange.com
8,039
[ "https://quant.stackexchange.com/questions/8039", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/89/" ]
Let's assume we need to calculate a 1-day VaR for a portfolio of funds. Funds are traded, they can be bought and sold every day. We know exactly what the assets in each fund are. What is the right way to calculate VaR? <ol> <li>flatten the portfolio and calculate VaR on a portfolio of assets</li> <li>treat each fund a...
Both approaches have drawbacks, so if one <em>must</em> choose among the two then one shall compare those drawbacks in the specific case. Or another way would be devising a hybrid of the two (e.g. adding statistics of historical deviations of the fund portfolio from the (1) view etc...). Among the drawbacks of (1): t...
No matter how you calculate the VaR (historical simulation, covariance approach, MC) I assume that you work on historical data or data derived from the history of assets, risk factors and theresuch. If this assumption is correct then I would use approach (1). If you know the exact positions today of the (sub-)funds, t...
https://quant.stackexchange.com
52,699
[ "https://dsp.stackexchange.com/questions/52699", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/38304/" ]
I have received an audio file which is 44.1kHz wav. My ears suspect this audio clip was originally lower than 44.1, and encoded to 44.1 later, much like re-encoding a 720p video to a 1080p video. Is there a way to find out if this is true? Like, analyse the audio clip to see.. how many Hz it uses..? I have literally no...
The short answer is no. The longer answer is that if there is some known signal that you know the frequency you could but this is knowledge you bring to the problem. You can look around 60Hz or 50Hz depending what the utility power frequency uses and see it there is some suggestion of a steady line in the data in tha...
I used to do this pretty frequently. You can use a DAW that has some kind of spectogram/frequency analysis feature. You’ll either see the high end is missing entirely or aliasing in the high frequencies. It’s not an exact science, but if you see obvious effects, such as bandwidth limiting, odds are it was recorded at...
https://dsp.stackexchange.com
64,697
[ "https://electronics.stackexchange.com/questions/64697", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/22217/" ]
I'm trying to do a CT Fourier Transform of these two signals $$e^{-a(t-1)} \cdot u(t-1)$$ and $$e^{-a(t-1)} \cdot u(t)$$ Where \$a\$ is any real number, and \$u(t)\$ is the unit step function. <img src="https://i.stack.imgur.com/XSdSA.jpg" alt="enter image description here"> My question is if there is either a prope...
Here's what the L293 output stage looks like: - <img src="https://i.stack.imgur.com/zPkHR.jpg" alt="enter image description here" /> I didn't see anything in the product pdf that says that they can be &quot;effectively&quot; paralleled but it's quite possible there was some small print somewhere or I was being stupid. ...
Recommended or not, soldering one of these chips atop another was in fact common practice back in the day. Today there are many other alternative parts which it would be worth considering instead.
https://electronics.stackexchange.com
130,394
[ "https://electronics.stackexchange.com/questions/130394", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/9983/" ]
I have two servos in an autonomous sail boat. One controls the rudder, the other the winch. I try to use both sparingly to minimize power consumption, and so I disconnect each unused servo through an n-MOSFET, and additionally, when neither are in use, I put the power regulator to sleep. Here's the circuit diagram: <i...
Typically, any feedback system requires capacitors, so that small fluctuations in the power supply due to movement of the motors do not create another unintentional feedback path. In this case, the charge lost in 1 discharge cycle of two 250uF capacitors is minuscule compared to your battery capacity: 250 uF * 5 V is a...
Capacitors don't consume significant energy (just a tiny bit of leakage). As batteries discharge their internal resistance increases so that circuits connected to them that do not draw steady current can malfunction while there is still plenty of energy left in the battery. The capacitors can counteract that if they'...
https://electronics.stackexchange.com
297,394
[ "https://electronics.stackexchange.com/questions/297394", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/121023/" ]
I drive a BLDC motor with an ESC. When using power from a LiPo battery everything works as expected. When I use a power supply, on rapid stops or slowdowns motor generates voltage spikes, which send my ESC to overvoltage protection. How can I deal with it? Will a zener diode work with PSU, if it's voltage rating will ...
First ad a large capacitor or bank of more capacitors. The zener will probably burn out very quick because of large amount of kinetic energy that is converted back in electricity. Your device needs to absorb the total amount of the energy generated during quick deceleration. Usually such device exists in servo drives n...
In a H bridge drive to motor, mechanical or stored inductive energy is released into the power rails because of the presence of diodes, actual or parasitic (in the case of MOSFETs). This means the power rail can rise but a battery close to the circuit will keep it in check. If the battery is too far away, the inductan...
https://electronics.stackexchange.com
3,565,114
[ "https://math.stackexchange.com/questions/3565114", "https://math.stackexchange.com", "https://math.stackexchange.com/users/395143/" ]
Would appreciate some help with a question. Before anyone asks, it's not homework and I'm not a professional maths person, only someone who is somewhat inquisitive! I have a series of probabilities related to "events" or "incidents" that may occur on a particular day. <span class="math-container">$P(n)$</span> is the...
First note that <span class="math-container">\begin{align}x_k&amp;\geq 1+\frac1{2\cdot 3}+\frac{1}{3\cdot 4}+\ldots+\frac{1}{k\cdot(k+1)}\\&amp;=1+\frac{1}{2}-\frac{1}{k+1}=\frac{3}{2}-\frac{1}{k+1}=\frac{3k+1}{2(k+1)}.\end{align}</span> Therefore, <span class="math-container">$$k^2x_k^2\geq \frac{k^2(3k+1)^2}{4(k+1)^...
It is trivial if you use <span class="math-container">$$\sum_{n=1}^\infty\dfrac{1}{n^2} = \dfrac{\pi^2}{6}$$</span> Note that <span class="math-container">$x_1=1$</span> and <span class="math-container">$x_i\ge\dfrac{5}{4}\forall i\ge 2$</span>. Hence, for <span class="math-container">$n\ge 4$</span>, <span class="math...
https://math.stackexchange.com
4,091,959
[ "https://math.stackexchange.com/questions/4091959", "https://math.stackexchange.com", "https://math.stackexchange.com/users/740148/" ]
Calculate <span class="math-container">$$\sum_{k=0}{n\choose 4k+1}$$</span> This should be an easy and short result but I'm messing up somewhere. What I've done so far is take <span class="math-container">$f(x)=(1+x)^n$</span> and with the binomial theorem expand <span class="math-container">$f(1), f(-1), f(i), f(-i)$<...
For <span class="math-container">$j = 0,1,2,3$</span>, let <span class="math-container">$S_j = \displaystyle\sum_{k}\dbinom{n}{4k+j}$</span>. Then, we have <span class="math-container">\begin{align*} 2^n = (1+1)^n &amp;= \sum_{\ell}\dbinom{n}{\ell} = S_0+S_1+S_2+S_3 \\ 2^{n/2}(\cos\tfrac{n\pi}{4} + i\sin\tfrac{n\pi}{4}...
In case there is interest we can also do this one with residues, by way of enrichment, and demonstrate some complex arithmetic. Start with <span class="math-container">$$\sum_{k\ge 0} {n\choose 4k+1} = \sum_{k\ge 0} {n\choose n-4k-1} = [z^{n-1}] (1+z)^n \sum_{k\ge 0} z^{4k} \\ = [z^{n-1}] (1+z)^n \frac{1}{1-z^4} = \mat...
https://math.stackexchange.com
15,321
[ "https://bioinformatics.stackexchange.com/questions/15321", "https://bioinformatics.stackexchange.com", "https://bioinformatics.stackexchange.com/users/856/" ]
I have following two lists. List1 <pre><code>m64041_200717_231916/100664277/0_42364 id=2440 m64041_200717_231916/100008029/0_42112 id=244006 m64041_200717_231916/100665802/0_46854 id=2440067 m64041_200717_231916/100008044/0_60161 id=24400 m64041_200717_231916/100928073/0_11804 id=2440152 m64041_200717_231916/10094492/0...
You really need to learn some python :) <pre><code>with open('/path/list2.txt', 'r') as fin: to_keep = set([]) for line in fin: to_keep.add(line.strip()) with open('/path/list1.txt', 'r') as fin: with open('/path/list3.txt', 'w') as fout: for line in fin: if line.strip()...
There is no need for a highlevel language in such a simple case, an <code>awk</code> oneliner does just fine: <pre><code><span class="math-container">$ awk -F " " 'FNR==NR {a[$1]; next} $</span>1 in a' List2 List1 m64041_200717_231916/100664277/0_42364 id=2440 m64041_200717_231916/100665802/0_46854 id=2440067 m64041_20...
https://bioinformatics.stackexchange.com