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
123,375
[ "https://softwareengineering.stackexchange.com/questions/123375", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/3544/" ]
I was reading, Facts and Fallacies of Software Engineering, which has a section of maintenance. Since, I'm have been a maintenance developer for years now, I was very interesting facts presented. Here's three. <ul> <li>Fact 41: Maintenance typically consumes 40 to 80 percent (average, 60 percent) of software costs. Th...
I think you will find that paradigms such as functional, OO, and procedural probably don't corellate with software maintainability in a meaningful way. What you might find the following corellates much more clearly with software maintainability: <ul> <li>Level of requirements gathering and requirements engineering</l...
<blockquote> This one was counter-intuitive, turns out that good software has more maintenance, because it's easy to change. Hence, it stays in use longer, leading to, yes, more changes. </blockquote> You seem to be viewing this from the amount of maintenance and not the percentage of cost. Good software that ha...
https://softwareengineering.stackexchange.com
89,184
[ "https://mathoverflow.net/questions/89184", "https://mathoverflow.net", "https://mathoverflow.net/users/10400/" ]
The cuspidal representations of <span class="math-container">$\operatorname{GL}_n(F)$</span> a non archimedean field <span class="math-container">$F$</span> with ring of integers <span class="math-container">$o$</span> can be classified by inducing irreducible representation from <span class="math-container">$Z\operato...
Abbreviate $G={\rm GL}(n,F)$ and $K={\rm GL}(n,{\mathfrak o})$. The general philosophy of "type theory" is the following. When you restrict an irreducible representation of $G$ to $K$, you get a semisimple representation whose irreducible components are of two sorts: -- irreducible representations of $K$ occuring in...
Some of your questions have several non-equivalent interpretations so it's not so easy to give precise answers, but I will try to give at least partial answers to two of your questions. How does the representation theory of <span class="math-container">$\operatorname{GL}_2(F)$</span> and the representation theory of <s...
https://mathoverflow.net
83,372
[ "https://cs.stackexchange.com/questions/83372", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/79434/" ]
Can anyone explain how are conditionals implemented in the CPU? Is special circuitry used?
The semantics of any non-jump CPU instruction is to increment the program counter PC (a.k.a. instruction pointer) so that the subsequent instruction can be executed next. Uncoditional jumps overwrite PC with a new, fixed value, written in the instruction. (Or, for relative jumps, add to PC said value) Conditional jumps...
The basis of the if condition is the conditional jump. That means that a jump is taken only if a certain condition it true. A non-conditional jump is a write to the program counter register. So a condition jump inhibits the write if the condition is not true.
https://cs.stackexchange.com
68,828
[ "https://cs.stackexchange.com/questions/68828", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/51753/" ]
The following context-free grammar presents a "dangling else" type ambiguity (imagine that $a$ stands for <code>if expr then</code> and $b$ stands for <code>else</code> and $c$ stands for some other kind of instruction or block): $$ \begin{aligned} S &amp;\rightarrow aSbS \;|\; aS \;|\; c\\ \end{aligned} $$ For example...
This problem is an exact analogue of the problem of matching parentheses in an expression in which some of the close parentheses have been omitted. Here an "if" (or $a$ in the representative grammar) is an open parenthesis and an "else" ($b$) is a close parenthesis. (From the sequence of $a$s and $b$s you can mechanica...
Take a+b+c+d+e and a-b-c-d-e. There are two obvious ways how a grammar could parse these, but there is one way that we use. In the case of the "dangling else", that's not actually how people look at it. Instead the syntax is interpreted as "if", followed by zero, one or more "else if", followed by an optional "else"....
https://cs.stackexchange.com
20,364
[ "https://security.stackexchange.com/questions/20364", "https://security.stackexchange.com", "https://security.stackexchange.com/users/13220/" ]
We've been logging GET requests on our domain to the following: <code>XX/YY/ZZ/CI/MGPGHGPGPFGHCDPFGGHGFHBGCHEGPFHHGG</code> This has no meaning on our site. A search on the web revealed no information, but a few other places which logged similar requests. Is this a known kind of attack? What might it be targeting?
This is a malicious request, but it's not trying to exploit a vulnerability. It's trying to generate a 404 page, in order to determine what kind of web server or CMS you're running, by identifying tokens in the page source. Error pages often specify their CMS name and version, or the web server name and version, so it'...
This is not a malicious request. It is actually a request for the png logo of a Fortinet device. This logo is displayed on the authentication page of Fortinet firewalls and other Fortinet network devices. That being said, if you are seeing many requests, it could be that an attacker is attempting to brute force the au...
https://security.stackexchange.com
22,829
[ "https://mechanics.stackexchange.com/questions/22829", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/10150/" ]
Is it normal for the car to vibrate on the biting point when no gas is given? When I give enough gas it seems fine but not when I very slowly release the clutch and hold at the biting point. Is this an issue?
More than likely, the clutch just isn't broken in yet (or bedded, for that matter). You need to not ride the clutch at all, don't over heat it, and don't try not to prolong it's usage during this period. It's common for a clutch to have some small amount of jidder while in this phase, so don't be surprised. Once it bec...
This is perfectly normal and there is nothing wrong with the car. Think about what's happening. You're transitioning the car from an idling engine that's turning with no load on it, to one that's supposed to be turning the wheels. Specifically, it's supposed to be turning the wheels at a rate proportional to the mini...
https://mechanics.stackexchange.com
458,648
[ "https://stats.stackexchange.com/questions/458648", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/279982/" ]
I'm currently looking through An Introduction to Statistical Learning by Gareth James, more specfically Chapter 6. It discusses ways to select the optimal number of variables in a model using methods such as forward stepwise selection. In the lab, they use MSE in cross validation calculations to compare different sized...
When you do cross-validation, you check your model on data that the model did not see during the training process. By doing so, you penalize the model for picking up on mere coincidences in the training data, the most extreme example of which is memorizing the training data (connect the dots). You are correct that mor...
crossvalidation uses "test set" MSE which does not necessarily reduce as number of predictors increases (whereas your statement would be true for training set MSE)
https://stats.stackexchange.com
48,518
[ "https://mechanics.stackexchange.com/questions/48518", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/32834/" ]
I have a Audi A4 B8 2009 model. I am running with a very stupid problem causing a great amount of pain. So, just a few weeks back, the "front hood (bonnet) is open" indication started showing up on the dashboard, even when the hood is shut. Now when the car is stationary or moving at a very slow speed, the wipers ceas...
It is very common on these models for the hood switch to fall out of the catch. If you look at the catch there will be a micro switch that will either be hanging by its wire or faulty. If it's come loose just reattach it, you'll have to remove the catch and slide the two 'nibs' on the switch into the holes on the rea...
You don't need to remove the switch to get rid of the warning, you just have to disconnect it. On some models A4 the detector is part of the latch mechanism, on others (depending on model year) it's on a separate push-in catch near the latch. You can see a cable going to it with a modular connector. Simply pull the co...
https://mechanics.stackexchange.com
4,587,743
[ "https://math.stackexchange.com/questions/4587743", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1021982/" ]
I don't understand why in the case of continuous R.V. (hence, continuous sample spaces) we don't even care about defining a Probability on the sample space. By analogy with the discrete case (where we define first a probability on the sample space, <strong>then</strong> an induced one on the event space of the R.V.) we...
The probability space is the source of all randomness. If there are multiple random variables defined on the same sample space, then any probability distribution on the sample space determines the joint distribution of all random variables at once. If you only want to focus on a particular random variable <span class="...
Short answer (leaving out all the technical stuff). For continuous probability the probability of a single point is <span class="math-container">$0$</span> and you can't get the probability of an event (say an interval) by summing the uncountably many <span class="math-container">$0$</span> probabilities of the the in...
https://math.stackexchange.com
150,387
[ "https://electronics.stackexchange.com/questions/150387", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/52607/" ]
<img src="https://i.stack.imgur.com/OmzqZ.png" alt="enter image description here"> My intent is to make sure that when the top mosfet is on the bottom mosfet is off and vice versa. I'm really not sure that this accomplishes the goal. Is there some better way than this? I'm using two current sources that are configured...
You can't consider R3 and R4 in series because of the terminal there on the node between R3 and R4. In order to be in series, the components have to have the same current path. With no load connected between the terminals, they would be in series, but that rather defeats the purpose of a source. So the correct Req w...
Perhaps a visual breakdown of the steps might clarify the procedure. <img src="https://i.stack.imgur.com/EzTdD.png" alt="enter image description here"> Split the circuit at points C D and convert the left hand part of the circuit to a Thevenin equivalent. Its Thevenin voltage will be 18* R2/(R1+R2) ( = 9V ie the <st...
https://electronics.stackexchange.com
401,171
[ "https://physics.stackexchange.com/questions/401171", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/193324/" ]
The magnitude of a vector quantity is a <em>scalar quantity</em> (a number) and is always positive.. I believe That direction must be always Positive but Why magnitude of Vectors must be always Positive (Absolute Value ) <blockquote> $$(\text{magnitude of }\vec A) = A = |\vec A|$$ </blockquote>
There are a few distinct questions here, so I'll answer quote by quote. $\newcommand{\ket}[1]{|#1 \rangle}$ <blockquote> [...] the state is simple not normalised here (we would require a factor of $\frac{1}{\sqrt2}$ at the front) </blockquote> People often omit explicit normalization to save space; you should just ...
The relative phase matters in all kinds of circumstances. Imagine a spin-1/2 system with $\vert +\rangle$ and $\vert -\rangle$ the spin-up and spin-down states in the $\hat z$ direction. Consider the state $$ \vert \psi\rangle =\frac{1}{\sqrt{2}}\vert +\rangle + \frac{i}{\sqrt{2}}\vert -\rangle. \tag{1} $$<br> The av...
https://physics.stackexchange.com
3,772
[ "https://stats.stackexchange.com/questions/3772", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/1558/" ]
I am evaluating the effectiveness of 5 different methods to predict a particular binary outcome (call them 'Success' and 'Failure'). The data look like so: <pre><code>Method Sample_Size Success Percent_Success 1 28 4 0.14 2 19 4 0.21 3 24 ...
The proposed procedure does not answer your question. It only estimates the frequency, under the null hypothesis, with which your observed order would occur. But under that null, to a good approximation, all orders are equally likely, whence your calculation will produce a value close to 1/5! = about 0.83%. That tel...
Your suggested Monte-Carlo permutation test procedure will produce a p-value for a test of the null hypothesis that the probability of success is the same for all methods. But there's little reason for doing a <em>Monte Carlo</em> permutation test here when the corresponding <em>exact</em> permutation test is perfectly...
https://stats.stackexchange.com
182,103
[ "https://softwareengineering.stackexchange.com/questions/182103", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/59764/" ]
Getting a few projects started with EF, but I had some questions about join tables and keys etc. Lets say I have a table of applications and a table of permissions. Applications have many permissions and each permission can belong to many applications (many-to-many). Now, the Application and Permission tables are easy...
I believe you mean "junction" table, not "join" table. There is no need for a junction table to have it's own ID field. You would never need to join or filter on such an ID. You would only join or filter on the ID's of the tables you're mapping. An ID on a junction table is a waste of disk space. So the "best" optio...
Over the years I got into the habit of giving each table "TableName" an auto generated primary key "TableNameID", without any exceptions, not even for junction tables. I can say I never regretted it, because it makes a lot of things easier when creating generic code which does something for "all tables" or "some tables...
https://softwareengineering.stackexchange.com
155,749
[ "https://physics.stackexchange.com/questions/155749", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/28048/" ]
I have been told numerous times that magnetic force do no work at all but I have some trouble digesting this fact. Now suppose we have two straight wire with some current, they certainly can feel force which may be repulsive or attractive depending upon current direction, can magnetic force do work? We also have magne...
Magnetic forces do no work on moving charges. If a charge $q$ moves with a velocity $\vec{v}$ in a magnetic field $\vec{B}$ then it experiences a force $\vec{F} = q\vec{v}\times\vec{B}$. Since the work done is $dW = \vec{F}\cdot d\vec{x}$ and since $d\vec{x} = \vec{v}dt$, we have $dW = q(\vec{v} \times \vec{B})\cdot\ve...
Obviously magnetic force can do work.The phenomenon is used in magnetic motors etc. You can search this on google. I am explaining here little bit of it. In motors we have a coil surrounded by magnets(magnetic field). Now the current id being passed by the coil.When the magnetic field of coil interact with the magnetic...
https://physics.stackexchange.com
108,448
[ "https://mathoverflow.net/questions/108448", "https://mathoverflow.net", "https://mathoverflow.net/users/7895/" ]
Suppose I have a set with two metrics, which induce distinct topologies, (so neither is contained in the other). There should exist a sequence which converges in both topologies, but to different points (otherwise all sequences converge to the same point in both metrics, which then implies the topologies are equal). I'...
It is a result of Nagata but it is easy to explain (at least to se the difference between $r\le 8$ and $r\ge 9$): The Picard group of the blow-up is generated by $L$, the pull-back of a general line, and $E_1,...,E_r$ the exceptional curves. Any curve disctinct from the $E_i$'s is linearly equivalent to $C=dL-\sum a_...
First consider the case when the $9$ points is the base locus of a pencil of cubics. Take the family of cubics through these $9$ points. On the blow up they form a basepoint-free linear system that defines an elliptic fibration. The exceptional curves give sections, and you can use the group structure on the elliptic ...
https://mathoverflow.net
177,218
[ "https://security.stackexchange.com/questions/177218", "https://security.stackexchange.com", "https://security.stackexchange.com/users/168115/" ]
I'm trying to learn more about PHP eval() exploitation and I came across this scenario: <pre><code>&lt;?php $test = array(); $test[0] = "command0 "; $test[1] = $_GET["cmd1"]; $test[2] = "command2 "; $test[3] = "command3 "; $params = ""; for ($i = 0; $i &lt; count($test); $i++) { $params .= "\$test[$i]"; } e...
No, this is not vulnerable to PHP code injection. The string passed to <code>eval()</code> is simply not user-controlled. There is no path from the source <code>$_GET["cmd1"]</code> to the sink <code>eval()</code>: <ul> <li>The argument to <code>eval()</code> is <code>$cmd</code>.</li> <li><code>$cmd</code> is assemb...
The code you are evaluating here is actually completely fixed, so PHP code injection is not possible here. The code that gets <code>eval</code>ed is always: <pre><code>echo "$test[0]$test[1]$test[2]$test[3]"; </code></pre> It references those variables as string data, which is safe (except against XSS).
https://security.stackexchange.com
14,931
[ "https://astronomy.stackexchange.com/questions/14931", "https://astronomy.stackexchange.com", "https://astronomy.stackexchange.com/users/-1/" ]
I recently read some articles and pages on Solar Sails, and the possibility of using lasers to propel spacecraft, and I had a relatively outlandish idea. Would it be possible for a star to be outputting enough light that planet-sized (or smaller) objects caught in it's gravitational pull would not cross a certain thre...
@Knu8 was right that adding mass to a gas giant will turn it into a star long before the gas giant could become a white dwarf or neutron star. But that works if you add fusionable material such as hydrogen. If you add something that can't fuse into a heavier element, such as Iron or Tin, the matter just keeps accreting...
Gas giants like Jupiter consists mainly of Hydrogen and some Helium. If you gradually add mass to these planets then core temperatures will rise gradually and a stage will come where they will ignite like normal stars. Unlike white dwarfs where accretion of mass leads to type 1A supernova.
https://astronomy.stackexchange.com
409,745
[ "https://electronics.stackexchange.com/questions/409745", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/205804/" ]
Is the following AC cicruit wired correctly? And is it safe to plug in if i use electrical tape to cover the open connections? <img src="https://i.stack.imgur.com/6uCcj.jpg" alt="enter image description here">
It appears to be correct assuming green is ground blue is neutral and brown is hot. I can't verify is you have selected the appropriate relay contact connections. I also can not verify if the relay is appropriate for the load. If you tape the connections, it will be marginally safe, but not reliable. and thus not safe ...
Twisting wires together is not safe. Use splice block connectors or wire nuts. Unless the wires are fixed in place, you will also need strain relief to prevent strands from breaking and falling into the device causing a short.
https://electronics.stackexchange.com
570,610
[ "https://physics.stackexchange.com/questions/570610", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/271317/" ]
I've been searching for the derivation of planar moment of inertial but I can't find it anywhere <span class="math-container">$(I = \iint y^2dA)$</span>. I don't understand why there's a <span class="math-container">$y^2$</span> term in there but I do understand that you divide up the body into smaller parts which is w...
A field operator annihilates a particle, or creates an antiparticle. The adjoint does the opposite, it creates a particle or annihilates an antiparticle.
It has largelly the same meaning as the adjoint wave function in the usual QM. <span class="math-container">$\psi$</span> is a complex function, and one can write two equations for both real and imaginary parts of <span class="math-container">$\psi$</span>, or equivalently two equations for <span class="math-container"...
https://physics.stackexchange.com
1,272,538
[ "https://math.stackexchange.com/questions/1272538", "https://math.stackexchange.com", "https://math.stackexchange.com/users/167615/" ]
This may seem a somewhat strange question, but I've been tying myself in knots about it recently. When constructing a polynomial ring, you must formally define a polynomial as an ordered ω-tuple, with the first entry being the constant value, the second being the coefficient of x, etc, and I think I understand why we ...
<em>I agree with the previous answer that the question is not very clear; thus, I add this "long comment".</em> From a "mathematical logic" perspective, a <em>variable</em> is a syntactical object. It is used mainly as a "place holder; consider the expression : "$x$ is a Philosopher" (that we can "formalize" in first...
I don't quite understand your question, but note that these are really very different ways of talking. Its not a subtle difference. Consider the equation $$(*) \quad x^2-1=0.$$ If $x$ is a variable of type $\mathbb{R}$, then $(*)$ is equivalent to the condition $x = 1 \vee x = -1$. If $x$ is a formal variable, then $(*...
https://math.stackexchange.com
50,635
[ "https://stats.stackexchange.com/questions/50635", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/21156/" ]
If I want to make a causal statement based on selection on observables. One typically assumes "Common Support" (/"Overlap") - which means that for any value of the confounding variables X a unit i can be potentially observed with treatment (D=1) and without treatment (D=0). I.e.: <pre><code>0&lt;P(D=1|X=x)&lt;1 </c...
Let me expand on alternative solution proposed by @curious_cat. $P_{ij}$ is the matrix of pitches $L_{ij}$ is the matrix of sells $S_{ij} = L_{ij}/P_{ij}$ is the matrix of success rates (elementwise division where it exists and 0 elsewhere) As @curious_cat suggested, you want to approximate $S_{ij}$ by the outer ...
This type of problem is typically referred to in econometrics and marketing research as a "choice modeling" problem. Texts dealing with such problems include: Louviere, J., D. A. Hensher, et al. (2000). Stated Choice Methods: Analysis and Application. Cambridge, Cambridge University Press. Train, K. E. (2009). Discret...
https://stats.stackexchange.com
372,131
[ "https://electronics.stackexchange.com/questions/372131", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/133247/" ]
Here is an info about regeneration due to braking: <blockquote> Most of the time, in most applications, a variable frequency drive controls the motor by supplying it with energy which then powers the load. However, occasionally the energy flow will be in reverse, that is, from the load, through the motor, back...
Induction motors 101. In an induction motor, the supplied voltage creates a rotating magnetic field around the rotor. If you consider a two-pole motor running on a 60 Hz system, the rotating field moves at 60 Hz * 60 sec/min = 3600 RPM. In this case, 3600 RPM would be called the "synchronous speed." Meaning that if t...
Take an electric motor connected to a big fly-wheel. When you are driving it, it has a lot of energy. The moment you stop the power, it still has that energy. The fly-wheel will start driving the motor, in exactly the same way as a crane load drives the motor. I have seen this used in the past in back-up generators. ...
https://electronics.stackexchange.com
103,233
[ "https://softwareengineering.stackexchange.com/questions/103233", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/1525/" ]
Quite simple, why would I want to write code that works for all cases and scalable data when all I need to do is repeat the same process a few times with a few minor tweaks? I'm unlikely to need to edit this again any time soon. It looks like a lot of less work to just go... <pre><code>function doStuff1(){/*.a.*/} ...
If you repeat yourself, you can create maintainability issues. If doStuff1-3 all have similarly structured code and you fix a problem in one, you could easily forget to fix the problem in other places. Also, if you have to add a new case to handle, you can simply pass different parameters into one function rather than ...
Because DRY will be less work later. <hr> <strong>DRY: (Don't Repeat Yourself)</strong> One function taking an argument. <pre><code>def log(arg): print(arg) </code></pre> <strong>C&amp;P: (Copy&amp;Paste)</strong> 26 gazillion functions doing essentially the same thing, but with a 2 char difference. <pre><co...
https://softwareengineering.stackexchange.com
109,052
[ "https://dba.stackexchange.com/questions/109052", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/71972/" ]
I am able to restore <code>MySQL</code> table data along with structure with indexes (InnoDB Engine) using 3 files. <code>MyTable.frm</code>, <code>MyTable.ibd</code> and <code>ibdata1</code>. Can any body confirm, will these 3 files suffice to restore data for all scenarios. Else, is there any other files that needs...
You shouldn't put those lines at the very bottom of the file. Look for the <code>[mysqld]</code> group header in <code>my.cnf</code> and put those lines under it <pre><code>[mysqld] query_cache_type = 1 query_cache_size = 4096M query_cache_limit = 2M query_cache_strip_comments =1 </code></pre> Those line cannot go u...
4GB for the query cache? NO, NO. That will slow down your system. Every change to a table requires scanning the 4GB to purge entries for that table. Limit the value to, say, 50M.
https://dba.stackexchange.com
53,584
[ "https://security.stackexchange.com/questions/53584", "https://security.stackexchange.com", "https://security.stackexchange.com/users/40694/" ]
Is there a way to trigger alarms in an Intrusion Detection System with something similar to the EICAR test virus? Maybe some special packet that is harmless to the environement, but will trigger IDS? I am asking this in the context of a SE rogue device dropping senario, where the device trys different tunneling protoc...
I'm not aware of any official product similar to EICAR but I'd suggest that something noisy and easily noticeable as invalid, such as a Christmas tree scan should achieve what you're looking for. An IDS if configured to notice/block port scans should definitely notice something like that which uses a packet type whi...
The world is your oyster with this one. If you simply need to create one alert use a packet crafting tool like scapy. Testing a rule like this in snort is easy, however, this can work for all types of rules. <pre><code>alert tcp any any -&gt; any 80 (content:"GET";) </code></pre> From here, just fire up scapy and at ...
https://security.stackexchange.com
4,804
[ "https://cardano.stackexchange.com/questions/4804", "https://cardano.stackexchange.com", "https://cardano.stackexchange.com/users/2103/" ]
I'm trying to use a library to access a cardano wallet, right now, I'm in webpack 5 and project run so far until I try to import the cardano library. It breaks in the same point always: <pre><code>runtime modules 33.6 KiB 17 modules modules by path ./node_modules/ 17.5 MiB 49 modules modules with errors 429 bytes [erro...
I've also come across this error in webpack, but found that it can be ignored if you use a Loader like so: <pre><code>class Loader { async load() { if (this._wasm &amp;&amp; this._wasm2) return; /** * @private */ this._wasm = await import( '@emurgo/cardano-serialization-lib-browser/cardano...
Use node-fetch 2.6.6 and it should work
https://cardano.stackexchange.com
653,011
[ "https://electronics.stackexchange.com/questions/653011", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/258385/" ]
Like this: <pre><code>model EFUSE_MODEL ( input PG_MODE, ... ); ... buf (pg_mode_buf, PG_MODE); // the body of this model uses pg_mode_buf only </code></pre>
<blockquote> <em>Can I use a 220V to 220V transformer in 110V to 110V? What happens with the power rating?</em> </blockquote> Yes you can use it but the power rating will reduce proportionately. This is because the full-load current handling of the transformer cannot increase at a lower voltage i.e. it is what it is an...
In addition to other answers: You can use two 110V to 220V transformers back to back. Yes, you will incur extra loss, but transformers are fairly efficient, so two back to back will take you from something like mid 90's to mid 80's efficiencywise. I've done this a couple of times when I need isolation. Microwave oven t...
https://electronics.stackexchange.com
577,285
[ "https://physics.stackexchange.com/questions/577285", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/270744/" ]
For the damped harmonic oscillator equation <span class="math-container">$$\frac{d^2x}{dt^2}+\frac{c}{m}\frac{dx}{dt}+\frac{k}{m}x=0$$</span> we get that the general solution is <span class="math-container">$$x(t)=Ae^{-\gamma t}e^{i\omega_d t}+Be^{-\gamma t}e^{-i\omega_d t}$$</span> where <span class="math-container">$...
As you've said, <span class="math-container">$A$</span> and <span class="math-container">$B$</span> are not necessarily real, they can be complex. In fact, if you want a physical solution, you don't need the <span class="math-container">$\sin$</span> term to be <span class="math-container">$0$</span>, but rather you wa...
The general solution for your ODE is: <span class="math-container">$$x(t)=(a+i\,b)\,e^{-\gamma t}e^{i\omega_d t}+(a-i\,b)e^{-\gamma t}e^{-i\omega_d t}\tag 1$$</span> Where <span class="math-container">$a=x(0)$</span> and <span class="math-container">$b=D(x)(0)$</span> are the initial conditions expand equation (1) you ...
https://physics.stackexchange.com
205,079
[ "https://security.stackexchange.com/questions/205079", "https://security.stackexchange.com", "https://security.stackexchange.com/users/182929/" ]
I am learning a bit about IT-Security and I wonder if there is a concept where you can get certificates for a specific device that approves the device is safe and not compromised. Lets say you want to use you own Laptop at work but they need to be sure your Laptop is not compromised. So you go somewhere to a trusted ...
Certificates like that only exist at the point of device manufacture. If you were to walk in, get it inspected and certified, then as soon as you walk out the door, the certificate is useless for determining if it is <em>still</em> fine. It only certifies the state of the device at the point in time of the inspection. ...
<blockquote> I am learning a bit about IT-Security and I wonder if there is a concept where you can get certificates for a specific device that approves the device is safe and not compromised. </blockquote> Probably no, and I won't really spend any time on whatever this exists or not, but rather why it's worthless a...
https://security.stackexchange.com
713,005
[ "https://physics.stackexchange.com/questions/713005", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/337770/" ]
Why do radial forces do no work?
Recall the definition of work done, <span class="math-container">$W$</span> by a force, <span class="math-container">$\textbf{F}$</span>, over a change in displacement <span class="math-container">$\textbf{x}$</span> <span class="math-container">\begin{equation} W = \textbf{F}\cdot\textbf{x}. \end{equation}</span> In a...
Radial forces do work. For example gravitation. Radial forces where <span class="math-container">$\vec{r} \cdot \hat v = 0$</span> do no work. <span class="math-container">$W = \int \vec{F} \cdot \vec{dr}$</span> <span class="math-container">$\int f(x,y,z) \hat r \cdot \vec{dr}$</span> <span class="math-container">$\in...
https://physics.stackexchange.com
68,439
[ "https://softwareengineering.stackexchange.com/questions/68439", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/23010/" ]
Is it true that a person with fairly good fundamentals in programming can easily learn any programming language? Well, when I say programming languages, I refer to the agile and dynamic languages like PHP, Perl, Ruby, etc but not the former programming languages of the distant past. I've worked only on java, groovy a...
Yes, with reservations. Four weeks ago, I would say I had professional-level skill in C and C++, and amateur-level skill in Java. My boss asked me to write some software in JavaScript, with which I had zero experience, and off I went. Over the next two weeks, I read many sample code snippets, found all the cool libr...
Basically the answer is yes... and no... it depends on what you mean by <em>fundamentals</em> and <em>mastered easily</em>. <h1>FACT</h1> <ul> <li>Knowing the fundamentals of programming will help regardless of the language. By fundamentals here I mean things that are not specific to a given paradigm. Things like...
https://softwareengineering.stackexchange.com
864,534
[ "https://math.stackexchange.com/questions/864534", "https://math.stackexchange.com", "https://math.stackexchange.com/users/156378/" ]
Let $f:\Omega \rightarrow \mathbb{R}$ be a simple function on a measure space ($\Omega,\Sigma,\mu$). Let $h:\Sigma \rightarrow \mathbb{R}$ a function with $h(A)=\int_A f \, d\mu$. Show that ($\Omega,\Sigma,h$) is a measure space. So I need to show that $h$ is a measure: <ul> <li>$h(\emptyset)= \int_\emptyset f\,...
The second equality is correct but I think you are supposed to use the fact that $f$ is a simple function. Then you just have to show that for a disjoint union $$\mu \left(\left(\bigcup_{k=1}^{\infty}U_{k}\right)\cap A\right)=\sum_{k=1}^\infty \mu(U_k \cap A)$$ where $A$ is a measurable set.
$$ h\left(\bigcup_{n\in\mathbb{N}}A_n\right)=\int\limits_{\bigcup\limits_{n\in\mathbb{N}} A_n} f \, d\mu = \int\limits_\Omega f\cdot 1_{\bigcup\limits_n A_n} \,d\mu \tag 1 $$ where for every measurable set $B$, $$ 1_B (x) = \begin{cases} 1 &amp; \text{if }x\in B, \\ 0 &amp; \text{if }x\not\in B. \end{cases} $$ Now o...
https://math.stackexchange.com
14,878
[ "https://security.stackexchange.com/questions/14878", "https://security.stackexchange.com", "https://security.stackexchange.com/users/21272/" ]
I want to confirm through scanning means if the switch is sending syslog packets or not. What i did was run a nmap scan <pre><code> nmap -sV -p514 xxx.xx.xx.xx </code></pre> The result came out as closed. Does this mean that syslog service is not activated on the switch is this a correct assumption?
The port would only be open if the switch was receiving syslog messages from another system. Outgoing connections will not show up in an nmap scan. You could run wireshark to monitor outgoing traffic.
I'm sorry to say that @Don Simon is wrong too. Syslog defaults to udp which will not show up on a nmap -sV scan. syslog over tcp is a rather new implementation and most network gear will not use it. If you would like to detect the syslog packets, you could sniff your network traffic between the switch and your remote...
https://security.stackexchange.com
2,124,197
[ "https://math.stackexchange.com/questions/2124197", "https://math.stackexchange.com", "https://math.stackexchange.com/users/369580/" ]
Let $f: [0,1] \rightarrow \mathbb{ R}$ be determined by: $f(x) = 0 $when $x$ is irrational $\frac{(-1)^p}{q}$ when $x$ is rational (and in reduced form $\frac{p}{q}$) Show that $f$ is Riemann integrable on $ [0,1]$and that the integral equals $0$. Any help would be much appreciated! Thank you!
Let $\epsilon &gt;0$. Pick some $N$ such that $\frac{1}{N} &lt; \frac{\epsilon}{2}$. Show first that there are only finitely many fractions $\frac{p_1}{q_1},..., \frac{p_M}{q_M}$ such that $q_M&lt;N$. Now, pick any partition $0=x_0&lt;x_1&lt;\cdots&lt;x_{k-1}&lt;x_k=1$ with $\| P \| &lt; \frac{\epsilon}{2M}$. Then ...
Well the function is continous everywhere except for rational points. Thus the set of discontinuities is of (Lebesgue) measure $0$ so $f$ is Riemann integrable. Now you can calculate the integral directly from the definition. Pick any partition $0=x_0&lt;x_1&lt;\cdots&lt;x_{k-1}&lt;x_k=1$. For any $i$ pick $t_i$ an ir...
https://math.stackexchange.com
286,916
[ "https://stats.stackexchange.com/questions/286916", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/30589/" ]
So we use polynomial regression for estimating conditional mean functions of unknown form, and especially higher order polynomials are flexible. I've learned in the past that especially higher-order polynomials have undesirable effects when being fitted: values of the response variable for some special segments of the ...
Think about how polynomials behave. Graph any polynomial. Look at what happens when you extrapolate beyond the data. The function will go to negative or positive infinity. That is almost always undesirable. But if you only need to estimate in the range where you already have data, then it should be OK, usually.
Polynomials are notorious for undesirable non-local effects and aside from very low degree polynomials (2 or 3 in particular situations) are usually avoided for that reason. Peter's discussion gives some sense of why it happens, but in any case it's easy to observe in practice -- a simple case is to fit a high order po...
https://stats.stackexchange.com
348,796
[ "https://electronics.stackexchange.com/questions/348796", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/107480/" ]
I want to connect My "USB to RS232(Male end)" to my NanoVolt Meter having RS232 male port. To make both communicate i need to make DB9 F/F serial RS232 mini gender changer. Any Circuit or suggestion will be very helpful. Thank you.
The decoupling capacitors for your Atmega should be directly across the supply pins and as close as possible to the pins. Try soldering a 100nF directly across pins 7 and 8 and also 20 and 22. If you intend to relayout the PCB you need to think about getting the high current path off the groundplane and as short as po...
<ol> <li>If you have huge noise before 7805 it's OK, but when noise on 5v power line you will need add 4,7 - 10uF ceramic capacitor. </li> <li>Check noise on mosfet gate. Noise can goes thru mosfet's gate straight on gpio. Resistors between gpio and gate can help you.</li> </ol>
https://electronics.stackexchange.com
191,335
[ "https://dba.stackexchange.com/questions/191335", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/76790/" ]
We recently upgraded an Amazon RDS instance from PostgreSQL 9.3 to 9.4. There were no problems during the upgrade, and afterwards we ran <code>VACUUM ANALYZE</code>. Performance is now very slow across the board. Here's an example of a query that took a fraction of a second in 9.3: <pre><code>EXPLAIN ANALYZE SELECT ro...
Since the entire database seemed to be affected, I decided to try a <code>VACUUM (FULL, ANALYZE)</code>. It took 50 hours and 4 minutes to complete, but it was <em>totally</em> worth it. Our database disk usage went from 1259 GB down to 747 GB (reclaiming a whopping 512 GB of space), and performance across the board ha...
You've got two totally different bitmap scans that are happening there.. Fast.. <pre><code> -&gt; BitmapAnd (cost=55.63..55.63 rows=1 width=0) (actual time=0.349..0.349 rows=0 loops=1) -&gt; Bitmap Index Scan on common_activityinstance_started_by_id (cost=0.00..5.53 rows=146 width=0) (actual time=0.122....
https://dba.stackexchange.com
3,660,380
[ "https://math.stackexchange.com/questions/3660380", "https://math.stackexchange.com", "https://math.stackexchange.com/users/784253/" ]
Is there a way to prove that <span class="math-container">$e^x$</span> dominates <span class="math-container">$3^{\sqrt{x}}$</span> as x goes to infinity using Calculus II level math. I was hoping to prove it using L'Hopital's rule. As I applied L'Hopital's rule it seems apparent that both functions will derivate infin...
<span class="math-container">$$\begin{align*} \lim_{x\to \infty} \frac{e^x}{3^{\sqrt x}}&amp;=\lim_{x\to \infty} \frac{(e^{\sqrt x})^{\sqrt x}}{3^{\sqrt x}}\\ &amp;=\lim_{x\to \infty} \left( \frac{e^{\sqrt x}}{3}\right)^{\sqrt x}\\ &amp;=\left(\to \infty\right)^{\to \infty} = \infty \end{align*}$$</span>
Applying the suggestions above (while avoiding hand grenades ;) I've come up with: <span class="math-container">$$\lim _{x\to \infty }\left(\frac{\left(e^x\right)}{3^{\sqrt{x}}}\right) = \lim _{x\to \infty }\frac{e^x}{e^{x^{\left(\frac{1}{2}\right)}\cdot \:ln\left(3\right)}} = \lim _{x\to \infty }e^{x-x^{\left(\frac{1}...
https://math.stackexchange.com
931,208
[ "https://math.stackexchange.com/questions/931208", "https://math.stackexchange.com", "https://math.stackexchange.com/users/16595/" ]
I am working on this problem for weeks without a good solution. <blockquote> Let $S\subset\Bbb R^d$ be a set in which $\rho(s_1,s_2)\in\Bbb Q$ for any $s_1,s_2\in S$, where $\rho$ is the Euclidean distance in $\Bbb R^d$. Show that $S$ is countable. </blockquote> If possible, can I request a proof not only some hint...
This is based on Yuval Filmus' idea. Let $n+1$ the maximum number of affinely independent points among the given ones. We have $n\le d$. Let $p_1$,$\ldots$, $p_{n+1}$, $n+1$ affinely independent and $A$ their affine span. Our set will be contained in $A$. For any $n+1$ nonnegative numbers $d_1$, $\ldots$, $d_{n+1}$...
Consider any fixed $d$ points $p_1,\ldots, p_d$ and distances $x_1,\ldots, x_d$. There is a finite number of points at distance $x_i$ from $p_i$ for each $i$. In your case there are countably many choices for the distances.
https://math.stackexchange.com
106,839
[ "https://mathoverflow.net/questions/106839", "https://mathoverflow.net", "https://mathoverflow.net/users/26365/" ]
Dear collegues, I am writing an overview paper for an academic journal, where I also need to state theorems proved by other authors. Usually I cite the source and then rephrase the theorem. However in a few cases rephrasing seems counterproductive and the optimal formulation was already given by the author. Is it OK to...
Depending on the style of your exposition, one possibility for distinguishing rephrased from verbatim results might be to say something along the lines of "In [reference], So-and-So proved a theorem that can be stated as follows: ..." on the one hand, and "In [reference], So-and-So stated and proved the following theor...
As far as I know, it is not plagiarism to use someone else's exact words as long as you make it clear that they are that other person's words and not your own. If you do this with a long piece of text, though, it might be copyright infringement, and there I don't think either Barry's suggestions or quotation marks wou...
https://mathoverflow.net
162,043
[ "https://softwareengineering.stackexchange.com/questions/162043", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/17492/" ]
We have some back end processes that runs* on our sql server (SQL Server), they involve processing claims. This requires both data manipulation (biz logic) and data read/write to tables. The biz logic contained should never be used by any of our end user (web/fat client) applications, just for this (runs once, nightl...
Since you don't really need to run this "in" SQL Server and you don't need to reuse any of the code anywhere else in SQL Server, create another server application in the language of your choice and have it triggered by a scheduler. This could give you the option to off-load the number crunching on another server. Using...
Personally, I prefer only using sp's when the process is only at the database level, e.g. populating some tables based on values in other tables, such as doing monthly data updates, etc. If for no other reason, it's difficult (at least in my experience) to properly version sp's, so I like to leave out any business logi...
https://softwareengineering.stackexchange.com
37,030
[ "https://engineering.stackexchange.com/questions/37030", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/28211/" ]
I'd like to clean my bicycle chain with as little effort as possible, so I thought an ultra-sound cleaner would be best. Professional oil-based ultrasound cleaners are way too expensive for a hobbyist, but water-based ultrasound cleaners are pretty cheap. So I could just run it with oil. Could this work or is it doomed...
Yes, it is possible. I actually went ahead and bought a simple large (for an end-user device) ultra-sound cleaner and filled it with low-viscous oil. I operated it twice in the space of a few weeks. It still works and it does clean. The main challenge is to get the dirt out of the oil in the device's basin.
In my lab we use ultrasound cleaners a lot, albeit to clean glassware but from all sorts of stains and dirt. What I would suggest at first is that you try water + dishwashing liquid. Dishwashing liquid is formulated to bind partially to grease (surfactant effect). Do let us know how it goes.
https://engineering.stackexchange.com
1,828,870
[ "https://math.stackexchange.com/questions/1828870", "https://math.stackexchange.com", "https://math.stackexchange.com/users/64460/" ]
A committee to contain $5$ members and have at least one woman. There are $7$ women and $9$ men. I think that we can fix one woman as one of the $5$ members, and randomly select the rest from a combined pool of men and women. I think the answer should be $C(15, 4)$. I thought we might have to multiply this by $7$ becau...
The only problem with multiplying by seven is that you could have one case where you fix one woman and choose other members in such a way so that the people on the committee are the same as in another case where you fix another woman. To make this clearer, let W1, W2, ..., W7 be the women who can be chosen to be on the...
Total number of combinations: $$\binom{7+9}{5}$$ <hr> Number of combinations with no women: $$\binom{9}{5}$$ <hr> Number of combinations with at least one woman: $$\binom{7+9}{5}-\binom{9}{5}$$
https://math.stackexchange.com
1,053,223
[ "https://math.stackexchange.com/questions/1053223", "https://math.stackexchange.com", "https://math.stackexchange.com/users/89739/" ]
Suppose we have a complex number $z$ such that $|z|=1$ and $$|\frac{z}{z'} + \frac{z'}{z}|=1$$ where $z'$ is conjugate . How many complex number satisfy this? So I simplified second condition as $$\frac{zz + z'z'}{zz'}=\frac{z^2 + z'^2}{|z|^2} $$ Now we may represent any complex no as $z=x+iy$ so putting it in above e...
Not sum it, multiply it. This is because for <strong>every way</strong> of choosing the odds, there are $\binom{50}{3}$ ways to choose the evens.
Rule of product, not rule of sum. We choose our even numbers independently of the odd numbers. So $\binom{50}{2} \binom{50}{3}$. Note the rule of sum is for disjoint cases (ie., partitioning the elements you are counting). Consider a smaller example- one even number and one odd number from $\{1, ..., 6\}$. So we can h...
https://math.stackexchange.com
656,872
[ "https://physics.stackexchange.com/questions/656872", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/266177/" ]
I am reading Altland and Simons, and they perform the following step in a calculation I am not sure how to perform. If <span class="math-container">$a_i$</span> and <span class="math-container">$\bar{\eta}_i$</span> are Grassmann variables, then <span class="math-container">$$e^{-\sum_i a_i \bar{\eta}_i} = \prod_i (1-a...
If <span class="math-container">$a_i, \bar{\eta}_i$</span> are Grassmann-odd then their product <span class="math-container">$a_i \bar{\eta_i}$</span> is Grassmann-even so <span class="math-container">$$ [a_i\bar{\eta}_i , a_j \bar{\eta}_j] = 0 $$</span> which allows you to make the manipulation with exponentials indic...
What about this? <span class="math-container">\begin{equation} e^{-\sum_i a_i\bar\eta_i}=\prod_ie^{-a_i\bar\eta_i}=\prod_i(1-a_i\bar\eta_i)~, \end{equation}</span> since <span class="math-container">$a_i^2,\bar\eta_i^2=0$</span>.
https://physics.stackexchange.com
50,358
[ "https://quant.stackexchange.com/questions/50358", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/40849/" ]
I'm building a short end of the libor curve using deposit &amp; fra due to overlapping in dates I get wrong values of Discount factor, here's the data i'm working with: <ul> <li>My today date is : 23/10/2019 </li> <li>Start of my deposit 6m contract is 25/10/2019 end date is 27/04/2020,day count is act/360 with ra...
There is no overlapping, the first instrument is tied to the LIBOR rate starting at <span class="math-container">$25/10/2019$</span>, the second one is tied to the LIBOR Rate at <span class="math-container">$27/04/2020$</span>. For the sake of clarity, let assume that the spot date and today's date are the same, that ...
Your rates do not overlap. You have a 6M (185/360) rate of 5%. And a forward rate agreement where the 5.2% rate starts at the end of your initial contract (4/27/20) for a period of 6M (183/360). Your first contract will earn you (1 + .05*(185/360)) = 1.025694. You will then earn (1 + .052*(183/360)) on that amount,...
https://quant.stackexchange.com
9,535
[ "https://chemistry.stackexchange.com/questions/9535", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/4998/" ]
I'm working on my chemistry lab report. The initial instructions were to test the hypothesis that the mass of products of a reaction will equal the mass of the reactants. Basically we where given a equation, our job was to balance and figure out the theoretical mass of reactants, and the theoretical mass of products. T...
Try to answer to these questions, don't cheat, check the answer passing over the yellow box. I think this software is confusing you always start from how much reactants you have and then calculate how much products you will have, suppose you have <span class="math-container">$\pu{100g}$</span> of oxygen and <span class...
<span class="math-container">$\pu{0.1 gram}$</span> is (<span class="math-container">$\pu{E4 kg}$</span>)(<span class="math-container">$\pu{299792458 m/s2}$</span>) = <span class="math-container">$\pu{8.988E12 J}$</span> or two kilotons nuclear yield equivalent. Let's be conservative and say &quot;experimental error.&...
https://chemistry.stackexchange.com
9,690
[ "https://cogsci.stackexchange.com/questions/9690", "https://cogsci.stackexchange.com", "https://cogsci.stackexchange.com/users/7654/" ]
According to my textbook <em>Cognitive Psychology</em> by E. Bruce Goldstein, <blockquote> a <em>double dissociation</em> occurs if damage to one area of the brain causes a function A to be absent while function B is present, and damage to another area causes function B to be absent while function A is present. To d...
In brain damage/lesion studies, a double dissociation gives evidence that function A and B are, to some degree, implemented in different regions of the brain. In general, a double dissociation shows evidence that A and B are independent of each other. This is a different kind of claim than saying that function A is im...
It actually has nothing to do with having an experimental and control group. A double dissociation refers to documenting two distinct patterns of impairment in two different groups or individuals, proving that two functions are neurologically distinct. For example, someone with hippocampal damage will have trouble fo...
https://cogsci.stackexchange.com
251,823
[ "https://softwareengineering.stackexchange.com/questions/251823", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/49141/" ]
I'm trying to build a new application using the Repository pattern for the first time and I'm a little confused about using a Repository. Suppose I have the following classes: <pre><code>public class Ticket { } public class User { public List&lt;Ticket&gt;AssignedTickets { get; set; } } public class Group { pub...
As it turns out, the first option was the more practical option in this case. There were a few reasons for this: 1) When making changes to a type and its associated repository (assume Ticket), it was far easier to modify the Ticket and TicketRepository in one place than to chase down every method in every repository t...
The second option seems like you are defining your repository based on your requirements for this given application vs 1 repository per "table" which could be more flexible for other areas of your app that might come up or other applications that might not group stuff like your current app does. Yes, it means you'll ha...
https://softwareengineering.stackexchange.com
308,617
[ "https://physics.stackexchange.com/questions/308617", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/143790/" ]
The mass of a carbon 14 atom is $14.003\,241\,988\,7\:\mathrm{u}$, nitrogen 14 has a mass of $14.003\,074\,004\,78\:\mathrm{u}$, and the rest-mass of an electron is $0.000\,548\,579\,9\:\mathrm{u}$ In $\beta^-$ decay, $$_6^{14}\mathrm C \ \longrightarrow \ _7^{14}\mathrm N + e^- + \nu_e^+. $$ The mass of nitrogen an...
One needs to be very careful in doing mass-energy balances in nuclear decay reactions, especially in beta-decay (electron or positron) The reaction as written in the OP is correct, and is exactly as it is normally written but is slightly misleading (<strong>not</strong> the fault of the OP!). Consider an individual c...
The atomic masses include both the nuclei and the electrons for a neutral atom. Nitrogen has one more electron than Carbon.
https://physics.stackexchange.com
15,576
[ "https://biology.stackexchange.com/questions/15576", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/5945/" ]
<blockquote> In a given population under Hardy Weinberg equilibrium, 40.0% of men have hemophilia. What is the probability that a random man and random woman will have a daughter with haemophilia? </blockquote> I think the answer is 16%, but the answer given is 9.6%. According to Hardy-Weinberg principle, p<sup>2</...
I make it 8%. Here is my reasoning. The gene is X-linked. 40% mutant males, so freq(mutant allele) = p = 0.4, and freq(wt allele) = q = 0.6 To get a mutant female we have to have a mutant male parent, probability = 0.4 Of these matings one half will produce a female offspring so 0.4*0.5 = 0.2 i.e. 20% of matings derive...
In a given population, 40% of men have hemophilia – an X-linked recessive disorder. What are the odds that a random woman and a random man from that population will have a daughter with hemophilia? Hemophilia is X-linked and recessive, so the frequency of males having the disease = q. So, q = 0.40. To determine the fre...
https://biology.stackexchange.com
85,061
[ "https://electronics.stackexchange.com/questions/85061", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/9910/" ]
<img src="https://i.stack.imgur.com/NquVf.jpg" alt="enter image description here"> <blockquote> Host transmitted protocol packets are routed through intervening hubs directly to a peripheral device. They do not traverse bus paths that are not part of the direct path between the host and the target peripheral dev...
USB does not use a hub setup. In an Ethernet HUB, A message from Point A, will go to Points B, C and D, regardless. In a USB Hub, there is a specific Upstream Port, and Multiple Downstream ports. There is ZERO interaction between Downstream ports Any possible interactions between Downstream Port 1 and Downstream Port 2...
The spec calls it a hub, conventional usage calls it a hub, so I'll call it a hub. I'm not sure what purpose it would serve to call it a router; some sort of extreme linguistic prescriptivism?
https://electronics.stackexchange.com
142,213
[ "https://electronics.stackexchange.com/questions/142213", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/53871/" ]
Computer A has an overall CPI of 1.3 and can be run at a clock rate of 600MHz. Computer B has a CPI of 2.5 and can be run at a clock rate of 750 Mhz. We have a particular program we wish to run. When compiled for computer A, this program has exactly 100,000 instructions. How many instructions would the program need to ...
Solving the first part gave me 216.667 us. I would double check your math there. $$100000 \cdot 1.3 = 130000$$ $$\frac{130000}{600 \cdot 10^6} = 2.167 \cdot 10^{-4}$$ Using this gives you the correct solution.
You've got a mistake in the first equation: I get a CPU time of \$2.2 \cdot 10^{--4} s\$, or ~200 us. The second equation can be reworked to \$I = \dfrac{f \cdot T_{CPU}}{CPI}\$
https://electronics.stackexchange.com
9,935
[ "https://quant.stackexchange.com/questions/9935", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/1504/" ]
For the purposes of Sharpe ratio, I calculate a trading strategy's daily returns using realized P/L only: $$ \frac{K(t + 1) - K(t)}{K(t)}, $$ where $K(t)$ is the cash balance after market close on day $t$. Assume no transfer is made from or to the account. Recently, someone suggested I use account balance(cash balance...
I would absolutely use a mark-to-market value in your daily pnl for the purposes of evaluating performance (e.g. Sharpe). So, yes, that would include the value of open positions in addition to your cash balance. If you hold something for a year, that performance was earned one day at a time, not all at once. If you on...
For a single day as long as $K(t+1)$ includes the intraday cash flows it is the same, however if you do not simulate your cash balance interest rate you forget that your cash get compounded over time, which is slightly incorrect. This is why someone suggested you simulate your cash balance. This is more correct as wel...
https://quant.stackexchange.com
3,788
[ "https://cardano.stackexchange.com/questions/3788", "https://cardano.stackexchange.com", "https://cardano.stackexchange.com/users/2092/" ]
My BP and relays are on the same local subnet, I would prefer to give them the private IP address in the topology files. However, all of the guides I've come across explicitly state using public IPs. Is there a problem with using private IPs in the topology files to connect my BP node and my relay nodes?
Each of your Cardano nodes needs a static IP address to communicate between each other. You can use IP or domain names. <strong>Block Producer (BP) node</strong> For better security, you can choose to set a private IP to your BP node to communicate with your relays (on the same private network) since your BP is hosting...
I dont know how you manage your nodes :) but for security reasons, i would recommend to use another node, which will be the &quot;Jump-Server&quot;. this Jump-Server has a public_IP, which will be used for you to connect with ssh, and only this system will have access to connect with ssh to the rest of your nodes (BP a...
https://cardano.stackexchange.com
295,512
[ "https://stats.stackexchange.com/questions/295512", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/152613/" ]
I have asked this question without success earlier, perhaps it was not really clear what I was looking for. Here is a clearer explanation, hopefully clear enough to get some help! My data has 378 entries where each row represents the shared score for two individuals playing a game. For example, on row one, the two p...
If I understand your scenario correctly, there are latent individual scores $X_1,\dots,X_{2n}$, which we can model as being iid random variables, with $n=378$. The data that we observe are team scores $Y_1,\dots,Y_n$, defined as sums over pairs of individual scores: $$Y_i = X_{2i-1} + X_{2i}$$ And again, if I understan...
If we assume that the scores are drawn iid (and I don't see why we wouldn't, since it's different players of different teams), then the 378 observations of average points per player (score/2 for each row) allow you to characterize the distribution of the statistic you're trying to estimate (in your case the "mean of me...
https://stats.stackexchange.com
72,628
[ "https://mathoverflow.net/questions/72628", "https://mathoverflow.net", "https://mathoverflow.net/users/16007/" ]
What are some of the natural number theory problems that are np-complete? I am looking for examples not in lattices and geometric number theory. Examples in analytic/algebraic number theory are ok.
You can take a look at the papers by Adleman and Manders (not always in this order) from the 70s (at least "Computational complexity of decision procedures for polynomials", "NP-complete decision problems for quadratic polynomials", "Diophantine complexity"), and the references therein. One example of the problems th...
See pages 249-251 of Garey and Johnson, Computers and Intractability, for a dozen NP-complete problems in Number Theory. EDIT: A couple of examples, by request. AN2, Simultaneous incongruences. Given a collection $\lbrace(a_1,b_1),\dots,(a_n,b_n)\rbrace$ of ordered pairs of positive integers with $a_i\le b_i$ for ...
https://mathoverflow.net
514,371
[ "https://physics.stackexchange.com/questions/514371", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/244758/" ]
I can't say I know physics very well. The most confusing concept for me as for now is potential energy. Often, while introducing potential energy of a gravitational force, the following example is used: imagine an object that has the mass of 1 kilogram that is lying on the earth. The gravitational force acting on it is...
<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
637,587
[ "https://math.stackexchange.com/questions/637587", "https://math.stackexchange.com", "https://math.stackexchange.com/users/119874/" ]
I am currently taking an experimental chemistry course where we need to fit data to an equation of the form $y=a\exp(bx)$. They recommend "linearizing" this equation by taking the logarithms of both sides to get $\log(y)=\log(a)+bx$, and then perform a linear regression. This is all fine, and I can do the regression ...
Try to picture what is going on, here. For brevity and simplicity, we will assume that $a&lt;b.$ (The $a=b$ case is simplicity itself, and the $a&gt;b$ case is just like the $a&lt;b$ case, but with the jumps in the opposite direction at each stage.) Let $d=|b-a|=b-a.$ To get from $x_0$ to $x_1$, we will jump right by ...
Consider $x_{n+2} - x_{n+1}$: it is $-\frac13 (x_{n+1} - x_n)$. So the consecutive differences decay as $3^{-n}$. Consider $3 x_{n+2} + x_{n+1}$: it is $3 x_{n+1} + x_n$. An invariant! Therefore the limit is $(3 b + a)/4$, because if $x_{n+1} \approx x_n \approx x$ then $3 x_{n+1} + x_n \approx 4 x$.
https://math.stackexchange.com
318,512
[ "https://softwareengineering.stackexchange.com/questions/318512", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/228438/" ]
In Instagram (web), when you click back/forward arrows - I've noticed that the content isn't loaded from the server and it immediately show up. After reading the docs on react.js + flux, I had this understanding: <code>Action -&gt; Dispatcher -&gt; Stores ...</code> where the <code>stores</code>would listen for change...
<blockquote> How can both of these return values to original function </blockquote> They don't; your book is badly-worded. <ul> <li>In the second case: <pre><code>average = gradeAve(grade1, grade2, grade3); </code></pre> <code>gradeAve</code> returns - literally with a <code>return</code> statement - its result. ...
I'm still very confused by this question but might as well try... In your <code>half</code> function, the <code>return;</code> statement doesn't do anything useful. If you left it out the function would behave exactly the same way. Similarly, the parentheses in <code>return (localAverage);</code> also do nothing and a...
https://softwareengineering.stackexchange.com
881,888
[ "https://math.stackexchange.com/questions/881888", "https://math.stackexchange.com", "https://math.stackexchange.com/users/162079/" ]
<blockquote> The perimeter of a rectangle is $48$ m and its area is $135$ m$^2$. Determine the sides of the rectangle. </blockquote> I tried the following: Perimeter $=48$ m<BR> Let the length be $x$ m and the breadth be $y$ m<BR> As we know, Perimeter $=2(x+y)=48$ $\Rightarrow x+y=24$ $[\cdot...
$x+y=24$ $x\cdot y=135$ Now solve for $y$ and substitute into the other equation. $y=24-x$ $x(24-x)=135$ $-x^2+24x-135=0$ $x^2-24x+135=0$ $(x-15)(x-9)=0$ $x=15$ or $x=9$ Plugging back into original equation you will get $x=15, y=9$ or $x=9, y=15$. They can be interchangeable because it is a rectangle. What we ...
$(x-y)^2=(x+y)^2-4xy=(24)^2-4.135=576-540=36$ Hence, $(x-y)=6$ Can you take it from here?
https://math.stackexchange.com
4,048,335
[ "https://math.stackexchange.com/questions/4048335", "https://math.stackexchange.com", "https://math.stackexchange.com/users/891908/" ]
Question: <blockquote> Assume that a recurrence relation is given as below: <span class="math-container">$T(n)=2T(n/2)+\log(n)$</span> and we know that <span class="math-container">$T(1) = 1$</span> We want to solve the relation (find an explicit definition of <span class="math-container">$T(n)$</span> which does not r...
Assuming <span class="math-container">$\log(n) = \log_2 n$</span> we have <span class="math-container">$$ T\left(2^{\log_2 n}\right) = 2T\left(2^{\log_2 \frac n2}\right)+\log_2 n $$</span> now calling <span class="math-container">$\mathcal{T}(\cdot) = T\left(2^{(\cdot)}\right)$</span> and <span class="math-container">$...
The recurrence relation is not well defined. You can't calculate, for example, <span class="math-container">$T(3)$</span>.
https://math.stackexchange.com
468,796
[ "https://stats.stackexchange.com/questions/468796", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/1569/" ]
I think I understand how MASE works when I have a single time series. But what if I have several, for which I want to obtain an overall accuracy measure? It's straightforward to compute an aggregate statistic for other measures (MAPE, MAE, RMSE, etc), since there are only 2 vectors of numbers to consider: the predicte...
The standard approach is to calculate the MASE separately for each series, using that series' scaling factor (classically, the in-sample MAE from the random walk forecast). Then aggregate these MASEs across series, e.g., by again taking the mean, or the median, or even weighting summary measures by the importance of yo...
A bit late to the party, but my answer could be useful for anyone else dropping to this question at a later stage. What I'd do is plot the different MASE's in the form of a boxplot. In that way, you prevent taking another mean/median which reduces interpretability and simultaneously allow for easy graphical comparison ...
https://stats.stackexchange.com
79,263
[ "https://cs.stackexchange.com/questions/79263", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/75308/" ]
I'm trying to solve pretty complex problem with combinatorics. Namely, we have given three numbers N, K, M. Now we want to count how many different arrays of integers are there with length N, sum K and all the elements in the range [1, M] Constraints: <ul> <li>1 &lt;= N &lt;= 100</li> <li>1 &lt;= K &lt;= 100</li> <l...
You can use dynamic programming. For each $0 \leq i \leq N$ and $0 \leq s \leq K$, count the number of arrays of length $i$, consisting of numbers in the range $\{1,\ldots,M\}$, which sum to exactly $s$. The running time is $O(NK)$. Explicitly, denoting the array by $a$, we have $a(0,0) = 1$, $a(0,s) = 0$ otherwise, a...
You actually don't need the largest element <code>l</code> in your recursive function. It doesn't make such sense to use it, since the largest number in an array has no influence on the other numbers. <hr> In most (all?) dynamic programming problems you have to think about the last step / the last part. For <code>f(...
https://cs.stackexchange.com
60,037
[ "https://electronics.stackexchange.com/questions/60037", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/15883/" ]
Is there standard that recommend guidance of particular colors of solder mask? A while back I was told by a local assembler that BLUE typically indicates the circuit is ROHS compliant. Yet my Google foo does not find any supporting evidence. Were my Google foo is swamped. So there may be something I just don't see.
The soldermask color is purely a function of designer preference, and whether the person paying for the boards is willing to foot the bill for custom soldermask colors. It has no relation to whether the board is ROHS compliant or anything else. Green is the most common just because it's a defacto standard. You can get...
I've used solder mask color to indicate version of the copper of a PCB. I use...Green = prototype, Red = REV A, Blue = REV B, White = REV C, Yellow = REV D, etc... This allows easy differentiation between copper revisions. It also allows production and repair technicians to know which PCB they are working with from acr...
https://electronics.stackexchange.com
465,605
[ "https://physics.stackexchange.com/questions/465605", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/225081/" ]
A current 1 ampere passed through a conductor which resistance is 10 ohms, if the current become 2 amperes, then will the resistance of the conductor will remain 10 ohms, and if not, then what is the resistance in the second case?
There is not sufficient information to answer this question. For starters, the question contradicts itself. A conductor is something with (close to) zero resistance. A conductor with a resistance of 10 ohms is not a (perfect) conductor. But let's say that 10 ohms is good enough to call something a "conductor". After a...
You state the material carrying the current is a “conductor”. That would normally imply metal. But as @Isusr has already pointed out, 10 ohms would involve a very long and thin wire to achieve that resistance in the case of copper conductors. That being said, the resistivity of an electrical conductor is a function of...
https://physics.stackexchange.com
94,525
[ "https://physics.stackexchange.com/questions/94525", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/37765/" ]
Say I write following statement on a paper: <blockquote> It's year 2014 at earth. </blockquote> Then I give it to my friend. My friend then starts to leave me and earth to outside with <strong>velocity of light</strong>. Einstein says <strong>the time stops for my friend</strong>. In my next year, the statement is...
I think you are asking "Are there statements whose truth or falsity does not depend on a frame of reference?", or rather, "is the same in every conceivable frame of reference?" Without getting into metaphysics, clearly there are tautologies like "129 = 129". It's hard to think of a frame of reference where that's not ...
The problem here is that the statement "The current time is 'x'" CANNOT be globally true. It is true only with respect to a given reference frame, so what you've implied with the statements involved in your question (i.e. that it is either 2014 or not 2014 <em>everywhere</em>) is simply invalid in relativity. "At earth...
https://physics.stackexchange.com
494,395
[ "https://electronics.stackexchange.com/questions/494395", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/249948/" ]
I wonder why is there no standard for Lithium ion batteries especially for portable devices,we can easily have a standard dimension/fit for similar capacities and power rating imposed by IEEE or similar organisations. In this way we can use the ones of older mobile phones which do not comply to current protocols of 4g/...
Everything looks right about your calculation, AND your plot! Nothing's wrong; there's no other frequency than <span class="math-container">\$f=1\$</span> in here. What is confusing you is the fact that your excel plot <em>incorrectly</em> connects the sample points with straight lines. That isn't how reconstruction w...
The <code>sin</code> function in excel expects to receive as argument the angle in radians, so first you have to convert it. Try the following: <span class="math-container">$$\sin(2\pi \cdot f \cdot t \cdot \frac{\pi}{180^°})$$</span>
https://electronics.stackexchange.com
448,652
[ "https://physics.stackexchange.com/questions/448652", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/189522/" ]
My thermodynamics professor gives a formula for ideal gas like this: <span class="math-container">$$s _ { 2 } - s _ { 1 } = c _ \mathrm{ v , a v g } \ln \frac { T _ { 2 } } { T _ { 1 } } + R \ln \frac { v _ { 2 } } { v _ { 1 } }.$$</span> This is true and makes sense in dimension analysis because both <span class="math...
There are two important points here: <ul> <li><span class="math-container">$c_v$</span> and <span class="math-container">$R$</span> have the same units (namely, J/K), otherwise the quantities could not be added together; </li> <li>Even if the units aren't necessarily physically sensible in a given expression, as long ...
A constant need not be dimensionless. For example the speed of light is a constant with dimensions of velocity. Exponents DO need to be dimensionless though. But you can always manage that by multiplying both sides of an equation by some constant with appropriate dimensions (1/heat capacity in your case) before expon...
https://physics.stackexchange.com
39,922
[ "https://mechanics.stackexchange.com/questions/39922", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/22260/" ]
I've been working recently from a Honda service manual. There are, of course, torque specifications documented for various fasteners used throughout the vehicle. I cannot find, however, any mention of the thread lubrication necessary to achieve the specified torque values. I'm curious what Honda, and other manufacturer...
In general, the assumption is that you are <strong>not</strong> using a lubricant. When a lubricant is specified, obviously then you use it. Using a lubricant will result in the same torque readings, but higher tension in the fasteners. This is, more or less, the same as over torquing and may lead to failures of the f...
Best practice for all fasteners is clean and dry threads. There are three exceptions. <ol> <li>If your using thread locker use the same torque. It is generally assumed that thread locker does not change the torque value.</li> <li>Fasteners that require thread sealant, such as ones that go into water jackets, have t...
https://mechanics.stackexchange.com
157,500
[ "https://dba.stackexchange.com/questions/157500", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/91655/" ]
I crashed all my 3 nodes. After all nodes have been started I noticed that mariadb is dead. An I couldn't run it again. I am using CentOS 7 on all servers I tried to start first node and then others but without success. First of all I tried to find the newest seqno as documentation says. So I looked in this file on ...
<strong>Pre-Recovery Settings:</strong> <ol> <li>Ensure that the MYSQL_HOME path is being exported in the .profile. If the MySQL install is in a different location, then make that change to the MYSQL_HOME.(Example: MYSQL_HOME=/path/to/mysql)</li> </ol> <strong>Crash Recovery Steps:</strong> <ol> <li>Find a valid seq...
If you are in the position where your seqno is -1, and you need to bootstrap that node, you can recovery the correct seqno by running: <pre><code># galera_recovery </code></pre> Which will output the correct seqno plus it will update the grastate.dat file.
https://dba.stackexchange.com
306,122
[ "https://mathoverflow.net/questions/306122", "https://mathoverflow.net", "https://mathoverflow.net/users/109471/" ]
Let $\{x_n\}_{n=1}^{\infty}$ be a monotone decreasing sequence of positive real numbers such that $\sum_{n=1}^{\infty} x_n$ diverges. Also let $\{k_n\}_{n=1}^{\infty}$ be a strictly increasing sequence of positive integers such that $\sum_{n=1}^{\infty} \frac{1}{k_n}$ diverges. Can $\sum_{n=1}^{\infty} x_{k_n}$ conver...
Yes, this can happen. E.g., let $m_1,m_2,\dots$ be natural numbers such that $$m_r\sim\ln r$$ (all asymptotic relations here are for $r\to\infty$). Let $k_r:=m_1+\dots+m_r$, so that $k_r\sim r\ln r$ and hence $\sum_r1/k_r=\infty$. Let \begin{equation} x_n:=y_r\sim1/(r\ln^2 r)\quad\text{if}\quad k_{r-1}+1\le n\le k_r...
What about if (for n bigger than 2) you take x(n)=(nlog(n))^(-1) and k(n) roughly same as x(n)^(-1) (say integral part of nlog(n))? Then both conditions required are satisfied, while the subseries wanted behaves like (n*log(n)*log(n))^(-1) which is convergent
https://mathoverflow.net
150,172
[ "https://electronics.stackexchange.com/questions/150172", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/37879/" ]
From the following diagrams: <img src="https://i.stack.imgur.com/SUJ16.png" alt="enter image description here"> <img src="https://i.stack.imgur.com/i7OEP.png" alt="enter image description here"> Are the current directions correct? Based on where the terminals are connected on both conductors?
the current will spread out across the whole conductor, there will be more curent in the centre but as the path that skirts the edges is only a litttle longer the current density there will be only a little lower
The general direction, yes. The actual current will fill up a certain amount of space <em>around</em> the given arrow, up to a maximum volume limited by both the size of the conductor and the amount of current.
https://electronics.stackexchange.com
400,708
[ "https://electronics.stackexchange.com/questions/400708", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/186538/" ]
Is it usually to not have a carry in the two's complement method for subtracting two binary numbers when we subtract a large number from small one ?
Carry behaves as if all numbers are unsigned. Just subtract as you were taught in school, i.e. going from right to left with 'borrow': <pre><code> 4 = 0100 7 = 0111 ---- - 1101 with a borrow remaining 7 = 0111 4 = 0100 ---- - 0011 with no borrow remaining </code></pre> Whenever a borrow remain...
You should start by understanding that the negative of an integer value encoded in twos-complement is achieved by inverting all the bits and then adding one to the result. Proof left as an exercise to the reader. You should follow from that that (a - b) = (a + (-b)). So subtracting b from a is the same as calculating ...
https://electronics.stackexchange.com
12,279
[ "https://mathoverflow.net/questions/12279", "https://mathoverflow.net", "https://mathoverflow.net/users/1149/" ]
In modern valuation theory, one studies not just absolute values on a field, but also <b>Krull valuations</b>. The motivation is easy enough: If $k$ is a field, a <b>valuation ring</b> of $k$ is a subring $R$ such that for every $x \in k^{\times}$, at least one of $x, x^{-1}$ is an element of $R$. (It follows of co...
Since you asked for it, here is a little bit about the role of valuations in the Lang-Nishimura theorem, one version of which is as follows (my version implies yours): <strong>Theorem (Lang-Nishimura):</strong> Let $X \to \to Y$ be a rational map between $k$-varieties, where $X$ is integral and $Y$ is proper. If $X$ ...
M. Temkin has some recent beautiful work on a new approach to semistable reduction for relative curves (without even assuming properness, and not using input about properties of moduli spaces, instead yielding a very new proof of the semistable reduction theorem and much more), and in this he makes very creative use of...
https://mathoverflow.net
23,775
[ "https://stats.stackexchange.com/questions/23775", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/9342/" ]
One of the most widely used interpretation of effect size is Cohen's $d$, as follows: <ul> <li>$&lt;.10$: <em>trivial</em></li> <li>$[.10,.30]$: <em>small to medium</em> </li> <li>$[.30,.50]$: <em>medium to large</em></li> <li>$&gt;.50$: <em>large to very large</em></li> </ul> This appears to be the standard in psych...
These "standards" in psychology are an unfortunate consequence of poor statistics training. Don't look for such standards in an entire field. At best they could be found within a particular subject matter. Cohen never intended these to be standards and just suggested them as a starting point for interpretation based ...
John has already given a spot on answer. Just as an addendum (which is just a bit too long as a comment), let me just add a quote from Cohen himself (from <em>Statistical power analysis for the behavioral sciences</em>, 1988): <blockquote> The terms "small,", "medium,", and "large" are relative, not only to each oth...
https://stats.stackexchange.com
2,341
[ "https://cs.stackexchange.com/questions/2341", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/208/" ]
Maybe I am missing something obvious, but can it be that P = co-NP $\subsetneq$ NP or vice versa? My feeling is that there must be some theorem that rules out this possibility.
No, because $\mathsf{P}$ is closed to complement this cant be, and we even know that $\mathsf{P}=\mathsf{NP} \implies \mathsf{NP}=\mathsf{co\text{-}NP}$. Let us assume that $\mathsf{P}=\mathsf{NP}$, and let $L \in \mathsf{co\text{-}NP}$, thus $L^c \in \mathsf{NP}$. We assumed $\mathsf{P}=\mathsf{NP}$, and therefore th...
$\mathsf{P}$ is closed under complement (i.e. $\mathsf{P}=\mathsf{co\text{-}P}$ ¹); so if $\mathsf{P}=\mathsf{co\text{-}NP}$ (or $\mathsf{P}=\mathsf{NP}$) then $\mathsf{co\text{-}NP} = \mathsf{NP}$ <hr> <ol> <li>Given a language $L \in \mathsf{P}$, we can construct a deterministic TM' that decides $\overline L$ in p...
https://cs.stackexchange.com
191,654
[ "https://dba.stackexchange.com/questions/191654", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/105522/" ]
I have a MS SQL Server 2012 instance preinstalled on a Windows 2012 R2 production server. The Windows locale was English(EN-US), and SQL Server Collation is SQL_Latin1_General_CP1_CI_AS. The system handles all Chinese data with nvarchar fields just fine. Later for some reason (unrelated to sql server) I may have to c...
In general you <em>should</em> be ok. The only area that I am aware of that could be affected is SQLCLR, in which case the following conditions must be true: <ol> <li>(<br> The LCID of the OS does not match the LCID of the default Collation of the Database where the Assembly is loaded, <em>OR</em> </li> <li>The d...
Nothing will happen to your SQL Server installation if you change the Windows system locale, because it was installed with the specific collation <code>SQL_Latin1_General_CP1_CI_AS</code>.
https://dba.stackexchange.com
2,339,408
[ "https://math.stackexchange.com/questions/2339408", "https://math.stackexchange.com", "https://math.stackexchange.com/users/309041/" ]
I see a question in Chinese senior high schools books: <blockquote> Throwing a fair coin until either there is one Head or four Tails. Find the expectation of times of throwing. (You start throwing a coin, if you see Head, then the game suddenly over; and if you see four Tail, the game is over too. Only these tw...
You could take $\Omega=\{T,H\}^4$ as sample space where all outcomes are equiprobable, and prescribe random variable $X$ as the function $\Omega\to\mathbb R$ determined by: <ul> <li>$X(\omega)=1$ if $\omega_1=H$</li> <li>$X(\omega)=2$ if $\omega_1=T$ and $\omega_2=H$</li> <li>$X(\omega)=3$ if $\omega_1=\omega_2=T$ and...
You can use as a sample space the set $$ \Omega=\left\{H,TH,TTH,TTTH,TTTT\right\} $$ The probabilities of these outcomes are $\frac{1}{2}$, $\frac{1}{4}$, $\frac{1}{8}$, $\frac{1}{16}$, and $\frac{1}{16}$ respectively. [You asked how to show this rigorously. Each throw is independent from every other throw, and o...
https://math.stackexchange.com
439,395
[ "https://physics.stackexchange.com/questions/439395", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/212142/" ]
I have trouble to understand that if <span class="math-container">$$\frac{\mathrm{d}q}{\mathrm{d}t} = n\cdot C $$</span> then during an isothermal process change in heat must also be zero , but why do we say only change in internal energy equals to zero?
In thermodynamics, the heat capacity is regarded as the derivative of the internal energy with respect to temperature (a function of state) rather than the derivative of the heat with respect to temperature (a function of process path). This is because we regard heat capacity as a physical property of the material. Th...
Heat can transfer to or from a substance without causing a temperature and internal energy change of the substance. And a temperature and internal energy change can occur to a substance without heat transfer to or from the substance. To understand the reasons for this you need to keep in mind that there are two possi...
https://physics.stackexchange.com
260,784
[ "https://electronics.stackexchange.com/questions/260784", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/94233/" ]
Ok.. so I know how solar panels are connected to a combiner box &amp; tied into a charge controller/inverter. I also know that the AC from the inverter must be in phase with the line/mains power. <strong>What I would like to know is the following:</strong> <ol> <li>Exactly how much voltage (above the line voltage)...
IF it is a 150W Tungsten filament operating at 15Vrms or dc, then the current at 4000'K is about 150W/15V=10A and the resistance is 15V/10A= 1.5 Ohms. We know that that PTC characteristics for tungsten are 1:10 Ohms cold:hot thus the cold resistance should be 1.5Ohms/10= 150 milliohms which results in a surge current ...
If you use only a 220/15 transformer, any fluctuations on the power line may cause the lamp to blink or even to break it down. Instead, you can buy a 15VDC/10A (Or with higher current rating) SMPS. This can be more efficient and reliable.
https://electronics.stackexchange.com
178,344
[ "https://mathoverflow.net/questions/178344", "https://mathoverflow.net", "https://mathoverflow.net/users/33018/" ]
Let $s&gt;\frac{1}{2};$ and define a Sobolev space as follows: $$H^{s}(\mathbb R)=\{f\in L^{2}(\mathbb R):[\int_{\mathbb R} |\hat{f}(\xi)|^{2}(1+|\xi|^{2})^{s}d\xi]^{1/2}&lt;\infty \}.$$ Fact: Let $m$ be an integer greater than $s+1.$ Assume that $F\in C^{m}(\mathbb R)$ and $F(0)=0.$ Then $F(f)\in H^{s}(\mathbb R)$ for...
In the case s>3/2, the answer looks to be given quite comprehensively as Theorem 1 (see also Remark 1) of <em>Bourdaud, G., Moussai, M., and Sickel, W. Composition operators on Lizorkin-Triebel spaces. J. Funct. Anal. 259 (2010), no. 5, 1098–1128.</em> As far as I am aware, results giving necessary and sufficient con...
The property $F(0)=0$ follows from applying $F$ to the zero function, but the regularity is not as good as you ask for. As a partial counterexample, let $F(x)=|x|$ and $s=1$. Now $F(f)\in H^1$ for all $f\in H^1$ but $F\notin C^1$. Although $F$ is not classically differentiable, it is weakly differentiable, and for exa...
https://mathoverflow.net
38,810
[ "https://stats.stackexchange.com/questions/38810", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/10164/" ]
For a microarray experiment with ~40,000 probes and ~30 samples I used the clara function from R to cluster my expression matrix. How do I interpret this silhouette plot? <img src="https://i.stack.imgur.com/dWO4i.png" alt="my sil plot!"> Firstly, I don't understand how a k of 3 could have the highest sil, considerin...
Silhouette statistic is computed for every object from the set of objects being clustered (what is objects in your case - probes?). Sole objects (objects remained unclustered) in the solution receive silhouette value 0. This of course affects the average silhouette value. You might want to consider quality of clusterin...
For microarray and gene expression data, the classic clustering algorithms such as k-means and also CLARA/CLARANS are a bad choice. Because they have no understanding of the domain, where some dimensions may not bear any relevant information. (And in fact, the distance function, where you probably use Euclidean distanc...
https://stats.stackexchange.com
213,498
[ "https://security.stackexchange.com/questions/213498", "https://security.stackexchange.com", "https://security.stackexchange.com/users/212300/" ]
In my apache error log I am getting these errors (there are 100s of these lines), most of these IPs are from China. I guess some bots are trying to find vulnerable files. Is there any way to protect the server against such attacks? <pre><code>script '/var/www/public_html/bbr.php' not found or unable to stat script '...
That is just normal background traffic. All domains are crawled all the time in order to find common vulnerabilities: <ul> <li>Unsecured or default passworded admin areas (like the wp-admins.php in your listing)</li> <li>Files containing credentials (config.php)</li> <li>Files or directories that are publicly availab...
There are tools like Fail2Ban that temporarily restrict access from IPs that have tried for non-existing files in a short time range too often (it is configurable what "too often" means exactly). This will reduce the scanning traffic on your site, but as @fleitner already wrote, you cannot exclude it completely.
https://security.stackexchange.com
358,443
[ "https://physics.stackexchange.com/questions/358443", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/144045/" ]
If a car is moving towards me and I push against the bonnet with a force $F$, but it makes little difference so the car pushes me backwards in a straight line for distance $x$, have I done $-Fx$ work on the car or have I done no work on it?
You can think of negative work as if you were pulling energy <em>out</em> of the system. In your example, you are indeed trying to brake the car and you do that by removing $W=-Fx$ Joules from it's kinetic energy.
The force that the car applies on you has a displacement which is in the same direction as the force so that force due to the car does positive work on you. The force that you applied on the car has a displacement which is in the opposite direction to the force so that force due to you does negative work on the car....
https://physics.stackexchange.com
459,809
[ "https://physics.stackexchange.com/questions/459809", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/217881/" ]
If an oxygen atom has six electrons, then it has an unfilled orbital and the oxygen atom may share electrons from two hydrogen atoms (and form water) in order to become more stable. But why does oxygen, or any other atom for that manner, favor stability over instability? Why can't the oxygen atom just have six electro...
An <span class="math-container">$\text{O}^{2+}$</span> ion, with 6 electrons, <em>is</em> stable in a vacuum. If you put one in the depths of interstellar space, far from any other matter, then it will sit in that state until the end of time. Similarly, you can have a high-elevation lake, and it can be absolutely stab...
Wanting or favoring are not very good terms in physics. More scientific view on this would be that whenever an oxygen atom comes close to another atom, they interact and provided things are right (such as the number of electrons and their state), the atoms attract and can get closer, while losing part of their initial ...
https://physics.stackexchange.com
41,861
[ "https://stats.stackexchange.com/questions/41861", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/9816/" ]
I'm trying to compute ANOVA effect sizes from papers that provide an F value without other information. If I understand correctly, the effect size for a single-factor ANOVA is $$ \eta {2} = \frac{ss_{between}}{ss_{between} + ss_{error}} $$ And the F value is: $$ F = \frac{(N-k)ss_{between}}{(k-1)(ss_{between} + ss_{e...
This question was based on a huge and very basic error. F is not $$ F = \frac{(N-k)ss_{between}}{(k-1)(ss_{between} + ss_{error})} $$ But rather $$ F = \frac{(N-k)ss_{between}}{(k-1)ss_{error}} $$ With this correction, everything makes sense. Unfortunately, I think it also means that there is no way to calculate eta...
<ol> <li>We know that: $$ F = \frac{MS_B} {MS_W} = \frac{SS_B/(k-1)} {SS_W/(N-k)}. $$ Thus $SS_B = F \times MS_W \times (k-1)$, and $SS_W = MS_W \times (N-k)$.</li> <li>We also know that: $$ \eta^2 = \frac{SS_B}{SS_B + SS_W} $$ </li> <li>Thus, if we substitute (1) in (2): $$ \eta^2 = \frac{F \times MS_W \times (k-1...
https://stats.stackexchange.com
210,572
[ "https://softwareengineering.stackexchange.com/questions/210572", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/25446/" ]
How do you deal with a senior developer who does not think that the company standard way of developing software applies to them ? For instance: <ol> <li>Will ask other developers to do work by email, rather than assign bugs to them.</li> <li>Will keep copies of documentation and code in their own local area, rather ...
I document their activities, give them multiple written warnings, work with HR to create and implement an improvement plan, then I fire them. <strong>edit</strong> Since you're not the manager, the best you can do is document what you see (stick to facts) and forward to your manager once in a while. If any of your p...
Obviously, firing them or reporting them to management is an option; whether or not it would be my <em>first choice</em> as an option would depend on whether or not they're also a good developer. It seems wrong-headed to send a very smart person packing <em>just</em> because they don't follow the process. Especially i...
https://softwareengineering.stackexchange.com
181,848
[ "https://electronics.stackexchange.com/questions/181848", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/80332/" ]
I was looking around the site and I encountered an intresting answer.The one who posted it said that:"If you supply too much current to a device,it will draw as much as it needs" and also that if you give a smaller amount,it is possible to damage it.Now I remember that I tested a LED with a higher current(a significant...
Most products and many components such as ICs are designed to operate from a constant voltage supply. They will draw what current they need, provided the voltage is in the correct range. A device that is supplied with a 19V 5A adapter will operate properly from a 19V 100A power supply (assuming it meets any other req...
A typical constant-voltage power supply marked "12 V, 100 W" isn't trying to push 100 W of power into the load. It produces a fixed 12 V output voltage. 100 W is just the maximum power it can deliver without overheating or malfunctionning. The actual power drawn depends on the characteristics of the load connected to i...
https://electronics.stackexchange.com
516,217
[ "https://physics.stackexchange.com/questions/516217", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/103806/" ]
given I know the density matrix elements in position basis as a function of time. <span class="math-container">$ \langle x | \rho(t) |x' \rangle$</span> How do I calculate the expection values like <span class="math-container">$\langle x^2(t) \rangle $</span> or <span class="math-container">$ \langle p^2(t) \rangle$...
The expectation values are calculate with this formula <span class="math-container">$$ \langle \hat A \rangle = Tr(\hat A \rho) = Tr(\rho \hat A). $$</span> Since the trace is basis-independent you can evaluate the trace in an arbitrary basis <span class="math-container">$\{ |n\rangle \}$</span> <span class="math-co...
I think I got it myself: <span class="math-container">$\rho = \int dx dx' \langle x |\rho| x' \rangle |x \rangle \langle x' |$</span> Then it follows: <span class="math-container">$\langle x^2 \rangle = \int dx \langle x |\rho| x \rangle x^2$</span>, right?
https://physics.stackexchange.com
278,710
[ "https://softwareengineering.stackexchange.com/questions/278710", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/129731/" ]
My manager keeps complaining that the estimates we have come up with are too much for the customer — every time he asks us to think like a customer and see whether the estimate is valid, but my point is that even though we somehow finish the project on time, lots of issues might creep up in the project. Apart from this...
Your manager is probably under pressure to justify your time estimates, thus the friction. This kind of friction is part of the work environment, there are lots of books, classes, coaching sessions available that will teach you how to interact with different people and personality types so you can do your job. More i...
Q: "What to tell a manager who tells your estimates are too much for a genuine task" A: "I am starting at new job in x weeks. Who should I hand over the project to?"
https://softwareengineering.stackexchange.com
160,409
[ "https://mathoverflow.net/questions/160409", "https://mathoverflow.net", "https://mathoverflow.net/users/6094/" ]
Or: <strong><em>Stabbing rolling disks</em></strong>. Imagine there are $n$ unit-diameter disks rolling between $x=0$ and $x=d$, reflecting off either end. The disk centers start at a random location within $[\frac{1}{2}, d-\frac{1}{2}]$, with uniformly random velocities in $[-1,1]$ per unit time. The goal is to wait ...
The waiting time is almost surely finite. More explicitly, if the speeds of the hoops are linearly independent over $\mathbb{Q}$ then the waiting time is finite for <em>all</em> initial positions, and furthermore the average proportion of the the time which is spent in a spearable position equals the probability that t...
As a start, consider the probability that the randomly distributed circles all overlap to begin with. Assume $d\ge2$ since otherwise the probability is 1. There are $n$ choices for the leftmost circle, $n-1$ choices for the rightmost circle, and then all the others have to be between them, which gives $$n(n-1)\int_{...
https://mathoverflow.net
586,914
[ "https://electronics.stackexchange.com/questions/586914", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/238026/" ]
I am using Nylon plastic screws as PCB mounts on my 2 layer PCB. The PCB has a very ESD sensitive and expensive device mounted on. Since the Nylon material can develop positive static charge, is it a good idea to have 4 nylon screws on the PCB which houses a very ESD senstive device? The PCB is to be screwed onto an E...
No, they are not. Any plastic like that has the potential to build up charge over time from small movements or vibration (triboelectric charging). I would not use any untreated plastic anywhere near a sensor like that - in the mounting solution or the enclosure. If you require electrical isolation, you should conside...
I do not see an issue with nylon screws (or plastic in general) <em><strong>if</strong></em> you create explicit grounding path that you control. The choice of mounting hardware depends on many aspects such as EMI requirements as well as grounding path from external(?) ESD sources. I assume you may have a specific reas...
https://electronics.stackexchange.com
32,439
[ "https://stats.stackexchange.com/questions/32439", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/7644/" ]
I am trying to do multiple imputation using the mice package in R, and the imputation keeps stopping with the following error: <pre><code>Error in mice.impute.logreg(c(1L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 2L, : dims [product 145] do not match the length of object [146] In addition: There were 50 or more warnings (u...
I had already modified the predictorMatrix, but I went through it again and set it not to use a few more variables I was doubtful about, and the imputation ran, giving reasonable results. Then I added another variable I needed imputed, and started getting the same problem. With further work on the predictorMatrix (I ...
I had this very annoying error message too. By trial and error I identified the two variables which when removed fixed the problem. What the two had in common was that they were factors with one empty (ie. unused, frequency of 0 observations) level. By running <code>dataset$variable&lt;-droplevels(dataset$variable)</co...
https://stats.stackexchange.com
169,163
[ "https://electronics.stackexchange.com/questions/169163", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/70284/" ]
Please, take a loot at this circuit: <img src="https://i.stack.imgur.com/OhOEC.png" alt="enter image description here"> Obviously, this is a circuit that is very easy to solve using lots of different methods. However, I'm trying to solve it using Nodal Analysis (I'm not sure if it's possible). I tried to use node B ...
At Node C: (C+20i)/10 + (C+20i)/30 = i But C=10, hence you can solve for i. Then, voltage at A is -20i
You won't be able to set up a traditional Nodal equation for node A because of the dependent voltage source. This brings you down one equation, but in return you get the equation for the dependent voltage source: <strong>Va = -20*i</strong> ('i' which would also be referenced in your nodal equaton for node C). So to a...
https://electronics.stackexchange.com
18,715
[ "https://dsp.stackexchange.com/questions/18715", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/7611/" ]
I have computed 12d-MFCC features on 3 consecutive audio frames, say: <pre><code>For 1st frame: a1 a2 a3 ... a12 For 2nd frame: b1 b2 b3 ... b12 For 3rd frame: c1 c2 c3 ... c12 </code></pre> How to organize these MFCC features, in <code>a1 a2 ... a12 b1 b2 ... b12 c1 c2 ... c12</code> or <code>a1 b1 c1 ... a12 b12 c1...
Natural order would be to save it on frame by frame basis - that's the way you calculate them, otherwise you would need some gymnastics to do so. What's more, each 12 coefficients will be one vector in your 12D space - frame after frame. Also it is easier to manage that in memory. In MATLAB like environments you simpl...
If you interleave your data you will have hard time adding new entries. Otherwise it make no differences.
https://dsp.stackexchange.com
11,874
[ "https://cstheory.stackexchange.com/questions/11874", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/9920/" ]
I have this Kripke model $M$: $$ \begin{array}{ccccccc} \to &amp; (p, q) &amp; \to &amp; (\neg p, \neg q) &amp; \to &amp; (p, \neg q) \\ &amp; \circlearrowright &amp; &amp; &amp; &amp; \circlearrowright &amp; \\ \end{array} $$ where $(p, \neg q)$ means “$p$ and not $q$” and $\circlearrowright$ is a self loop. No...
Intuitively, what happens here is that for $AFGp$, you check each individual path for whether after some point, $p$ will always be true - no matter what other choices are available in a given state. In particular, for the path which always stays in the first state, this is true even though a $\neg p$-state is reachabl...
Lets name the states $s_1,s_2,s_3$, from left to right. First, we show why the first formula is false: In order to see this, we first need to check which states satisfy the sub-formula $AG(p)$. $s_3$ satisfies $AG(p)$ because there is only one infinite computation starting from $s_3$ which is $s_3^\omega$. However, ...
https://cstheory.stackexchange.com
594,009
[ "https://physics.stackexchange.com/questions/594009", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/279835/" ]
In one of the postulates of Bohr's model of hydrogen atom it is said that &quot;While the electron revolves, the electrostatic force between the electron and nucleus provides centripetal force. The derivation then follows: <span class="math-container">$F_e = F_c$</span> <span class="math-container">$\implies \frac{\tex...
The simple explanation is that we only need to consider magnitudes in the equations, as directions are trivial in this situation (there is only one force, and it is clearly in the required direction). Now think of <span class="math-container">$F_e$</span> and <span class="math-container">$F_c$</span> not as forces, but...
The force equation says -Fe + Fc = 0. So you do have a negative sign coming from the negative charge of electron.
https://physics.stackexchange.com
322,620
[ "https://physics.stackexchange.com/questions/322620", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/147951/" ]
I'm studying for my quantum mechanics 3 exam and I really can't get my head round Dirac notation. My understanding so far is that $\lvert\psi\rangle$ is some mathematical object which doesn't really mean anything by itself (I've heard mentions of dual space but I don't think I should get into that). Then if you want to...
In the following, I will consider that $|x\rangle$ is a proper state of the Hilbert space of interest, although this is not mathematically rigorous. In that case, yes, $\langle x|\psi\rangle$ is the projection of $|\psi\rangle$ onto the state $|x\rangle$ (the state fully localized at the position $x$), much in the sam...
<blockquote> My understanding so far is that $|\psi\rangle$ is some mathematical object which doesn't really mean anything by itself </blockquote> Of course it means something, it is a vector in a Hilbert space. Remember your Linear Algebra lectures: A vector $\vec v$ might be written as $(5,0)^T$ in one basis and a...
https://physics.stackexchange.com
122,392
[ "https://physics.stackexchange.com/questions/122392", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/50606/" ]
I realize that the curvature of space-time causes acceleration (gravity). Is it possible to have a curvature only of space, or a curvature only of time? If so, would a curvature only of space, or a curvature only of time, also cause acceleration?
In general it doesn't make sense to talk of curvature being only in space or only in time. The geometry of a spacetime is described by the metric. Normally we start with some distribution of matter/energy and solve the Einstein equations to calculate the metric. Alternatively you can start with the desired metric and ...
First off, I'm not entirely sure of what you are asking, or what you are thinking of as curvatur. There are certainly coordinate systems which are non-euclidean that are not considered to be "curved." For instance standard cylindrical coordinates have zero Riemann Curvature, but they are "curvy looking." My take thou...
https://physics.stackexchange.com