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
181,080
[ "https://physics.stackexchange.com/questions/181080", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/55394/" ]
I am beginning to learn about the AdS/CFT correspondence, but I can't find a comprehensive introduction that includes the relevant gravitational/string theory physics. What specific areas of general relativity and superstring theory are essential for understanding the correspondence?
There is no non-trivial one-dimensional representation of $\mathrm{U}(1)$ on a scalar field $\mathbb{R}^4\to\mathbb{R}$, but on complex fields $\mathbb{R}^4\to\mathbb{C}$, we have the one-dimensional "phase" representations by $$\phi\mapsto\mathrm{e}^{e\mathrm{i}\chi}\phi$$ for $e\in\mathbb{Z},\chi\in\mathfrak{u}(1)\c...
What type of fields are you using? If you are working with spinor fields, the representation of Lorentz transformations is complex. So even if the field is real in some reference frame, if you switch to another reference frame it will become complex. There's no way to avoid complex spinor fields.
https://physics.stackexchange.com
1,402,679
[ "https://math.stackexchange.com/questions/1402679", "https://math.stackexchange.com", "https://math.stackexchange.com/users/171192/" ]
I know that $\mathbb{Z}$ is a group under addition with a multiplication defined. I have just the definition of even and odd integers: $n$ is even if $n = 2k$ for some integer $k$ and $n$ is odd if $n = 2k+1$ for some integer $k$. Using just this I am wondering how to prove that all integers are either even or odd. Th...
If you really want to avoid using general facts about division with remainder, you can use <strong>mathematical induction</strong> on $n$ to prove it for <em>nonnegative</em> integers: Base case: $0$ is even because $0=2\cdot 0$. Induction step: Assume that $n$ is odd or even; then we must prove that $n+1$ is also ei...
Suppose that $n&gt;0$ is an integer which neither odd nor even. So, if $n$ is not odd, it cannot be of the form $2k+1$. Also since it is not even it cannot be of the form $2k$. From this it follows that $n-1$ is also neither even, nor odd. Apply this argument repeatedly so long as your $n&gt;1$. At one stage you are fo...
https://math.stackexchange.com
40,482
[ "https://stats.stackexchange.com/questions/40482", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/9677/" ]
My data analysis workflow is through R and <code>ggplot2</code>, in part because <code>ggplot2</code> discourages me from making 'bad' (misleading, etc.) plots. However, I sometimes would like to make plots that compare multiple unlike dependent variables against a common independent variable, like below: <img src="htt...
Call me a heretic, but I completely disagree with this flame war on double axes; yes, they can be extremely deceiving, but only when you plot two things of a same unit (i.e. when their sum or difference makes sense) -- then the plot suggest that they have an equal range, which is usually not the case (like income of tw...
I think your graph can mislead about the relationship. The following, which just reverses one of the lines, tells a rather more informative story about which changes first and shows when one changes and the other does not. <img src="https://i.stack.imgur.com/NgIdA.png" alt="enter image description here"> and would b...
https://stats.stackexchange.com
8,971
[ "https://mechanics.stackexchange.com/questions/8971", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/3766/" ]
I wish to reduce sway in my 2005 Daihatsu Copen. I have found a number of different vendors, and I have heard good things about Ultra Racing. They sell the following bars: <h3>Front Upper Strutbar</h3> <img src="https://i.stack.imgur.com/7ufcf.jpg" alt="Front Upper Strutbar" /> <h3>4-Point Front H-Brace (UR-LA4-1667)</...
For the Daihatsu Copen, the Front Upper Strutbar will do very little in the way of getting "bang for your buck", particularly since the exiting ride quality can best be described as hard. Realistically, you should be looking at the 4-Point Front H-Brace (UR-LA4-1667) and the 4-Point Mid Lower Bar (UR-ML4-1668) as the...
I'm not familiar with this model, but generally speaking the actual swaybars are the best bang for the buck upgrade. They can make a dramatic difference in handling. The strut bars/stress bars/tie bars/etc tend to only be a very minor difference (if you can notice them at all, may not even be effective without signif...
https://mechanics.stackexchange.com
55,100
[ "https://dba.stackexchange.com/questions/55100", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/15294/" ]
After using a percona optimized .cnf file the backup fails <h1>Installing my.cnf</h1> <pre><code># service mysql stop (Installed my.cnf) # rm ib_logfile0 # rm ib_logfile1 # service mysql start Mysql creates new log files on startup </code></pre> <h1>my.cnf</h1> <pre><code># Generated by Percona Configuration Wizard (h...
the hint is in last error messages as follows <pre><code>xtrabackup: innodb_log_file_size = 50331648 InnoDB: Error: log file ./ib_logfile0 is of different size 268435456 bytes </code></pre> my.cnf implicitly refereced by xtrabackup has innodb_log_file_size = 48M (50331648 bytes), but actual log file size is 256MB (as...
I had the same issue. The fix is simple, just add the following to my.cnf in the [mysqld] section innodb_log_file_size=48M (Use whatever size log file you need, 48M is OK for small Dbs) Then follow the instructions to restart mysql with a new log file size. The basics are (but READ the Manual!) stop mysql remove the ...
https://dba.stackexchange.com
177,135
[ "https://math.stackexchange.com/questions/177135", "https://math.stackexchange.com", "https://math.stackexchange.com/users/32240/" ]
I got stuck in this problem: Let $A:\mathbb{R}^{6}\rightarrow \mathbb{R}^{6}$ be a linear transformation. Assume $A^{26}=I$, prove that $R^{6}=\oplus_{i=1}^{3} V_{i}$, with $AV_{i}\subset V_{i}$(the explicit condition is $V_{i}$ are 2-dimensional invariant subspaces of $\mathbb{R}^{6}$ under $A$). My thought is $A$ ...
The decomposition of $x^{26}-1$ into irreducible factors over $\mathbb R$ is $$ (x-1)\cdot(x+1)\cdot\prod\limits_{k=1}^{12}p_k(x),\qquad p_k(x)=x^2-2\cos(k\pi/13)x+1. $$ This almost determines the minimal polynomial $\mu_A(x)$ of $A$, since $\mu_A(x)$ divides $x^{26}-1$. Hence $\mu_A(x)$ is the product of at most three...
Suppose $A^2 = I$. Let $x$ be any nonzero vector. Then the space spanned by $x$ and $Ax$ is invariant. Repeat.
https://math.stackexchange.com
186,759
[ "https://stats.stackexchange.com/questions/186759", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/98222/" ]
I have a few questions regarding the variable importance in random forest. The <code>importance</code> function outputs two types of importance measures (<code>1</code> = mean decrease in accuracy, <code>2</code> = mean decrease in node impurity). For the 2nd measure, the manual says: <blockquote> The second measu...
You've asked a statisticians forum for help on this question, so I'll provide a statistically-based answer. Thus it's reasonable to assume you're interested in the probability of guessing a PIN at random (for some definition of random), but that's reading more into the question than is provided. My approach will be to...
Obtaining a closed formula seems complex. However, it is quite easy to enumerate them. There are <code>568 916</code> possible codes for the second solution. Which is bigger than the number of solutions with a four digit PIN code. The code to enumerate them is below. Though not optimized, it only takes seconds to run. ...
https://stats.stackexchange.com
4,007,136
[ "https://math.stackexchange.com/questions/4007136", "https://math.stackexchange.com", "https://math.stackexchange.com/users/881411/" ]
I'm having a hard time finding an explanation how to solve the following problem. <blockquote> Given the recurrence relation <span class="math-container">$a_{n+1} = 2 a_n -1$</span> with <span class="math-container">$a_0=3$</span>. What is <span class="math-container">$a_n$</span> when expressed as an explicit functi...
<strong>First way</strong> Verify by induction that the provided solution is the right one... <strong>Second way</strong> If you don't know the solution. Take <span class="math-container">$b_n = a_n +c$</span> in order to get rid of the term <span class="math-container">$-1$</span> in the recurrence relation. That give...
You can compute the first terms: <ul> <li><span class="math-container">$a_0=3$</span>;</li> <li><span class="math-container">$a_1=5$</span>;</li> <li><span class="math-container">$a_2=9$</span>;</li> <li><span class="math-container">$a_3=17$</span></li> <li><span class="math-container">$\vdots$</span></li> </ul> These ...
https://math.stackexchange.com
169,213
[ "https://physics.stackexchange.com/questions/169213", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/23430/" ]
I have always heard that the inconsistency in explaining atomic models with classical mechanics was that the study of electrical charges had shown that whenever a charge is accelerated, it emits light (and thus there is no way to sustain circular movement of electrons around a nucleus). Since then it seemed interestin...
<h1>Yes, there are an uncountable infinity of possible wavelengths of light.</h1> In general the frequency spectrum for Electromagnetic (e.g light, radio, etc) is continuous and thus between any two frequencies there are an uncountable infinity of possible frequencies (just as there are an uncountable number of number...
Formally there are an infinite number of different wavelenghts. However, any given physical system can only be found in a finite number of distinct physical states. To create a light source with a wavelength $\lambda$ that is well defined up to some resolution $\delta\lambda$, requires observing it within a system of ...
https://physics.stackexchange.com
195,465
[ "https://security.stackexchange.com/questions/195465", "https://security.stackexchange.com", "https://security.stackexchange.com/users/188561/" ]
When installing Debian, I chose an option to create Encrypted LVM (Logical Volume Management). So now, when I turn on my PC, it asks me for an encryption password. It looks ok, but how does it work? What does GRUB initialize to ask my password, if the full drive with my OS and Kernel is encrypted? How does it decry...
You may not be aware of this, but VirusTotal saves the files that you upload. Businesses that have a subscription to VirusTotal can download those files you uploaded, it's part of the terms of service. I wouldn't upload anything potentially sensitive that you don't want the entire world seeing. While VirusTotal is i...
Large [legitimate] files, generally have a checksum provided by the manufacturer for a number of reasons: <ul> <li>Ensure the download completed successfully and in it's entirety</li> <li>Ensure the download is from the manufacturer in it's intended (unmodified) form</li> </ul> I'd hunt for a checksum from the vendor...
https://security.stackexchange.com
185,803
[ "https://softwareengineering.stackexchange.com/questions/185803", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/80048/" ]
When I first started to learn programming I remember having an argument with my teacher about If Else statements. I was arguing that: <pre><code> if { ... } else if { ... } ... </code></pre> is basically the same as: <pre><code> if { ... else { if { ... } else { ...
They are logically equivalent and achieve the same thing, it's just a different way to format the code. The difference generally comes down to readability of your code. I find nested <code>if</code> statements harder to read personally and try to avoid them. These statements are the same: <pre><code>if (condition1) ...
I'll be writing about the syntactical difference, since both forms are semantically equivalent (i.e. both programs compute the same result for any possible input). An <code>if</code>-<code>else</code>-statement will be represented in the abstract syntax tree (AST) as a node with three children. One is the condition, ...
https://softwareengineering.stackexchange.com
34,838
[ "https://dba.stackexchange.com/questions/34838", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/20228/" ]
I'm currently designing a project and I need professional advice from DBA. My project will feature voting system somewhat similar to the one used in stack exchage websites. I have users and content pieces and users can vote for content pieces they like or don't. Note, that I will have vote up/down option on the feed l...
<blockquote> Is there really a limit to that design and if yes, how can it be dealt with? 1.1. If the select query on votes table will be getting slower, what can I do to speed it up? </blockquote> I don't think the number of votes is likely to be the problem. The questions will have to do in part with questions of...
<ol> <li>Using a table with a ton of rows is not a problem (if properly indexed, as Phil pointed out). Managing it (backup, restore, altering) a single table can be rough.</li> <li>You could shard the data into multiple tables. You should cache the total number of up/down votes in the 'content' table itself.</li> <li...
https://dba.stackexchange.com
443,756
[ "https://softwareengineering.stackexchange.com/questions/443756", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/363053/" ]
I've seen similar questions but in this case the code deployed to all stages (local, dev, staging, prod) will be the same. The idea is to have a special field on one particular request, something like <code>isTest</code> that would allow a certain endpoint (consumed by a web client) to perform a DELETE action that othe...
Deletion isn't part of the test, so why not have that run separately, e.g. after all tests have completed? More generally, is there a reason why you don't have fresh test environments for each run? You're effectively adding another unrelated dependency between each test run: the results of previous tests could affect t...
I think you should consider to name the field differently, like &quot;overrideValidation&quot;, or &quot;enforceDeletion&quot;, not just &quot;isTest&quot;. The field should tell clearly what it does, not let the caller make assumptions. Of course, in your production environment, you are going to ignore the field on th...
https://softwareengineering.stackexchange.com
36,212
[ "https://dba.stackexchange.com/questions/36212", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/2945/" ]
I have two SQL Server instances that I manage. One is a SQL Server 2000 instance, and the other is 2005. Some where, on these servers, I recall setting up a couple table triggers that were executed under certain conditions. I need to look-up these triggers as a point of reference for a new project, however, for the ...
This will give you a list of tables that have triggers, and the name of the associated trigger: <pre><code>SELECT t.name, tr.name FROM sys.triggers tr INNER JOIN sys.tables t ON tr.parent_id = t.object_id </code></pre> This will give you the same list, with a column that shows the actual text of the trigger stat...
For SQL Server 2000: <pre><code>SELECT [table] = t.name, [trigger] = tr.name, c.text FROM sysobjects AS t INNER JOIN sysobjects AS tr ON t.id = tr.parent_obj INNER JOIN syscomments AS c ON tr.id = c.id WHERE tr.xtype = 'TR' AND t.xtype = 'U'; </code></pre>
https://dba.stackexchange.com
447,626
[ "https://stats.stackexchange.com/questions/447626", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/272560/" ]
If <span class="math-container">$X$</span> is random variable that has two density function <span class="math-container">$f(x)$</span> with probability <span class="math-container">$p$</span> and <span class="math-container">$g(x)$</span> with probability <span class="math-container">$1-p$</span>, and mean and standard...
This is our objective function, composed of a loss function and a regularizer. <span class="math-container">$$\mathcal O(w,x,y) = \mathcal L(w,x,y)+\mathcal R(w)$$</span> So <span class="math-container">$\mathcal R(w)=\|w\|_2^2=\sum{w_i^2}$</span> in the case of <span class="math-container">$\ell_2$</span> regulariza...
L2 regularization adds <span class="math-container">$w_i^2$</span> term to the loss function. In iterative approaches using gradients, we subtract the gradient of the loss function not the magnitude of the weight itself. And in the loss function, the regularization part's derivative with respect to <span class="math-co...
https://stats.stackexchange.com
65,226
[ "https://physics.stackexchange.com/questions/65226", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/24714/" ]
I did an experiment where I boiled two cups (500ml) of water in a kettle, and it took 1:30 minutes to reach around 98 C, average. However, when I boiled 4 cups of water, (1L) it only took me 2:30 minutes, when I expected it to be 3:00 minutes. Does this mean that the more water I boil, the faster it will reach 100 C (p...
Double the ammount of water does not need doulbe the ammount of time to heat, since while the energy needed is doubled indeed, losses due to vaporization and radiation from the kettle should be approximately constant. You can plot the time needed for a given ammount of water to boil and try to fit a function into that...
The simplest explanation that I haven't seen in another answer yet is the following: <h3>You're not just heating the water</h3> While the heat capacity of water is very large, your kettle also has a heat capacity and the parts of it in contact with the water also need to be heated. The heating element itself needs to b...
https://physics.stackexchange.com
168,076
[ "https://softwareengineering.stackexchange.com/questions/168076", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/61613/" ]
C++ noob here. I have a very basic question about a construct I found in the C++ book I am reading. <pre><code>// class declaration class CStr { char sData[256]; public: char* get(void); }; // implementation of the function char* CStr::get(void) { return sData; } </code></pre> So the <code>Cstr::get</code> fu...
For C and C++, array's degrade to pointers. An array cannot be returned as the value of a function, only a pointer can be returned. Returning the array is equivalent to returning the address of the first element of the array: <pre><code>return &amp;sData[0]; </code></pre>
<blockquote> Does C++ know to return the address of the returned object? </blockquote> In this case, yes. <em>An array's name is a constant pointer to the first element in the array</em>. So, when <pre><code>char* CStr::get(void) { return sData; } </code></pre> is executed, pointer to the first element of th...
https://softwareengineering.stackexchange.com
328,110
[ "https://softwareengineering.stackexchange.com/questions/328110", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/200700/" ]
I have developed in the past always classic ASP.NET solution. I am starting currently to develop ASP.NET MVC solutions, but i have a problem understanding what a Model is and what it should contain. In the past i had an Object. For example one for <code>User</code>, <code>Product</code> and an object for <code>Countri...
The "M" in ASP.NET's MVC is better thought of as a "ViewModel", which is an object that contains everything your View needs to render information to the screen. So a ViewModel is sort of specific to one "page" of your MVC application (although you can certainly reuse them for common pages). If you had a screen in your...
Model Refers to a set of classes that describe tha data that the application works with.In addition,these classes define business logic that governs how the data can be manipulated.
https://softwareengineering.stackexchange.com
498,970
[ "https://electronics.stackexchange.com/questions/498970", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/249500/" ]
I don't understand how to leverage CAN bus Mailboxes in my embedded systems.<br> I think I don't use them properly because I don't understand the problem they are trying to solve. Here's a simple example to illustrate my conundrum: <blockquote> <strong>Requirements and assumptions</strong> <ul> <li>Transmit ...
Indeed, I don't think you are understanding the problem that mailboxes are trying to solve. An "old school" CAN controller only has FIFO buffers: one Rx FIFO and (at best) one Tx FIFO. Where the Tx "FIFO" may be as low level as "you get one data register to write to and meanwhile we use another register for shifting ou...
CAN mailboxes solve problems for the CAN hardware designer: where to put a message when it arrives? And where to take messages from in order to send them? Sophisticated systems like Ethernet tend to have queues. CAN microcontrollers usually don't. So each mailbox can hold only one message. If another message arrives f...
https://electronics.stackexchange.com
906,762
[ "https://math.stackexchange.com/questions/906762", "https://math.stackexchange.com", "https://math.stackexchange.com/users/98900/" ]
The question is as follows: $$2^{{2014}^{2013}}$$ Determine its remainder by division with $41$. I know that I need to use $\bmod 41$ and reduce the power somehow to something that can be solved easily but I am not able to figure out how. There is a hint too. $$2^{10} \equiv -1 \pmod{41}$$ which I think I need to inco...
So, $2^{20}\equiv(-1)^2\equiv1\pmod{41}$ $$2014^{2013}\equiv14^{2013}\pmod{20}$$ Now as $(14^n,20)=4$ for $n\ge2$ let us find $14^{2013-2}\pmod{\dfrac{20}4}$ i.e., $14^{2001}\pmod5$ As $14\equiv-1\pmod5,14^{2001}\equiv(-1)^{2001}\equiv-1$ As $a\equiv b\pmod m\implies a\cdot c\equiv b\cdot c\pmod{m\cdot c},$ $14^2...
$\!\!\!\!\begin{eqnarray} &amp;&amp;{\rm mod}\ \color{#c0f}4\!:\ 2014^{2013}\ \ \equiv\,\ \ 2^{2013}\equiv\ \ 0\ \ \equiv \color{#0a0}4\\ &amp;&amp;{\rm mod}\ \color{#c0f}5\!:\ 2014^{2013}\equiv (-1)^{2013}\equiv -1\equiv \color{#0a0}4\\\end{eqnarray}\ \Rightarrow\, \color{#0a0}{2014^{2013}\equiv 4\pmod{\color{#c00}{20...
https://math.stackexchange.com
15,424
[ "https://mathoverflow.net/questions/15424", "https://mathoverflow.net", "https://mathoverflow.net/users/1238/" ]
Is the tr.deg of Q_p over Q 1? and what about C over Q?
In both cases the transcendence degree is the cardinality of the continuum. CH is not needed. This is a corollary of the following result: let $K$ be any infinite field, and let $L/K$ be any extension. Then $\# L = \operatorname{max} (\# K, \operatorname{trdeg}_K L)$. To prove this, in turn it suffices to establi...
The transcendence degree of either $\mathbb{C}$ or $\mathbb{Q}_p$ over $\mathbb{Q}$ is exactly the cardinality of the continuum. Certainly it can't be countable, since any field with countable transcendence degree over a countable field is countable. On the other hand, either transcendence degree is at most that of t...
https://mathoverflow.net
188,381
[ "https://softwareengineering.stackexchange.com/questions/188381", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/39757/" ]
Today I experienced a first in a technical interview. The candidate refused to use the whiteboard to solve an algorithm question, as I requested. There was no sort of disability at play or anything (outside of nervousness). He simply said that he is uncomfortable using a whiteboard for difficult questions. Oddly enough...
I wouldn't be too concerned about it. You aren't hiring him to work on a whiteboard; you're hiring him to work at a keyboard. The whiteboard is an in-interview technique to help demonstrate his competence. If that doesn't work well for him, but he's able to demonstrate his competence in other ways, then that's an ir...
There's a big difference between hashing out code on a whiteboard when brainstorming and hashing code out on a whiteboard when there's a guy who already knows the answer staring at you and waiting for you to make a mistake. Some people get really nervous in that environment. And even if you are not nervous, being in te...
https://softwareengineering.stackexchange.com
897
[ "https://mechanics.stackexchange.com/questions/897", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/489/" ]
I know the panels circled in yellow are headlight washers and exist on many cars now. However, on several BMWs I have noticed an extra panel, circled in red. It is not symmetric and I have only noticed it to be located more on the passenger side. What is it for? <img src="https://i.stack.imgur.com/gScsh.png" alt="en...
Red one is likely to be for a pull hitch. If you get stuck you can insert a screw with the hoop on the end and it will allow someone to pull you out with a chain or winch, putting load in the appropriate place (not the bumper). The screw device is probably in your trunk somewhere. From the owners manual <img src="h...
The red one is a cover for a screw-hole, into which a tow fitting can be attached. A tow fitting is a small ring, welded to a bolt. You screw it into that place in the bumper, allowing a tow truck to attach to the car without having to climb underneath, potentially hooking to a part of the car that can be damaged. Th...
https://mechanics.stackexchange.com
672,511
[ "https://physics.stackexchange.com/questions/672511", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/316948/" ]
Why is it not possible to have waves with high frequency (high energy) and great wavelength and converse? What physical quantity ties frequency to wavelength in an inversely proportional way?
The <strong>wavelength</strong> is how long each individual little wave is. The <strong>frequency</strong> is how many of these little waves can pass through in one second. They are automatically inversely related if the speed at which they move is the same for waves everywhere. Suppose a two-lane street. The left lane...
The equation for the speed of an EM wave is speed = wavelength x frequency. So for a given speed, larger frequency means smaller wavelength. To motivate this equation, frequency = 1/period, where the period is the time for one cycle. So if you watch one wavelength of a wave pass you by, it does it in a time equal to th...
https://physics.stackexchange.com
37,647
[ "https://mathoverflow.net/questions/37647", "https://mathoverflow.net", "https://mathoverflow.net/users/4466/" ]
Let $\mathcal{M}$ denote the category of finite sets and monomorphisms, and let $\mathcal T$ denote the category of based spaces. For a based space $X \in \mathcal T$, one has a canonical funtor $S_X : \mathcal M \rightarrow \mathcal T$ defined by $\{n\} \mapsto X^n$. The definition on morphisms is to insert basepoin...
It so happens that Emmanuel Dror Farjoun is visiting the EPFL this week. I figured I'd ask him about this problem at lunch today. What a coincidence! He proved exactly this statement using the exact same techniques. In fact, the construction of $SP^n$ as a homotopy colimit is the subject of Chapter 4 in "Cellular S...
I just came across this old posting, and see that folks had correctly discovered presentations (dating back to the mid 1980's) by Emmanuel Dror about writing colimits as homotopy colimits. The special case in hand -- symmetric powers of spaces -- is particularly elegant, as the orbits which arise are very limited an...
https://mathoverflow.net
12,207
[ "https://electronics.stackexchange.com/questions/12207", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/2985/" ]
I'm trying to create a circuit that will pulse out (short pulse) whenever it passes a certain threshold going upwards and another one to detect going downwards. I was thinking of using delay to achieve this... but I dont know how to really go about it. Any help would be appreciated, thanks in advance!
Use a comparator to detect the treshold crossing. Apply this signal to both inputs of an XOR-gate, one directly, the other delayed. You can use a few gates to create the delay. The output of the XOR-gate will give a short positive pulse each time you cross the treshold. The width of this pulse is determined by the dela...
Here is the circuit made out of two opamps: <img src="https://i.stack.imgur.com/fFNFY.png" alt="enter image description here"> Here is the simulation for Vthreshold = 1V <img src="https://i.stack.imgur.com/2JQ2I.png" alt="enter image description here"> The width of the pulse can be set by value of C1 (the bigger, t...
https://electronics.stackexchange.com
4,534,213
[ "https://math.stackexchange.com/questions/4534213", "https://math.stackexchange.com", "https://math.stackexchange.com/users/779554/" ]
I am a software engineer without a math degree, so I am planning to learn something today. Take this bijection between the naturals and reals. (This is a valid bijection, no?) <pre><code>...03020 =&gt; 0.02030... ...11111 =&gt; 0.11111... ...51413 =&gt; 0.31415... . . . </code></pre> Walking along the diagonal, we ca...
All natural numbers have <em>finitely</em> many digits.
Forget diagonals, the point of being an bijection is that you can go both ways. If your map is a bijection, it has an inverse that sends reals to naturals. But where would this inverse send the famous real number <span class="math-container">$1/3 = 0.33333333...$</span>?
https://math.stackexchange.com
7,252
[ "https://scicomp.stackexchange.com/questions/7252", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/3980/" ]
For the numerical integration of reaction terms in my PDE on a 2D triangular mesh, I would like to use the scheme $$ \int_T \Phi(x) \approx \frac{|T|}{3} (\Phi(x_0) + \Phi(x_1) + \Phi(x_2)) $$ where the $x_i$ are the triangle nodes. How to specify this when <code>assemble</code>ing the system?
Actually you don't specify quadrature rule to assembler but to form compiler. You can tweak <code>ffc/quadrature_schemes.py</code> for your needs or you can adjust generated code. In both cases you just supply your quadrature points and weights.
You can adjust the quadrature degree by setting <pre><code>parameters["form_compiler_parameters"]["quadrature_degree"] = q </code></pre> This will change the quadrature degree such that polynomials of degree q are integrated exactly. FEniCS will try to autodetect the necessary quadrature degree so this should normal...
https://scicomp.stackexchange.com
51,816
[ "https://mechanics.stackexchange.com/questions/51816", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/34886/" ]
1979 leyland Sherpa 230 1.7l with an "o series" engine. I've an overheating problem for a while now and still trying to get to the bottom of it. The cooling system and heater matrix are all OK and the thermostat works. First of all I did a power balance test and noticed the revs of the engine did not drop much on re...
You're just not getting good air flow. Have you thoroughly checked the condition of the valve train: worn camshaft lobes? loose timing chain? weak valve springs? improper tappet clearance? Is there any blockage of the exhaust system (emission controls, such as a collapsed catalytic converter, or damaged exhaust p...
On second thought, there should be <em>no</em> increase in revs when you apply propane. An intake manifold air leak is therefore most likely. I've never heard of a worn valve guide seal causing an internal air leak, but I'm no expert. It would seem that if a valve guide were the issue, you would see blue, burning oi...
https://mechanics.stackexchange.com
133,333
[ "https://chemistry.stackexchange.com/questions/133333", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/93398/" ]
Let’s say I have <span class="math-container">$\ce{AB (aq) + CD (aq) —&gt; AD + CB}$</span>. When AB and CD are dissolved in water, they get dissociated into their component ions. But why don’t they reform as AB and CD, if it is already known they (A and B, C and D) can form a chemical compound with each other? Why mus...
If one dissolves both AB and CD in water, they are split into their ions i.e. A+, B-, C+ and D-. As long as all ions remain in aqueous solution, thus no precipitation, they don't really exist as AD + BC in the solution. The solution is just a homogeneous mixture of ions at this stage. The difference between reactants a...
If the four substances AB, CD, AD and CB are all soluble in water, there is no such reaction in water. If you dissolve AB and CD, or independently AD and CB, you will obtain a solution containing the ions A+, B-, C+ and D-. That is all you can say. There are no pure substances any more. And it does not depend on the or...
https://chemistry.stackexchange.com
112,312
[ "https://softwareengineering.stackexchange.com/questions/112312", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/22141/" ]
Well... I was hired because I did not take a comp-sci or engineering course, however I was really good at coding. My job is doing the heterodox stuff when needed... You know, the guy that sometimes has to use a goto, or invent some bizarre technology. When I started my job, I blasted though stuff I needed to do, then ...
You sound like you're tired really, you're doing a lot of stuff and that 4 hours of travelling is a killer (I do 3 a day so I can feel your pain). I'd recommend getting to sleep earlier, try take some time off work if you have any holidays available and rest and relax.
Either lack of motivation or burnout issue (too much coding). Retrospect yourself. Are you happy at your job? Do you really like doing what you are doing right now? Talk to your friends and they may be able to point out what they see wrong with your attitude towards things.
https://softwareengineering.stackexchange.com
136,508
[ "https://softwareengineering.stackexchange.com/questions/136508", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/48332/" ]
Many, many, moons ago, I did my masters in Object Orientated Software Engineering. I covered everything: project initiation, requirements, analysis, design, architecture, development, etc, etc. My favourite IT book of all time was Developing Object Oriented Software, an Experience Based Approach (IBM-1996). A book crea...
I can't really give an answer to this question, but let me offer some thoughts. I am a computer engineering student in a university, and last semester me and a group did a large software project in which our primary language was Scala. We did our design the traditional way: use cases, a domain model, sequence diagrams...
UML emerged out of the "Bubble Wars" of the late 80s and early 90s. It was always a compromise for <em>notation</em>, not a design method. Many of the calumnies attributed to UML are secretly the result of a design method that says "Step 1: draw a class model." I suggest that we don't need <em>new</em> design methods ...
https://softwareengineering.stackexchange.com
372,973
[ "https://physics.stackexchange.com/questions/372973", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/117629/" ]
Consider the expression of velocity in generalized coordinates, $\mathbf v = \frac {d \mathbf x}{dt}$, where $\mathbf x = \mathbf x (\mathbf q(t), t)$. We end up with a total derivative, i.e $$\mathbf v=\frac {d\mathbf x}{dt}=\sum_i \frac {\partial\mathbf x}{\partial q_i} \frac{\partial q_i}{\partial t} + \frac {\part...
The partial derivative is a very confusing object. Say you have a function of two variables, $f(q,t)$. In this case, $f$ has a direct dependence on $t$. The partial derivative is defined as: $$\frac{\partial f}{\partial t}=\lim_{h\to0}\frac{f(q,t+h)-f(q,t)}{h}$$ What this means effectively is that you're holding consta...
There is nothing wrong with using the chain rule over there, since you are expressing only a partial derivative. It is perfectly correct. What cannot be done is to write $\frac{d\bf{x}}{dt} = \frac{\partial \bf{x}}{\partial q_i}\frac{\partial q_i}{\partial t}$. This is wrong because it neglects the meaning of $\frac{d...
https://physics.stackexchange.com
43,081
[ "https://softwareengineering.stackexchange.com/questions/43081", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/11532/" ]
I know basic stuff like, what are beans, jsp, servlet, jsf and how this stuff should work together. I know how to make basic jsp page with database query for example. Now I need to know what is the best path to learn all this stuff. My plan is to learn in this order: <ol> <li>jsp (including persistance and JSTL)</l...
While it did once have some performance implications, I think the real reason is for expressing your intent cleanly. The real question is whether something <code>while (*d++=*s++);</code> expresses intent clearly or not. IMO, it does, and I find the alternatives you offer <em>less</em> clear -- but that may (easily) be...
<h3>It is, err, was, a hardware thing</h3> <hr> Interesting that you would notice. Postfix increment is probably there for a number of perfectly good reasons, but like many things in C, it's <em>popularity</em> can be traced to the origin of the language. Although C was developed on a variety of early and underpower...
https://softwareengineering.stackexchange.com
11,764
[ "https://scicomp.stackexchange.com/questions/11764", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/8329/" ]
We all know the problem that computation time explodes when simulating systems with big matrices. I got just this problem, but I have the advantage that I know that my matrices are symmetric. My question is thus: Do you know a way to decrease computation time if I know that my matrices are symmetry? What I want in ...
Obviously if your matrices are sparse you should move to a sparse matrix implementation. There are packages available that take advantage of symmetry too. <strong>Storage:</strong> Assuming that your matrices are dense, unless your matrices have a more detailed (known) structure, you won't be able to do better than t...
If you're using a library like LAPACK, I think you'll find there are specific routines for symmetric matrices, in addition to those that work for completely general inputs. These are intended to be more efficient (in time and/or storage).
https://scicomp.stackexchange.com
24,497
[ "https://mathoverflow.net/questions/24497", "https://mathoverflow.net", "https://mathoverflow.net/users/3757/" ]
The following seems to be a question related to standard calculus, but I am not quite sure where to look for an answer. Suppose $f,g:\mathbb{N} \to \mathbb{C}$ are such that the have the same asymptotical behaviour, i.e. $f(n)/g(n) \to 1$ as $n \to \infty$. Of course, suppose that one of the sums $\sum_{n=0}^\infty f(...
Following Theo Johnson--Freyd's suggestion, I am making my above comment an answer: Just subtracting one series from the other, it seems that you need $\sum_{n=0}^{\infty} (f(n)−g(n))$ to converge. Writing $$f(n)/g(n)=1+\delta_n,$$ $$\text{so that } \qquad \qquad\sum_{n=0}^{\infty} (f(n)−g(n))=\sum_{n=0}^{\infty} \...
What about this: Take $f(n) = (-1)^n\log(n)^{-1}$ and $g(n)=f(n)+n^{-1}$. The sum of the $f(n)$'s is converging (it is "telescopic") and very far from absloutely converging. The sum of $g(n)$'s diverges to $+\infty$. Finally we have $$f(n)/g(n) = \frac{1}{1 + (-1)^n\log(n)n^{-1}}$$ which goes to 1 as $n$ goes to infi...
https://mathoverflow.net
580,086
[ "https://stats.stackexchange.com/questions/580086", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/361704/" ]
We compute confidence intervals to estimate the true population mean of either a sample (when population standard deviation is unknown) or an entire population (when population standard deviation is known). But I wonder why, if we are given an entire population, why don't we calculate the average of that population ins...
We’d love to calculate population parameters! All of inferential statistics is about inferring. In other words, we are using our data at hand to guess about something greater than the data (e.g., the population from which the data are drawn). We can be silly with our guesses, or we can be thoughtful. Good statisticians...
If we're able to observe the entire population of interest then that's exactly what we'd do! In this case we don't require any statistical inference because we directly observe the entire population of interest. Where statistical inference (including confidence intervals, etc.) comes in is when, for some reason, we a...
https://stats.stackexchange.com
77,757
[ "https://softwareengineering.stackexchange.com/questions/77757", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/23010/" ]
Technically, Is there a difference between these two words or can we use them interchangeably? Both of them more or less describe the logical sequence of steps that follow in solving a problem. ain't it? SO why do we actually use two such words if they are meant to talk of the same? Or, In case if they aren't synonymo...
Wikipedia's definition of an Algorithm: <blockquote> In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning. </blockquote> A...
"Pseudocode" is to "algorithm" as "English" is to "knock-knock joke". An algorithm is a formal structure for something that might be expressed in pseudocode, or in <em>actual</em> code. A knock-knock joke is a formal structure for something that might be expressed in English, or in some other language. (Do other cult...
https://softwareengineering.stackexchange.com
384,552
[ "https://mathoverflow.net/questions/384552", "https://mathoverflow.net", "https://mathoverflow.net/users/164702/" ]
In Chapter 2 of Lurie's Higher Topos Theory, the first main theorem establishes a connection between categories cofibered in groupoids and left fibrations and asserts the importance of studying left fibrations in <span class="math-container">$\infty$</span>-category theory. However, I lack understanding of the importan...
I tried to implement my proposal in a C-code. That is a mixture of analytic and numeric integration. It does <span class="math-container">$10^6$</span> rectangles with half-percent relative precision in about 16 seconds, which is a bit better than the corresponding Iosif's 30 minutes. You can play with parameters to tr...
Let <span class="math-container">$r=\frac12\sqrt{(a_1-a_2+b_1-b_2)^2 + (c_1-c_2+d_1-d_2)^2}$</span>, which is the distance between the centers of the rectangles. Then the distance between <span class="math-container">$(x_1,y_1)$</span> and <span class="math-container">$(x_2,y_2)$</span> is <span class="math-container">...
https://mathoverflow.net
82,397
[ "https://physics.stackexchange.com/questions/82397", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/31765/" ]
An elevator is moving down with uniform acceleration. A man inside the elevator who wants to measure the acceleration drops a coin as soon as the elevator starts. The coin is 6ft above the floor of the elevator at the moment it is dropped. It takes 1 second for the coin to reach the floor of the elevator. Calculate the...
Using the frame of reference of the building: Can you figure out how far the elevator moves in $1\text{ sec}$, starting at rest, and accelerating at $a$, the unknown you want? Can you figure out how far the coin falls in $1\text{ sec}$, starting at rest and accelerating at $32 \text{ } ft/sec^2$? Do you see that $Di...
Another possible way to solve it, is by using the elevator as the frame of reference. Since the elevator is accelerating downwards, we will have to apply a psuedo force upwards in the chosen frame of reference.Let a be the acceleration of the lift. Now the forces on the coin is mg(downward) and ma(upward). Since the ...
https://physics.stackexchange.com
2,070,547
[ "https://math.stackexchange.com/questions/2070547", "https://math.stackexchange.com", "https://math.stackexchange.com/users/135245/" ]
The following exercise appears in "Hilbert $C^*$-modules" book by E. Christopher Lance:<br> Definition: $E$ and $F$ are <em>unitarily equivalent Hilbert $A$-modules</em> if there exists a unitary element $u\in L(E,F)$, where $L(E,F)$ denotes the set of $A$-linear maps that are adjointable.<br> Exercise: Show that $A$...
If you have $\mathcal O_2\subset M(A)$, you can take two orthogonal isometries $V,W\in M(A)$ with $V^*V=W^*W$, and $VV^*+WW^*=I$. Now you can define $$u:A\to A\oplus A$$ by $$ua= V^*a \oplus W^*a .$$ This is well-defined because $V,W\in M(A)$. We need to check that $u$ is adjointable: $$ \langle ua,b\oplus c\rangle_{A...
I think that I have an idea for the converse direction (without the assumption that $A$ is unital):<br> Let $u: A\oplus A\to A$ be the given unitary element in $L(A\oplus A,A)$.<br> Define $p_1:A\to A\oplus A$ to be $p_1(a)=(a,0)$, then it is easy to check that $p_1\in L(A,A\oplus A)$ and $p_1^* \in L(A\oplus A,A)$ i...
https://math.stackexchange.com
257,603
[ "https://stats.stackexchange.com/questions/257603", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/76459/" ]
Let's assume that we have simple linear regression: $\hat{y} = bx + \text{intercept}$. Is it possible to have a high p-value and high $R^2$ (or low p-value and low $R^2$)? I've been looking for examples of this. When the linear regression has multiple parameters, I saw some examples where p-value for some parame...
Yes, it is possible. The $R^2$ and the $t$ statistic (used to compute the p-value) are related exactly by: $ |t| = \sqrt{\frac{R^2}{(1- R^2)}(n -2)} $ Therefore, you can have a high $R^2$ with a high p-value (a low $|t|$) if you have a small sample. For instance, take $n = 3$. For this sample size to give you a (two...
This looks like a self-study, so I'll offer a hint: Is either or both of these measures (R-square and p-value) related to the sample size?
https://stats.stackexchange.com
59,814
[ "https://mechanics.stackexchange.com/questions/59814", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/42399/" ]
A couple of weeks ago, the right headlight in my car burnt out, so I went to the garage and had it fixed. When I picked up my car, their salesnerd told me to watch my <em>left</em> headlight, for "once one headlight burns out, the other often follows in short order". At first, I found that statement a little odd. But ...
No, the salesman was spot on. If you think about it, bulbs are designed to last about the same amount of time. If they are installed in pairs, then the secondary light which matches the first will most likely be on the road to death just as the first. This holds mostly true for higher output lights, like your headlight...
Lightbulb failure is a random event, which is not pre-set to happen after X hours of service or before a certain date. It is provoked by stress from vibration, repeated heating up and cooling down and voltage spikes above nominal voltage. Having said that, lightbulbs have a predictable ageing process where their filam...
https://mechanics.stackexchange.com
217,839
[ "https://mathoverflow.net/questions/217839", "https://mathoverflow.net", "https://mathoverflow.net/users/15735/" ]
The situation is this. I have a space $X$ which is second countable, compact, and Hausdorff (it's a modified form of a type space, though I don't think that matters here). It has size continuum. It may or may not have isolated points. Must $X$ have a discrete subset of size continuum? The obvious inductive constru...
Without even using compactness (or metrisability), a subspace of a second-countable space is second-countable. There is no discrete, uncountable, second-countable space.
A second countable, compact Hausdorff space is metrisable (and separable). Subspaces of separable metric spaces are separable too. Uncountable discrete spaces are not separable.
https://mathoverflow.net
265,796
[ "https://security.stackexchange.com/questions/265796", "https://security.stackexchange.com", "https://security.stackexchange.com/users/284521/" ]
How serious a security problem is it to have the name of the web server in the HTTP header (Apache, Nginx etc.)? I am discussing this with a system administrator and he told me that deleting version is easy, but deleting the name of the server (in our case nginx) is not so simple and it takes more time. So, he thinks t...
Assuming that the server is fully patched and you're just talking about product name and not version, I wouldn't generally regard this as a serious problem. Essentially all security hardening is a trade-off between effort and risk reduction. Here you would potentially be reducing the risk marginally of a successful att...
Any competent vulnerability scanner won't check for headers or similar information; instead, it'll just try dozens or hundreds of known attacks and checks if one if them works. Why that? Because there's so many reasons why the header info might be wrong. You might, for example, be using a long term release of Ubuntu, D...
https://security.stackexchange.com
69,452
[ "https://datascience.stackexchange.com/questions/69452", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/63565/" ]
I'm working with an unbalanced classification problem, in which the target variable contains: <pre><code>np.bincount(y_train) array([151953, 13273]) </code></pre> i.e. <code>151953</code> zeroes and <code>13273</code> ones. To deal with this I'm using <code>XGBoost</code>'s <code>weight</code> parameter when defin...
Depending on your choice of accuracy metric, you'll find that different balancing ratios give the optimum value of the metric. To see why this is true, consider optimizing precision alone vs. optimizing recall alone. Precision is optimized (=1.0) when there are no false positives. Upweighting negative data reduces the ...
<blockquote> Instance Weight File XGBoost supports providing each instance an weight to differentiate the importance of instances. For example, if we provide an instance weight file for the "train.txt" file in the example as below: train.txt.weight 1 0.5 0.5 1 0.5 It mean...
https://datascience.stackexchange.com
53,436
[ "https://electronics.stackexchange.com/questions/53436", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/17715/" ]
I need to convert 10V-32V range from a battery ( full range 0V- 32V) to a range of 0-5V before applying it to ADC. This is basically to get more resolution in my required range(10v -32V), since most of the battery applications not require sensing below certain range(Li-ion Bat)
The other questioners understood your requirement but disagreed with the need for it. As do I, it adds less than 1 bit of resolution to your measurements. However, you can do it by adding a 10V zener diode in series with the resistor string. <pre><code>Bat(+)----|&lt;|----(A)----////---(B)---////----Bat(-) </code></pr...
A voltage divider is needed if you have a real world signal that covers a wider range than your ADC. Suppose you have a signal from a transducer that goes from 0-20 Volts, and an ADC that works from 0-5 Volts. You need to divide the signal by 4 to get it into the range of your ADC. You can do this by placing two resi...
https://electronics.stackexchange.com
131,929
[ "https://physics.stackexchange.com/questions/131929", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/46038/" ]
Most quantum mechanics texts include a phrase such as 'any ket can be written as a sum of eigenkets of a given observable'. I have problems with the generalities of <em>any</em> ket. Does this literally mean <em>any</em> ket, or does it mean any ket of the same observable? It seems odd that any ket, say an eigenket o...
Think about it this way: When you measure some observable $O$, you get <em>some</em> measured value. If you measure many identically prepared systems, you may measure different values corresponding to the operator $O$. In the limit where you do this infinitely many times, you are able to recover exactly which values ar...
Look it like this, a ket is a vector of a (fancy) vector space and as such it has different components with different weights. Now, going to a more familiar vector space of the $R^3$, you can choose for example the cartesian coordinate system to describe a vector in space, but you can also choose any other set of thr...
https://physics.stackexchange.com
161,981
[ "https://physics.stackexchange.com/questions/161981", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/52381/" ]
A primitive cell of a crystal lattice is a set $A$ such that two copies of $A$ which are translated by a lattice vector do not overlap and such that $A$ tiles the entire crystal. <img src="https://i.stack.imgur.com/ao8GH.png" alt="Some primitive cells in an scc grid"> I have read (for example in the german “Festkörpe...
Let $\mathcal{L}\subseteq\mathbb{R}^n$ be a lattice with a basis $B\in\mathcal{R}^{n\times n}$ and $F\subseteq\text{span}(\mathcal{L})$ be measurable. $F$ tiles $\mathcal{L}$ iff <ol> <li>$(x+F)\cap(y+F)=\emptyset\,\forall x\neq y\in\mathcal{L}$, and</li> <li>$\mathcal{L}+F=\text{span}(\mathcal{L})$</li> </ol> It is ...
The quotient forming map $\Bbb R^n\to\Bbb R^n/\Lambda$ is a local isometry (as translations by elements of the lattice $\Lambda$ are isometries without fixed points) onto a torus, whose volume is equal to the (absolute value of the) determinant of the basis of $\Lambda$. The preimage of each point of the torus has ex...
https://physics.stackexchange.com
96,799
[ "https://electronics.stackexchange.com/questions/96799", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/35715/" ]
More and more often, I find myself needing to tear apart a device to seek out and connect to serial pads. These pads typically give me access to the underlying operating system for research or tinkering, of which I'm perfectly comfortable with. What I'm not comfortable with, though, is making the necessary hardware co...
The best trick is not a trick at all. It's using a thin solder and flux. Once you've identified the pins you need to use, that is. If heat is a concern, use a low wattage soldering iron. After all, these are fairly small (area wise) isolated pins. These things are made to be soldered. Surface mounted parts go through 2...
I would say pogo pins <img src="https://i.stack.imgur.com/wWTzJ.png" alt="pogo"> attached to a small peg that can "bite" the pcb, similar to the following but using smaller pegs with one pin in the tip of each one. <img src="https://i.stack.imgur.com/osu6i.jpg" alt="enter image description here">
https://electronics.stackexchange.com
303,321
[ "https://mathoverflow.net/questions/303321", "https://mathoverflow.net", "https://mathoverflow.net/users/73701/" ]
Consider Poisson equation $\nabla \cdot (\sigma(x)\nabla u)=0$ in a domain $D$, where $\sigma(x)$ is the spatially dependent conductivity. On the boundary we have $n$ electrodes (Dirichlet BC $u=\text{const}$ on each electrode). And the rest of the boundary is insulating material $du/d\vec n=0$ (Neumann BC). The electr...
Let $A$ be this matrix. Because of the formula $$\int_D\sigma\nabla u\cdot\nabla v\, dx=\sum_{i,j}a_{ij}U_iI_j,$$ ($U$ for voltages of $u$, $I$ for currents of $v$), we see three necessary conditions: <ul> <li>the matrix must be symmetric,</li> <li>it must be positive semi-definite,</li> <li>and $A{\bf1}=0$.</li> </ul...
In dimensions 3 and higher, and without any constraints on $\sigma$, one can apparently obtain any symmetric matrix $A = (a_{ij})$ such that $a_{ij} &lt; 0$ when $i \ne j$ and $a_{ii} = -\sum_{j \ne i} a_{ij}$, as suggested in Denis Serre's answer. That answer already explains why these conditions are necessary. To see...
https://mathoverflow.net
168,808
[ "https://physics.stackexchange.com/questions/168808", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/36266/" ]
Consider two waves $y_1,y_2$ travelling in opposite directions with equations $$y_1(x,t) = A \sin(\omega t - kx) \\ y_2(x,t) = A \sin(\omega t + kx) $$ That create the following standing wave $$y_s(x,t) = y_1 + y_2 = 2A\cos(kx)\sin (\omega t)$$ Consider, now, a point $P$ at $x = x_0$ (without loss of generality let ...
The equations you wrote down describe a wave that is traveling one way, then gets reflected and travels back the other way. The leading edge of the returning wave changes the slope of the wave - just before it becomes a full standing wave it is a mixture of the traveling wave (to the right) and the leading edge of the ...
I believe it means that there is a kink or cusp in the pattern the wave makes at that point in time, presumably due to the fact that there was some external disturbance needed to make that change happen.
https://physics.stackexchange.com
43,387
[ "https://dba.stackexchange.com/questions/43387", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/24360/" ]
<h1>Introduction.</h1> When I create a database, <pre><code>postgres=# CREATE DATABASE test2 OWNER test2; </code></pre> it is created with an <strong>empty</strong> privileges column: <pre><code> Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+----...
This is currently not supported in PostgreSQL out of the box. Perhaps you should send in a feature request (or a patch).
The <code>CONNECT</code> privilege for <code>PUBLIC</code> looks somewhat special: <pre><code>\l template1 | postgres | UTF8 | Hungarian, Hungary | Hungarian, Hungary | postgres=CTc/postgres </code></pre> That is, user <code>test</code> (which is the member of <code>PUBLIC</code> only) cannot connect to <code>t...
https://dba.stackexchange.com
456,414
[ "https://physics.stackexchange.com/questions/456414", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/185622/" ]
What is the relationship to the energy capacity of a flywheel and its radius, mass, rotational velocity etc?
<blockquote> Hence are 4D Euclidean spaces also solutions to the equations? </blockquote> Yes. <blockquote> What about spaces with signature (++−−)? </blockquote> Yes, they can also be solutions. <blockquote> Is it just the starting conditions that determine the signature of space-time? </blockquote> Yes, or...
I think the answer to this question depends on what one understands by a solution to Einstein's equations. For simplicity consider the vacuum equations <span class="math-container">$$ Ric(g)=0 $$</span> What is meant by a solution? If one is looking for a Ricci flat metric, then there is no restriction to the signature...
https://physics.stackexchange.com
263,408
[ "https://security.stackexchange.com/questions/263408", "https://security.stackexchange.com", "https://security.stackexchange.com/users/280502/" ]
On my school website I can list all existing accounts in the system to send them a message. Each account has a logo showing the user role (admin, professor or student) and I can directly filter on it. As I know some of these peoples are likely to click on a link I send them via chat. Is it a bad security practice ? Or ...
<blockquote> running <code>npm i ...</code> not long after <code>pass my-password</code> allows a malicious package to steal my entire password store </blockquote> Yes, but not just that. Running <code>npm i ...</code> <strong>at any time before</strong> <code>pass my-password</code> allows a malicious package to steal...
That’s only a partial solution to your problem, but I do use a hardware token for my GPG key. Whenever the hardware token is unplugged, no malicious code can use my GPG key. Moreover, the hardware token I am using is a Yubikey that can me configured so that it requests to be physically touched before any decryption/sig...
https://security.stackexchange.com
152,143
[ "https://cs.stackexchange.com/questions/152143", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/151320/" ]
Normally, when working with dictionaries, we expect around O(1) complexity when we go to retrieve a value given the key (and when we insert). I work in Python, but this might apply to any dynamic typed language. I have been working with dictionaries where the keys are frozensets, which are just sets that are hashable ...
Unfortunately, no, this isn't achievable (at least not if you want to handle arbitrary sets as keys). The reason is simple: if <span class="math-container">$N$</span> denotes the number of elements in a key set, then it takes <span class="math-container">$O(N)$</span> time just to read all of those elements, and any co...
My understanding: You might have three values in the table with keys (a, b), (a, c), (b, c). When you lookup (d, e, c) you want the values for the keys (a, c) and (b, c) containing a “c”. First you implement a hash-table like data structure where a key can occur multiple times. When a key/value set is added or removed ...
https://cs.stackexchange.com
122,874
[ "https://dba.stackexchange.com/questions/122874", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/82098/" ]
Last day, I was at one training for Oracle installation and service start &amp; shutdown. There I came to know about some Linux commands to start and shutdown an Oracle instance on a Linux machine. <strong>To identify the instance running</strong> : The command below will return all Oracle instances which are current...
There's no fool-proof way, but here's a list of ideas for you: <strong>/etc/oratab:</strong> Little script to give you a list of SIDs in the <code>oratab</code>: <pre><code>cat /etc/oratab | grep -v '^#\|^\s*$' | cut -d: -f 1 </code></pre> <strong>$ORACLE_HOME/dbs</strong> You can adapt the above script to look in...
IF Oracle restart is in place, as is often the case when RAC and/or ASM is in use, you can use: <pre><code>crsctl stat res -t -w "TYPE = ora.database.type"|awk '/^ora./ {l=$0;} !/^ora./ { if ( l &gt; "" ) l=l " " $0; print l;l="";}'|grep ${HOSTNAME%%.*} </code></pre> to list the databases that are defined on the cur...
https://dba.stackexchange.com
231,666
[ "https://softwareengineering.stackexchange.com/questions/231666", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/60716/" ]
My professor made a comment today - "...They've been having trouble with filesystem performance, and since they're more graphics guys, they asked us systems guys to help out...". What exactly is "computer systems"? What does it mean to be a "systems guy"? And, what is a "systems guy" passionate about? For contrast, wh...
He means a specialist in Operating Systems. Typically covering things like file systems, device I/O, memory management, concurrency control, and security. File systems would be things like "Do I have a system where the file structure can be accessed quickly and efficiently?". Device I/O would be along the lines of "I...
A system is a lot more than a CPU running code. How all the boxes are connected, reliably powered, cooled, fault-monitored, fail-over provisioned, who feeds the card-punches and moves the tape-reels (just kidding), etc. can be affected by software that a systems guy might be involved with.
https://softwareengineering.stackexchange.com
4,245
[ "https://ai.stackexchange.com/questions/4245", "https://ai.stackexchange.com", "https://ai.stackexchange.com/users/10118/" ]
How are the layers in a encoder connected across the network for normal encoders and auto-encoders? In general, what is the difference between encoders and auto-encoders?
<h1>Theory</h1> <h2>Encoder</h2> <ul> <li>In general, an Encoder is a mapping <span class="math-container">$f : X \rightarrow Y $</span> with <span class="math-container">$X$</span> Input Space and <span class="math-container">$Y$</span> Code Space </li> <li>In case of Neural Networks, it is a <strong>Generative Mode...
To answer this rather succinctly, an encoder is a function mapping some input to some different space. An example of this is what the brain does. We have to process the sensory input that the environment gives us in order for it to be storable. An autoencoder's job, on the other hand, is to learn a representation(enco...
https://ai.stackexchange.com
321,794
[ "https://dba.stackexchange.com/questions/321794", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/279/" ]
I have some data stored in a table in XML format: <pre><code>&lt;AccountTypes xmlns=&quot;&quot;&gt; &lt;Id&gt;1003&lt;/Id&gt; &lt;Id&gt;2&lt;/Id&gt; &lt;Id&gt;3&lt;/Id&gt; &lt;Id&gt;1004&lt;/Id&gt; &lt;Id&gt;1002&lt;/Id&gt; &lt;Id&gt;0&lt;/Id&gt; &lt;/AccountTypes&gt; </code></pre> This is legacy data that...
<code>Id</code> is looking for a sub element of the <code>'/AccountTypes/Id'</code> nodes that is called <code>Id</code> i.e. would match something in <pre><code>&lt;AccountTypes xmlns=&quot;&quot;&gt; &lt;Id&gt; &lt;Id&gt;1003&lt;/Id&gt; &lt;/Id&gt; &lt;/AccountTypes&gt; </code></pre> You can use <pre><code>DE...
There's an alternative way to get the data: <pre><code>DECLARE @accountTypes XML SELECT @accountTypes = DT.AccountTypes FROM dbo.DataTable AS DT WHERE DT.Id = 1016 SELECT Id.value('.','int') AS Id FROM @accountTypes.nodes('/AccountTypes/Id') AS Ids(Id) </code></pre> This produces the same results and as the data I hav...
https://dba.stackexchange.com
6,775
[ "https://cs.stackexchange.com/questions/6775", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/4365/" ]
There are N players and M objects, each of the objects has a value. Each player has a strategy in choosing an object. Each round a player will choose an object, many players can choose the same object. However the value of each object is divided evenly among every player that has chosen it. There will be 9000 rounds(ch...
To expand upon my comment, remember, this algorithm for finding Min-Cost-Flow relies on the fact that $f$ is maximal. By first running Ford-Fulkerson to find $f$ and the resulting residual network $G_f$, the cost $f$ is then reduced by finding negative cycles in $G_f$. That is, by finding negative cycles in $G_f$ we do...
My suggestion: You have to start the algorithm from T, in order to find a negative cycle in your residual network. The result should be the same, but then you can reach the circle
https://cs.stackexchange.com
2,244
[ "https://engineering.stackexchange.com/questions/2244", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/61/" ]
This one should be easy to answer by looking at the thermodynamics, but I find it not to be. Say we have a natural gas stream, ~700 N∙m<sup>3</sup>/h, that we want to compress from 16 bar to 250 bar. What will the power consumption of the compressor be? The thing that stymies me is that the power uptake is not path in...
The work is surely path dependent; you can estimate a fast passable value in two way. Isothermal, as in the case when several stages with intercoolers are used <blockquote> (SI Units) KWiso = 2.78*10^-4 * (VolFlowRate) * P1 * LN( P2/P1 ) </blockquote> And Adiabatic with costant ratio of specific heats (k) <blockquote> ...
Maybe I didn't get the problem it sounds a little bit simple, but as I see you would have to calculate using a PVT correlation (Peng-Robinson for exemple) the power your transformation requires in a ideal system (ΔS=0, the power required for this transformation is path independent) and then you can divide the value you...
https://engineering.stackexchange.com
124,713
[ "https://electronics.stackexchange.com/questions/124713", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/27349/" ]
I have designed the following circuit to interface a 12-20V signal to a microcontroller running on 3.3 volts. The signal is either 20V or open circuit. I want the circuit to be as resilient as possible. It should be able to handle EMI and ESD. <img src="https://i.stack.imgur.com/XMOZk.png" alt="circuit"> <ul> <li>R1...
Looks good to me. The inverse diode D1 is a good idea. If you have a minimum of 12V available you may wish to reduce R2 somewhat. This circuit has a threshold of maybe 2V, you could easily halve R2 or double R1. In the case of momentary extreme over-voltage, the base-emitter voltage (forward biased) will not rise abo...
I designed a very similar circuit myself once when I needed some "rugged" inputs. However, I used R1 = R2 = 100k (rather than 10k). It really doesn't take much input current to saturate Q1 with R3 = 10K. Reduce C1 by the same factor if you want to keep the same corner frequency. If you want some hysteresis to improve ...
https://electronics.stackexchange.com
1,018,672
[ "https://math.stackexchange.com/questions/1018672", "https://math.stackexchange.com", "https://math.stackexchange.com/users/154018/" ]
<blockquote> <span class="math-container">$$\int_0^{\infty} \frac{1}{x^3-1}dx$$</span> </blockquote> What I did: <span class="math-container">$$\lim_{\epsilon\to0}\int_0^{1-\epsilon} \frac{1}{x^3-1}dx+\lim_{\epsilon\to0}\int_{1+\epsilon}^{\infty} \frac{1}{x^3-1}dx$$</span> <hr /> <span class="math-container">$$\lim_{\e...
Remember that in any limit to infinity only the highest power term in the numerator and denominator matter. Thus your expression is equivalent to $\frac{1}{6}ln(1)=0$
We can in fact evaluate the Cauchy principal value of the integral as follows (which is what I think you were trying to do). Consider the following contour integral: $$\oint_C dz \frac{\log{z}}{z^3-1}$$ $C$ is a modified keyhole contour about the positive real axis of outer radius $R$ and inner radius $\epsilon$. T...
https://math.stackexchange.com
4,927
[ "https://mathoverflow.net/questions/4927", "https://mathoverflow.net", "https://mathoverflow.net/users/1253/" ]
Let k be a finite field, G the k-points of GL_2, T1, T2 the k-points of the split and non-split tori of G. Then the G-representations C[G/T1] and C[G/T2] are almost the same. More precisely, they differ by two copies of a certain irreducible representation (the Steinberg). I might have slightly miscomputed, but the...
I don't have much time, but maybe the following can lead you to a solution. I'm sloppy too, writing $G$ both for the algebraic group (over some finite field $k$) and for the set of points $G(k)$. This is semilar to a special case of a formula of Humphreys on Deligne-Lusztig characters. ("Deligne-Lusztig characters and...
Certainly representations associated to the different tori of G play an important role in Deligne-Lusztig theory. Unfortunately, the whole point of D-L theory is that if you want to understand the representation theory of the finite field points of algebraic groups, you should still remember that they are algebraic va...
https://mathoverflow.net
96,999
[ "https://softwareengineering.stackexchange.com/questions/96999", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/12758/" ]
Simulated threads are known as "green threads" in programming-language-wonk speak. They are compared to "native threads" as provided by the operating system, but is there an analogous colour for native threads, and what is it?
User-mode threads can be referred to as "green" threads, whereas kernel-mode threads can be referred to as "red" threads. This terminology is rarely used, but an appreciation of the difference is a good thing to know.
No, there isn't. The "green" is like in "green peace", not like in "green apple". I guess the opposite might be "smoggy" or any other term denoting non-eco-friendliness.
https://softwareengineering.stackexchange.com
698,002
[ "https://physics.stackexchange.com/questions/698002", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/186673/" ]
In certain reaction, gamma rays are released as products. Take the following reaction for example: <span class="math-container">$${}^1_{0}n + {}^{235}_{92}U \rightarrow {}^{140}_{54}Xe+{}^{94}_{38}Sr + 2{}^{1}_{0}n + \gamma(6MeV). $$</span> For determining <span class="math-container">$Q$</span>-values for reactions, I...
<blockquote> What force is opposite in direction and equal in magnitude to the one exerted by me? </blockquote> This would be the book pushing you in the opposite direction, but since your mass is much larger you get more friction and as a result you do not move. If the surface on which you stand was frictionless, you ...
<blockquote> For example, if I give a book a push and it starts to slide across the table, that means it was not able to neutralize the force I exerted on it with normal/frictional force. </blockquote> The book moved because the static friction force between the book and the table that opposed the force you applied to ...
https://physics.stackexchange.com
4,394
[ "https://electronics.stackexchange.com/questions/4394", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1363/" ]
Some micros have all bits of a port nicely lined up, while others' bits seem to have been scattered by the winds to all four points of the compass. Why?
I occasionally do chip design - as mentioned above many chips will intersperse power and grounds within parallel buses so that the drivers will have enough power (lead inductance is an issue - plus you don't want to starve the core when driving external loads). However there are other issues - you might be constrained...
Often this has alot to do with lead inductance. You need to keep your grounds spread out, and based on layout decisions in the chip internal to the package it may need to spread out the I/O pins. Would you rather have ground problems or spread out pins. In general, I use #define to handle which pin I am using and all...
https://electronics.stackexchange.com
68,394
[ "https://security.stackexchange.com/questions/68394", "https://security.stackexchange.com", "https://security.stackexchange.com/users/4077/" ]
Is my understanding correct that in order to exploit via "Shell Shock", binary we influence needs to execute bash (and we need to have influence on command line)? Therefore, am I correct, that if binary does not execute bash directly, and does not use <code>system()</code> system call (which uses shell for command eva...
Wrong on both counts. In order to exploit the "shellshock" vulnerability, an attacker needs to control at least one environment variable (easy to do through CGI, SSH, or DHCP), and <code>bash</code> needs to be invoked at some point with the modified environment: directly as the result of an <code>exec()</code>, indir...
To add to what Mark said, it's also worth noting that <code>execlp</code>, <code>execvp</code>, and <code>execvpe</code> all invoke <code>/bin/sh</code>, as that's how they perform their path lookups. So, even without the 2nd-generational effects Mark mentions, just using the exec* family of functions does not guarant...
https://security.stackexchange.com
176,438
[ "https://softwareengineering.stackexchange.com/questions/176438", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/71409/" ]
I'm a student working an internship at a larger company, writing small business apps in C#. I've noticed that I don't comment my code as I write it. Rather, I comment my code when I'm in the debugging stage of development. As I'm tracking down bugs, I'll run across a block that makes me think "hmm...that might confu...
<strong>Code should be self-describing, whenever possible.</strong> In other words, if you write clear code, you will need fewer comments. Comments should include: <ol> <li>A general description of the class/method and what it does,</li> <li>How objects and methods relate to each other, as an overall architecture....
Write comments as you write the code. They're there for your benefit as well as the benefit of anyone who may be subsequently reading the code. You've got things half right when you talk about "explain why this block is used" but the debugging stage is just going to be too late for that. If you have to think about w...
https://softwareengineering.stackexchange.com
180,478
[ "https://stats.stackexchange.com/questions/180478", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/93929/" ]
I have a regression, e.g. $Y=a+b_1X_1+b_2X_2+c_1Z_1+c_2Z_2+e$. Is it possible test the one-tailed null $b_1+b_2\leqslant c_1+c_2$ against the alternative $b_1+b_2&gt;c_1+c_2$? Notice that this is an $F$-test with a single restriction.
<strong>Yes, this is possible.</strong> The general multiple linear regression model is $$y = X\beta + \varepsilon$$ with the $k$ regressor values, along with a constant vector, forming the columns of $X$ and the $p=k+1$ coefficients arranged correspondingly in the vector $\beta$. When there is no collinearity amon...
Yes this is indeed very possible, in fact nothing changes. Use the standard F-test provided by whatever software you are using. Actually, when you only have one parameter the F-test is just the square of a the same t-test. That is, $t^2_{n-k-1} \sim F_{1,n-k-1}$. As Whuber points out in the comments, you have to be c...
https://stats.stackexchange.com
48,260
[ "https://dba.stackexchange.com/questions/48260", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/25434/" ]
We have deployment scripts that we need to run on databases that are spread across multiple servers. One script only runs on one database, but the scripts depend on each other. We are looking for a way to run all of the scripts as one big transaction so that all scripts either commit or rollback as a whole. How do I d...
It really depends on what you are trying to protect from and what your SLAs are. If your goal is to protect against hardware failure and you can handle a few minutes of downtime in the event of a hardware failure then stick with the native VMware options. If you need to protect yourself from blue screens then cluster...
VMware HA will soon bring a new option, which will be announced at VMworld (end of August 2013), this might help you a little. Drawback though that still remains is that with HA (incl the new feature) you cannot do maintenance on one node and have the other node server requests like you mentioned in the cons already. I...
https://dba.stackexchange.com
35,053
[ "https://security.stackexchange.com/questions/35053", "https://security.stackexchange.com", "https://security.stackexchange.com/users/10714/" ]
My login form uses Ajax so it doesn't need to reload if the password is wrong. A PHP script process the request and creates the session if the credentials are right. My idea is to have the PHP script sleep to mitigate a brute force attack. At first it wouldn't sleep at all but after that I'm not sure. How long does a ...
Since HTTP is a stateless protocol, there is no concept of a wait time between tries. The attacker can simply spawn multiple processes, and try many passwords simultaneously. A common way to deal with the problem, and to lessen the impact on your server is by implementing a lockout policy, where you maintain a cou...
A hacker can easily spawn multiple AJAX calls in parallel, this will bypass your sleep thing. And you may end up clogging server resources. Instead, do the following: <ul> <li>Start showing CAPTCHAs after three incorrect attempts from an IP</li> <li>After an incorrect attempt, block all new login requests to your ser...
https://security.stackexchange.com
161,031
[ "https://softwareengineering.stackexchange.com/questions/161031", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/48679/" ]
A simple way to keep the settings of a Java application is represented by a text file with ".properties" extension containing the identifier of each setting associated with a specific value (this value may be a number, string, date, etc..). C# uses a similar approach, but the text file must be named "App.config". In bo...
Essentially the external configuration file is encoded as a YAML document. This is then parsed during application start up and mapped to a configuration object. The final result is robust and above all simple to manage.
How I've done it: Initialize everything to default values. Parse the file, storing the values as you go. The places being set are responsible for ensuring the values are acceptable, bad values are ignored (and thus retain the default value.)
https://softwareengineering.stackexchange.com
2,592,252
[ "https://math.stackexchange.com/questions/2592252", "https://math.stackexchange.com", "https://math.stackexchange.com/users/85798/" ]
I need to show that $$\sum_{k\mathop=n}^{\infty} \frac 1 {k^2} &lt; \frac 2 {2n-1}$$ Could I have a small hint? I have tried many things, like bounding it above with the corresponding integral but this is too weak. I have tried subtracting $1$ from each of the denominators (excluding the first term) and then evalua...
$$\frac1{k^2}&lt;\frac1{k^2-\frac14}=\frac1{k-\frac12}-\frac1{k+\frac12},$$ so $$\sum^\infty_{k=n}\frac1{k^2}&lt;\sum^\infty_{k=n}\left(\frac1{k-\frac12}-\frac1{k+\frac12}\right)=\frac1{n-\frac12}=\frac2{2n-1}$$
Hint: Compare with the integral of $1/x^2$, by comparison with the integral, you obtain that $\sum_{k\geq n}{1\over k^2}&lt;\int_{n-{1\over 2}}^{+\infty}{1\over x^2}dx={2\over{2n-1}}$.
https://math.stackexchange.com
4,562,061
[ "https://math.stackexchange.com/questions/4562061", "https://math.stackexchange.com", "https://math.stackexchange.com/users/846768/" ]
Consider the <span class="math-container">$(n+1) \times (n+1)$</span> Coxetermatrix <span class="math-container">$$ A = \begin{pmatrix} 1 &amp; -\frac{1}{2} &amp; 0 &amp; \cdots &amp; -\frac{1}{2}\\ -\frac{1}{2} &amp; 1 &amp; -\frac{1}{2} &amp; \ddots &amp; \vdots \\ 0 &a...
You've correctly identified that your sample space contains <span class="math-container">${52 \choose 2} = 1326$</span> possible combinations of cards, but you are double-counting some of the combinations in your figure of <span class="math-container">$663$</span> ways of drawing at least one spade. Specifically, for e...
An alternative rehabilitation of the approach taken by the OP is as follows: You can either get: <ul> <li>Spade, Non-spade : <br> <span class="math-container">$\displaystyle \binom{13}{1} \times \binom{39}{1} = 507.$</span> </li> <li>Spade, Spade : <br> <span class="math-container">$\displaystyle \binom{13}{2} = 78.$</...
https://math.stackexchange.com
3,067
[ "https://electronics.stackexchange.com/questions/3067", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/857/" ]
I understand that a DSP is optimized for digital signal processing, but I'm not sure how that impacts to the task of choosing an IC. Almost everything I do with a microcontroller involves the processing of digital signals! For example, let's compare the popular Microchip dsPIC30 or 33 DSP and their other 16-bit offe...
To be honest the line between the two is almost gone nowadays and there are processors that can be classified as both (AD Blackfin for instance). Generally speaking: Microcontrollers are integer math processors with an interrupt sub system. Some may have hardware multiplication units, some don't, etc. Point is they...
One thing the others didn't mention is behavior on numeric overflow. In normal processors this usually wraps around from the maximal value to the minimal value. For DSP usage there is often at least an option to use <em>saturation</em> instead. That is, on overflow the value stays at the maximal value, which produces ...
https://electronics.stackexchange.com
122,818
[ "https://mathoverflow.net/questions/122818", "https://mathoverflow.net", "https://mathoverflow.net/users/9093/" ]
Let $A$ be a $k \times k$ invertible matrix over complex numbers. If it possible to write its nth root as an analytic function (i.e. power series in $A$)? EDIT: Complex coefficients can be functions of $A$. <h2>Notes</h2> If a matrix $A$ has only one eigenvalue $\lambda$, then it is simple. We take $$B = \exp\left...
If I am reading this correctly, you are fine with a power series whose (scalar) coefficients depend on the matrix $A$. In this case, it suffices to take a polynomial $p$ that interpolates $\sqrt[n]{x}$, such that for each eigenvalue $\lambda$ with multiplicity $k_\lambda$, the first $k_\lambda-1$ derivatives of $p$ coi...
Let $A$ be a $k\times k$ invertible matrix, i.e. in $Gl(k)$. Assume that the segment $[I,A]$ lies in $Gl(k)$. Let us define $$ \text{Log}A=\int_{[1,A]} \frac{d\xi}{\xi}=\int_0^1(I-tI+tA)^{-1}(A-I)dt. $$ It makes sense since $A$ commutes with the denominator inside the integral. The assumption is satisfied in particular...
https://mathoverflow.net
2,664,888
[ "https://math.stackexchange.com/questions/2664888", "https://math.stackexchange.com", "https://math.stackexchange.com/users/74378/" ]
I am familiar with how to use the linearity of the expectation and variance of random variables, however, I have this problem where I don't understand how to represent it by random variables in the first place. The problem states that 40% of a given country is urban and 60% is rural. The urbanites have a mean income ...
Consider three random variables: the income $X$ of typical urban person, the income $Y$ of typical rural resident, and the Bernoulli random variable $Z$ which is independent of $X$ and $Y$ and distributed as $\mathbb P(Z=1)=0.4$, $\mathbb P(Z=0)=0.6$. Then $ZX+(1-Z)Y$ represents an income of randomly chosen person. Th...
You are right about the mean of the new set (the whole population). The mean is the expectation as you have it. The variance on the other hand depends very much on the distribution of the 2 subsets. Even with a known distribution, say normal, computing the new variance would be very difficult and I would probably emp...
https://math.stackexchange.com
394,856
[ "https://softwareengineering.stackexchange.com/questions/394856", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/274250/" ]
The use of <code>instanceof</code> might be a code smell and I am in front of the following code which seems ok. Would you consider that <code>instanceof</code> should not be used in such case? What would be the pattern to use? <pre class="lang-php prettyprint-override"><code>&lt;?php interface Account {} class Priv...
Yeah its a code smell to check the type of an object. The whole point of polymorphism is that you shouldn't have to know the type. In your case the code will break if I pass in some other derived class of Account. In terms of performance, searching the lazy loaded lists either way is going to be slow. Splitting it do...
Instead of using <code>instanceof</code> you might implement a method <code>isPrivate()</code> on Account which would be implemented as <code>return true;</code> in PrivateAccount and <code>return false;</code> in PublicAccount. Another option would be to use double dispatch: User would implement methods <code>hasPri...
https://softwareengineering.stackexchange.com
11,988
[ "https://electronics.stackexchange.com/questions/11988", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/3301/" ]
I'm have a project which is using an ATMega 328 which is powered by 5 volts. It is connected to an accelerometer/gyro breakout board through a 3.3 voltage regulator and supplying the 3.3 volts to the ATMega's AREF pin. I want to control a Jaguar speed controller via PWM, which I believe expects a 5 volt signal. My ques...
AREF is nothing to do with PWM, it's the analogue reference input for the ADC. With a 5V supply, you will get a 5V PWM output.
AREF is defined as as the analog input voltage-reference. I looked in a few places and I can't find any discussion of changing the PWM voltage. Not a definitive 'no' but that would be my guess. I'd be reaching for my meter, right about now.
https://electronics.stackexchange.com
223,924
[ "https://stats.stackexchange.com/questions/223924", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/123422/" ]
I have a response variable that obtains different confidence intervals (CI) when calculated with different explanatory variables. I want to add up all values of the response variable and create a CI for the sum. I would understand how to do if someone please helped me solve the following example from a triathlon where...
In short: <ul> <li>Take as central point of your confidence interval the sum of central points of every confidence interval (45+70+35=150 minutes).</li> <li>Take as radius of your interval the square root of the sum of the squares of the radius of every confidence interval <span class="math-container">$\sqrt{5^2+10^2+5...
Pere has given a good answer. Adding up of variances is what happens when you add distributions. However in your case, he has assumed the radius as the standard deviation. but in fact, it is 1.96 times the standard deviation. So you will need to divide the radius (pere's terminology) by 1.96 (95% conf int) and then squ...
https://stats.stackexchange.com
400,144
[ "https://electronics.stackexchange.com/questions/400144", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/168714/" ]
I was able to find a lot about why the input resistance is high and basically infinite. I understand that the input resistance is high so that it doesn't become a load on the signal. I also know that it makes sense like a voltage divider, the high impedance means that all of the voltage drops on the op amp. But I can'...
whether it's an inverting or non-inverting circuit, if the feedback resistance <span class="math-container">\$R_F\$</span> and the other resistor connected to the inverting input terminal (usually called <span class="math-container">\$R_1\$</span>), gets as large as the internal input resistance, then the internal inpu...
Each opamp parameter which normally is neglected during calculation will affect the operation (the gain) of the amplifier (input and output impedances, finite and frequency-dependent open-loop gain,...). However, in most cases we do not care about these effects because they will be either not too important (because t...
https://electronics.stackexchange.com
2,436,923
[ "https://math.stackexchange.com/questions/2436923", "https://math.stackexchange.com", "https://math.stackexchange.com/users/431574/" ]
<blockquote> A and B are swimming in lanes right next to each other, but in different directions. They both start at the same time, and they pass each other after person A has swam 84 feet. When they reach the end, they turn around and swim back, meeting again 36 feet away from person A's starting point. How long is ...
Let the length of the pool be $L$. When they first meet, $A$ has swum $84$ feet and $B$ has swum $L-84$. How far have they each swum the next time they meet? Now require that the speeds be constant, so the ratios of distances are the same at each meeting. That gives an equation in $L$.
I recall a similar problem from the Moscow Puzzles. A clever way of solving with minimal algebra is as follows: When they pass each other first, they have together crossed $1$ length of the pool. When they cross again, they have crossed $3$ lengths of the pool, and since their speeds are constant, we know that it took...
https://math.stackexchange.com
6,634
[ "https://security.stackexchange.com/questions/6634", "https://security.stackexchange.com", "https://security.stackexchange.com/users/3738/" ]
I've come across several sites lately that have complexity requirements for <em>usernames</em> like "must be 8 characters long and contain at least 2 numbers". Is there any real added benefit to this from a security standpoint? I would think that since a username is designed to be an identifier and not a secret that ...
I cannot think of a tangible security benefit, other than maybe possibly it being a little more difficult to enumerate the user names. Some practice of security through obscurity, i would think that would have the disadvantage of then requiring your users to have to write down their username to remember it, maybe defe...
The reasoning behind the requirement could be to discourage users from re-using a username and password from another system.
https://security.stackexchange.com
7,032
[ "https://mechanics.stackexchange.com/questions/7032", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/3526/" ]
After changing the air tube in my front tire and reinstalling the wheel on my Suzuki RMZ450, I noticed that the front brake lost a lot of stopping power. What caused this and what do I need to fix to get the full stopping power back? Do I need to bleed the front brake? Please give step by step instructions if possible....
It is unlikely that simply removing and re installing the wheel would cause air to enter the brake system, though I suppose if someone had repeatedly squeezed the brake lever while the wheel was off the bike, that could have run the master cylinder reservoir dry and admitted air. One should never apply the brakes unles...
<strong>It's almost a bit normal</strong> Your brake pads aren't lined up on the wear grooves of your disc. What is very common on dirtbikes is to get a few grooves, not necessarily deep, cut into the discs/rotors. When you put the wheel back onto the bike the pads on your front caliper were just a little bit off....
https://mechanics.stackexchange.com
43,933
[ "https://security.stackexchange.com/questions/43933", "https://security.stackexchange.com", "https://security.stackexchange.com/users/31671/" ]
I need some help for my understanding while reading through this authentication scheme in WEP. In a WEP authentication scheme, the station first sends a request for authentication. However, this authentication scheme is a one-way authentication because it does nothing to prove to the station that the access point know...
No. That shows a need for mutual authentication. Two factor authentication is a way to increase the confidence or assurance in an authentication. Passwords are weak; passwords combined with either token or biometrics are stronger. But the authentication is still one way; the relying party has confidence in the id...
<strong>"Two-factor" is not "two-way".</strong> "Two-way" authentication, aka mutual authentication, is when two entities (let's call them A and B, e.g. a WiFi access point and a client system) prove to each other that they are who they claim to be; A gains confidence in the fact that it talks to the genuine B, and B ...
https://security.stackexchange.com
1,137,206
[ "https://math.stackexchange.com/questions/1137206", "https://math.stackexchange.com", "https://math.stackexchange.com/users/203334/" ]
Does a finite group contains subgroups generated by its elements. I suspect that answer is Yes and that my question could be trivial. But I am studying algebra for the first time so I wanted to be sure. I would really appreciate your input. While proving that a group of prime order is cyclic (2.2.4 page 60 Herstein...
Any collection of elements in a group, finite or infinite, always generates some subgroup. This is in particular always true for a single element of the group. Sometimes, however, the generated subgroup may be the entire group. (But any group is a subgroup of itself, so this is not a contradiction). To see this, we fir...
Closure under the group operation of $G$ ensures that if $a\in G$, then $a^n\in G$ for all positive integers $n$. Since $a^{-1}\in G$, again by closure we have $(a^{-1})^n \in G$ for all positive integers $n$. Since $(a^{-1})^n = (a^n)^{-1}$ for all $n\in \Bbb N$ (which can be shown by induction), we have that $a^n\in ...
https://math.stackexchange.com
325,053
[ "https://stats.stackexchange.com/questions/325053", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/155692/" ]
I have an understanding into the technicals of word2vec. What I don't understand is: Why semantically similar words should have high cosine similarity. From what I know, goodness of a particular embedding is seen in shallow tasks such as word analogy. I am unable to grasp the relationship between maximizing cosine ...
<blockquote> Why semantically similar words should have high cosine similarity. </blockquote> From wikipedia on distributional semantics: <blockquote> The distributional hypothesis in linguistics is derived from the semantic theory of language usage, i.e. words that are used and occur in the same contexts tend to...
One of the main difference in cosine based similarity is the non-affect the dual 0 bits have(There is no angle at 0).<br> In the case of word-similarities, it helps the algorithm focus only on sentences(or phrases or documents or..) where at least one of the words exist.<br> This in a contrary to using the Euclidean no...
https://stats.stackexchange.com
68,325
[ "https://mathoverflow.net/questions/68325", "https://mathoverflow.net", "https://mathoverflow.net/users/15856/" ]
Let $(M,g)$ be a closed, smooth Riemannian manifold. Let $\Delta = -div\nabla$ be the Laplace-Beltrami operator. Let $h$ be a smooth function on $M$. Is there a condition on $h$ weaker than non-negativity such that $\Delta + h$ is a positive or non-negative operator? I'm thinking of something akin to the following: F...
This can't be right as stated: if $h$ takes a negative value at some point $p$ of $M$ then $\Delta+ch$ has a negative eigenvalue for sufficiently large $c$. Proof: let $f: M \rightarrow {\bf R}$ be a nonnegative smooth function that's positive at $p$ and supported on a small enough neighborhood of $p$ that $f(q)=0$ wh...
I believe the answer is no if $n&gt;2$. Let $g$ be a metric with a negative Yamabe constant. There will be a metric $h$ in the conformal class of $g$ such that $\int_M R_h dv_g&gt; 0$. Let $L_h$ be the conformal Laplacian of the metric $h$. It will possess a negative eigenvalue due to the negativity of the Yamabe const...
https://mathoverflow.net
403,500
[ "https://softwareengineering.stackexchange.com/questions/403500", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/327861/" ]
I'm developing an application that has a backend (Java, Spring) and a frontend (TypeScript, Angular). The backend application provides with an OpenAPI-compatible API and performs certain operations with different 3rd-party services (Kubernetes cluster, GitLab server and other ones). The backend service has controllers...
There are two reasons for catching an exception <ol> <li>To convert the exception to a different exception, so that internal implementation details are not exposed to users of a module. An example could be that you want to turn a Kubernetes "no such pod" exception into a more generic Repository exception "item not fou...
There is only <em>one</em> reason to catch An Exception - to do something "useful" with it. Question: Do you "screen" every telephone call that comes into your office building on the <em>off-chance</em> that it might be relevant to you and "throw back" [all] the ones that aren't? Of course not. It's the same wi...
https://softwareengineering.stackexchange.com
514,380
[ "https://physics.stackexchange.com/questions/514380", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/239012/" ]
When an electron passes the double slit it hits the screen leaving a trace but we don't know anything about which one of the two it acctually passed.What about making a single slit on the screen where a stripe appears.We now have a possibility of the electron to pass that slit on the stripe and by placing an additional...
<blockquote> Now the work I've done is distance traveled times force magnitude, hence 20 joules. </blockquote> That is not strictly true. You are neglecting the kinetic energy that the object possesses at 2 meters due to the velocity you initially gave it has when it reaches 2 meters. The total work you did equals...
The key point to avoid confusion is to have clear in mind the correct attribution of forces, work and potential energy to the corresponding physical systems. When one introduces the potential energy of a body in the gravitational field, the work of interest is <strong>the work done by the gravitational force, which, i...
https://physics.stackexchange.com
90,175
[ "https://datascience.stackexchange.com/questions/90175", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/33057/" ]
When comparing ML models with baseline or &quot;dummy&quot; models, are there best practices for building and comparing baselines? I'm doing a binary classification task where 40% of the samples are class_0 (untreated class), and the other 60% are class_1 (treated/positive class). I have two baselines: baseline_0 predi...
This depends on what you want to show. When working with metrics you shouldn't just take the value as is, but <em>see what each metric are telling you</em>. baseline_1 isn't better/worse than baseline_0 because it has a higher/lower value in metric X. <strong>Both baselines give an interesting perspective on a given da...
Selecting the right metric is maybe the first point to find out and strongly <strong>depends on</strong> the <strong>real use case</strong> your are trying to apply the model to. Is it more important to prevent false negatives (e.g. in medical applications)? Or is it a balance between getting high true positives and tr...
https://datascience.stackexchange.com
203,318
[ "https://security.stackexchange.com/questions/203318", "https://security.stackexchange.com", "https://security.stackexchange.com/users/157534/" ]
I read the following piece of code: <pre><code>dd if=/dev/urandom bs=16 count=1 2&gt;/dev/null | md5sum </code></pre> Apparently, this code was used as a trick to produce a hex string key from a 128-bit binary pseudo-random value. Someone here claimed this is inherently insecure since it passes a cryptographically s...
Hashing is a deterministic process which means that it can never increase the randomness. But of course it can decrease the randomness: if you hash a 200 bit random value with some hash algorithms which only outputs 160 bits (like SHA-1) then of course the resulting value can never have 200 bits randomness. But as lo...
<pre><code>dd if=/dev/urandom bs=16 count=1 2&gt;/dev/null | md5sum </code></pre> This is guaranteed to lose some entropy, but not much. The difficulty in attacking MD5 doesn't directly suggest the amount of loss, but merely tells us it is not zero. If I fall back on naïve construction, I find that the entropy loss i...
https://security.stackexchange.com
29,325
[ "https://dsp.stackexchange.com/questions/29325", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/19948/" ]
I am recording vibration data using an adxl335 accelerometer.I have ~50ms delay before i save a reading from this sensor so most probably each second i have ~20 readings. I verified that by checking the difference between two consecutive readings since i am recording the time of reading, however since my pc is not real...
The sensor is analogue and being input to Arduino for analogue to digital conversion. Arduino has a function <strong>Micros()</strong> which Returns the number of microseconds since the Arduino board began running the current program, I suggest using this to accurately save the time of analogue read on Arduino. Calcula...
Sampling rate = samples per second. Since your fft frame will be several samples long, you could think about: <ol> <li>recording the time when you read the first sample of the frame</li> <li>reading in a certain number of samples</li> <li>querying the time again</li> <li>computing time difference in seconds</li> <li>t...
https://dsp.stackexchange.com
11,689
[ "https://dba.stackexchange.com/questions/11689", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
I need some help analysing some simple t-sql execution plans. I have a table [User] with the following 3 columns: Id(Primary Key), Username(nvarchar(50)), FirstName(nvarchar(50)) I have Created an Unique NonClustered Index for the Username column The execution plan for a query filtering by FirstName: <pre><code>sel...
From your question I gather that your table is relatively small. As you put more rows in the table you'll find that the bookmark lookup stays about the same, and the scan takes longer and longer. Eventually the scan will cost many times more than the bookmark lookup. As SQLMenace said, execution plan costs are often u...
Total cost is almost always not reliable for things like this I would use <code>STATISTICS IO</code> and <code>STATISTICS TIME</code> instead run both queries and look at the difference in reads <pre><code>SET STATISTICS IO ON select * from [User] where FirstName ='John' select * from [User] where Username = 'johndo...
https://dba.stackexchange.com
60,505
[ "https://quant.stackexchange.com/questions/60505", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/47437/" ]
I am aware that there exist several libraries and programs that allow to baktest a portfolio strategy by iterating through the OHLC dataframe of the stocks of interest (Backtrader, Backtesting, ...). However, these methods are useful when we are working on one or few stocks: when it comes to backtest a strategy that in...
I've worked in this industry for a while and have run ETF market making for quite a few years. It's very difficult to perfectly lock in profit as you detailed above. With fast equipment it can be done sometimes. But most of the time you really are just hedging to model - and there is risk in that case. For exampl...
An ETF typically appoints one or multiple Authorized Participants (aka APs) which are allowed to buy and redeem ETF shares directly with the fund, by exchanging the fund shares against a basket of the underlying securities. These APs are often the market makers and their arbitrage involves managing an inventory of unde...
https://quant.stackexchange.com
80,952
[ "https://mathoverflow.net/questions/80952", "https://mathoverflow.net", "https://mathoverflow.net/users/10030/" ]
The problem is as follows. Given a set $S$ of natural numbers of size $n$ where each $x_i \in S$ is from the set $[n^2]$. Elements of $S$ are not necessarily pairwise different, i.e., there can be duplicates in $S$. Given an input number $y \in [n^2]$, find the first occurrence of $y$ in $S$, if any. That is, suppose $...
You can't do that. Most probably $y$ does not occur in $S$ at all, and when it does it will most probably occur only once. In either case you cannot hope to know that fact, or locate $y$, without looking at all elements/half the elements on average.
You can certainly construct a data structure such as a hash table, which maps values from $[n^2]$ to indexes in $S$. This will enable a constant-time look-up. If you are not allowed a pre-computed data structure, then as Marc van Leeuwen pointed out, you can't expect to do better than $O(n)$ time.
https://mathoverflow.net
2,655,842
[ "https://math.stackexchange.com/questions/2655842", "https://math.stackexchange.com", "https://math.stackexchange.com/users/402373/" ]
I'm having trouble gaining intuition as to why the answer is 2/3 as opposed to 1/2. Here is the question: Alice has five coins in a bag: two coins are normal, two are double-headed, and the last one is double-tailed. She reaches into the bag and randomly pulls out a coin. The coin lands and shows heads face-up. What...
You are of course correct that it can only be one of the four coins as indicated, but when you say that the sample space $HT, HT, HH, HH$ leaves as options $T,T,H,H$ you are effectivly assuming that of the double-headed coins, you could only have gotten the 'first' head being face-up. But since the 'second' one could ...
"Intuitive thinking doesn't always give the right answer." is the short answer. <blockquote> <code>{H,T H,T H,H H,H }</code>occurs, which leaves these possibilities -> <code>{H, H, T, T}</code> </blockquote> First off I'm not sure what you mean here, but I think something like "Head means we can ignore the dou...
https://math.stackexchange.com
108,137
[ "https://security.stackexchange.com/questions/108137", "https://security.stackexchange.com", "https://security.stackexchange.com/users/94537/" ]
I was just wondering if this would be a reasonable way to write a custom authentication method for a RESTful API. It seems moderately secure, but perhaps I'm way wrong here. 1) Email and Password are sent over HTTPS to my server. 2) Server stores the email, and runs the password through a SHA512 hash with a 256 bit r...
Seems reasonable if step 5 is also done via HTTPS. As for what to do if you suspect the tokens have been compromised, you could store an ExpirationDate for each token and force users to reauthenticate after the token has expired. Upon suspecting a breach, just expire all the tokens immediately.
Your token idea is fine but the password hashing is horrible. You're using a fast hash, the salt helps a bit but that's sill insecure; you should use a slow hashing function especially designed for passwords like bcrypt. Most web frameworks provide ready-to-use authentication functions that use the most secure methods...
https://security.stackexchange.com