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 |
|---|---|---|---|---|---|
29,599 | [
"https://cs.stackexchange.com/questions/29599",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/21350/"
] | We have a weighted tree of $n\leq 10^5$ nodes, and for every node $v$, value $L(v)$. The goal is to calculate, for every vertex $v$, number of vertices $u$ such that $\mathrm{dist}(v,u)\leq L(v)$. This is a task from a programming contest. Judging by the limit on $n$, and also specifics of time limits on... | As it is a contest problem, I will give you some tips which may be a good start point.
<ol>
<li>Consider an easier problem: the graph has a vertex $v$ and multiple paths going out of it (they are straight). Of course, the result for vertex $v$ is easy to compute (one DFS). Now try to use the binary search to find the ... | Since this is a contest problem, I'll just give a hint at one possible approach.
It sounds like you know how to efficiently answer queries of the form "how many vertices are of distance $\le d$ from $v$ and are within the subtree under $w$?".
So, try using that as a subroutine. Assume this is a rooted binary tree. ... | https://cs.stackexchange.com |
83,762 | [
"https://cs.stackexchange.com/questions/83762",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/80055/"
] | Given an alphabet $\Sigma = \{0, 1\}$ and
a formal language $$L = \{ w \in \Sigma^* |\ |\mathrm{odd}(w)|_1, |\mathrm{even}(w)|_1 \text{are even numbers} \}$$
That means that the number of 1's in the odd and even positions of a given string are always an even number. I've tried using the Pumping-Lemma on a $1^{4n}... | To create the DFA, just start doing it. I assume there is no requirement that the number of elements in the string is even.
You start in the state A. In state A, you have an even number of 1's in the even and odd positions (initially, both counts are 0), so A is an accepting state. To get to an accepting state again,... | The following general result holds:
<blockquote>
Let $L = \{ w : \mathrm{odd}(w) \in L_1 \text{ and } \mathrm{even}(w) \in L_2 \}$. Then $L$ is regular iff $L_1,L_2$ are regular.
</blockquote>
Indeed, suppose first that $L$ is a regular language over the alphabet $\Sigma$. Define a substitution $s\colon \Sigma \to ... | https://cs.stackexchange.com |
40,928 | [
"https://quant.stackexchange.com/questions/40928",
"https://quant.stackexchange.com",
"https://quant.stackexchange.com/users/25029/"
] | I have a time series of \$pnl of a strategy and nothing else. Can i use it to come up with some sort of a performance measure adjusted for risk? Is $$ \frac{average(\$pnl)} {sigma(\$pnl)}$$ ok to use here? Are there ways of improving it? Is it same as sharpe ratio?
| Adding to Attack68 answer- you can do a few things:
<ol>
<li>calculate total and average pnl over a given time.</li>
<li>calculate skew, kurtosis etc. as suggested above.</li>
<li>calculate hit rate.</li>
<li>calculate max drawdown.</li>
<li>SR using daily pnl is fine but ideally the returns should be in %.</li>
</ol... | If you have a time series of accumulated/on going PnL figures, $X_t$, you should be careful to convert these into a more stationary data series of period PnL changes (probably daily changes):
$Y_t = X_t - X_{t-1} = (1-L)X_t \; , \text{for L the lag opertaor}$
Then you can consider the traditional ex post Sharpe Ratio... | https://quant.stackexchange.com |
48,189 | [
"https://softwareengineering.stackexchange.com/questions/48189",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/9398/"
] | There is a basic website (homepage and 5 subpages) with static content, we want to add something like a slideshow of current offers with custom images that would change every month. We also want to include an image gallery with effects like Lightbox.
The person who is going to add/modify/delete the images in the two n... | Due to the simple nature of your site and the limited CMS-type needs, I would not implement a full CMS and just create a simple, upload/modify/delete page for the monthly offers.
If you plan or expect more CMS-type activities to begin taking place in the future you might want to consider setting up a CMS though.
Also... | Well, it might be worth it if the CMS has features (in terms of display and layout and themes and such) that would save you coding time (assuming custom-code is your alternative). Plus, they are likely to be fixed/updated/featured-added by someone else so you don't have to do any of that. You lose control of the code-b... | https://softwareengineering.stackexchange.com |
12,761 | [
"https://datascience.stackexchange.com/questions/12761",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/13450/"
] | So, I have not been able to find any literature on this subject but it seems like something worth giving a thought:
<ul>
<li>What are the best practices in model training and optimization if new observations are available?</li>
<li>Is there any way to determine the period/frequency of re-training a model before the pr... | <ol>
<li>Once a model is trained and you get new data which can be used for training, you can load the previous model and train onto it. For example, you can save your model as a <code>.pickle</code> file and load it and train further onto it when new data is available. Do note that for the model to predict correctly, ... | When new observations are available, there are three ways to retrain your model:
<ol>
<li><strong>Online:</strong> each time a new observation is available, you use this single data point to further train your model (e.g. load your current model and further train it by doing backpropagation with that single observatio... | https://datascience.stackexchange.com |
505,762 | [
"https://physics.stackexchange.com/questions/505762",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/243260/"
] | Consider the following scenario:
When studying forces, we know that when there is an unbalanced force acting on an object (let's say a textbook), the textbook moves in the direction of the unbalanced force. However, in real life, the textbook will move differently if the force is applied on the edge of the textbook ve... | The phenomenon you're talking about is <strong><em>torque</em></strong>, which is simply a force acting at a distance from an object's center of mass. If the force vector points directly through the center of mass, you'll just have a translational movement, but if the force vector points anywhere else, you'll induce a ... | <blockquote>
The force is not applied on an angle; it's applied closer to one edge
of the textbook instead of the dead center. The force should move the
textbook forward, but instead the book will be pushed forward on the
edge only, causing the book to spin.
</blockquote>
You need to take into account that the... | https://physics.stackexchange.com |
65,640 | [
"https://dba.stackexchange.com/questions/65640",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/38788/"
] | I've upgraded my SQL Server from the 2008 R2 Express edition to a full standard version of SQL Server 2014. Now I'm running them both side by side. But my problem is how can I abandon the 2008 version and only run on the 2014 version? I've check the properties on the SQL Server 2014, and it shows that I'm still with 20... | <blockquote>
Now i'm running them both side by side
</blockquote>
So, to clarify, you did a side-by-side upgrade. Meaning that you installed a new instance of SQL Server 2014?
In that case, if you are ready to rid yourself of the SQL Server 2008 R2 instance then you would need to <em>transfer all of your necessary... | select @@version will give you which version you are actually connecting to.Also check whether your instance names of both in configuration manager to avoid accidentally connecting
| https://dba.stackexchange.com |
161,914 | [
"https://softwareengineering.stackexchange.com/questions/161914",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/62398/"
] | Dear fellow programmers,
We're developing software which simulates vehicular traffic.
Part of the process called "assignment" is concerned with assigning vehicles to their routes and has to use some kind of shortest-path-finding algorithm.
Traditionally, people do this with Dijkstra's, and certain scientific literatu... | Dijkstra's finds the shortest path between a given node and <em>all</em> other nodes, so I expect it would be more expensive than A*. However, it looks like you're trying to pre-compute the cost & path from any node to any other? Then Dijkstra's is the way to go.
As for a simpler representation, a few things com... | You have large graph and you made it even larger. Martinc C. Martin advised using lathes only when needed, so i will not go into this.
One of things that could help you, is tranform your graph into smaller graphs.
First simplification that helped me a lot (I worked with road networks of europian states) was "removing... | https://softwareengineering.stackexchange.com |
529,918 | [
"https://physics.stackexchange.com/questions/529918",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/197229/"
] | Say there is a man running on a road. Friction is applying a force hence he is accelerating, but the friction is static hence does no work. We know that the change in kinetic energy is due to internal work done by his muscles.
Now say that the same man is running on a wooden plank kept on a frictionless surface. As t... | From the ground reference frame, there is <strong>no</strong> net work done. Friction did displace you by a distance of say <span class="math-container">$d$</span>. However, the same friction also displaced the wooden board by a distance <span class="math-container">$d'$</span>. These two perfectly cancel and this can ... | <blockquote>
Thus work is frame dependent.
Is my conclusion correct?
</blockquote>
Yes. Work is frame dependent. This can be easily seen by noting that distance is frame dependent and since <span class="math-container">$W=F\cdot d$</span> then work is also frame variant.
Note that the plank frame that you descri... | https://physics.stackexchange.com |
404,319 | [
"https://math.stackexchange.com/questions/404319",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/12952/"
] | Let's say I've got two squares with side length $d$ that are held parallel at a distance $m$ apart.
Suppose that particles are randomly falling from above in such a way that the polar angle $\varphi$ of the trajectory of the particles has a probability distribution proportional to $\operatorname{cos}^2(\varphi)$, wh... | Let $d=\alpha \tan (\varphi) = \sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$ be the distance (projected over the $z$ axis) between the point points at which the ray intersect the square planes. (Disregard for now the restriction that the ray passes through the squares).
Then, the probability density of $d$ can obtained, by the usua... | Use Bayes' theorem:
$$ P(\phi\mid\text{admissible}) = \frac{P(\text{admissible}|\phi)P(\phi)}{P(\text{admissible})}. $$
Unless I am misreading your question (what do you do about rays that are parallel to an admissible ray? I am assuming here they are admissible, so only the direction or a ray matters), a ray parametr... | https://math.stackexchange.com |
287,473 | [
"https://softwareengineering.stackexchange.com/questions/287473",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/184378/"
] | I would like to ship test code alongside a product. Specifically, provide an option so that anyone with a copy of our program can hit a "self-test" button or pass --self-test on the command line and run through the complete suite of unit | integration tests.
I mostly want to do this to help debug problems discovered i... | Sometimes test code contains snippets of code from third parties, both external and internal to your company. This happens as users file bugs; your tests (such as regression tests) then incorporate the code supplied by them to reproduce. Often, the licensing of such code snippets to reproduce bugs is unclear. So, yo... | Shipping tests? Yes.
Shipping Unit tests? No.
As you say in the comment, problem you may face when running the product on a client computer will include problems such as linking with the wrong dll, generally this is not something a unit test will catch (which will no doubt have mocked the dll out to test the code).
... | https://softwareengineering.stackexchange.com |
9,544 | [
"https://quantumcomputing.stackexchange.com/questions/9544",
"https://quantumcomputing.stackexchange.com",
"https://quantumcomputing.stackexchange.com/users/8491/"
] | Can qubit be inside Bloch Sphere, i.e. its length is less than 1?<br>
If yes, how we represent that state since we have only parameter for angles and not the length (norm) of the vector?
| Mixed states are represented by vectors inside Bloch sphere.
Suppose you have mixed state with density matrix
<span class="math-container">$$\rho=q|\psi\rangle\langle\psi| + (1-q)|\phi\rangle\langle\phi|$$</span>
where <span class="math-container">$|\psi\rangle$</span> and <span class="math-container">$|\phi\rangle$<... | Yes, the state of a qubit can be described by a point inside the Bloch sphere. However, you cannot use the state vector formalism to describe it, you have to generalise to the concept of mixed states. For a qubit, these have three parameters: the two angles and the length of the vector.
| https://quantumcomputing.stackexchange.com |
122,182 | [
"https://mathoverflow.net/questions/122182",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14601/"
] | I'm currently trying to relate two descriptions of the curvature and torsion of a connection and am running into some confusion.
I know that an affine connection $A$ on an $n$-dimensional manifold $M$ can be split into two parts $A = \omega + e$, where $\omega$ takes values in the Lie algebra of rotations $\mathfrak{s... | This is not really an answer, but I think it might help you look at things a little bit differently. It is not at all clear that Cartan chose the word 'torsion' to describe the 'translation' component of the curvature because it was related to the torsion of a curve in flat space or had anything to do with developing ... | The curvatures of a curve are all extrinsic. There is no intrinsic curvature of a curve since this is always a 2-form with values in a subgroup of endomorphimss of the tangent bundle.
The analogon of the curvatures of a curve is the second fundamental form of a submanifold, and its covariant derivatives with respect to... | https://mathoverflow.net |
108,770 | [
"https://datascience.stackexchange.com/questions/108770",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/133121/"
] | I’m trying to build a model to predict the amount of sales of a product for the next few days
This question is about whether or not I should <strong>use the tail of the serie as the test set</strong> and train models using the rest of the data or I should create a test set picking dates at random as usual
Reading about... | I ended up randomly browsing my dataframe and assigning each row to train or test set depending on its unique identifiers. It happens to be fast enough for my usecase (takes 1 minute for my 10M rows dataframe with 4 identifiers).
<pre><code>import random
from tqdm import tqdm
def train_test_split_identifiers(df, ident... | Simple solution would be to create a sudo Id column which is the concatenation of all unique identifier columns (e.g. mail@com9825403). You then sample the unique entries of that column to test and train.
| https://datascience.stackexchange.com |
33,976 | [
"https://math.stackexchange.com/questions/33976",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/5531/"
] | A problem I've been working on has lead me to consider power series of the form $\sum_{n \geq 0} a_n x^n$ with $a_n = 0$ or $a_n = 1$ for all $n$.
Is there any literature available on these series? What do we know about them? I'm interested in convergence, analytic properties, and possibly even representation by kno... | Okay, given your definition:
If $G$ is open in $\mathbb{R}^n$ and $H$ is open in $\mathbb{R}^m$, is $G\times H$ open in $R^{m+n}$?
If $A\subseteq G\subseteq\mathbb{R}^n$ and $B\subseteq H\subseteq \mathbb{R}^m$, is $A\times B\subseteq G\times H$ true?
If $A\subseteq G$ and $B\subseteq H$, what is $(G\times H)\setmin... | This is an elaboration of Arturo's answer; it is too long to be a comment. It usus your definition of measurable set and Fubini's theorem. Proceed in steps:
<ol>
<li>We may assume tha $A$ and $B$ are of finite measure, say $m(A),m(B)\le M$.</li>
<li>Let $\epsilon>0$ be given. Choose open sets $G\subset\mathbb{R}^m$... | https://math.stackexchange.com |
11,508 | [
"https://cstheory.stackexchange.com/questions/11508",
"https://cstheory.stackexchange.com",
"https://cstheory.stackexchange.com/users/553/"
] | It was shown in the paper "Integer Programming with a Fixed Number of Variables" that integer programmings with constant number of constraints (or variables) are polynomially solvable.
Does this hold for 0-1 programming?
| I'm assuming that by "0-1 programming with a constant number of constraints" you mean the following problem:
Maximize some linear function of (x_1, x_2, ..., x_n) subject to the constraints that each x_i is in {0,1} and a constant number of additional linear constraints.
This problem is NP-complete even with 1 additi... | Lenstra showed in the mentioned paper, that the <em>Integer
Linear Programm <strong>Feasibility</strong> Problem</em>
<blockquote>
Given integral matrix $A_{m,n}$ and $b \in \mathbb{Z}^m$. <br> Is there a $x \in \mathbb{Z}^n$ such that $Ax \le b$ ?
</blockquote>
is polynomially solvable, if n or m is constant. (No... | https://cstheory.stackexchange.com |
61,295 | [
"https://mathoverflow.net/questions/61295",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14233/"
] | Let $\mathbb P$ be the set of prime numbers.
Is there a non constant polynomial $f \in \mathbb Z[X]$ such that the set $$I_f := \{ \textstyle\frac{z}{p} : z \in \mathbb Z, p \in \mathbb P, p \mid f(z) \}$$
is dense in $\mathbb R$?
(I suppose that the following much stronger statement holds: Every polynomial $f \in \... | The set $I_f$ is dense for quadratic polynomials which are irreducible over $\mathbb{Q}$, by the work of Duke-Friedlander-Iwaniec (Ann. of Math. 141 (1995), 423-441) and Toth (IMRN 2000, No. 14, 719-739). In fact we have uniform distribution even when $p$ is restricted to a reduced residue class of any modulus.
| In my paper, Polynomial congruences and density, Math Mag 80 (2007) 299-302, I prove this related result:
Let $f(t)=t^eg(t)$ where $e$ is a nonnegative integer, $g$ is a polynomial of degree at least 2 with integer coefficients, and $g(0)\ne0$. Define $T_f$ by $$T_f=\lbrace r/m:\gcd(r,m)=1,{\rm\ and\ }m{\rm\ divides\... | https://mathoverflow.net |
336,556 | [
"https://physics.stackexchange.com/questions/336556",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/157752/"
] | My question is related to problem 2.2.4 in Xiao-Gang Wen's book.<br>
Problem statement:
Compute the time ordered velocity correlation function for a harmonic oscillator described by $$H = \frac12 m ({\omega_0}^2 x^2 + \dot{x}^2 )$$.
This velocity correlation function is defined as:
$$ G(t) = \langle\mathcal{T} \{\do... | The path integral automatically gives time-ordered operators:
$$G(t)\equiv\langle T\{\hat{\mathcal{O}}_1(t)\hat{\mathcal{O}}_2(0) \}\rangle=\int_{x(t_a)=x_a}^{x(t_b)=x_b}\mathcal{D}[x(t')] \mathcal{O}_1(t)\mathcal{O}_2(0)e^{iS[x(t')]}.$$
In order to evaluate the above, you'll need to provide the boundary value data ... | Here is one way to compute it without using path integral. I will try with path integral to check it:
$$\hat{\dot{x}} \equiv \hat{v} = \sqrt{\hbar \omega_0 \over 2m} (a^\dagger -a)$$
Using the heisenberg evolution $a^\dagger (t) = a^\dagger e^{i \omega_0 t}$, we get
$$ \langle 0 | \mathcal{\tau} \{ v(t) v(0) \} | 0... | https://physics.stackexchange.com |
79,542 | [
"https://cs.stackexchange.com/questions/79542",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/74991/"
] | <blockquote>
There is given input - words is sequence of numbers: $w_i$ is number
in sequence, $i$ is position. All of them are in written in binary
system.
$$w_1\#,...\#w_k\#i$$ Prove that there exists deterministic
Turing machine which find $i$-th number in sorted sequence $w$ in
logspace.
</bl... | First let's consider the case when <strong>numbers are unique</strong>. The idea is that for each element $w_t$ we count the number of elements in the sequence which are less than $w_t$. After each loop on all elements of the sequence we check if there are $i-1$ elements less than $w_t$ then $w_t$ must be $i$-th elemen... | Maintain 3 registers, A, B, C. For the first two have them be "the Ath number is located at index B". The third register, use it to find the next largest number. Psuedo:
<pre><code>A = 1
B = the index of the smallest element in the sequence
C = number of elements equal to W[B]
A += C
while (A < I) {
C = index... | https://cs.stackexchange.com |
7,255 | [
"https://cstheory.stackexchange.com/questions/7255",
"https://cstheory.stackexchange.com",
"https://cstheory.stackexchange.com/users/2302/"
] | This question is posted on behalf of my friend, who is a networks engineer handling massive data (so not a toy problem). He needs to maintain a lookup/insertion/deletion structure storing nodes with multiple attributes. That is, there is a set of $k$ global properties, or key/value fields, where each node may maintain ... | One possibility (that depends on the relative size of the attribute set and the record set) is to use an inverted index, which is a wildly successful structure for use in text searching. Rather than storing the documents and doing a search, you store a list of which documents contain which value of which attribute for ... | The attribute-value pairs are LARGE. this results in loads of overhead to see all partial matches. This is currently not feasible. We already use a form of inverted index.
| https://cstheory.stackexchange.com |
35,239 | [
"https://physics.stackexchange.com/questions/35239",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/11791/"
] | If water is heaten up to ridicilously high temperatures, is it possible for the atoms in the molecules to lose their bonds?
And if it is possible, isn't this some kind of chain-reaction? <br>
Like you heat up water --> steam, keep heating it, then wamm you get 1 oxygen and 2 hydrogen atoms, and at that temperature the... | Whenever you have a chemical reaction like $2H_2O \rightleftharpoons 2H_2 + O_2$, it goes both ways. In this reaction, the products on the right have more chemical energy, so going to the right requires energy input, and going to the left releases energy, by the same amount.
Under any conditions, the reaction is runni... | Mike's answer is correct that this exchange happens constantly within a system containing water. You are right, however, to suggest that heating water can cause disassociation of water molecules. I am not sure to what temperature you would need to heat steam for this to happen in the absence of other substances, but ... | https://physics.stackexchange.com |
461,971 | [
"https://physics.stackexchange.com/questions/461971",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/99071/"
] | When you go to the sauna you may sit in a room with 90°C+. If it is a "commercial" sauna it will be on for the whole day. How does it come that when you sit on the wood you don't get burned?
I believe this question is different than the "classical" one concerning the "feeling" of heat, which may be explained with a lo... | First of all, I hope you sit on a towel. But even when you touch wood with your bare skin, you don't get burned. This indeed has to do with thermal conductance.
The point is not the heat transfer between the wood and your skin, but rather the heat flowing within the wood. When you touch the surface, your skin and the ... | Wood is full of air, and air is a terrible conductor of heat. It's not as complicated as it sounds, lighter, i.e. less dense woods, translate heat more poorly than dense ones.
If you look at a cross-section of a piece of wood on the microscopic level, you'll actually see that it's a network of relatively free-floating... | https://physics.stackexchange.com |
39,017 | [
"https://electronics.stackexchange.com/questions/39017",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/11862/"
] | This is more of an academic exercise than something practical. I've uploaded the image from a solution manual to a problem I was working on. I can't seem to agree with what they've done.
Also I can't seem to find a Euler path that works for both PUN and PDN.
<img src="https://i.stack.imgur.com/7qwsi.png" alt="">
Any... | NO you're not crazy. According the schematic the only NMOS that should be connected to node "g" is one of the S/D's of "e".
Also, the NMOS active cannot be one piece as drawn and there need only be one ground connection.
| It's been a few years since I last did this kind of thing, so I thought I'd try to figure it out.
Here's the transistor diagram:
<img src="https://i.stack.imgur.com/MoPWo.png" alt="enter image description here">
Here's the transistor diagram with the intermediate nodes labeled 1-4, and with the Euler path drawn in fo... | https://electronics.stackexchange.com |
27,338 | [
"https://softwareengineering.stackexchange.com/questions/27338",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/3712/"
] | Doctrine and Propel both make use of single and concrete table inheritance to map object relationships. The former sees all possible fields in the class tree mapped to a single table - whereas the latter maps each class to a specific table, duplicating common fields in the inheritance hierarchy.
While this facilitates... | It's impossible to say whether a particular database design is bad without knowing what the application is doing, the shape of the data, the performance expectations and so on. While generally normalisation (to some degree) is seen as best practice, it's pretty common to denormalise areas of databases for performance ... | I don't agree that ORM promotes de-normalisation or bad database design. In fact, the worst designed databases I've seen has been done without ORM's. By making it simple to have proper relations based on row id instead of making a relation based on the value of a random field, it rather promotes good database design. ... | https://softwareengineering.stackexchange.com |
1,599,953 | [
"https://math.stackexchange.com/questions/1599953",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/103441/"
] | <blockquote>
$$\int \frac{dx}{\sqrt{-x^2-12x+28}}$$
</blockquote>
First we need to use completing the square $-(x^2+12x-28)=-(x+6)^2+64$
So we have $\int \frac{dx}{\sqrt{-(x+6)^2+64}}$ I know that it is a general form of $\arcsin(\frac{x+6}{8})$ but how can I solve it using substitution?
| Put $y=\frac{x+6}{8}$ then the integral is equivalent to
$$
\int \frac{\mathrm{d}y}{\sqrt{1-y^2}}.
$$
From here you can conclude..
| Its not really necessary to go for substitution. Use basic differentiation of inverse trig functions.
$\begin{align}
\int\frac{dx}{\sqrt{a^2-x^2}}&=
\sin^{-1}(\frac{x}{a})+C\\
&=\int\frac{dx}{\sqrt{64-(x+6)^2}}\\
&=\sin^{-1}\frac{(x+6)}{8}+C
\end{align}
$
| https://math.stackexchange.com |
57,997 | [
"https://mathoverflow.net/questions/57997",
"https://mathoverflow.net",
"https://mathoverflow.net/users/370/"
] | Let $G$ be a linear algebraic group over some field, and let $V$ and $W$ be two simple rational representations of $G.$ Is $V\otimes W$ semi-simple?
I was trying to convince myself that if $G$ has a faithful semi-simple representation, then $G$ is linearly reductive, and was reduced to the question above. The problem ... | If $G$ is a(ny) group, if $k$ is a field of characteristic 0, and if $V$ and $W$ are semisimple finite dimensional $kG$ modules, then $V \otimes_k W$ is indeed semisimple as a $kG$-module. This is due to Chevalley, and (I think I'm not off-base in saying this) inspired the characteristic $p>0$ result of Serre mentio... | Let $G=SL_2(F_p)$. Put $V_k$ the $k+1$-dimensional representation. Then $V_k$ is simple for $0\le k\le p-1$. Take $0\le r,s\le p-1$ with $r+s>p$. Then $V_r\otimes V_s$ is not semisimple.
| https://mathoverflow.net |
45,392 | [
"https://electronics.stackexchange.com/questions/45392",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/15544/"
] | I have a device connected to MOXA nPort 5150 via 4-wire rs-485 cable. Termination resistor inside the converter was set to 1 kΩ (another option was 150 kΩ, which didn't work at all - I got framing errors on both sides) and now I have a correct signal on transmitting lines (my device properly reacts to commands).
Unfor... | To be honest, I forgot that I even asked this question because I have never figured out the exact answer, just a workaround. I'm posting this now, maybe it'll help someone.
It turns out, the Moxa converter I was using at the time incorrectly interpreted signals from some devices and could not reliably differentiate b... | What resistor do you refer as the termination? The 1 kOhm resistor is still way to much for RS485. If the twisted pair is your media (as it should be), resistors should be around 120 Ohms (100 to 150 Ohms) between the lines. Of course, this should be arranged only at the connection endpoints. Is it possible that your A... | https://electronics.stackexchange.com |
310,582 | [
"https://electronics.stackexchange.com/questions/310582",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/13393/"
] | I just started hearing this term in the context of an arc or sparking between components. Can anyone define <code>dead metal</code>?
| IIRC, this is related to SPICE, in general: the elements have numbered pins. Where two pins are concerned, it is considered that the current flows into one pin, and goes out from the other.
This has to be known prior to simulation in order to correctly build up the matrix solver. This is why the currents may appear a... | I think it's a model thing. The voltage on the gate slowly rises until the gate threshold voltage in your model is met, at which time the FET switches. When this happens, the drain is pulled down toward ground.
The gate-to-drain capacitance then drives the gate voltage more negative, but in the model, it only driv... | https://electronics.stackexchange.com |
244,193 | [
"https://physics.stackexchange.com/questions/244193",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/36793/"
] | <em>If an operator commutes with the Hamiltonian of a problem, must it always admit degeneracy?</em> It appears that not necessarily. For example, the parity operator commutes with the Hamiltonian of a free particle as well as that of the 1-D linear harmonic oscillator. But in the former case, we have two-fold degenera... | <blockquote>
If an operator commutes with the Hamiltonian of a problem, must it always admit degeneracy?
</blockquote>
No. The identity always commutes with the Hamiltonian, yet we don't generally find all energy levels to be degenerate.
<blockquote>
Does it mean that $[P,H]=0$ is not the sufficient condition to ... | If there exist two non-commuting Hermitian operators $A$ and $B$ which both commute with the Hamiltonian, then the energy eigenvalues will in general, but not always, be degenerate. The exceptions only occur when $A$ and $B$ have a common eigenstate which is also a zero-eigenvalued eigenstate of their commutator.
Acco... | https://physics.stackexchange.com |
1,096,226 | [
"https://math.stackexchange.com/questions/1096226",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/197849/"
] | How does $\zeta=A\cos(\omega\cdot t-kx)$ satisfy this equation:
$$\frac{\partial^2\zeta}{\partial x^2}=\frac{1}{c^2}\frac{\partial^2\zeta}{\partial t ^2}$$
| As stated, it doesn't obviously. However, if there is a relationship between $\omega$ and $k$, then it can. Note that
$$
\frac{\partial^2 \zeta}{\partial x^2} = -Ak^2\cos(\omega t - kx)
$$
and
$$
\frac{\partial^2 \zeta}{\partial t^2} = -A\omega^2\cos(\omega t - kx)
$$
and so the equation
$$
-Ak^2\cos(\omega t - kx) = \... | Differentiate $\zeta $ twice relative to $x$ and relative to $t$ we get
$$\frac{\partial^2\zeta}{\partial x^2}=k^2\zeta$$
and
$$\frac{\partial^2\zeta}{\partial t^2}=\omega^2 \zeta$$
so in order to have the given equation we should have
$$\frac{\omega}{c}=k$$
| https://math.stackexchange.com |
29,590 | [
"https://security.stackexchange.com/questions/29590",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/21272/"
] | I have a question regarding scheduling a vulnerability scanning and assessment exercise.
I'm in the process of laying a schedule for vulnerability scans. I'm wondering when and why to initiate the scan in the first place - What conditions should necessitate the requirement.
Should this exercise be initiated whenever ... | There are a few times you should do vulnerability scanning, and a configuration audit, each having their own purpose:
<ol>
<li><strong>When a new system or application is being introduced into the environment.</strong> This is to evaluate the risk posed by introducing the new element into your environment. </li>
<li... | The Federal consensus is that vulnerability scanning should be continuous.
I think that change driven scans are valid; periodic scans are also valid to detect untracked changes.
I'm afraid that I can't follow the "rock on rock" strategy, or why you are compelled to question the legitimacy of the change. Scan for vul... | https://security.stackexchange.com |
2,591,925 | [
"https://math.stackexchange.com/questions/2591925",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/487077/"
] | <blockquote>
Does a differentiable surjective function $f: [0, \infty) \mapsto [0,1]$ exist?
</blockquote>
It is fairly easy to create a surjective function that does the mapping, but when it comes to deciding whether a diferentiable one exists, the question gets quite tricky. I am rather inclined to say that such f... | Of course $f(x)=\sin ^2(x)$. And this is not the only one you can imagine.
| What about $\displaystyle f(x)=\frac{2x}{1+x^2}$?
| https://math.stackexchange.com |
23,117 | [
"https://physics.stackexchange.com/questions/23117",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/-1/"
] | Parallel universe: in every universe, you are presented with a different decision. Does that mean there are an infinite amount of parallel universes? I.e., if in one universe I choose to go left, I am then presented with different choices vs if i choose right, and that creates more universes with more decisions to be m... | Imagine you have a hollow cubic conductor with some charge in the cavity. This will polarize the charge in the conductor to the inner and outer surfaces. If you now define a Gaussian surface inside the conductor where the electric field must be zero, then the total electric flux out of this surface is zero which must e... | Well, the field lines from the external charge have to terminate somewhere. If they don't terminate on the conductor, then they must diverge off to infinity. If they all terminate on the conductor, the total charge on the surface must then equal the external charge.
| https://physics.stackexchange.com |
167,250 | [
"https://electronics.stackexchange.com/questions/167250",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/53642/"
] | I just encountered this implementation of a NOT gate:
<img src="https://i.stack.imgur.com/wuYyn.png" alt="Not Gate with 2 transistors">
My question is: Why do we need the lower transistor? Why can't we do this:
<img src="https://i.stack.imgur.com/rtPpk.png" alt="Proposed Not gate">
Thanks!
| ...because to represent logical 0 you need (close to) 0 Volts and not just a floating output.
| In your example, what pulls the output down to ground? Essentially when the PFET is off, you will be left with the output signal floating. If it is required to drive another logic gate for example, then it will not be able to sink current to discharge any parasitic capacitance of the next stage.
CMOS is what is known ... | https://electronics.stackexchange.com |
45,114 | [
"https://physics.stackexchange.com/questions/45114",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/2578/"
] | If we are given two Hydrogen atoms, would the only difference between them would be their quantum state (Energy level or eigen value, and the corresponding Orbital or eigen state) and their location (say you are the origin and each of the Hydrogen atoms are located an arm's distance apart)
This leads to my next questi... | You are right in observing the converse to what you were expecting.
By definition $\tau=r \times F$. But also $\tau=I\alpha$, with $\alpha$ the angular acceleration (an analogy with Newton's second law $F=ma$).
Now suppose we want to achieve a given angular acceleration $\alpha$. The two equalities above can be comb... | What you are experiencing is the <em>effective mass</em> of the swinging door at the point of contact. The calculate this value use the linear and angular equations of motion (starting at rest). Sum of forces equals mass $m$ times acceleration at c.g. $a_\textrm{cg}$, and sum of moments about c.g. equals inertia $I_\te... | https://physics.stackexchange.com |
440,277 | [
"https://electronics.stackexchange.com/questions/440277",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/222790/"
] | <img src="https://i.stack.imgur.com/lZxTU.jpg" alt="enter image description here">
So I'm new to this and this may be a dumb question, but why is there such high resistance in this circuit when the current/voltage of it isn't that high? A 1M Ohm resistor to the collector seems like too much.
| My interpretation is that this circuit is an extremely sensitive current amplifier, with a gain of something like 10,000,000, designed for input currents starting in the hundreds of picoamps range (based on the assumption that a typical LED current is around 20mA.)
The purpose of the current-limiting collector resisto... | Without current limiting, you will burn out the bottom transistor's base region.
Thus the first 2 transistors need to limit their collector current, to protect the base of the 3rd transistor.
Also I'd place 10Kohm in that first base, just for ESD protection.
| https://electronics.stackexchange.com |
87,438 | [
"https://softwareengineering.stackexchange.com/questions/87438",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/29157/"
] | I have been programming for a very long time and I have in depth knowledge of several technologies. Recently I applied for a web development job and in my resume I had listed all the skills - HTML, CSS, JavaScript, jQuery, AJAX, PHP, ASP, JSP, C/C++, ARM. Except for C/C++ and ARM I had shown the skill level for all tec... | The people who fine-tune their resumes to the job for which they are applying are the most successful at getting interviews. I've experienced this from both the applicant side and the reviewer side.
If I'm hiring for a web developer position, I'm probably not going to be concerned about whether or not the applicant k... | As for me, when I review a candidate's resume that has a laundry list of skills, especially with a self-assessment of "expert", that isn't placed into the specific context of the projects and accomplishments where you've applied those skills, I think that there's at least some inflation of skills, and potentially some ... | https://softwareengineering.stackexchange.com |
166,145 | [
"https://chemistry.stackexchange.com/questions/166145",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/125347/"
] | If we, theoretically, get a piece of ideally 100% pure iron and it is left in moist air? Will it rust? My understanding of iron rust is that the Iron itself becomes the ANODE and carbon impurities (as an example of impurities) are CATHODE, so if this cathode is not there will iron itself become anode and cathode and ru... | Three substances are required to transform iron into rust : air (oxygen), water, and a impurity at the surface of the metal. If one of these substances is missing, iron will not rust. The whole operation occurs at the contact of the impurity and iron and it has an electric origin. The reduction occurs at the impurity w... | <strong>Pure iron will rust but far, far more slowly than iron with impurities</strong>
The key point here is not whether iron will rust or not: it is about the speed of rusting.
Very pure iron will rust but very, very slowly. But even tiny impurities will promote much faster rusting. Many iron alloys (which means most... | https://chemistry.stackexchange.com |
50,443 | [
"https://chemistry.stackexchange.com/questions/50443",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/23728/"
] | What exactly is the difference between an ester linkage and a glycosidic linkage? I know both release a molecule of water, but what is the difference? Is it simply which types of monomers are involved in the bond?
| Let’s approach the entire problem from the other direction. Consider your final reaction:
$$\ce{FeF2(s) + 2H+ (aq) <=> Fe^2+ (aq) + 2 HF (aq)}\\
K_\mathrm{tot} = \frac{[\ce{Fe^2+}][\ce{HF}]^2}{[\ce{FeF2}][\ce{H+}]^2}$$
We have our initial dissociation with the following equation:
$$\ce{FeF2(s) <=> Fe^2+ ... | Yes, Jan is right. You need to multiply $K_2$ <strong>squared</strong> because it takes <strong>two</strong> additions of reaction 2 to get from reaction 1 to reaction 3. You will get $K_3$ = 2.
As a side note, and you probably meant this anyway, but saying that a molecule is "thermodynamically favorable" is meaningle... | https://chemistry.stackexchange.com |
338,330 | [
"https://electronics.stackexchange.com/questions/338330",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/168033/"
] | Something in my bike (USB Charger, Hella Socket itself) has made a short circuit leading to deep discharge of Lead-Acid battery.
Battery was down to 5.2V for time counted in minutes.
I've disconnected load sources and recharged the battery using recovery function.
Now battery keeps at quite rock-solid 12.6-12.4V, but... | Your battery has most likely lost some capacity. If this is a "car" battery, then it is probably significantly damaged. If it is a industrial battery with "deep cycle" capability, then it should be less damaged.
Read the datasheet. If this is a consumer item that doesn't have a datasheet, assume significant damage.... | When a battery sits for a length of time in a discharged state that's when the plates will suffer the most damage, the lower the voltage the worse it gets of course. if the discharge is very brief and is promptly recharged, then damage will be minimized or avoided. Keeping a battery on a float charger when it is very r... | https://electronics.stackexchange.com |
239,516 | [
"https://dba.stackexchange.com/questions/239516",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/182054/"
] | Table structure:
<pre><code>CREATE TABLE `extend_0` (
`id` bigint(20) NOT NULL,
`code` varchar(30) NOT NULL,
`data_key` varchar(50) NOT NULL,
`data_value` varchar(200) NOT NULL,
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`yn` tinyint(3... | There are many ways to get the beginning of this year, I think the most intuitive is <code>DATEFROMPARTS()</code>:
<pre><code>DECLARE @BeginningOfThisYear date = DATEFROMPARTS(YEAR(SYSUTCDATETIME()),1,1);
SELECT ... FROM dbo.Customers AS c
WHERE NOT EXISTS
(
SELECT 1 FROM dbo.Orders
WHERE CustomerID = c.Custo... | There could be many different ways to do this, this is one:
<pre><code>Declare @SO Table (SOID int,
date datetime)
insert into @so
(SOID, DATE)
VALUES
(1, dateadd(yy,-1,getdate())),
(2, dateadd(mm,-1,getdate()));
SELECT SOID, Date
from @SO
WHERE Year(date) = year(getdate())
</code></pre>
Same idea with a ... | https://dba.stackexchange.com |
258,928 | [
"https://physics.stackexchange.com/questions/258928",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/89637/"
] | I am reading Carroll's book on GR right now, and I ran into a little trouble in his chapter 3 on curvature. He is establishing the properties of the covariant derivative, and claims that the fact that the covariant derivative commutes with contraction, i.e $$\nabla_\mu T^\lambda {}_{\lambda \rho} = (\nabla T)_\mu {}^\l... | Note that $\delta^i{}_j=\delta^i{}_k\delta^k{}_j$. Then
$$\nabla_l\delta^i{}_j=\nabla_l(\delta^i{}_k\delta^k{}_j)=C(k,m)[\nabla_l(\delta^i{}_k\delta^m{}_j)]=C(k,m)[\delta^i{}_k\nabla_l\delta^m{}_j+\delta^m{}_j\nabla_l\delta^i{}_k]=2\nabla_l\delta^i{}_j$$
where $C(k,m)$[...] is defined as the contraction operator which... | You can write the Kronecker delta tensor as a product of the metric tensor
$$\nabla_a(\delta^a_b) = \nabla_a (g_{bc} g^{ac}) = \nabla_a (g_{bc} g^{ac}) = g_{bc} \nabla_a g^{ac} + g^{ac}\nabla_a g_{bc} $$
As you may recall, the covariant derivative of the metric tensor is $0$ in general relativity.
Version without u... | https://physics.stackexchange.com |
37,845 | [
"https://cs.stackexchange.com/questions/37845",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/7226/"
] | Reducing one computable problem to another by providing an algorithm which transforms an instance of one problem to one of the other (and limiting the time or space of that algorithm) is clear to me. However, I fail to understand how reductions via logic work, e.g. a reduction in FO. My biggest problem is that the stru... | David Richerby already answered the question partially but I had the chance to ask the professor for logic at my university today. He showed me one kind of logical reduction.
Given two problems, $X$ and $Y$, to reduce $X \leq_\text{FO} Y$: Let $\tau$ be the signature of the instances in $X$ and $\sigma$ the signature ... | Logical reductions work in essentially the same way as computational ones. In computational reductions, you show how to <em>compute</em> an instance of the target problem; in logical reductions, you show how to <em>define</em> it. In practical terms, that's often almost the same thing since, for example, you reduce cl... | https://cs.stackexchange.com |
149,416 | [
"https://softwareengineering.stackexchange.com/questions/149416",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/54477/"
] | I recently saw a recruiting page for a software company where one of the requirements was "Excellent knowledge of C++."
Now, I know this somehow implies as expert knowledge of C++, but where exactly does expert knowledge fit into. Is it the knowledge and experience of (let's say) eight years of programming in the lang... | If they say "Excellent knowledge" then you should be able to identify and use all of the language's features correctly- including those from the latest C++11 Standard which are currently universally supported (unfortunately, meaning Visual Studio is the lowest common denominator here). A person with Excellent C++ knowl... | I don't think there's one widely accepted definition of what constitutes "excellent" knowledge of C++.
It tends to be difficult to come up with a clean answer to what would constitute "good", "excellent", "superb", (etc.) knowledge of any language, framework, platform, or what have you. In many cases it's particularly... | https://softwareengineering.stackexchange.com |
9,491 | [
"https://chemistry.stackexchange.com/questions/9491",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/4906/"
] | <blockquote>
A $\pu{100 mL}$ solution of $\ce{NaOH}$ has a $\mathrm{pH}$ of $13$. What volume of water in $\pu{mL}$ must be added to change the $\mathrm{pH}$ to $11$?
</blockquote>
My steps:
<ol>
<li>Begin by calculating conc. of $[\ce{OH-}]$ for $\mathrm{pH}~13$. </li>
<li>Find the moles by multiplying concentrat... | Since the amount of substance stays equal, you can calculate the volume of your final solution $V_\mathrm{end}$, form your start concentration $c_\mathrm{start}(\ce{OH-})$ and your initial volume $V_\mathrm{start}$ and your target concentration $c_\mathrm{end}(\ce{OH-})$. Your working equation should be:
\begin{align}... | Here is a different approach:
<span class="math-container">$\ce{NaOH}$</span> is a strong base and will be completely dissociated in water. A solution of <span class="math-container">$\ce{NaOH}$</span> with <span class="math-container">$\mathrm{pH} = 13$</span> will contain <span class="math-container">$\pu{0.10 M}$</... | https://chemistry.stackexchange.com |
61,552 | [
"https://datascience.stackexchange.com/questions/61552",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/83534/"
] | I have been reading a couple of articles regarding polynomial regression vs non-linear regression, but they say that both are a different concept. I mean when you say polynomial regression, in fact, it implies that its Nonlinear right. Then why there is a difference in the Data Science world regarding both the concepts... | the difference is probably easily seen with an example. Linear regression assumes a form <span class="math-container">$$f(x, \beta) = \beta_0 + \beta_1 x_1 + \cdots + \beta_n x_n$$</span> with some covariates <span class="math-container">$x_i$</span> and some parameters to estimate <span class="math-container">$\beta_i... | Well elaborated by Marvin,To add on that-We define linear model as "A model that expresses the target output value in terms of a <strong>sum of weighted input variables</strong>" taking this definition into consideration for polymonial regression- the features are just numbers within a weighted sum
| https://datascience.stackexchange.com |
17,104 | [
"https://biology.stackexchange.com/questions/17104",
"https://biology.stackexchange.com",
"https://biology.stackexchange.com/users/6580/"
] | I recently read about an experiment where they removed the dendrites and axons from rat neurons and placed them on a grid. After a while they started reconnecting and were able to learn things.
Since I'm trying to create a model simulating this, I'd like to know (as much as is needed to make it look at least a little ... | I think I can partially answer you question. As far as I'm aware, there are many surface receptor molecules such as ephrins that are responsible for axonal guidance and dendritic repulsion in developing organisms such as flies (Drosophila). As you can tell this is extremely crucial since its important for neurons to sp... | In cases of severe head injury where a large portion of neurons and their connections get shredded. I don't think a neuron would be very choosy when presented with quite a few axons and lots of intracellular fluid
There are coup and the contra coup (p silent) brain injuries that occur because the brain bounces back ... | https://biology.stackexchange.com |
249,168 | [
"https://dba.stackexchange.com/questions/249168",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/191289/"
] | Suppose I have two tables linked by a foreign-key
example DDL's
<pre><code>CREATE TABLE raw_collection (
info_datetime DATETIME NOT NULL,
asset_id INTEGER NOT NULL,
price FLOAT,
PRIMARY KEY (info_datetime, asset_id),
FOREIGN KEY(asset_id) REFERENCES assets (id)
);
CREATE TABLE assets (
id... | It depends on a number of things. You list postgres in one of your tags, so it should be noted that the CTE will be materialised in full as CTEs are an optimisation fence that block predicate push-down. I'm not sure about sqlite, the other DB you list in the tags, but this is not the case for all databases, SQL Server ... | In PostgreSQL the second query should never be slower.
If indexes can be used to speed up execution depends on the amount of data in each table and the selectivity of the column.
| https://dba.stackexchange.com |
138,126 | [
"https://dba.stackexchange.com/questions/138126",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/92888/"
] | I wrote a simple procedure to modify the whole column to a set of meaningless values. However, when I tried
<pre><code>call NewProc('tableName','colName')
</code></pre>
it returned
<blockquote>
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right... | Most likely the issue is with the first dynamic query, the one you are storing into <code>@sql0</code>:
<pre><code>set @sql0=CONCAT('select count(*) into ',@i,' from ',tab1);
</code></pre>
You are concatenating the <em>value</em> of <code>@i</code> into the query, but <code>@i</code> has not been defined yet at this ... | Why write a loop? Skip the count and the loop, simply perform this once:
<pre><code>SET @sql1=CONCAT("update ",tab1," set ",col1,"='565656'");
</code></pre>
| https://dba.stackexchange.com |
65,060 | [
"https://softwareengineering.stackexchange.com/questions/65060",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6987/"
] | I have been involved in a project and now it is coming to an end. The good news is the company will start to commercialize the software which is specific software to ISPs.
As a programmer / developer of the project, I intend to still support the project, attend to new custommer customizations, basically the software w... | My criteria, in order:
<ol>
<li>Is it the right tool for the job? For example, if you're building a graphical, networked desktop client, you'd want to use a language that supported that sort of thing out of the box like Java or C#. OTOH, if you're working on a realtime system, you'd want something that gave you more... | A lot of factors would come into it I guess
<ol>
<li>Does the language lend itself well to the application type you are going to code? </li>
<li>How well versed are you in the programming language? (Becomes more important as the deadlines get smaller)</li>
<li>Library and language features for a certain area in your a... | https://softwareengineering.stackexchange.com |
93,049 | [
"https://softwareengineering.stackexchange.com/questions/93049",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/15252/"
] | When starting a new project, are "proactive" designs useful? I mean, if you create a UML diagram/Activity diagram/Use Case/Class diagram/etc. for anything and everything can think of, then when you <em>think</em> you're done, you start coding. Afterwards, you realize an important feature or method was left out. All you... | Contrary to popular opinion I do not buy into the "Big Design Up Front is bad" movement very much.
This statement is used too often as a lead-in to a project with <em>no design at all</em>. The project is started with no design, and none ever materialises during the development.
I also do not believe that this way o... | What you call "proactive design" is generally called "big design up front" (BDUF) and considered a very bad idea. Vendors of UML tools claim to make it work through MDD, i.e. more or less all your code is directly generated from UML diagrams, or by keeping the model in synch with subsequent changes in code. But this ne... | https://softwareengineering.stackexchange.com |
181,459 | [
"https://softwareengineering.stackexchange.com/questions/181459",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/76637/"
] | During a recent code review I was asked to put <code>default</code> cases in all the files wherever <code>switch</code> block is used, even if there is nothing to do in <code>default</code>. That means I have to put the <code>default</code> case and write nothing in it.
Is this the right thing to do?
What purpose woul... | It seems there are three cases when a <code>default</code> statement is not necessary:
<ol>
<li>no other cases are left, because there is a limited set of values that enter the <code>switch case</code>. But this might change with time (intentionally or accidentally), and it would be good to have a <code>default case</... | <blockquote>
Is this the right thiong to do? What purpose would it serve ?
</blockquote>
It's not uncommon for company coding standards to require a default case for all <code>switch</code> statements. One reason for it is that it makes it easy for readers to find the end of the <code>switch</code>. Another, probabl... | https://softwareengineering.stackexchange.com |
9,133 | [
"https://cs.stackexchange.com/questions/9133",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/1108/"
] | Given a directed acyclic graph $D = (V,A)$, a vertex $v \in V$ is a <em>source</em> if its <em>indegree</em> is zero, meaning that it has only outgoing arcs.
Does there exist a linear time algorithm to find a source in a given directed acyclic graph?
Follow-up question: Can one in linear time find all sources?
| As Yuval mentions, the datastructure is important here. I'll try to give a solution for some of the types of adjacency lists:
<ol>
<li><strong>Incoming edge list</strong>: For each node, there is a list of vertices from which there is an incoming edge to this node. You can simply scan all vertices and check if the siz... | Let's consider a simpler question. Suppose that you know your graph is a tree. Then you can find the source node in linear time. Just select a random node, if it is the root then you have your answer, if not it should be a child or parent then traverse back until you reach the root. This can be done in $O(|V|-1)$.
| https://cs.stackexchange.com |
331,267 | [
"https://physics.stackexchange.com/questions/331267",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/154632/"
] | <img src="https://i.stack.imgur.com/GuPkK.jpg" alt="enter image description here">
How is the second equation derived with the orthonormality property?
The orthonormality property is
< a"|a'> = kronecker delta_a",a'
I ask because I don't know why the summation in the first equation disappears in the second equ... | You are missing something obvious. The position you calculate is the position <em>relative to the chosen origin</em>. In one case, it's 40 cm from the lighter mass; in the other case, 10 cm from the heavier mass. Since the two masses (the two chosen origins) were 50 cm apart, that's the same answer...
| See, according to your results, when you took the 0.5 kg mass as origin, the answer was 0.40m. But in the next one, you made a slight mistake. Because it's <strong>-0.10m</strong> from right(2kg mass). So both the answers are correct. You just have to keep in mind that the distances you put in the equation are <em>rela... | https://physics.stackexchange.com |
102,060 | [
"https://cs.stackexchange.com/questions/102060",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/98259/"
] | I have been thinking about some problems in combinatorics and I came across a problem I'm having trouble with.
Suppose you have a list <span class="math-container">$L$</span> of length <span class="math-container">$n$</span> (wlog the elements of the list are 1,2,3,...,n) and you want to sort it circularly (meaning [3... | Suppose we have two lists <span class="math-container">$L$</span> and <span class="math-container">$M$</span> of length <span class="math-container">$n$</span>. They are identified as circular lists if and only if, when you write out <span class="math-container">$(L_1 \ldots L_n)$</span> and <span class="math-container... | Even if you want to sort circularly, you definitely need a point of reference.
Deciding where it should be implies you'll need to look around.
If you don't want to look at every position, you can try skipping the pre-sorted intervals and sort the blocks rather than the individual elements.
Notice this doesn't remove t... | https://cs.stackexchange.com |
431,351 | [
"https://physics.stackexchange.com/questions/431351",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/30370/"
] | Is there a fundamental reason why a power supply, say, from 120v AC to 12v DC, <strong>has</strong> to lose some power to heat dissipation?
I am not asking why current engineering solutions do; I'm aware that rectifying capacitors act as resistors. The question is whether it's theoretically possible to create a devic... | If what you're asking is: Is there some kind of efficiency limit to power conversion, like for example the Carnot limit for heat engines, the answer is: no, there is not. It is <em>not</em> forbidden by physics to have a 100% efficient electrical power conversion devices, and some large industrial transformers achieve ... | It is not just an issue of the inevitable presence of lossy wires connecting various parts or parasitic losses of semiconductor devices (diodes or transistors) in switching applications, there is also a fundamental problem in any rectification, namely, that it must also involve signal <em>filtering</em>. To achieve ide... | https://physics.stackexchange.com |
11,608 | [
"https://physics.stackexchange.com/questions/11608",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/4026/"
] | A Lightning rod is fixed to the building and it is not given earthing then what happens? How does the lightning reach the ground through the building?
| A Lightning rod without earthing is as good as any other conductor laying stray in open. If its not earthed then it wont work at all. There is nothing very fancy about the whole process. You need to connect both ends of a circuit to make current flow. An improper grounding connection can cause disaster sometimes as the... | Any lightning protection system which includes a lightning rod will have the lightning rod galvanically connected to ground. Usually this is done with very heavy gauge copper or aluminum wire which goes directly to a buried metal rod (typically copper). But some designs use the steel in steel-girder construction buil... | https://physics.stackexchange.com |
430,429 | [
"https://softwareengineering.stackexchange.com/questions/430429",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/398074/"
] | I have an API call that returns products to be displayed on a Point-of-Sale system. the current account I have has about 7000 products.
Initially I made the API return all products at once, this works for users that have 1-1000 products and the Point-of-Sale loads relatively quickly. However when users have more than 1... | You could try:
<ul>
<li>Streaming the response.
Rather than waiting for the full result set before displaying the UI, start drawing as the items come in and continue to update until they are all there
</li>
<li>Push Updates
Get the whole list when you first load the app, but then register for push updates. So when the ... | Most likely you will have to revisit how products are queried and returned. From a practical standpoint can a user even manage 7000 products at once? Probably not.
This is usually solved via paging. That is, Returning a fixed amount of products, usually 10, 20, 100 at a time that can be paged through. The UI only ... | https://softwareengineering.stackexchange.com |
1,063 | [
"https://softwareengineering.stackexchange.com/questions/1063",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/86/"
] | I have often wondered if it would be possible to write a programming language that would work as a conversation. I would tell the computer that I want to store coordinates and it would ask what representation I would use. I would then ask to find the shortest path between points and it would ask if I want to use Djkstr... | I think such a language would need an artificial intelligence in place, or at least a system that can learn.
The problem is that humans don't know what they want.
Also, even writing in classical imperative language we still make logical errors. Imagine trying telling a non-intelligent software what he has to do.
| What you're describing sounds less like programming and more like using an application.
Some problems you'd have to address in such a system:
<ul>
<li>Repeatable results. The current source-code paradigm stores a list of instructions for the computer- in your 2-sided conversation, do you only store 1 half of the con... | https://softwareengineering.stackexchange.com |
174,244 | [
"https://electronics.stackexchange.com/questions/174244",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/9409/"
] | I have my voltage rails coming off board and I have quite a number of ICs. Each has their own decoupling and for the really demanding ICs I have a bulk capacitor.
If I have some target impedance and it's said that to achieve that impedance I need 10 capacitors of various values and sizes, where do all these capacitors... | For a power connector: each pin can carry a limited amount of current. All current must return via ground. There are multiple power pins per voltage, hence multiple ground pins are needed to carry all the ground current.
For a data connector: unused pins might as well be connected to ground, and when a ribbon cable is... | For the ATX power supply cable there needs to be enough GND wires to return current from all the other voltage rails back to the power supply. So ideally the number of GND wires would match the size and number of the voltage rail wires.
For the parallel port you need multiple GNDs so that the return current path for ... | https://electronics.stackexchange.com |
277,035 | [
"https://electronics.stackexchange.com/questions/277035",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/134262/"
] | I'm studying technological aspects of electronics but I don't understand what UTBB is. In particular, I do not understand the difference between UTB (Ultra Thin Body) and UTBB (Ultra Thin Body and Buried oxide). What are the consequences, advantages and disadvantages of having also a thin buried oxide?
Thanks
| It sounds like the inductor is not rated for the current. You want 2 A average out, so the inductor must be rated for more than that. Purchasing a component from a local market without a datasheet is no way to source parts.
The LM2567 is a rather old part requiring high inductance. I've only looked at the first pag... | You should assess if you really need a continuous 2A from your power supply.
GSM modules may take a peak current of up to 2A when they transmit, but the transmission only lasts 577us, and it only transmits every 4.615ms. That gives an average current of 2A/8, or 250mA. Also, the 2A figure is a worse case. You will onl... | https://electronics.stackexchange.com |
322,038 | [
"https://physics.stackexchange.com/questions/322038",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/100776/"
] | I have just read that using high voltage results in low current, which limits the energy losses caused by the resistance of the wires. <br>
What I don't understand is why it works this way. Does it have anythnig to do with electromagnetic induction in the wire which resists the current?
| If the total resistance of the transmission line leading from a power station to you is <span class="math-container">$R$</span> and the city/town you're in demands an average amount of power <span class="math-container">$P$</span>. Then <span class="math-container">$P=I\times V$</span> . This makes the current drawn b... | From the formula $P=VI $, $I=\frac {P}{V} $. So, if the voltage is high, current becomes low for same power. Now, $H=I^2RT $, so lower the current, lower is the heat production. Mainly to reduce heat production, the voltage is increased.
| https://physics.stackexchange.com |
415,791 | [
"https://physics.stackexchange.com/questions/415791",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/111448/"
] | According to Higgs Mechanism a particle acquires mass when it couples to the higgs field. Now consider Wave-Particle Duality. Suppose I am doing a Young's Double Slit Experiment using electrons. When they pass through the slits they behave like waves and quantum waves have no mass, there is just momentum given by de-Br... | <blockquote>
quantum waves have no mass, there is just momentum ...
</blockquote>
is a fundamental misconception about QM. The probability amplitude wavepacket desribing the motion of the electron fully accounts for the movement of its mass (and charge, and...) because this wavepacket, moving freely is restricted by... | The Higgs induced mass is due to the vacuum expectation value or v.e.v of the Higgs. In the cold dead universe we live in, Higgs has a sort of "crystallized" background configuration (b.g.c) with perturbations around it. This b.g.c is everywhere and all the fields that couple to it get their mass from it. So it does... | https://physics.stackexchange.com |
34,703 | [
"https://scicomp.stackexchange.com/questions/34703",
"https://scicomp.stackexchange.com",
"https://scicomp.stackexchange.com/users/34441/"
] | Suppose there are two arrays (They have the same length), I want to give a quantitative description about the similarity between them. I define a formula like this, which means we can shuffle them arbitrarily. If we use the stupidest method, i.e. calculate every possible result, we need to keep array B unchanged and ke... | You can formulate this problem as an assignment problem of the form
<span class="math-container">$\min \sum_{i=1}^{n} \sum_{j=1}^{n} w_{i,j}x_{i,j}$</span>
subject to
<span class="math-container">$\sum_{j=1}^{n} x_{i,j}=1,\; i=1, 2, \ldots, n$</span>
<span class="math-container">$\sum_{i=1}^{n} x_{i,j}=1, \; j=1,... | You have a <span class="math-container">$1D$</span> minimization problem and not an <span class="math-container">$argmin$</span>-problem. Here, you could easily use a 1-Wasserstein distance (commonly known as the Earth mover's distance). For the 1-dimensional case, there is a closed form solution compute-able in linear... | https://scicomp.stackexchange.com |
3,715,891 | [
"https://math.stackexchange.com/questions/3715891",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/154155/"
] | I am trying to understand what <span class="math-container">$\forall$</span> and <span class="math-container">$\exists$</span> mean. Please consider the following expression.
<span class="math-container">$$ \forall x \, \exists y \, \forall z \, \left( z = \frac{x-y}{3} \right) $$</span>
I claim that the above stateme... | One way to think of it is as a game where if you assert a sentence is true, I get to pick all the variables that have <span class="math-container">$\forall$</span> in an effort to make the sentence false and you get to choose the <span class="math-container">$\exists$</span> variables in an effort to make the sentence ... | Here's a simple way of understanding that quantifier order matters. Let <span class="math-container">$Lxy$</span> mean <span class="math-container">$x$</span> loves <span class="math-container">$y$</span>. This is, sadly, not a symmetric relation. Consider the difference between:
<ul>
<li><span class="math-container">$... | https://math.stackexchange.com |
358,196 | [
"https://physics.stackexchange.com/questions/358196",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/169707/"
] | I know that the heat transfer between solids and liquids occur via both conduction and convection.
However, I am not sure about the fine line that separates them. For example, what is the mode of heat transfer when a hot piece of steel is put out in the air. Does the wind change the situation?
Or is, for instance, the... | I will use the term fluid, that refers to both liquid and gas phase.
It is conduction if single fluid particles transport heat via Brownian motion. It is convection if a macro scale movement of fluid particles is involved. Usually both are playing a role, but for smaller differences of fluid and solid temperatures con... | If a hot metal object placed openly then heat can be transferred
<ul>
<li>by means of conducting (the molecules in contact to the metal block)</li>
<li>by convection (the flow of hot air in contact to the block)</li>
<li>and by radiation.</li>
</ul>
| https://physics.stackexchange.com |
338,805 | [
"https://softwareengineering.stackexchange.com/questions/338805",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/203972/"
] | I've been tasked with researching and making suggestions about refactoring/cleaning up some existing code in our code base. Presently, many of our projects depend on a Constants class, which contains all of the constants used in the library. While on one hand I get this choice - this object has a clear, defined purpo... | The problem isn't that you shouldn't have a constants class. It's having a class that you think of as "our constants class". If I was a young new developer on you team and I saw a "constants class" I might think "oh, so this is where to put that PI constant I need. I'll put it right next to this "path" constant sinc... | If you could give a bit more context around the domain and the nature of the constants, we would probably be able to help a bit more.
But, in most cases, a constant is part of a specific domain. As a result, this constant should reside in a specific class (which encapsulates the whole logic of this domain). Ideally, y... | https://softwareengineering.stackexchange.com |
3,886,173 | [
"https://math.stackexchange.com/questions/3886173",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/802707/"
] | Please help me to prove this inequality
<span class="math-container">$$\frac{1}{2} + \frac{1}{3} + \dots + \frac{1}{n} < \ln n < 1 + \frac{1}{2} + \frac{1}{3} + \dots + \frac{1}{n - 1}$$</span>
| To solve (a), you are correct to use the Perron's formula. Namely, we get that
<span class="math-container">\begin{align*}
\frac{1}{2 \pi i}\int_{c-i\infty}^{c+i\infty}\log(\zeta(s))\frac{x^s}{s}ds&=\frac{1}{2 \pi i}\int_{c-i\infty}^{c+i\infty}\sum_{n=1}^{\infty}\frac{\Lambda(n)}{n^s\log(n)}\frac{x^s}{s}ds\\
&=... | Whenever <span class="math-container">$n$</span> is not a prime power, we have <span class="math-container">$\Lambda(n)=0$</span>, but when <span class="math-container">$n=p^k$</span>, we have
<span class="math-container">$$
{\Lambda(n)\over\log n}={\log p\over\log p^k}=\frac1k
$$</span>
Hence, we have
<span class="mat... | https://math.stackexchange.com |
610,731 | [
"https://physics.stackexchange.com/questions/610731",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/284252/"
] | I have been always taught that <strong>Work done = force x distance</strong> through which the force was applied.
but recently in the elasticity I have been taught that <strong>W= (1/2) (F X D)</strong>.
why did we multiply it by a <strong>half</strong>?, I know that work is the area under the curve and the curve is ri... | Work is not generally "force times distance". That is only true when the force is <em>constant</em>. The general formula is (where <span class="math-container">$x$</span> is the position):
<span class="math-container">$$W=\int F\,\cdot \mathrm dx$$</span>
An integral is mathematically always the area under th... | The factor <span class="math-container">$1/2$</span> in work done by an elastic force is since elastic force is not constant: <span class="math-container">$F(x)=kx$</span>. This means that the work done when the spring is stretched a small distance <span class="math-container">$dx$</span> is <span class="math-container... | https://physics.stackexchange.com |
112,360 | [
"https://physics.stackexchange.com/questions/112360",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/23517/"
] | Imagine that you have a triangle where each side has the length $a$ and a charge $q$ sitting at every vertex. Additionally, we have a charge $-3q$ sitting in the center of the triangle. What is the first non-vanishing multipole moment?
I thought that there cannot be a net charge or dipole moment, but I was uncertain a... | <h2>Spherical Multipole Expansion</h2>
The first nonvanishing moment is the quadrupole moment. Assuming that you are looking for an exterior multipole expansion, the potential from the charge distribution $\rho$ can be expanded as
$$V(\mathbf{r})=\frac{1}{4\pi\epsilon_0}\sum_{L=0}^\infty\sum_{m=-L}^LI_{Lm}(\mathbf{r}... | It has a non-zero quadrupole moment. The easiest way to see this (Other then computing it) is to consider the expansion of the potential near a point perpendicular to the plane of the triangle and passing through the centre. If you place the origin of the coordinate system also at the origin then the radius vectors of ... | https://physics.stackexchange.com |
38,727 | [
"https://mathoverflow.net/questions/38727",
"https://mathoverflow.net",
"https://mathoverflow.net/users/6085/"
] | This is a question I wonder a little about every now and then.
It is immediate, using forcing, that if there is a transitive set model of set theory, then there are continuum many.
<blockquote>
Can one prove a weak version of this without using the forcing machinery?
(Perhaps in the presence of reasonable large cardina... | Suppose you could prove, in ZFC, without forcing, the statement
(A) If there are two transitive models of ZFC, then there is a third.
Then you could also prove, in ZFC, without forcing, the statement
(B) If there are two transitive models of ZFC, then there is a transitive model of ZFC + $V\neq L$.
[Proof: Work... | If there is one model of set theory, transitive or otherwise, then there are class-many. This follows from the upwards Lowenheim-Skolem theorem and Mostowski's transitive collapse theorem.
| https://mathoverflow.net |
2,343,879 | [
"https://math.stackexchange.com/questions/2343879",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/459318/"
] | I am relatively new to MathOverflow and my experience of Maths is somewhere between A-Level and University-Level.
In my further research, I came across the following question:
$$
\text{Given sets A, B and C : } C \subseteq B
$$
$$
\text{Prove that: } A \cap C \subseteq A \cap B
$$
Now, I went about trying to prove ... | You have found one polynomial, $p(x)=x^3-x$, such that $p(T)=0$. Thus, the minimal polynomial $\mu_T(x)$ <strong>divides</strong> it.
Notice, however, that you had <em>already</em> found another polynomial $q$ of degree $2$ such that $q(T)=0$ when you wrote $T^2(B)=B$; it was $q(x)=x^2-1$.
Now, you must prove that no... | You have $T^2(B)=B$ this implies that the minimal polynomial divides $x^2-1$, since it is different of $x-1$ and of $x+1$, it is $x^2-1$.
| https://math.stackexchange.com |
467,402 | [
"https://electronics.stackexchange.com/questions/467402",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/232966/"
] | <ol>
<li>How quick does a signal have to be in order to be considered a high-speed signal?</li>
<li>What are the limits and threshold where you can get away without special PCB layout?</li>
</ol>
| For you to need to consider high-speed design (controlled impedance) rules you would need traces on your PCB that are physically longer than the wavelength/10 of the highest frequency component of your signal. For continuous wave RF (and long-pulse RF waveforms) this will correspond to:
<span class="math-container">$$... | If you have a vacuum-tube computer with 100 nanosecond edges, then 10nanoSec or 20nanoSec round trip delays and reflections will be hidden in the edge waveform.
In that case, your computer can be 5 feet across (5 + 5 nanosecond round trip) to 10 feet across (10 + 10 nanosecond round trip).
This vacuum-tube computer wi... | https://electronics.stackexchange.com |
98,398 | [
"https://physics.stackexchange.com/questions/98398",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/20263/"
] | I'm quoting a passage from my notes:
<blockquote>
The development of clocks based on atomic oscillations allowed measures of timing with accuracy on the order of $1$ part in $10^{14}$, corresponding to errors of less than one microsecond (one millionth of a second) per year.
</blockquote>
I do not understand what t... | It means that if the clock begins set to the correct time, then after time $t$ the clock will be wrong by no more that $(\pm 10^{-14}) t$.
Or as a physicist would be likely put it
$$\frac{\delta t}{t} \le 10^{-14} \,.$$
This kind of expression of "fractional errors" is very common in many fields of quantitative scien... | The error would be in the order of 10^-14. This is mathematically similar to the sense of errors you have on your hand watch, caused by mechanical inaccuracy - probably in the range of 1 second per week, or 1 second per year if its a Rolex :)
One should note however, that such a very small inaccuracy in time measureme... | https://physics.stackexchange.com |
193,188 | [
"https://physics.stackexchange.com/questions/193188",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/66515/"
] | I was thinking about this recently and I think this is a reasonable question to ask. SR can handle forces just like Newtonian physics can; the difference is that the four-force is defined a bit differently than the classical force.
So this made me wonder; what's the difference between that a body is experiencing a for... | While DanielSank's answer is correct, I don't think it is the complete story. Sure the equivalence principle naturally leads to a geometric description of gravity but it does not <em>necessitate</em> such a description in and of itself.
For example, Newtonian gravity can be described geometrically in a manner complet... | As Einstein himself put it, "If a person falls freely he will not feel his own weight."
Consider yoruself sitting in your chair right now.
You don't see to be accelerating, yet you feel a force on your butt.
This is very strange because $F=ma$$^{[a]}$ would suggest that if you are under the influence of a force (the o... | https://physics.stackexchange.com |
3,769,567 | [
"https://math.stackexchange.com/questions/3769567",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/811644/"
] | The original problem is:
If a, b, c, d are the position vectors of points A, B, C, D respectively such that <span class="math-container">$$(\vec{a}-\vec{d}). (\vec{b}-\vec{c})= (\vec{b}-\vec{d}). (\vec{c}-\vec{a})= 0$$</span>then prove that D is the orthocentre of <span class="math-container">${\Delta}$</span> ABC.
How... | (I don't know if this answers your question, but it can be an hint.)
You can define the function <span class="math-container">$\lambda\colon [1,+\infty)\to [0,+\infty]$</span> by
<span class="math-container">$$
\lambda(a) := \limsup_{x\to 0+} x^a f(x).
$$</span>
Since <span class="math-container">$g_a > g_b$</span> ... | We have 2 conditions, where the first condition is the inequality
<span class="math-container">$$
|f'(x)|\leq C\frac{f(x)}{x}\tag{1}
$$</span>
and the second condition is the limit saying that there exists a <span class="math-container">$\beta$</span> such that
<span class="math-container">$$
g_\beta(0^+)=0.\tag{2}
$$<... | https://math.stackexchange.com |
325,484 | [
"https://physics.stackexchange.com/questions/325484",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/152437/"
] | Gauss's law for magnectic field states $\nabla\cdot\mathbf{B}=0$, and thus calculating the divergence of a field and finding it is nonzero que can promptly prove the vector field cannot represent a magnetic field.
However, I don't find an analogous giveaway using Ampère-Maxwell's law.
Which conditions does the <strong... | Any static field with zero divergence, i.e. which obeys the magnetic Gauss law $\nabla\cdot\mathbf B=0$, is a valid magnetic field. The curl of the field can be anything: if it is nonzero then it requires a current density $\mathbf J$ to sustain it, given by Ampère's law
$$
\nabla\times\mathbf B = \mu_0\mathbf J.
$$
Th... | <blockquote>
Which conditions does the curl of a vector field have to verify in order to represent a magnetic field?
</blockquote>
Probably none, except the Maxwell equation itself.
The equation
$$
\nabla\cdot \mathbf B = 0
$$
restricts the set of possible magnetic fields, because the right-hand side is constant... | https://physics.stackexchange.com |
577 | [
"https://dba.stackexchange.com/questions/577",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/136/"
] | I tried to modify an Oracle stored procedure to use a CTE instead of a simple Select Statement.
My procedure looked like this:
<pre><code>Create or replace Myproc ( MyRefCursor IN OUT SYS_REFCURSOR)
as
begin
Open MyRefCursor for
Select * from ...something ...;
end;
/
</code></pre>
I rewrote this query... | Since the CTE is part of the same SQL statement, it should not contain a semicolon.
So, there should be no semicolon on the second line of the third block or the third line of the fourth block. The fifth block does not have a contiguous SQL statement.
| A complete very basic example using a stored procedure without input parameter:
Some demo data:
<pre><code>CREATE TABLE DEMO(
id NUMBER(10),
type NUMBER(10),
code varchar2(20)
);
Insert INTO DEMO values (1, 0, 'a');
Insert INTO DEMO values (2, 0, 'b');
Insert INTO DEMO values (3, 0, 'c');
Insert INTO DEM... | https://dba.stackexchange.com |
35,791 | [
"https://chemistry.stackexchange.com/questions/35791",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/19503/"
] | Why doesn't electron pairing take place in $\ce{[Fe(NH3)6]^2+}$ though $\ce{NH3}$ is a strong ligand field producer?
| (If you know the basics, go to last paragraph and skip the introduction part)
There are two types of ligands. Strong field ligands and weak field ligands. Those which only cause a small extent of crystal field splitting is called weak field ligand and those which cause large splitting is called strong field ligand.
<... | The dichotomy between weak- and strong-field ligands that I have often seen constructed here is <em>false</em> and physically inaccurate.
Complexes can be in a low-spin state or in a high-spin state. The high-spin state is the one according to Hund’s rule where electrons are filled into the five d orbitals one after t... | https://chemistry.stackexchange.com |
19,449 | [
"https://dba.stackexchange.com/questions/19449",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/8227/"
] | I'm having a question rounding my mind. It's better to create one table and store a lot of rows there or create various tables and have a few rows on them? What's the performance and the I/O saved at physical level? How many space will use many tables instead of one table? I'm thinking in how Wordpress handling the mu... | Assuming that you are talking about tables containing the same kinds of entities, you typically want to have one table.
You would not have any performance differences and a whole lot of management differences between the two approaches, with the single table being easier to manage. Typically large tables do not have ... | It's not clear why these two setups would be equivalent. Normally, you would store all data for one kind of entity in one table. Perhaps the "one table" is storing some type of entity and there's a field that indicates a form of variance for that entity (such as "colour" for a table that stores information on vehicles)... | https://dba.stackexchange.com |
3,466,258 | [
"https://math.stackexchange.com/questions/3466258",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/700492/"
] | Hello I was presented today with a logarithmic problem. After computing the calculations in order to solve for <span class="math-container">$x$</span> we had to factor the following equation (no calculator allowed). I am a somewhat stumped due to the numbers. Is there an ingenious way of solving it?
<span class="math... | Clearly the field of fractions of <span class="math-container">$R$</span> is contained in the field of fractions <span class="math-container">$F(x, y)$</span> of <span class="math-container">$F[x, y]$</span>. So it remains to show that they are equal. Note that it is enough to show that <span class="math-container">$y$... | Is <span class="math-container">$x^2y / x^2$</span> an element in the field of fractions of <span class="math-container">$R$</span>? Where should the isomorphism you're trying to define send it?
| https://math.stackexchange.com |
75,809 | [
"https://chemistry.stackexchange.com/questions/75809",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/46165/"
] | Why is it that in order to make an carboxylic acid from an alcohol you oxidise it twice...
ie alcohol + 2[O] ---> carboxylic acid
...but to get back to the alcohol you reduce it four times?
carboxylic acid + 4[H] ---> alcohol
My understanding was that oxidation is the opposite of reduction, and in organic chemistry... | Addition of oxygen and hydrogen can be useful to predict oxidation and reduction in most of the cases but this criteria fails to classify a reaction as oxidation or reduction when there are no oxygen or hydrogen atoms involved. This method is very primitive.
A better perspective :
<strong><em>Oxidation</em></strong> ... | in reaction dont see how much O or H you are using.Just see how your derired substance is oxidized.During first oxidation to carbonyl alcohol loses hydrogen in case of methanol 1 hydroge.And nest on to convert to acid adds one oxygen.
Similar is the case whil reducing acid first adds remove one Oygen atom and then in c... | https://chemistry.stackexchange.com |
306,929 | [
"https://mathoverflow.net/questions/306929",
"https://mathoverflow.net",
"https://mathoverflow.net/users/122620/"
] | Let $u$ be a solution of the heat equation $$u_t - u_{xx} = 0, \quad t>0, x \in \mathbb{R}$$
with initial data $u(0,\cdot) = u_0$.
Fix $\alpha >0$. How can I estimate (without using explicitly the heat kernel)
$$\sup_{t>0}\int_{\mathbb{R}} t^\alpha |u_x|^2 \ dx,$$
in terms of the initial data? Could you poin... | I'm sorry for the late answer, but joined MathOverflow just this week. The Fourier Splitting method, developed by María Elena Schonbek in the 80's asserts that "decay is determined by the low frequencies of the solutions" for many dissipative linear and nonlinear equations (heat, fractional heat, Navier-Stokes, dissip... | Write the heat equation in the abstract form $u'+Au=0$, where $A$ is a maximal dissipative operator over the Hilbert space $H=L^2({\mathbb R})$, with domain the Sobolev space $D(A)=H^2({\mathbb R})$. Because $A$ is self-adjoint, it is a classical result that if $u_0\in H$, then $u(t)\in D(A)$ for every $t>0$, with a... | https://mathoverflow.net |
61,715 | [
"https://stats.stackexchange.com/questions/61715",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/22022/"
] | So I have heard it said that it is not a good idea to choose one statistical test based on the outcome of another. This seems strange to me though. For example, people often choose to use a non parametric test when some other test suggests that the residuals are not normally distributed. This approach seems pretty wide... | Given that $p$ is the probability of observing data this extreme or more extreme if $H_0$ is true, then what is the interpretation of $p$ where the $p$ is arrived at through a process where there was a contingent decision made in the selection of the test that produced that $p$? The answer is unknowable (or at least v... | <blockquote>
For example, people often choose to use a non parametric test when some other test suggests that the residuals are not normally distributed. This approach seems pretty widely accepted but does not seem to agree with the first sentence in this paragraph. I was just hoping to get clarification on this issu... | https://stats.stackexchange.com |
147,117 | [
"https://dba.stackexchange.com/questions/147117",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/82568/"
] | I have the tables:
<ol>
<li>Invoices ( VendorID, InvoiceDate, InvoiceNumber, InvoiceTotal,...), </li>
<li>Vendors (VendorName, VendorID,....)</li>
</ol>
I am trying to obtain a list of the earliest invoices for each vendor, together with <code>VendorName</code>, <code>InvoiceNumber</code>, <code>InvoiceDate</code>, <... | Looks like you don't have InvoiceState anywhere in your query.
Here it is with a little better formatting (<em>PRE-COLUMN COMMA MASTERRACE!!</em>)
<pre><code>SELECT VendorName
, InvoiceNumber
, InvoiceDate
, InvoiceTotal
FROM Vendors V
JOIN Invoices I
ON V.VendorID=I.VendorID
WHERE InvoiceDate <= ( SELECT ... | <pre><code>SELECT VendorName
, InvoiceNumber
, InvoiceDate
, InvoiceTotal
FROM Vendors V
JOIN Invoices I
ON V.VendorID=I.VendorID
WHERE InvoiceDate <= ( SELECT ASC(InvoiceDate)
FROM Invoices
JOIN Vendors
ON V.VendorID=Vendors.VendorID )
GROU... | https://dba.stackexchange.com |
1,515,778 | [
"https://math.stackexchange.com/questions/1515778",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/279872/"
] | Is enough to evaluate the limits at the edges of the domain in order to determine the range of $y = 5/(x^3+2)$?
The domain is $(-\infty, -2^{1/3}) \cup (-2^{1/3}, +\infty)$ and calculating the limits at the edges of the domain, I obtain: $(-\infty,0) \cup (0,+\infty)$, which is the range. But I've checked it in a calc... | Here $\displaystyle 3^x+4^x = 7^x\Rightarrow \bf{\underbrace{\left(\frac{3}{6}\right)^x+\left(\frac{4}{6}\right)^x}_{Strictly\ decreasing\; function}} = \underbrace{\left(\frac{7}{6}\right)^x}_{Strictly\; increasing\; function}$
So these two curve Intersect each other exactly one Point.
So we can easily calculate $x=... | For $x>1$ obviously $(3+4)^x > 3^x+4^x$ by binomial theorem.
For $1>x>0$, we have $(3^x+4^x)^{1\over x} > 3^{x{1\over x}}+4^{x{1\over x}}$ since ${1\over x} > 1$ and hence $3^x+4^x > (3+4)^x$
For $x< 0$, let $y=-x$ then $({1\over 3})^y+({1\over 4})^y>({1\over3})^y > ({1\over7})^y$
| https://math.stackexchange.com |
3,271,691 | [
"https://math.stackexchange.com/questions/3271691",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/512018/"
] | I have seen an argument along the lines of:
if <span class="math-container">$f$</span> is a given function on <span class="math-container">$\mathbb R$</span> and, for any <span class="math-container">$x \in \mathbb R$</span>, <span class="math-container">$\lim\limits_{ h \to 0}\vert f(x+h)-f(x)\vert=0$</span>, then i... | It is not true: the statement<span class="math-container">$$(\forall x\in\mathbb R):\lim_{h\to0}\bigl\lvert f(x+h)-f(x)\bigr\rvert=0$$</span>is <em>equivalent</em> to continuity, not to uniform continuity. However, the statement<span class="math-container">$$\lim_{h\to0}\sup_{x\in\mathbb R}\bigl\lvert f(x+h)-f(x)\bigr\... | The argument you saw was probably the following:
<span class="math-container">$f$</span> is uniformly continuous if and only if
<span class="math-container">$$\lim\limits_{ h \to 0}\vert f(x+h)-f(x)\vert=0 \mbox{ uniformly in } x \in \mathbb R$$</span>
Here uniformly in <span class="math-container">$x$</span> means... | https://math.stackexchange.com |
4,227,140 | [
"https://math.stackexchange.com/questions/4227140",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/46215/"
] | It is well-known that the harmonic series <span class="math-container">$\sum _{i=0}^{n-1} \frac{1}{1+i}$</span> could be approximated to the natural logarithm <span class="math-container">$\ln$</span>. Now, let <span class="math-container">$c$</span> be an arbitrary positive real number. Could one deduce that for a big... | You have either graphed <span class="math-container">$-7x+2y=1$</span> or <span class="math-container">$-21x+6y=3$</span> by mistake instead of the equations given in your system. In your original system, equation 2 is simply <span class="math-container">$3$</span> times equation 1. As such, you have two unknowns but o... | The matrix <span class="math-container">$\begin{bmatrix} 7 & 2 \\ 21 & 6 \end{bmatrix}$</span> is a rank 1 matrix i.e. it's not full-ranked.
So it's not invertible.
| https://math.stackexchange.com |
700,351 | [
"https://physics.stackexchange.com/questions/700351",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/295017/"
] | Consider a mass <span class="math-container">$m$</span> restricted to moving along a helix of fixed radius <span class="math-container">$b$</span> placed along the <span class="math-container">$z$</span> axis. Using cylindrical coordinates, also consider <span class="math-container">$z=a\varphi$</span>.
To me it seems ... | those are the Helix equations
<span class="math-container">$$x=b\cos(\varphi)\\
y=b\sin(\varphi)\\
z=a\varphi$$</span>
the generalized coordinate is <span class="math-container">$~\varphi~$</span> thus
you need two constraint equations
<span class="math-container">$$x^2+y^2=b^2\tag 1$$</span>
<span class="math-containe... | You can think of this problem in the following way.
We are talking about a particle in <span class="math-container">$\mathbb{R}^3$</span>. The space it exists in has a dimension of <strong>3</strong>.
But the particle rides on a path (helix) that only takes <strong>1</strong> quantity to fully describe its position.
Th... | https://physics.stackexchange.com |
306,818 | [
"https://electronics.stackexchange.com/questions/306818",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/148625/"
] | I ordered PCB for my prototyping board and I made an inversion about the pin of the microUSB :
(If the bullets stand for the pin)
Original microUSB :
<ul>
<li>GND</li>
<li>ID</li>
<li>D+</li>
<li>D-</li>
<li>5V</li>
</ul>
My board :
<ul>
<li>5V</li>
<li>D-</li>
<li>D+</li>
<li>ID</li>
<li>GND</li>
</ul>
Does an... | You have three options as I see it.
<ol>
<li>Cut the end off a USB cable and either solder it directly to the PCB (preferred), or solder on a USB connector with a pinout matching your board (dangerous - don't use the cable for anything else!).</li>
<li>Get the board remade with the correct pinout.</li>
<li>Solder on t... | You can try mounting a mid-mount micro-usb connector upside down.
| https://electronics.stackexchange.com |
18,536 | [
"https://cs.stackexchange.com/questions/18536",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/8870/"
] | I have come across many sorting algorithms during my high school studies. However, I never know which is the fastest (for a random array of integers). So my questions are:
<ul>
<li>Which is the fastest currently known sorting algorithm?</li>
<li>Theoretically, is it possible that there are even faster ones? So, what's... | In general terms, there are the $O(n^2)$ sorting algorithms, such as insertion sort, bubble sort, and selection sort, which you should typically use only in special circumstances; Quicksort, which is worst-case $O(n^2)$ but quite often $O(n\log n)$ with good constants and properties and which can be used as a general-p... | The answer, as is often the case for such questions, is "it depends". It depends upon things like (a) how large the integers are, (b) whether the input array contains integers in a random order or in a nearly-sorted order, (c) whether you need the sorting algorithm to be stable or not, as well as other factors, (d) wh... | https://cs.stackexchange.com |
416,241 | [
"https://mathoverflow.net/questions/416241",
"https://mathoverflow.net",
"https://mathoverflow.net/users/50438/"
] | Let <span class="math-container">$B$</span> be the closed unit ball in <span class="math-container">$\mathbb R^3$</span> centered at the origin and let <span class="math-container">$U= \{x\in \mathbb R^3\,:\, \frac{1}{2}\leq |x| \leq 1\}.$</span> Let
<span class="math-container">$$ S_U= \{u \in C^{\infty}(U)\,:\, \Delt... | No. If <span class="math-container">$\varphi \in C^\infty_c(B)$</span> is a bump function equal to <span class="math-container">$1$</span> in <span class="math-container">$\lvert x\rvert \leq 1/2$</span> then from Green's theorem we have
<span class="math-container">$$ \int_B u \Delta \varphi = 0$$</span>
for all <span... | Suppose that <span class="math-container">$u\in S_{U}$</span>. Then I claim that <span class="math-container">$\inf\{\|u-v\|_{L^{2}(U)}:v\in S_{B}\}$</span> is bounded below by the standard deviation of the spherical symmetrization <span class="math-container">$u^{\sharp}$</span> of <span class="math-container">$u$</sp... | https://mathoverflow.net |
101,635 | [
"https://mathoverflow.net/questions/101635",
"https://mathoverflow.net",
"https://mathoverflow.net/users/24979/"
] | My question is from the polymer field's famous literature: <em>The Equilibrium Theory of Inhomogeneous Polymers</em> by Glenn H.Fredrickson.
In its Appendix C, the C.2 Functional differentiation item, it says a Taylor-expanded form of a functional $F[f+\delta f]$ is:
$F[f+\delta f] = F[f] + \int_a^bdx\Gamma_1(x)\delt... | In Dieudonne's book <em>Foundations of Modern Analysis</em> you will find a description of Taylor expansion appropriate to your situation. It involves certain multi-linear maps. There is a famous theorem due to <em>L. Schwartz</em> stating that under certain assumptions multilinear maps can be given integral de... | You can probably derive the formula by expanding the function $t \mapsto F[f + t\delta f]$ into its Taylor series centered at $t = 0$ and then setting $t = 1$ in the Taylor series. It then comes down to computing the $k$-th derivative with respect to $t$ of $F[f + t\delta f]$. If the integrals involved all converge pro... | https://mathoverflow.net |
3,336 | [
"https://mechanics.stackexchange.com/questions/3336",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/1321/"
] | Is there a particular type of Anti-Seize compound that is preferred for use on spark plugs? What temperature rating is needed?
| Most people use Copper because it's the most common and cheapest, but beware the cheap/generic stuff that's only good to 600°F or so. I use the Nickel type, not so much for the temperature (2400°F), though that is a bonus, but because there are some metals that you can't use the copper on (Titanium might be one... | The highest heat range. The price difference is only a couple of bucks and you don't do the job often enough to worry about it. If you get one "oxygen sensor safe" you can reuse it throughout your exhaust system on other jobs you may have that requires antisieze compound.
| https://mechanics.stackexchange.com |
11,278 | [
"https://datascience.stackexchange.com/questions/11278",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/17971/"
] | I'm trying to choose an algorithm for filtering spam.
I found two options:
<ol>
<li>Create word dictionary for spam and not spam data.
Calculate average TF-IDF for each word and use cosine similarity for filtering.</li>
<li>Or use word dictionary for training logistic regression model.</li>
</ol>
Could you suggest wh... | Use logistic regression which allows the weights to be learnt. By using cosine similarity you are forcing the weights to be the same for all features (assuming that you normalize the features first). This is putting unnecessary restrictions on the model.
| You have to make a prediction (after performing supervised learning), so cosine distance won't help since it's fundamentally used in unsupervised learning (clustering and distance). A popular spam prediction approach was published in Springer textbook by Hastie & Tibshirani, which is on statistical learning. You ... | https://datascience.stackexchange.com |
105,599 | [
"https://physics.stackexchange.com/questions/105599",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/43452/"
] | <img src="https://i.stack.imgur.com/UPKe6.png" alt="enter image description here">
<blockquote>
Two objects A and B, of masses 5 kg and 20 kg respectively, are connected by a massless string passing over a frictionless pulley at the top of an inclined plane, as shown in the figure. The coefficient of static friction... | The answers posted by others encouraged me to examine the assumptions I was making in trying to solve the problem. Unfortunately I think none of the answers were ultimately heading in the right direction so I can't accept any of them.
I believe the answer is that the friction between block B and the plane will always ... | <strong>Hint</strong> : Friction opposes tendency to move. Tension is produced if the string is stretched $very$ slightly. So, increase friction to maximum and then tension will act if necessary.
Ironically, you are thinking absolutely right. Give yourself a cookie.
From part $a$, we know that the blocks will be at r... | https://physics.stackexchange.com |
52,438 | [
"https://dsp.stackexchange.com/questions/52438",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/32545/"
] | I am quite new to digital signal processing (and also Z transforms). I am reading about frequency response modelling and have some questions
<ul>
<li>do we always need a pair of poles for each "peak" in the frequency response ?</li>
<li>why is this so ?</li>
<li>what happens if i dont have a pair of pole for each peak... | The fft returns complex values, to get the amplitude you need to take the abs( ). The real and imaginary portion tell you about the signals phase. Remember the fft is changing the basis by projecting your signal onto a complex sinusoid:
<span class="math-container">$$e^{i \omega t} = \cos(\omega t) + i \sin(\omega t)$$... | The Fourier Transform is complex valued, it can be represented either as "real part and imaginary part" or as "amplitude and phase". Normally you need two graphs to show the entire picture of a Fourier Transform
The link you post just shows the real part and in this particular example, the imaginary part happens to be... | https://dsp.stackexchange.com |
290,774 | [
"https://electronics.stackexchange.com/questions/290774",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/141325/"
] | Ok, I haven't done any experiment and please don't get all technical "what type of scales are used"
But here is my question
Does the weight of and electromagnet change when it on?
Here is my though! If you place an electronic magnet on a weighing scale and weighed it. Would the weight change when you turned it on... | The weight of the electromagnet is only a function of its mass and the pull of gravity. This has nothing to do with magnetism.
However, the total force between the earth and the electromagnet can change when the magnet is turned on. This is because the earth produces its own magnetic field. The two magnetic objects... | The <em>MASS</em> of an electromagnet does not change when it is energized. There is, as far as my understanding of physics knows, no relationship between magnetism and gravity.
I can imagine that an experiment could be constructed where the apparent <em>weight</em> of the electromagnet changes, based on interactio... | https://electronics.stackexchange.com |
119,225 | [
"https://cs.stackexchange.com/questions/119225",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/112327/"
] | It could be a silly question, yet I'm not able to understand.
In modern day, computers, we have integers with million digits length. Even in my ordinary 2GB laptop, I can calculate values of numbers up to thousand digits long, but the value of a floating-point calculation is often limited to 15 digits or worse, like 0.... | There is a <span class="math-container">$\mathcal{O}(nk)$</span> DP approach.
Call an edge covered if we select a vertex next to it. Root the tree at an arbitrary vertex <span class="math-container">$r$</span>. Define <span class="math-container">$DP[i][b][t]$</span> as the maximum number of edges in the subtree of no... | A simple solution is to use the state <span class="math-container">$dp(n,2,n)$</span>. Let <span class="math-container">$dp(i,0,j)$</span> be the maximum number of edges we can get by using <span class="math-container">$\leq j$</span> nodes in the subtree rooted at node <span class="math-container">$i$</span>, with nod... | https://cs.stackexchange.com |
483,482 | [
"https://electronics.stackexchange.com/questions/483482",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/216596/"
] | I was thinking today and am curious, assuming there is an open collector output on two chips, one that runs on 3.3V and cannot tolerate 5.0V, and a 5.0V chip, could they just communicate by using pullup resistors with the correct voltage? What does a level shifter do that makes it worthwhile to buy?
| You may not be be able to pull up the output of a 3.3V chip to 5V. But assuming that your desired direction is possible, the other issue is that the rise time resulting from the pullup resistor charging the capacitance of inputs and stray capactiance is potentially very slow compared to an active pullup, and there is a... | 3.3 volts may be seen by the 5 volt chip as a grey area voltage not a true absolute high. The 5 volt line can and is often lowered to a 3.3 high by one of many methods. These questions really are circuit dependent. Some systems are somewhat voltage tolerant others are not! True good engineering practice dictates always... | https://electronics.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.