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 |
|---|---|---|---|---|---|
616,139 | [
"https://electronics.stackexchange.com/questions/616139",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/270326/"
] | I was trying understanding how SPI protocol works.
Basically they are just bunch of 1's and 0's serially for every its pins.
I wonder if I can send and receive data from SPI slave device without using <code>SPI.h</code> library. The problem I need to consider is about SCK pin which it's about frequency and timing. How ... | I will try:
You ask what is SPI?
SPI (Serial Peripheral Interface) it is a synchronous communication bus standard. Data is synchronous to keep transfers short and fast. SPI communication is a master to slave configuration, where a single master can choose between one or more slaves via the CS chip Select function of ... | Yes you can, every time the clock changes in a spi bus (usually on rising edge of clock) you find out what the data input pin is doing and then record that into a variable (with a shift function).
You can find the rising edge with interrupts or a for loop and oversample.
| https://electronics.stackexchange.com |
137,620 | [
"https://softwareengineering.stackexchange.com/questions/137620",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/2471/"
] | Recently a senior developer that I work with made a case for requiring that developers get the latest version and compile as part of their project a major internal library. This stands in contrast the the counter argument that project teams should be working off a stable version that they get from an internal Maven rep... | This senior developer's argument makes no sense to me.
They want to add overhead of constantly retrieving & compiling an internal library just so devs can occasionally read the source code? That's going to waste a lot more time than having devs go look at the source code only when they need to check if a feature ... | The suggestion is
<blockquote>
We can save time by client-side developers reading the library's source code to determine if required functionality is available
</blockquote>
You could make an alternative suggestion
<blockquote>
We can save time by someone documenting the library to indicate what functionality i... | https://softwareengineering.stackexchange.com |
458,825 | [
"https://physics.stackexchange.com/questions/458825",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/221853/"
] | <blockquote>
A particle is defined by a wave function, <span class="math-container">$Be^{-2x}$</span> for <span class="math-container">$x<0$</span> and <span class="math-container">$Ce^{4x}$</span> for <span class="math-container">$x>0$</span>. For the wave function to be continuous at <span class="math-contain... | The derivative of <span class="math-container">$\psi(x)$</span> is continuous only where there is no infinite discontinuity in the potential. Examples of situations where <span class="math-container">$\psi'(x)$</span> is not continuous include a <span class="math-container">$\delta(x)$</span> potential and both ends o... | I remember this exercise well, because the lecturer of my course in quantum mechanics gave us this homework assignment without us knowing anything about distributions.
The reason that the two cases are different cannot be understood properly from physics text books. The difference between <span class="math-container"... | https://physics.stackexchange.com |
198,945 | [
"https://softwareengineering.stackexchange.com/questions/198945",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/-1/"
] | I'm putting much work in my program and after it's done I want to just setup a small website and sell each copy of the program but I don't want any legal issues.
Do I have to look for another library or can I "safely" link to it?
| The GPL is a heavily viral license. If you use GPL code in your program at all, the entire codebase has to be compatible with the GPL.
If the library in question is available as both GPL and LGPL, you can link to it dynamically (as an external DLL/SO/dylib/whatever) without being in violation of the LGPL. If not, yo... | No. You can't. That's a violation of the GPL and one can be sued for distributing software that uses the GPL'd library without making the source code of said library publicly available. The code that was freely given to the world came with the string that if you use it in a project, you have to freely give the project ... | https://softwareengineering.stackexchange.com |
65,630 | [
"https://mathoverflow.net/questions/65630",
"https://mathoverflow.net",
"https://mathoverflow.net/users/12135/"
] | I'm undergraduate student in probability theory (and its applications). There are lots of different and definitely good text on standard, functional analysis-based approach, but I'm interested in alternative approaches - maybe, some more algebraic variants. Could you name some ideas/papers/texts about this? I'm especia... | Yuri, you may have a look at the introductory probability book by Henk Tijms, Understanding Probability. An excellent book having the nice feature that simulation is used throughout to develop probabilistic intuition.
| Peter Whittle's "Probability via expectation" is a very nice book. In taking expectation (rather than probability measure) as a starting point, the text manages to
<ol>
<li>Avoid measure theory almost entirely</li>
<li>Get to interesting applied problems very quickly </li>
</ol>
Though Whittle (probably deliberately)... | https://mathoverflow.net |
1,567 | [
"https://cs.stackexchange.com/questions/1567",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/1011/"
] | I have developed two algorithms and now they are asking me to find their running time.
The problem is to develop a singly linked list version for manipulating polynomials. The two main operations are <em>addition</em> and <em>multiplication</em>.
In general for lists the running for these two operations are ($x,y$ are... | The running time of the <code>InsertTerm</code> subroutine is $\Theta(n)$ where $n$ is the number of terms in the polynomial, and this is the worst-case complexity as well as the average-case complexity absent any information about the monomial being inserted.
The outer loop of <code>PolynomialAdd</code> runs <code>Ma... | The multiplication algorithm has a characteristic of $O(\log(n))$ because the actual multiply operation can be divided into separate sub problems, "multiply". But, the complexity becomes worse when you have to go through the entire result list again in the "insertTerm" subroutine which is called in the inner while loop... | https://cs.stackexchange.com |
170,348 | [
"https://softwareengineering.stackexchange.com/questions/170348",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/42132/"
] | For example, if I'm using some MVC-like architecture, which folder structure should I use:
<pre><code>domain1/
controller
model
view
domain2/
controller
model
view
</code></pre>
Or:
<pre><code>controllers/
domain1
domain2
models/
domain1
domain2
views/
domain1
domain2
... | I think this depends on specific project.
For example, if the different business domains are totally independent of each other, then I'd organize by business domain.
But if there is shared code between the business domains, or rather, the business domains are different <em>variants</em> of the same code base, then it... | I think it's enlightening to ask, "what am I more likely to add on a regular basis, more domains or more technical divisions?" Then whatever the answer is, put that at the top level.
In most cases your technical architecture will solidify faster than your domain. That means you should organize by domain first, then ... | https://softwareengineering.stackexchange.com |
72,987 | [
"https://softwareengineering.stackexchange.com/questions/72987",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/23880/"
] | Another programmer wants to subcontract me to write, test, and document code. If anyone has nuggets of wisdom they could share regarding the business arrangement, I sure would appreciate the advice. My present plan is to go through specification and break it down into fixed-price deliverables, with the definition of ... | In all important ways, a client is a client is a client:
<ul>
<li>Treat the other programmer like your customer representative. They must be available to answer questions you have about requirements and etc. You might want to make this responsibility clear in the contract.</li>
<li><strong>Do not use fixed bid</strong... | Beware of the payment terms. You may not get paid until the main contractor gets paid. If you're going to ask to be paid first, you may have to settle for less. Different places and industries vary in their practices and legal requirements. Follow @Ramhound 's advice.
| https://softwareengineering.stackexchange.com |
395,290 | [
"https://softwareengineering.stackexchange.com/questions/395290",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/206473/"
] | I need a data structure <code>d</code> with somewhat conflicting requirements. What are the different tradeoffs I could pick?
The same algorithm will be repeatedly done on each time step:
<ul>
<li><code>push</code> one new element to the right (so all elements remain naturally ordered by the date they came into the d... | Tree data structures allow for O(log n) random access and for easy traversal. A naive binary tree likely has worse performance than using a flat array though, but you are not forced to use binary trees.
You can implement k-ary trees that contain an array of items per tree node. The size parameter k is tunable. For suf... | That sounds like a doubly-linked list. Appending, (sequential) enumerating and deleting are all quick operations.
Parallel algorithms on doubly-linked lists are harder. If you somehow can't meet performance goals with the sequential enumeration, you could probably utilize a list of lists, but that makes all operations... | https://softwareengineering.stackexchange.com |
339,539 | [
"https://physics.stackexchange.com/questions/339539",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/159154/"
] | Could someone explain to me why this 'perpetual motion machine' would not work?
The only explanation i've thought of is it would be impossible to suspend the water in a way where the balls could still travel through it...
<img src="https://todayinsci.com/Books/MechApp/chap23/955-ChainPump.jpg" alt="idea">
(the idea i... | At the point where the balls enter the water from the bottom they will experience "negative buoyancy" that exactly cancels out any work done by the balls floating up in the water - to enter the water column you have to do work against the pressure caused by the full column of water.
| You can imagine some iris- like door that opens when the ball at the bottom tries to go up. But the machine will not work because the water preasure will push the ball down. It will not allow the ball to enter from the bottom. Remember that at this point the ball is not fully inside and there is a net force down due to... | https://physics.stackexchange.com |
112,373 | [
"https://mathoverflow.net/questions/112373",
"https://mathoverflow.net",
"https://mathoverflow.net/users/23506/"
] | I need a reference for conditions on a closed subspace of a Banach space to have the homotopy type of an ANR.
| You could try Karol Borsuk's Theory of Retracts. There is extensive discussion of ANRs. Further related conditions can be found in shape theory (work in the 1970s by Edwards and Geoghegan) but that requires a knowledge of shape theoretic ideas. (That is why I asked what sort of conditions you were looking for as this i... | (By <em>subspace</em> you mean <em>topological subspace</em>, right?).
You may try papers by Henryk Toruńczyk (and his students).
| https://mathoverflow.net |
46,059 | [
"https://mechanics.stackexchange.com/questions/46059",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/24639/"
] | I bought a Honda Fit 2008 with 53000 miles, and I want to know how often I need change the motor oil?.
Thanks in advance.
| ALL newer Honda cars come with an "oil life" measuring system, which tells the driver when to change the oil. This system is better than using a schedule in two ways...
<ul>
<li>It prevents you from changing the oil too soon, which is a waste of money and doesn't extend the life of the engine at all.</li>
<li>It warns... | Your owner's manual should contain a maintenance schedule, or you could have a separate maintenance schedule booklet included with the packet that contains your owner's manual.
If you don't have your owner's manual, the internet says your interval is 7500 miles. Also note that you should change your filter when you ch... | https://mechanics.stackexchange.com |
635,256 | [
"https://electronics.stackexchange.com/questions/635256",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/84456/"
] | In my book it specifically says that for decoders only one output is high for combinations of each input. And also the number of outputs are 2 power of number of inputs. None of these are true for BCD to 7 segments decoder. It has 4 inputs and 7 outputs and has more that one high for the outputs of each input in its Tr... | It can decode BCD and drive segments of a 7 segment display.
So both depending on how you think of the device. It clearly has to decode BCD or binary into one out of 10 or 16 states and then encode that into 7 outputs for the display.
There are also chips that decode only. Such as binary 3-to-8 decoder like the 74138 o... | Your book is making a statement about binary to 1 of N decoders.<br />
It is true within the context it is intended to cover.<br />
The statement does not apply to other types of decoders.
<blockquote>
And also the number of outputs are 2 power of number of inputs.
</blockquote>
This means that if you have e.g. 2 input... | https://electronics.stackexchange.com |
11,619 | [
"https://datascience.stackexchange.com/questions/11619",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/16244/"
] | I've been thinking about the Recurrent Neural Networks (RNN) and their varieties and Convolutional Neural Networks (CNN) and their varieties.
Would these two points be fair to say:
<ul>
<li>Use CNNs to break a component (such as an image) into subcomponents (such as an object in an image, such as the outline of the o... | A CNN will learn to recognize patterns across space. So, as you say, a CNN will learn to recognize components of an image (e.g., lines, curves, etc.) and then learn to combine these components to recognize larger structures (e.g., faces, objects, etc.).
You could say, in a very general way, that a RNN will similarly... | Difference between CNN and RNN are as follows :
<h1>CNN:</h1>
<ol>
<li>CNN take a fixed size input and generate fixed-size outputs.</li>
<li>CNN is a type of feed-forward artificial neural network - are variations of multilayer perceptrons which are designed to use minimal amounts of preprocessing.</li>
<li>CNNs use ... | https://datascience.stackexchange.com |
105,424 | [
"https://dba.stackexchange.com/questions/105424",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/69516/"
] | I am evaluating Postgres 9.4 performance on a machine with Intel i7 quad-core 3.6 GHz CPU, 8 GB ram, and 7400 rpm HDD (no RAID) running Linux Mint. The DB schema has the following table:
<pre><code> Table "public.sensor_readings"
Column | Type | Modifiers
----------+--------------------... | The main problem is that you have 60 GB of data which you want to access quickly on a single slow HDD (I've never heard of 7400 rpm, is it 5400 or 7200?).
You can partition on the time, so the last two weeks of data are grouped together in tight set.
Or you could try clustering on the time instead of partitioning on... | You should try to create an index on <code>time</code>, and see if this improves the execution time of your query:
<pre><code>CREATE INDEX time_index ON sensor_readings(time);
</code></pre>
An alternative is to partition or cluster the table on <code>time</code>, as described in another answer.
| https://dba.stackexchange.com |
25,891 | [
"https://mechanics.stackexchange.com/questions/25891",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/7325/"
] | In almost every case I can think of, the larger vehicles with four wheel power are 4x4, and the smaller ones AWD. As far as my experience goes, AWD is much more convenient, and also works at least as well on ice as 4x4 (at least 4h), and allows a rotational difference between front and rear axles, which 4x4 doesn't. I'... | I really think that it's more of a naming convention issue but there is a marked difference between 4x4 and AWD.
In 4x4 all the wheels are "guaranteed" power. Power is sent from the engine to the transfer case and then the transfer case sends it to the front axle and rear axle. The reason I put guaranteed in quotes i... | One of the things the other answers neglected to mention and is probably the key point between AWD and 4x4 is that AWD transfer cases will almost always be a single speed differential. The 4x4 will almost always have 4-wheel high and 4-wheel low ranges <em>and be selectable</em>. This provides more torque if the driver... | https://mechanics.stackexchange.com |
3,048 | [
"https://electronics.stackexchange.com/questions/3048",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/245/"
] | Anyone familiar with relays mechanical or otherwise? I would like to be able to switch on/off up to 250W (120V) load using a microcontroller.
Will be used to control lighting to an aquarium.
| Solid-state relays are easier to use than electro-mechanical ones. They can be controlled directly by MCU outputs and you don't have to worry about things like putting diodes across coils. I've used lots of them with an ARM to control motors and valves in a complex piece of medical equipment.
| Mechanical relays require gobs of current to keep the coil energized, much more than you can directly get from a microcontroller, and when you want to switch them off, you have to contend with all the flyback energy too (i.e., the diode thing).
Solid state is the way to go.
| https://electronics.stackexchange.com |
286,956 | [
"https://dba.stackexchange.com/questions/286956",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/225789/"
] | I have a large table (~500M records, 85GB in size) on a PostgreSQL 10.10 database (AWS RDS instance).
The records are created by a bunch of game simulations which insert "events" whenever they happen in the simulation.
Here is a sample record:
<div class="s-table-container">
<table class="s-table">
<thead>
<t... | Index-only scans don't work on expressions in expressional indexes, the planner isn't smart enough. It thinks it will need the root column "event_json" to be in the index to use an index-only scan. If you want the index only scan on that table as it is, you would have to include the entire jsonb column in t... | try:
<pre><code>SELECT programming_scenario_id, D.runnum, SUM((A.event_json->>'captured')::int) as times
FROM simulations.programming_scenarios F
join simulations.programming_scenarios psc on (psc.id = f.id)
JOIN simulations.runs D ON D.programming_scenario_id = F.id
JOIN details.events A ON A.runnum = D.runnum A... | https://dba.stackexchange.com |
193,727 | [
"https://dba.stackexchange.com/questions/193727",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/108119/"
] | I am using SQL Server 2014. I want to execute <code>EXEC (@remotecmd) AT [server_name];</code> (@remotecmd is a dynamic sql not a stored procedure) into <code>##eapb</code>. My code is
<pre><code>insert into ##eapb
EXEC (@remotecmd) AT [ADSQLDB3S\DEV];
</code></pre>
But I get the error:
<blockquote>
OLE DB provide... | In my testing (to another instance on the same server, not on a separate server), this worked if I had the Linked Server option of <strong>Enable Promotion of Distributed Transactions for RPC</strong> set to "False". You can accomplish that via the following command:
<pre><code>EXEC master.dbo.sp_serveroption
@... | I can use:
<pre><code>SELECT *
INTO #TABLATEMP
FROM Openquery([link-server-name],N' Execute anything ')
Select Campo1, Campo2, Campo3, .... CampoN
FRom #TABLATEMP
DROP TABLE #TABLATEMP
</code></pre>
-- That's all!!!
| https://dba.stackexchange.com |
12,676 | [
"https://mechanics.stackexchange.com/questions/12676",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/7032/"
] | Is there any proper source where I could find a list of cars with Dual Mass Flywheels (DMF)?
I have an opportunity to buy the said car, but I had some bad experience with DMF, so I would avoid them at all costs.
(Also, does anyone know if the 162kw petrol Lancia Kappa has one?)
Thanks in advance!
| I know DMF is expensive, but if you really like a car and don't wonna have a DMF, you can change it to regular fix flywheel. Valeo producing such a kits. So just check, if there exist such a kit for your car. I don't think there is a list of DMF cars, but you can ask you part shop which one is in for the car you like.
| Look on the www.luk.co.uk for all the information you want. Dual Mass Flywheels are usually fitted to diesel vehicles. They reduce torsional vibrations through the transmission, promoting longer gearbox life. The lack of vibrations contribute to greater driver comfort and so less stress. They also play a part in improv... | https://mechanics.stackexchange.com |
57,099 | [
"https://physics.stackexchange.com/questions/57099",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/14473/"
] | I've been struggling with conversion from Gaussian to SI units for sometime, trying to figure out how derived units in CGS (current, charge etc) relate to the SI units.
But I couldn't find any reference that spoke about temperature. I've read that the only base units in CGS are the centimetre, gram and second. How do... | When people say they are using CGS units, they mean:
<ul>
<li>Centimeters are the implied units of length;</li>
<li>Grams are the implied units of mass;</li>
<li>Seconds are the implied units of time;</li>
<li>Anything involving electric charge will be defined in accordance with $4\pi\epsilon_0 = 1$; and</li>
<li>All ... | In both SI and CGS Kelvin is used to measure temperature, but Boltzmann's constant has different orders being expressed in corresponding units. And you can always forget about $k = 1.38 \times 10^{-16} \frac{erg}{K} $ it and measure the temperature in erg, MeV or other energetic units suitable for your problem, so you... | https://physics.stackexchange.com |
86,605 | [
"https://electronics.stackexchange.com/questions/86605",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/29737/"
] | I'm a bit confused about the range on my multimeter. I have connected the multimeter to a 5V USB wall charger rated at 1.3A.
When I'm measuring voltage, everything makes sense. It shows a 1 for 200m and 2000m, and 4.98V for 20, 200, and 500.
I'm confused with the current range. When it's connected to the 10 range, i... | The USB wall charger is capable of providing <em>up to</em> 1.3A. Current draw is based on load, not on upon what the supply can provide. Obviously if a load requires <em>more</em> than a supply can provide, the load may not work correctly, or the power supply may fail (and cause damage if not protected).
A voltage me... | For measuring in the 200mA and lower current ranges, you are supposed to put the probe in the other socket. Where it says mA.
Hence, the 13.3 and other readings are not valid.
| https://electronics.stackexchange.com |
454,227 | [
"https://physics.stackexchange.com/questions/454227",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/219798/"
] | I'm a chemist not a physicist, so I have a loose relationship with its laws. I read that light (specifically a photon) doesn't have mass, gravity doesn't act on a photon to alter its trajectory. Instead a mass-laden object (planet/blackhole, which inherently produce a gravitational field) acts on the 'fabric of spaceti... | I think you may be mixing a Newtonian view of gravity with the modern Einsteinian view. In short anything that creates a stress energy tensor will cause curvature of space-time and all things move "freely" along the geodesics associate with the corresponding metric tensor that describes the geometry created by stress-... | Photons just move along the straightest path that exists in curved spacetime. There is no reason they would need to have a finite size to do this, any more than a straight line in Euclidean geometry needs to have a finite thickness.
There is no observed limit to the energy a single photon can have, or to the number of... | https://physics.stackexchange.com |
608,862 | [
"https://physics.stackexchange.com/questions/608862",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/216010/"
] | I'm trying to motivate the theory of general relativity. Concretely, using which arguments is it deduced that spacetime must have the structure of a curved Riemannian manifold?
From the strong equivalence principle I deduce that it is taken as an axiom that free-falling frames are locally intertial, but I don't know ho... | <blockquote>
I'm trying to motivate the general relativity theory. Concretely upon which arguments is deduced that spacetime must have a structure of curved Riemannian manifold.
</blockquote>
First, you consider spacetime without gravity. You notice that inertial objects have worldlines which are straight lines in spac... | We don't have any better way to define straightness than by saying that the world-line of an inertially moving test particle is straight. By the equivalence principle, we have to count free-falling particles as inertial. (We can't say they're acted on by a gravitational force, because there is always a frame in which t... | https://physics.stackexchange.com |
302,075 | [
"https://electronics.stackexchange.com/questions/302075",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/147530/"
] | I have a 5V ultrassonic sensor HC-SR04 and I want to read the value and (if > x) turns ON output 1 and turns OFF output 2 and (if < x) turns ON output 2 and turns off output 1.
Outputs are 24V so I would use a transistor or a relay to turn on the outputs with the arduino.
The only way I know is to use an Arduino.... | All you really need is an analog comparator (either made from discrete parts or a dedicated IC, an op-amp or a purpose built comparator), some resistors to set the switching threshold (or a voltage reference, e.g. a zener diode, for more accuracy), a FET or some other buffer with sufficient drive current to run a relay... | There is no need of an arduino in this case. You can do it with few transistors and one opamp to compare sensor's output to "x".
Arduino or µC are use to do complexe operation, read bus, compute some data... Yes it's possible to do it with an arduino but as you said, it's overkill.
If you look closer at the cost of ... | https://electronics.stackexchange.com |
171,500 | [
"https://electronics.stackexchange.com/questions/171500",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/27415/"
] | I recently found my way onto a Datum x72 rubidium standard and had half a mind to turn it into a homebrew atomic clock, since I'm not exactly using it for a garage-based satellite business.
It seems there are plentiful examples of building atomic clocks using AVRs and PICs online, but most of these appear to feed one ... | If the input is down to a 1PPS, then one method of keeping the time calculation at ISR deterministic (neither fast, nor slow, but consistent) would be to actually calculate time one second into the future elsewhere, then use the ISR to update time to the "one second ahead" time.
In this case, even relatively slow perio... | If you configure a MCU to use an external oscillator then you could feed the 10MHz signal into the MCU (you may need a level shifter if it doesn't use TTL/5V CMOS signal levels) and then use timer prescalers to get it down to a more manageable clock rate for further use.
| https://electronics.stackexchange.com |
7,449 | [
"https://dba.stackexchange.com/questions/7449",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/154/"
] | I am having trouble setting up the Oracle Wallet on a new box connecting to a new database. I have added the following lines to my SQLNET.ORA:
<pre><code>SQLNET.WALLET_OVERRIDE = TRUE
WALLET_LOCATION = (SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=c:\oracle\Wallet))
</code></pre>
The wallet is created without error, ... | I was able to figure out from the trace file that there was line in the sqlnet.ora file that it didn't like. I narrowed it down to the WALLET_LOCATION line and finally recognized that there was a missing parenthesis at the end of the line.
| You also can use the below entry which is a working copy on my wallet store.
<pre><code>WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = c:\oracle\Wallet)
)
)
SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0
</code></pre>
| https://dba.stackexchange.com |
6,313 | [
"https://computergraphics.stackexchange.com/questions/6313",
"https://computergraphics.stackexchange.com",
"https://computergraphics.stackexchange.com/users/8245/"
] | I've been hunting around the internet for a while now, and I can't find anything about the specific shadow technique that I'm looking for.
I can only recall one game in particular that used it, and I know that it happens on the PC port of the game too. The game in question is "Sonic Adventure 2: Battle" for GameCube. ... | Having not worked on these games, I can only speculate... but from your description, it sounds like a crude shadow map with orthogonal projection and no depth information. It probably has (or had) a specific name but the way I suspect they did it is:
<ul>
<li>Render the character from above to a binary texture (eg. wh... | Don't know the game but hard shadows are usually shadow volumes, often implemented with help of a stencil buffer. You can find a short description of the algorithm on Wikipedia.
| https://computergraphics.stackexchange.com |
475,112 | [
"https://electronics.stackexchange.com/questions/475112",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/194434/"
] | I want to prevent others from reverse-engineering the on-die ROM, using X-ray, microscope, etc..
I think it's best to inject some substance between chip and packag and when the chip package is tempered or the radiation comes through the chip, that substance explodes or do someways to destroy the chip(at least ROM str... | Brief answer is "no", at least at the chip level.
At board level there are a number of solutions but they all involve techniques that are probably illegal, since they amount to creating a booby trap which is at the vey least capable of destroying most of the board. And also likely corroding or setting fire to its surr... | To answer your actual question, "is there research", the answer is yes. However, the research itself and any techniques developed will be classified as state secrets. If you have to ask in a public forum then you are already off on the wrong foot.
| https://electronics.stackexchange.com |
277,474 | [
"https://physics.stackexchange.com/questions/277474",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/52834/"
] | I have long wondered what would happen if - theoretically - someone was in an elevator that was moving rather quickly and either jumping or flying a helicopter (something of the like).
So here's the situation, the elevator is moving upwards in a building and going at a fairly high rate of speed. The occupant of the el... | If you stand still and jump, you exert a force on the floor. This force gives an acceleration (from $\sum F=ma$) that brings you to a certain height. From this height you fall back the same distance down to the floor again.
If the floor under you is moving upwards, you can jump as always and exert the same force as al... | If the elevator is not accelerating, there is no way for the person in the elevator to know whether it's moving or still. So the laws of physics will be exactly the same: they jump with a certain force, reach a certain height, and land again.
If the elevator <em>is</em> accelerating (upwards), then the person will fee... | https://physics.stackexchange.com |
3,911 | [
"https://physics.stackexchange.com/questions/3911",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/1598/"
] | Trying to secure a wall hanging using magnets; me and a coworker came up with an interesting question:
<blockquote>
When the hanging is hung using 1 magnet, the weight of it causes it to quickly drag the magnet down and the hanging drops. Using <em>n</em> magnets retards this process; causing it to fall more slowly,... | Your two questions are not really related, in my thoughts.
The first one is about friction of some magnets clutched to a ferromagnetic wall.
The second is about failiure of some "wire".
Both are strange and unnessecary mixtures of idealized classical
mechanics and some real world problem.
So, first Question is re... | You slightly misinterpreted your results. They don't just fall more slowly, they <em>accelerate</em> more slowly.
More magnets will cause the acceleration of the object to reduce. Once you have enough magnets to provide enough force to overcome the force on your object due to gravity, then it will stay up.
The same i... | https://physics.stackexchange.com |
541,998 | [
"https://physics.stackexchange.com/questions/541998",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/207901/"
] | I got a general query regarding variation of two physical quantities.
If we have two physical quantities say <span class="math-container">$A$</span> & <span class="math-container">$B$</span> such that <span class="math-container">$A$</span> is directly proportional to <span class="math-container">$B$</span>. There... | The proportionality constant will always have units of <span class="math-container">$A/B$</span>, but these units can often be written in more than one way when expressed using derived units. For instance the proportionality constant <span class="math-container">$k$</span> in the electric force
<span class="math-contai... | since apples are never equal to pears k has always to have the dimension of A/B
| https://physics.stackexchange.com |
70,732 | [
"https://physics.stackexchange.com/questions/70732",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/25403/"
] | I read somewhere that when you jump, the sole effect caused by your jump on the earth moves it about $10^{-18}m$ (I don't remember the figure exactly, but I think it was that).
However - obviously - with so many people running, jumping, etc. on the whole surface of the earth, the whole effect is canceled out, so it... | Some rough figures: earth's mass is about <span class="math-container">$6 \cdot 10^{24}$</span> kg. The mass of the total world population is roughly 7 billion times 80 kg or about <span class="math-container">$6 \cdot 10^{11}$</span> kg. So earth is 13 orders of magnitude (10 trillion times) heavier than the world's h... | <blockquote>
Discernable displacement?
</blockquote>
No, the earth far outweighs the human population. If the masses were closer, absolutely, as action/reaction.
More interestingly is the effect of Gravity on the separate masses. If both masses lack sufficient "escape velocity", both return to their origina... | https://physics.stackexchange.com |
560,727 | [
"https://math.stackexchange.com/questions/560727",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/107691/"
] | The question is: what is the indefinite integral:
$\int \sin^2(kx) \, \mathrm dx$?
I get the correct answer using trig identities to change the $(\sin(kx))^2$ into $\dfrac{1}{2} - \dfrac{(\cos(2kx))}{2}$ and integrating that. But why can't I just integrate the outermost function $(x^2)$ and then divide by the derivati... | The chain rule does say something about integrals, but not what you seem to think. The chain rule says
$$ \dfrac{d}{dx}f(g(x)) = f'(g(x)) g'(x)$$
Integrating both sides gives you
$$ \int f'(g(x)) g'(x)\ dx = f(g(x)) + C$$
Now you can't just divide out the $g'(x)$ from the left side, because that
$g'(x)$ is inside the ... | $$
\frac{(\sin(kx))^3}{3k\cos(kx)}
$$
If you differentiate the expression above, the derivative of the numerator is
$$
3(\sin(kx))^2\cdot 3k\cos(kx) \cdot \underbrace{\frac{d}{dx}(2k\cos(kx))}.
$$
<ul>
<li>You entirely neglected the part over the $\underbrace{\text{underbrace}}$;</li>
<li>You entirely neglected the q... | https://math.stackexchange.com |
494,763 | [
"https://electronics.stackexchange.com/questions/494763",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/113566/"
] | I'm creating a portable test socket for electrical appliances that comes equip with a RCBO, power meter and possibly emergency stop button. My test socket will operate at max 240V AC and 10A. The purpose of the RCBO is to protect myself when I'm working on or fixing electrical appliances.
When searching for RCBO brea... | I am not sure why this wasn't the first thing pointed out by any of the earlier answers, but it is because as transistors are made smaller to increase speed, increase density, and reduce power consumption, the gate oxide layer is made thinner (which also increases leakage currents).
A thin gate oxide layer can't with... | The power required to switch a capacitance from logic 0 to logic 1 (or vice versa) is proportional to the clock frequency times the supply voltage <strong>squared</strong>. In CMOS digital circuits the logic gate inputs look like capacitors, so charging and discharging capacitances uses most of the power in these circu... | https://electronics.stackexchange.com |
438,196 | [
"https://mathoverflow.net/questions/438196",
"https://mathoverflow.net",
"https://mathoverflow.net/users/178594/"
] | <strong>Background:</strong> The equation
<span class="math-container">$$a^4+b^4+c^4=2d^4$$</span>
has infinitely many positive integral solutions if we take <span class="math-container">$c=a+b$</span> and <span class="math-container">$a^2+ab+b^2=d^2$</span> further assuming that <span class="math-container">$GCD(a,b,c... | Let <span class="math-container">$A=\frac{a}{d}, B=\frac{b}{d}, C=\frac{c}{d},$</span> then we get
<span class="math-container">$$A^4+B^4+C^4=2\tag{1}$$</span>
Let <span class="math-container">$A=x+y, B=x-y, z=C^2$</span> then
<span class="math-container">$$2x^4+12y^2x^2+2y^4+z^2 = 2\tag{2}$$</span>
Hence
<span class="... | <span class="math-container">$(a, b, c, d) = (32, 1065, 2321, 1973), (2156, 5605, 8381, 7383)$</span>
| https://mathoverflow.net |
2,877,129 | [
"https://math.stackexchange.com/questions/2877129",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/262545/"
] | This is from Arnold's ODE:
<blockquote>
<span class="math-container">$\mathbf{Problem.}$</span> Can every smooth direction field in a domain of the plane be extended to a smooth vector field?
<span class="math-container">$\mathbf{Answer.}$</span> No, if the domain is not simply connected.
</blockquote>
I cannot see why... | Let's consider our domain to be $D = \mathbb{R}^2\setminus\{(0,0)\}$, which is not simply connected. We will define a direction field on $D$ which cannot be extended to a continuous vectorfield, much less a smooth one.
We will use polar coordinates with $\theta$ restricted to $[0,2\pi)$.
At the point $(r,\theta)$, w... | I am quite late to the party, but I myself was recently thinking about when you can turn slope fields into vector fields, came across this post, and realized a slightly more abstract way to think about what's going on using a tiny bit of algebraic topology which I think better illuminates the core issue (and also revea... | https://math.stackexchange.com |
34,978 | [
"https://mechanics.stackexchange.com/questions/34978",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/15967/"
] | Recently, a squirrel paid a visit to the engine compartment of my 1999 VW (it's a diesel 1.9 TDI). Besides leaving some crabapples as gifts, it chewed clean through one of the fuel injector return hoses. I didn't discover it until reaching my destination and smelling/observing the spilled diesel which was bathing the... | tl dr: Could you? Probably. Should you? No.
Engines with a return line need to have it intact or you will be creating over pressure on the entire fuel system. This would cause you to dump more fuel into the engine, plus cause the fuel system components to be overworked, which could lead to other failures. If any part ... | You don't say the specific engine in your car but assuming it's one of the 1.9 TDI's, I'd say it's definitely a bad idea to run with the fuel return "to air" or blocked.
I have a 2003 Bora (Jetta IV) 1.9 TDI PD130 which has a "fuel cooler" fitted in the fuel return line under the front floor pan. Doing some research ... | https://mechanics.stackexchange.com |
52,343 | [
"https://mathoverflow.net/questions/52343",
"https://mathoverflow.net",
"https://mathoverflow.net/users/12264/"
] | Who knows online video of Riemannian Geometry and Commutative Algebra? If you know, please recommend them to me. I am really eager to learn these courses.
| This is not true, you are guessing right. Here is a counter-example: take $k$ a field, $A=k[X,Y]$, $K=k(X,Y)$.
Let $M=XA+YA$. Then using the fact that $A$ is a UFD one see easily that $(A:_K M)=A$.
(indeed, let $P/Q \in (A:_K M)$ with $P,Q \in A$, $Q \neq 0$. We have $XP/Q \in A$ so
$Q$ divides $XP$. Similarly $Q$ divi... | Let me add just something to this.
Let $K$ be the quotient field of $A$. If $M$ is a fractional ideal of $A$, then the fractional ideal $M_v = (A\colon_K(A\colon_KM))$ is called "the divisorial closure of $M$". In this case (when $K$ is the quotient field of $A$) one can show that $(A\colon_KM) \subset A \Longleftrig... | https://mathoverflow.net |
274,888 | [
"https://physics.stackexchange.com/questions/274888",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/120460/"
] | I have a question about the solution of the following problem:
<blockquote>
Two metal balls of same radius $a$ are located inside a homogeneous poorly-conducting medium of resistivity $\rho$. Find the resistance of the medium between the balls provided the separation between them is much greater than the radius of ... | Let's state some basic facts.
<ol>
<li>Whenever speed of light is given as <span class="math-container">$186,000~\rm
mi/s$</span> or <span class="math-container">$300,000~\rm km/s$</span>, that's its speed in a vacuum.</li>
<li>In the real world we use copper cable or fibre
optic (glass) to conduct electricity or l... | I test fibre and copper cables.
The speed of a "signal" or a pulse of electricity ,or light ,through either is about
200,000 km/hr.
the problem is copper carrying current creates a magnetic field. Combined with the
inductive effects and capacitance of cable conductors the higher the frequency the less a cable is effec... | https://physics.stackexchange.com |
506,622 | [
"https://stats.stackexchange.com/questions/506622",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/45971/"
] | Suppose <span class="math-container">$Y \in \mathbb{R}^n$</span> and <span class="math-container">$Z \in \mathbb{R}^n$</span> are random vectors, where <span class="math-container">$Y$</span> follows a <span class="math-container">$MVN(\mu, \Sigma)$</span> distribution. Let <span class="math-container">$X \in \mathbb{R... | Identically distributed random variables have the same <em>candidate</em> values but not the same realizations, generally speaking. In the example below, <span class="math-container">$X$</span> and <span class="math-container">$Y$</span> are identically distributed: <span class="math-container">$\sim N(0,1)$</span>.
<b... | The key here is the difference between "identical variables" and "identically distributed variables". For a non-statistical example, imagine a factory making a particular model of car. Even if the manufacturing and assembly process remains identical (the same distribution), there will still be varia... | https://stats.stackexchange.com |
345,178 | [
"https://physics.stackexchange.com/questions/345178",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/162432/"
] | It is my understanding that in quantum mechanics energy comes in discrete pieces - quanta, and in order for these quanta to be absorbed by some process it must match the energy required for it.
Now imagine, for example, that I hit an isolated table and transmitted to it 10 units of energy. That energy will make the ta... | The image distance is where the image achieves maximum focus. If the object is a point source of light and the lens is ideal, then the image will be a point at the image distance. Putting a screen at any other distance will create a larger circle, which is a blurry image of the point.
| Image distance is the distance of the image from the geometric centre or optic centre of the lens on the principal axis, measured along the principal axis.
Similarly, object distance is the distance of the object from the geometric centre or optic centre of the lens on the principal axis, measured along the principal ... | https://physics.stackexchange.com |
480,348 | [
"https://physics.stackexchange.com/questions/480348",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/154137/"
] | Suppose force is applied on an object at an angle theta and the block moves for some distance along x axis
I understand that we take <code>x component</code> of <code>force</code> which is <code>Force cos theta</code> and multiply it with <code>displacement vector</code>. Why are we ignoring the <code>y component</cod... | You are correct in answering most of your own questions. The Work done by the force on the object is equal to the component of the force that is tangent to the trajectory, i.e. along the path of motion. This turns out to be equal to dot(F, dx) where both inputs are vectors. This definition holds even for curved path... | It is just the matter of definition that work is defined as the scalar product of force and displacement.
In the second part of your question the work done would be <strong>F</strong>.d<strong>s</strong>cos( theta - gamma).
| https://physics.stackexchange.com |
434,178 | [
"https://stats.stackexchange.com/questions/434178",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/256892/"
] | I am using doing a binary classification to classify things 0 or 1 using a set of features with LightGBM and XGBoost. Both models give <code>AUC</code> scores roughly in the <code>0.85s</code>, which seems good. But the <span class="math-container">$RMSE$</span> is around 0.32, which is too high, and a negative <span c... | I think AUC is more acceptable for binary classifiers. I personally prefer Gini, which is simply just a restatement of the AUC. Gini goes between 0 and 1, whereas AUC goes between 0.5 and 1. RMSE is more acceptable when the target variable is continuous. For example, if you were validating a linear model in-sample thro... | The ROC-AUC has a number of nice statistical properties and is a good metric for binary outcomes. This is what I use most of the time unless there is a huge class imbalance in which case it is the PR curve.
I think you have probabilistic outcomes so people use the Brier score or log likelihood for assessing performanc... | https://stats.stackexchange.com |
492,736 | [
"https://electronics.stackexchange.com/questions/492736",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/249087/"
] | Several of my devices with 3.5mm jacks make unreliable connections. The sound will cut out when the plug is wiggled slightly, or one ear will not have sound at all, or the sound will "cancel" in a way that seems to remove center panned audio but keep left- and right-panned audio. It seems to be a function of the jack a... | Short answer is, it can't run anything else if the interrups keep interrupting the normal execution flow. There are MCUs that run main code for one or two opcodes before accepting a new interrupt, and there are MCUs that don't exit the interrupt context at all if next interrupt is pending.
Executing and returning from... | Yes, the CPU time required to process the ADC samples must be less than the time it takes to collect the samples. Otherwise the CPU will lose/drop samples because it is too busy processing previous samples.
However, the CPU does not typically retrieve each sample from the ADC. Typically the DMA controller is configu... | https://electronics.stackexchange.com |
1,968 | [
"https://security.stackexchange.com/questions/1968",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/953/"
] | What are some ways to mitigate the time-of-check-to-time-of-use issues that apply to Windows permissions?
Example:
<ol>
<li>End-user is added to the local Administrators group in order to install software, printers, etc.</li>
<li>The user's account is removed from the Administrators group while the user is logged in.... | Fix Windows (or your own applications, where applicable - in your example you'd need to fix Windows). The TOCTOU vulnerability can only be addressed by not separating checking from use. A far more common example in applications I've seen: temporary files (yes, people still get this one wrong). Just because a file doesn... | Without actually answering the declared question, I want to address your given example - because I think you're actually just trying to solve that issue, and not the generic issue.
Once you grant administrative privileges to a user - it's done with, you aint never getting them away again.<br>
As you say, the user ca... | https://security.stackexchange.com |
124,514 | [
"https://softwareengineering.stackexchange.com/questions/124514",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/39205/"
] | I'm writing a class that draws a very complex image, with multiple parts. I also plan on adding to the class to add more functionality. Would it be right to make a function for each part, even if that function will only EVER be called in the render function? I see an upside to this since it will be easier to read the c... | Nope, breaking down complex methods into a sequence of smaller, private methods is perfectly good design and improves maintainability, if the new methods have descriptive names.
| Definitely break it up! Break your steps into logical parts. This makes the code much easier to troubleshot, especially when you are employing unit tests, which itself will save you loads of troubleshooting time in the long run.
| https://softwareengineering.stackexchange.com |
414,519 | [
"https://softwareengineering.stackexchange.com/questions/414519",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/350019/"
] | I have .NET Core WebApi application with JWT token for authorization. I also have roles and permissions.
To make it more flexible for end user, I decided to make permissions like this:
<pre><code>[Authorize(Policy = "HasAccessToThisMethod")]
[Route("someMethod/{id}")]
[ProducesResponseType(typeof(in... | Thanks for suggestions. I ended up removing frontend related permissions from token, keeping only backend permissions, and it's working fine. Later I'll probably add friendly names and use abbreviations, as @Dom suggested.
| It sounds like you have a lot of permissions, and maybe those permissions have very long names. One way of reducing the overall token size would be to <em>severely</em> abbreviate them, and add a static class of constants to make them humanly readable.
eg.
<pre><code>public static class Permissions
{
public const s... | https://softwareengineering.stackexchange.com |
10,853 | [
"https://chemistry.stackexchange.com/questions/10853",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/5542/"
] | I learnt that given a reaction: $$\ce{A -> B}$$ the enthalpy change is given by:
$$\Delta H = \left( \begin{array}{c} \text{total enthalpy of}\\ \text{bonds broken}\end{array}\right)-\left( \begin{array}{c} \text{total enthalpy of}\\ \text{bonds made}\end{array}\right)$$
By convention, we keep the minus sign in th... | Yes. The two methods are equivalent.
You can try this with the dimerization of $\ce{NO_2}$ into $\ce{N_2O_4}$. In this reaction we form one $\ce{N-N}$ bond. Every other bond stays the same.
$\ce{2NO_2 <=> N_2O_4}$
If we calculate the enthalpy of the reaction through bond energies, we get the negative of the ... | Given the reaction $\ce{A -> B}$ you know that $\ce{A}$ and $\ce{B}$ must have the same atomic composition, i.e. they consist of the same number of atoms for each element, because if this wasn't the case there would be other reactants or products in the reaction equation (the reaction is some sort of rearrangement).... | https://chemistry.stackexchange.com |
51,933 | [
"https://softwareengineering.stackexchange.com/questions/51933",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/18431/"
] | Let's assume the situation where a team of four developers is building an application. During the testing phase, bugs are reported by users. Who should fix them? The person who committed the erroneous code, or anyone who is free?
What is preferred approach in agile development (scrum)?
| The preferred approach in agile development would be to get them fixed as quickly as possible, by whomever is available. This is simply because the ownership of the code does not fall to any one person, but to the entire developer group. If one individual is consistently causing bugs, that is another issue that needs... | By default the person. The reason is quite simple: feedback. Bugs provide a great opportunity for personal and professional feedback. If someone else fixed my bugs, I would make the same mistake again, because I wouldn't learn from it.
If that person is not available, somebody else can fix it, but the person should fo... | https://softwareengineering.stackexchange.com |
251,049 | [
"https://electronics.stackexchange.com/questions/251049",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/110797/"
] | I took apart a Kenmore microwave in order to salvage the magnetron, transformer, and the HV capacitor. The transformers, HV capacitor, and the magnetron from the microwave are intact. Is it possible to make the magnetron work without the microcomputer panel?
| Unfortunately, it <em>is</em> possible to make the magnetron work outside the oven, but as the comments have said, this is a <strong>really bad</strong> idea. Do not fire up a magnetron after removing it from an oven.
You recall what a microwave oven is designed to do? Heat food! Do you know what you are? A big bag of ... | Just DON'T. I was a radar technician in the Navy and was once shocked by a home microwave magnetron. I will refrain from using my Navy speak as to how it felt but will say it HURT and my vocabulary was laced with salty language. I had someone rush me for an EEG or EKG or something in case there was damage. I didn't wan... | https://electronics.stackexchange.com |
65,095 | [
"https://stats.stackexchange.com/questions/65095",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/28311/"
] | In documentation to <code>glm</code> I read: "<em>For binomial and quasibinomial families the response can also be specified as a factor (when the first level denotes failure and all others success)</em>" Does it mean that probability of failure or success is being modeled?
I'm trying to apply simple logistic model t... | The probability of 'success' is what's being modelled, in <code>glm</code> & in a fairly common terminology: though it really doesn't matter; you get equivalent models however you code the different levels of the response (the coefficients simply switch sign).
In any case, the way you've set it up in your example ... | Which level of a two-level dependent variable is called "success" and which is "failure" is fairly arbitrary, from the point of view of the statistics. From your code, it is clear you had the success/failure variable coded as 2 = bad and 1 = good. You could just as easily have coded it 2 = good and 1 = bad. Then it wou... | https://stats.stackexchange.com |
148,093 | [
"https://softwareengineering.stackexchange.com/questions/148093",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/47546/"
] | I've been programming C++ for almost a year, and I've written complex programs however there are a couple of programming features of C++ which I didn't cover up (Classes & pointers), however I felt ready to develop a desktop application. I didn't get any books nor did I find any REAL documentation. I said to myself... | C++/CLI is very bad and not useful, for anything except interop, and has little to do with C++.
Just to note, classes are the single most important thing in C++. If you can't use classes, you can only write tiny little toy programs.
| Yes, you should hit the books. And start with C++ books that cover classes and pointers. Make sure you know these topics well. Then you will want to go for an introductory Microsoft Visual C++ book. Practice is important, but if you don't know what you're doing, practice won't get you anywhere.
| https://softwareengineering.stackexchange.com |
766,869 | [
"https://math.stackexchange.com/questions/766869",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/104919/"
] | Given three non-negative (as pointed out by Calvin Lin) real numbers $x+y+z = 3$, find the maximum value of $\sqrt{2x + 13} + \sqrt[3]{3y+5} + \sqrt[4]{8z+12}$.
(Source : Singapore Math Olympiad 2012, Senior section, Round 1, question 29).
I tried using the fact that $2x +13, 8z + 12\ge 0$ to deduce that $y \le 11$, ... | \begin{align*}&\sqrt{\dfrac{2x+13}{4}}\cdot\sqrt{4}+\sqrt[3]{\dfrac{3y+5}{4}}\cdot\sqrt[3]{2}\cdot\sqrt[3]{2}+\sqrt[4]{\dfrac{8z+12}{8}}\cdot\sqrt[4]{2}\cdot\sqrt[4]{2}\cdot\sqrt[4]{2}\\
&\le\dfrac{\dfrac{2x+13}{4}+4}{2}+\dfrac{\dfrac{3y+5}{4}+2+2}{3}+\dfrac{\dfrac{8z+12}{8}+2+2+2}{4}\\
&=\dfrac{1}{4}(x+y+z... | If $y$ is allowed to be negative, then there is no maximum.
Take $ x =k - \frac{13}{2}$, $ y = -k - \frac{5}{3}$, $ z= 3 + \frac{13}{2} + \frac{5}{3}$
The important part of the value looks like $ \sqrt{2k} + \sqrt[3]{-3k} + C$, which tends to infinity as $k\rightarrow \infty$.
<hr>
Otherwise, if $y$ is positive, se... | https://math.stackexchange.com |
179,094 | [
"https://mathoverflow.net/questions/179094",
"https://mathoverflow.net",
"https://mathoverflow.net/users/48827/"
] | Given von Neumann equation
$$\frac{d}{dt} \rho(t) = -i [H, \rho(t)] = -i e^{-iHt}[H, \rho(0)]e^{iHt}.$$
If we know that $[H, \rho(0)] \neq 0$, how do we prove that the solution will fluctuate forever. (stabilization means the fluctuation approaching to zero, but the derivative can still be large, so here, we want to ... | You don't need your variety, say $X$, to be Fano, only $\mathrm{Pic}(X)=\mathbb{Z}$. A pseudo-automorphism $u$ of $X$ induces an automorphism of $\mathrm{Pic}(X)$, which must be the identity. Let $L$ be a very ample line bundle on $X$; since $u^*L\cong L$, $u$ induces an automorphism of $H^0(X,L)$ (here you use Hart... | This is also true for every smooth Fano variety $X$, with any Picard number. One can see it using Mori dream spaces: $X$ is a Mori dream space (by BCHM), and hence has (up to isomorphisms) only finitely many "small $\mathbb{Q}$-factorial modifications" (SQM) = $f\colon X$-->$Y$ birational, isomorphism in codimension on... | https://mathoverflow.net |
15,934 | [
"https://physics.stackexchange.com/questions/15934",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/1093/"
] | In a table fan, the blades move around in circular way and we feel air/wind when sitting on front of it. How does this happen?
| The blades are at an angle. As the blade moves down it hits an air molecule and the air molecule "bounces off" toward you.<br>
It's just like hitting a ball in tennis/baseball
| Due to the rotational motion of the blades a pressure variation is created and the air blows.
| https://physics.stackexchange.com |
444,082 | [
"https://softwareengineering.stackexchange.com/questions/444082",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/427223/"
] | I am working on a project to stand up a central database to replace a current massive file-sharing/syncing system of physical log files and text configurations for the primary application I work on.
The app I help develop runs on around 40 computers, each of which can generate hundreds of records per minute while activ... | The problem you will have with any solution, ie queues, is what happens when <em>that</em> is unavailable.
You need to return errors to whatever is pushing the messages when you can't process them. You also need to think what else might not work if you have lost connectivity.
In terms of logging that means the log shou... | Rather than a fall-back system when an error is detected, you should
have a failsafe procedure that runs all the time. Build a persistent,
local queue of transactions to be posted, with a separate process to
post, verify, and remove items from the local queue. Something like
sqlite would be a good choice as the loc... | https://softwareengineering.stackexchange.com |
48,216 | [
"https://engineering.stackexchange.com/questions/48216",
"https://engineering.stackexchange.com",
"https://engineering.stackexchange.com/users/35767/"
] | If I were to make a sculpture out of Gallium, Ga melts at about 85 °F I think, would I be able to spray it with some sort of solvent based or not solvent based coating to help prevent it from breaking or heating up when holding it?
| What you're asking for is a perfect insulator. There is no perfect insulator, let alone a thin film liquid kind. If ambient temperature is even on iota higher than the melting temperature, eventually it will reach that and melt.
If the magic spray you're looking for existed you could make ice cubes that would never mel... | It's unlikely that you'll be able to find a coating of any sort that insulates the item from thermal changes as a result of holding it.
How does one prevent an element from melting at 85 °F? Enclose it in a cooling chamber, perhaps a Peltier effect device providing lower temperatures within the transparent cylinder.
| https://engineering.stackexchange.com |
235,268 | [
"https://physics.stackexchange.com/questions/235268",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/87129/"
] | I really cannot understand this: I know through reading that unlike electric potential energy, which is charge dependent, the electric potential is purely location dependent. For example: If at a point, the electric potential is $5V$, then $1C$ of charge will have $5J$ of energy, and $10C$ of charge will have $50J$ of ... | <strong>About the first question</strong>: The potential is created by the charges themselves and is found from their spatial distribution. It does not mean anything to say charges loose potential even though their energy can be deduced from the it. Moreover, The potential can be found by solving Poisson equation as il... | Second question answered first: in context of physics or electrical engineering, a <em>battery</em> is <strong>modeled</strong> as something that provides a voltage difference, a difference in electrical potential, that can keep that voltage (nearly) no matter what you do to it.
So, some charge traveling (== some cur... | https://physics.stackexchange.com |
58,392 | [
"https://stats.stackexchange.com/questions/58392",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/25344/"
] | I have incomplete regression output subsisting of the sample size, the standard error of the regression coefficient, and the p-value for two variables in a regression model. Can I determine what the regression coefficients are? Can I infer which coefficient indicates a larger value for the regression coefficient?
| If the p-values come from a two-tailed test, then you're out of luck. There's no way to determine whether a certain $\hat{\beta}_2$ having a very small p-value relative to $\hat{\beta}_1$ having the same standard errors indicates that it's a very large positive slope or a very large negative slope. However, since the i... | I'm going to cover how the p-value is calculated first, then how to work backwards from the p-value.
The t-statistic used to compute a p-value for a regression coefficient is $t= {\beta \over SE}$<br>
Then the usually reported p-value is calculated from $|t|$ and a t-distribution with $n-k$ degrees of freedom, $n$ be... | https://stats.stackexchange.com |
17,134 | [
"https://physics.stackexchange.com/questions/17134",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/6193/"
] | Does it make sense to talk of the inertial mass of a scalar field? By the equivalence principle, it must be equal to its gravitational mass. We know that the scalar field contributes towards the stress-energy tensor, so, shouldn't it have an inertial mass too?
| Yes, of course, if you produce a localized concentration of energy carried by a scalar field, it exhibits all the properties that this total energy $E=mc^2$ should exhibit.
It will enter the right hand side of Einstein's equations so it will curve the surrounding spacetime and create a gravitational field. It will be... | Yes, indeed
This is exactly why it is assumed in the Standard Model that mass is the result of an interaction with a <strong>scalar</strong> "world potential" (The Higgs field) while for instance the changes in energy/momentum of a charge are due to the electromagnetic <strong>vector</strong> potential $A^\mu$
Regard... | https://physics.stackexchange.com |
167,233 | [
"https://electronics.stackexchange.com/questions/167233",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/69856/"
] | Does anyone have the datasheet for this display there is no serial number or Ebay link. A student came to me with this 4 digit 7 segment LED, there are 12 pins in one side, and nothing on the other side. Model number is, WP02841MGA.
<img src="https://i.stack.imgur.com/oeW4c.jpg" alt="7" />
| after testing, this is the result :) thanks everyone - if someone have problem just use this
always the (-) is the first number
<img src="https://i.stack.imgur.com/2FRXm.png" alt="led">
| If you just want the pinout, poke around with a 5V supply with a 1k resistor in series and in minutes you'll have it.
With 12 pins it's a multiplexed display with at least four commons. Could be common anode or common cathode, some of the positions (colon, some or all decimal points) may not be populated.
| https://electronics.stackexchange.com |
212,295 | [
"https://stats.stackexchange.com/questions/212295",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/53820/"
] | I have two questions:
<ol>
<li>Why test $u_t$ (see below) for stationarity instead of any other linear combination? </li>
<li>And to confirm, if $u_t$ is not stationary does it mean that $x_t$ and $y_t$ are not cointegrated?</li>
</ol>
If $x_t$ and $y_t$ are cointegrated, then there exists a linear combination of the... | <blockquote>
Purpose of the first step in Engle-Granger cointegration test
</blockquote>
...is to find <strong>a</strong> stationary combination of the integrated variables at hand. If there are just two variables, then it will be <strong>the</strong> stationary combination as it must be unique.
<blockquote>
Why ... | These are two different hypotheses:
<ol>
<li>$y$ and $x$ are cointegrated for any vector (hence estimate vector $(1, -\beta)$</li>
<li>$y$ and $x$ are cointegrated for the vector $(1,-1)$</li>
</ol>
Usually, you would start with the first, and if you find cointegration, you could then test if $\beta=1$
| https://stats.stackexchange.com |
2,993,160 | [
"https://math.stackexchange.com/questions/2993160",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/583851/"
] | <blockquote>
Solve for x, <span class="math-container">$$x^3-x-6=0\tag1$$</span>
</blockquote>
let <span class="math-container">$x=y-2$</span>
<span class="math-container">$$(y-2)^3-(y-2)-6=0\tag2$$</span>
<span class="math-container">$$y^3-6y^2+11y-12=0\tag3$$</span>
let <span class="math-container">$x=y+3$</span... | Guess the solution <span class="math-container">$x = 2$</span> by using the Rational Root Theorem. By synthetic division, we have
<span class="math-container">$$x^{3} - x - 6 = (x - 2)(x^{2} + 2x + 3)$$</span>
Using the quadratic equation on the second equation, we obtain the solution set
<span class="math-container... | You can try with candidates for integer roots, that are <span class="math-container">$\pm1,\pm2,\pm3$</span> and <span class="math-container">$\pm 6$</span>. If non of them works then you still have the Cardano formulas.
| https://math.stackexchange.com |
609,628 | [
"https://electronics.stackexchange.com/questions/609628",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/308042/"
] | I am working on a kind of voltage meter which will be able to measure positive and negative voltages and will have 2 ranges connected to 2 separate pins of STM32. My problem is that at the most negative voltage being measured, the voltage applied to the lower range pin on the STM32 will be negative (at this point the M... | Some pins tolerate 5mA negative injection (clamp current). Some pins don't. Voltage can go 0.3V negative.
Putting a 1k resistor to -3V would only mean approximately 2.7mA would flow, but any circuit that is designed to operate intentionally and constantly through internal protection structures is just a poor design.
| MCU pins have <strong>source and sink current specs</strong>, which you can find in datasheet of the specific MCU.
If you connect it the way you want, I don't think anything good will come out of it, because when you make GPIO output LOW on some pin (0V), you effectively turn on an N-MOSFET from that pin to GND. So if ... | https://electronics.stackexchange.com |
546,524 | [
"https://math.stackexchange.com/questions/546524",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/37598/"
] | There are two independent normal random variables $N_1, N_2$ with means $\mu_1, \mu_2$ and variances $\sigma_1^2, \sigma_2^2$ respectively.
Is there a way to compute the two conditional expressions
$$ \mathbf{E}[ N_1 \mid N_1 > N_2 ] $$
$$ \mathbf{Var}[ N_1 \mid N_1 > N_2 ] $$
by rewriting them in the form of ... | Let us start with some simple cases.
<strong>First case:</strong> Assume that $Z$ is normal $(\mu,\sigma^2)$, then $Z=\mu+\sigma U$ where $U$ is standard normal hence $E[Z\mid Z\gt0]=\mu+\sigma E[U\mid U\gt-\mu/\sigma]$. Furthermore, since $U$ is standard normal, for every $u$, $P[U\gt-u]=P[U\lt u]=\Phi(u)$ and
$$
E[... | Use the independent decompostion: $N_1 = \frac{\sigma_1^2}{\sigma_1^2+\sigma_2^2}(N_1 - N_2) +\frac{\sigma_2^2}{\sigma1^2+\sigma_2^2}N_1 + \frac{\sigma_1^2}{\sigma1^2+\sigma_2^2}N_2$.
Note that $Cov(N_1 - N_2, \frac{\sigma_2^2}{\sigma1^2+\sigma_2^2}N_1 + \frac{\sigma_1^2}{\sigma1^2+\sigma_2^2}N_2) = 0$, since combined... | https://math.stackexchange.com |
59,524 | [
"https://mechanics.stackexchange.com/questions/59524",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/19901/"
] | Just a quick question to ensure that everything is correct:
On my 2009 Opel Astra I want to do a preemptive steering fluid replacement as the original fluid is quite old and is becoming dark. At the moment I do not have steering issues, but I was told that dark steering fluid indicates a stale fluid, causing excessive... | Go for it, you should be at least 50:50 to new V. old and most likely better.
If you check a decent workshop manual it may say the total capacity for power steering fluid, in which case you will be able to know for sure.
Either way, it can only help.
| What you're suggesting should work well enough.
While I get your want to not do a <em>complete</em> purge of the power steering system, you could do one more simple thing which would probably get your car to about 80-85% of the fluid changed out. If you jack the car up and put it on jack stands (supporting the front e... | https://mechanics.stackexchange.com |
299,854 | [
"https://physics.stackexchange.com/questions/299854",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/109193/"
] | I'm trying to deduce eikonal equation from Fermat's principle through variational calculus (namely, applying Euler-Lagrange equations)
<span class="math-container">$$\delta L=\delta\int_{t_{1}}^{t_{2}}n(x(s), y(s), z(s)) ds =0 \iff \dfrac{d}{ds}\left(\dfrac{\partial n}{\partial \dot{x} } \right)-\dfrac{\partial n}{\pa... | I'm thinking that you have to get a lot clearer on what you mean.
Let me define an abstract coordinate $p \in (0, 1)$ that traces in some sense "how far" an object has gone from the starting point to the ending point, then the paths we're considering have the form $\vec r(p).$ We know that the medium has an index $n(\... | Define <span class="math-container">$$L(\mathbf r, \dot{\mathbf r}) = n(\mathbf r(s))\sqrt{\dot{\mathbf r}(s)\cdot\dot{\mathbf r}(s)}$$</span> satisfying <span class="math-container">$\mathrm ds^2 = \mathrm d\mathbf r\cdot \mathrm d\mathbf r$</span>
Now, define <span class="math-container">$$I = \int_{s_1}^{s_2}L ~\mat... | https://physics.stackexchange.com |
14,213 | [
"https://electronics.stackexchange.com/questions/14213",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/4229/"
] | Important note: You are not helping me do my homework. This is for a competition for engineering students, that encourages you to "use your network" ;)
I've got this pattern for a frequency divider that divides the clock by 5. It's supposed to have one major problem, but I can't seem to figure out exactly what it is.
... | <blockquote>
It's supposed to have one major problem
</blockquote>
The one possible problem that jumps out at me is glitch prevention. Your output is a clock signal, so it would be very sensitive to extra edges. But it is a combinational output, so it can be prone to glitches.
Just as an example, let's say you had ... | I'd suggest starting with a divide-by-five counter, one of whose bits is high for two counts and low for three. For example:
<pre>
Q0 := !Q1 & !Q2;
Q1 := Q0;
Q2 := Q1;
</pre>
This counter will go through the sequence: 000 001 011 110 100 (a value of 101 will reach a valid state after two clocks; 010 or 111 will reac... | https://electronics.stackexchange.com |
290,611 | [
"https://physics.stackexchange.com/questions/290611",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/76595/"
] | <strong>Take the Heisenberg's indeterminism law:</strong>
$$\Delta \chi \cdot \Delta \rho \geq h/ 2$$
Does the momentum pose a limit so that we cannot measure the position with a precision greater than:
$$h / (2\cdot \Delta \rho)$$
where $\Delta \rho$ is at maximum $mc$?
<ul>
<li>$m$ is mass of particle</li>
<li>$... | You're making a simple matter complex. It's simply stated that average of each velocity component of the gas molecules are same with no preference to one component over the other. If you turn the gas container upside down all velocity components are on average same in equilibrium. I.E. $$\langle v_x\rangle =\langle v_y... | The author is saying that, $v^2 = v_x^2 + v_y^2 +v_z^2$, and because the velocities are random, then $\langle v_x^2 \rangle = \langle v_y^2 \rangle = \langle v_z^2 \rangle$, and thus, $$v^2 = 3 \langle v_x^2 \rangle,$$ where the angled brackets denote averages.
The averages can be interpreted both as ensemble (over th... | https://physics.stackexchange.com |
3,692 | [
"https://astronomy.stackexchange.com/questions/3692",
"https://astronomy.stackexchange.com",
"https://astronomy.stackexchange.com/users/1842/"
] | Is Mars visible at night sky of Michigan these days?
I was trying to search for Mars from Michigan (at elevation of 30 deg and azimuth of 220 deg) around 11:45 PM with binoculars of 20x60 but didn't get successful.
| On 16 June 2014 at 11:45pm, it was up not far from 220az 30alt. It was actually 232az, 27alt, almost level and to the right of Spica. It would have been easily seen without binoculars being -0.2 visual magnitude.
You can answer this sort of question yourself by getting a planetarium app like Stellarium, The Sky X, Sk... | Yes, it is. Mars is bright (-0.14 magnitude) and is in the constellation Virgo. It's the brightest star in this region of the sky (SW during the evening) and should appear as a very bright reddish star at a good altitude.
If you need a guide, try to find Leo (W). Virgo is at the left of the constellation.
| https://astronomy.stackexchange.com |
226,596 | [
"https://math.stackexchange.com/questions/226596",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/28251/"
] | <em><strong>Given the following example:</em></strong>
Obtain the Sum of the series
$$\frac{1}{(2)(4)}+\frac{1}{(4)(6)}+\frac{1}{(6)(8)}+...+\frac{1}{(2n)2(n+1)}=\sum_{k=1}^n{\frac{1}{4k(k+1)}}=\frac{1}{4}\sum_{k=1}^n{\frac{1}{k(k+1)}}$$
<strong>Solution</strong>: Resolve
$$\frac{1}{k(k+1)}$$
into partial fractions ... | $$\cos\dfrac{(x-2)\pi}{4x^2 -4x + 2}=\sin\dfrac{(x+1)\pi}{4x^2 -4x + 2} =\cos\left( \frac \pi 2-\frac{(x+1)\pi}{4x^2 -4x + 2}\right)$$
So, $$\frac{(x-2)\pi}{4x^2 -4x + 2}=2n\pi\pm \left( \frac \pi 2-\frac{(x+1)\pi}{4x^2 -4x + 2}\right)$$ where $n$ is any integer as $\cos A=\cos B\implies A=2n\pi\pm B$
Multiplying ei... | Your approach is fine. You write
$$\sin\left(\frac{(x+1)\pi}{4x^2 -4x + 2}\right) = \cos\left(\frac{(x-2)\pi}{4x^2 -4x + 2}\right)$$
convert to $\sin$ as you suggested
$$\sin\left(\frac{(x+1)\pi}{4x^2 -4x + 2}\right) = \sin\left(\frac{\pi}{2} - \frac{(x-2)\pi}{4x^2 -4x + 2}\right)$$
Taking $\arcsin$ over all branches
$... | https://math.stackexchange.com |
806 | [
"https://security.stackexchange.com/questions/806",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/140/"
] | For those of you who have worked with commercial secure code review tools such as:
<ul>
<li>Klocwork</li>
<li>Coverity</li>
<li>Armorize</li>
<li>Fortify</li>
<li>Checkmarx</li>
<li>Appscan Source Edition (formerly
Ounce)</li>
</ul>
Or perhaps a free or open-source equivalent such as:
<ul>
<li>CAT.NET</li>
<li>FindB... | Not much of an answer, but I would say it depends more on the feature-set of each product, and the usablity of each interface.<br>
E.g. Fortify's IDE plugin, fatapp, and webapp are not equivalent in supported features. Even more, Fortify's Eclipse plugin is not equivalent to their own VisualStudio plugin!
In princi... | Both are necessary to choose one over the other depends on the development lifecycle approach:
For instance, typically in a Scrum project, the IDE based ones makes more sense as you can add a backlog item asking for scanning code once per sprint or even once per day and that would be highly useful.
On the other hand i... | https://security.stackexchange.com |
135,691 | [
"https://stats.stackexchange.com/questions/135691",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/67822/"
] | I am trying to figure out what test I should use in the following scenario: I know that there is a lot of room for improvement in a specific area at work - being extremely critical, let's say that sampling $52$ observations, $31$ could be improved. After instituting an improvement / QA program for six months, let me as... | You state that you have read the chi-squared test should be used when "the total number of observations is too high". I have never heard this. I don't believe it is true, although it is hard to say, since "too high" is quite vague. There is a standard recommendation not to use the chi-squared test when there are any... | I think what the OP is observing is that using the Clopper-Pearson method for calculating exact binomial probabilities can be done for very large in this age of fast computing, whereas in the past when the sample size got large, it was easier to use a normal approximation which would be pretty accurate with or without... | https://stats.stackexchange.com |
195,309 | [
"https://physics.stackexchange.com/questions/195309",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/86496/"
] | Tension, for me, is a tricky thing.
After finishing a related chapter of my book and watching a video, I still can't get a hang of it.
Here is a situation:
<img src="https://i.stack.imgur.com/AdZmN.jpg" alt="enter image description here">
My knowledge is that tension, just like normal force, happens in just the sam... | We treat the string/rope like another object. This object exerts forces on other objects such as the hanging mass (in your picture). However, a string, by its very nature, can never "push" another object, it can only "pull" another object. That "pull" is a force which we give the name tension.
Thus, tension will poin... | Tension is an internal force in a body, such as a rope, that resists any attempt to pull the rope apart. Simply, tension arises due to intermolecular interactions, and if it did not exist, ropes would fall apart the moment you pull on them.
Now, it is necessary to distinguish between internal and external forces for a... | https://physics.stackexchange.com |
3,519,994 | [
"https://math.stackexchange.com/questions/3519994",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/704928/"
] | <strong>Assignment Statement</strong>
given
<span class="math-container">$$ y^{\prime} + p(t)y = q(t) $$</span>
a general linear equation where <span class="math-container">$q(t)$</span> is not zero everywhere,
I'm asked to find <span class="math-container">$C(t)$</span> form
<span class="math-container">$$ C^{\pr... | I assume the metric is Euclidean metric.
<blockquote>
for 3rd one
</blockquote>
A point <span class="math-container">$a\in \mathbb R$</span> is an accumulation point of <span class="math-container">$X$</span> if for all <span class="math-container">$r\gt 0, \{B(a,r)-\{a\}\}\cap X\neq \emptyset$</span>.
Let <span ... | The sequence <span class="math-container">$\{ 1/n\}_1^\infty $</span> converges to <span class="math-container">$0$</span> so every neighborhood of <span class="math-container">$0$</span> contains infinitely many points of the sequence, so <span class="math-container">$0$</span> is a limit point.
<span class="math-co... | https://math.stackexchange.com |
289,704 | [
"https://physics.stackexchange.com/questions/289704",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/115337/"
] | The mechanical advantage is given by MA = Load/Effort which is quite universal (at least in my short experience with them). However when i reviewed over the mechanical advantage of simple machines, especially levers , the formula for mechanical advantage stunned me, instead of
MA = Distance of Fulcrum to Load / Dista... | It all starts from a consideration of work done by the effort (effort $(E)\;\times$ distance moved by effort $(e)$ ) and the work done on the load (load $(L)$ $\times$ distance moved by load ($l)$).
These two quantities are related by the efficiency of the machine
$\eta = \dfrac {\text{work done on load }}{\text{wor... | According to principle of moments(in levers)
anticlockwise moments =clockwise moments
Therefore
(Effort) <em>(Effort arm)= (Load)</em> (Load arm)
now
MA=(Load)/ (Effort)
(Load)/ (Effort)=(Effort arm)/(Load arm)
Therefore
MA=(Effort arm)/(Load arm)
| https://physics.stackexchange.com |
3,620 | [
"https://scicomp.stackexchange.com/questions/3620",
"https://scicomp.stackexchange.com",
"https://scicomp.stackexchange.com/users/1611/"
] | I am a bit confused of the qualitative behavior of the two methods. Consider quadratic case, start by having points $x_i$, where I know the value and points $y_j$, where the values to be found. If I want to do Lagrange interpolation at any point $y_j$, I find three points from $x_i$ with values close by and fit the par... | The convergence order is the same. My gut feeling is that the magnitude of the error is going to be larger for the Hermite interpolation than for Lagrange interpolation, but the real reason why one would use the former is that you get an interpolation that is $C^1$, i.e., that is continuously differentiable. On the oth... | Cubic Hermite interpolation requires different data (function value and derivative at two end points) than quadratic polynomial fit (three function values). Also, cubic Hermite interpolation fits a cubic to 4 dof, hence is order $O(h^4)$, while a quadratic polynomial fits 3 dof only, hence is order $O(h^3)$.
If a cub... | https://scicomp.stackexchange.com |
334,728 | [
"https://softwareengineering.stackexchange.com/questions/334728",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/251646/"
] | Let's say you have three development branches going at once (dev 1, dev 2, dev 3), each branch working on different features for a given software product.
If I understand continuous integration correctly, these development lines would each need to constantly check code back in to a shared main line (once it has passed... | Further to Vlad, you would set up testing environment(s) for each branch. CI would then be configured to push changes made to branch A to Test A and Branch B to Test B.
A branch can contain between 1 and n features. The fewer you have in a branch, the less impact if it slips.
The changes stay in their branches unti... | This statement is wrong: "development lines would each need to constantly check code back in to a shared main line". The very reason to introduce branches is to not merge unstable code to main. Why do you actually need three dev branches if you are merging to main right away?
CI does not push you to sacrifice quality ... | https://softwareengineering.stackexchange.com |
207,758 | [
"https://dba.stackexchange.com/questions/207758",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/152069/"
] | I am using XAMPP. I simply tired this <code>begin..end</code> -
<pre><code>CREATE PROCEDURE dowhile()
BEGIN
DECLARE v1 INT DEFAULT 5;
WHILE v1 > 0 DO
SET v1 = v1 - 1;
END WHILE;
END;
</code></pre>
statement and got error. This happens with every <code>begin..end</code> or <code>while</code> that I try. ... | While creating procedure, function or another compound statement consisted from more than 1 command, You <strong>MUST</strong> use <code>DELIMITER</code> statement.
The reason is simple - command to create procedure is one command. But it consists from a lot of common commands. When You enter its code, server has no ... | Here is the code that I currently use. I hope it helps you.
<pre><code>drop procedure if exists _SP;
DELIMITER //
create procedure _SP(
xClave varchar(8)
)
begin
Select 1;
end
//
Delimiter ;
call _SP
</code></pre>
| https://dba.stackexchange.com |
322,002 | [
"https://physics.stackexchange.com/questions/322002",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/97014/"
] | The title basically sums up the question. We know that if I shoot $N$ particles through a double slit then as $N$ gets large I see an interference pattern. Now if I take $N$ experiments and shoot one particle for each experiment and superimpose the outcome do I still see an interference pattern, or does the set up need... | Theoretically, yes, the interference pattern should emerge if you shoot one particle in each of $N$ experiments and then merge the outcomes.
However, It is not practically feasible to conduct thousands, or millions of experiments using one particle each. So, this can not be experimentally verified.
But, what can be ... | The interference pattern emerges due to interference of the two wave fronts that emerge from two slits. Even if you shoot one particle at a time in a single setup, the interference pattern will emerge over time, since the single wave-particle interference with itself when passing through the slits.
Thus, if you have N... | https://physics.stackexchange.com |
120,389 | [
"https://security.stackexchange.com/questions/120389",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/107406/"
] | In usual network applications, that employ password hashing, is the user password hashed on client side before sending it to the server, or is it sent without hashing as encryption of plain text password to the server?
The main question that I have is if an attacker discovers the hashed passwords then why can't they j... | <strong>At least part</strong> of the hashing must occur server-side. Indeed, whatever the client sends to the server grants access, so if that very same value is just stored as-is on the server, then you have the same issues as plaintext password storage, namely that a single read-only glimpse at your server database ... | <h2>How login password hashing is <em>supposed</em> to work</h2>
Note that in all snippets, I am intentionally excluding security features because I want to keep it compact. Do not rely on these code snippets for anything.
<blockquote>
In usual network applications ,that employ password hashing, is the user passwor... | https://security.stackexchange.com |
389,920 | [
"https://softwareengineering.stackexchange.com/questions/389920",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/45101/"
] | Imagine the following situation: <br>
1. Consume a 3rd party WSDL, out comes thousands of classes.<br>
2. There's an opportunity to optimize performance by using a custom paralleled implementation.<br>
3. Wsdl class structure has consistent naming convention: [RecordType][CrudAction]<br>
4. Use Java Reflection to creat... | There are two fundamental things about reflection that can make it bad.
<ul>
<li>Reflection can break protections like private.</li>
<li>Reflection can cause performance problems.</li>
</ul>
These perfectly valid concerns are used by some shops as excuses to swear off ever using reflection. This is wrong. Reflection ... | Basically what it comes down to here is that you are asking is it's a good idea to generate a ton of statically defined classes and then use reflection to avoid referencing them in a static way. Assuming there's no other reason you need these class definitions, it's not clear why you would want to generate classes in ... | https://softwareengineering.stackexchange.com |
19,483 | [
"https://physics.stackexchange.com/questions/19483",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/5885/"
] | A magnet and a coil move relative to each other. In the frame of reference of the magnet, there is a magnetic field and consequently a force acting on the charges in the coil according to the Lorentz force $F=qv\times B$ but there is no net electric field. In the frame of reference of the coil, there is a magnetic fiel... | When the magnet is moving, the electric field of the magnet is doing the work, pushing the current carriers around the wire. When the magnet is still and the wire is moving, the magnetic field produces a force in the current carriers, but this force <em>does no work</em>, it is the constraint force that keeps the elect... | There is no paradox: the two reference frames have different answers to the question "how much work is being done", indeed. It's because "work being done" is nothing else than energy and energy isn't a relativistic invariant; it is the time component of a 4-vector. According to relativity, various quantities are observ... | https://physics.stackexchange.com |
171,436 | [
"https://electronics.stackexchange.com/questions/171436",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/31102/"
] | I need my pads for connectors to be plated so that the pins from the connectors can be soldered. But the bottom side cannot have copper pad/annular ring. I have made the pads as shown in the figure below. Bottom pad size is same as the hole size and the hole is Plated.
Is this the proper way? Will there be risk that t... | Well as comments have said only your fab house can tell you for sure. You should try to keep a close relationship with them as they're basically your partner in all your designs :)
Now this question just happened to come up for me as well a few months ago on a really dense board. I use Via Systems when in the US, a ... | <blockquote>
Will there be risk that the holes will be unplated my the manufacturer?
</blockquote>
Yes. Most PCB plating operations occur after drilling and before etching. A board with copper on both sides drilled for all the holes requiring plating. Then a conductive solution is sprayed (or dipped) such that al... | https://electronics.stackexchange.com |
277,858 | [
"https://physics.stackexchange.com/questions/277858",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/110311/"
] | In various applications where we are dealing with electromagnetic or acoustic waves, such as medical imaging, we use the space $L^2$ or the related Sobolev space $W^{1,2}$. I have never seen a reason given for this. Does anyone know why these spaces are preferred over say $L^1$ spaces?
| In Quantum Mechanics the inner product between two functions $\phi_1$ and $\phi_2$ is given by
$$\langle \phi_1(x) | \phi_2(x) \rangle = \int dx \, \phi_1^*(x) \phi_2(x) \, ,$$
and this inner product has a very special place dedicated to it in the theory. Namely, the equation
$$ \langle \phi_1(x) | \phi_1(x) \rangle... | The two spaces you mentioned initially, differently from the third one, are Hilbert spaces so that one can exploit the spectral theory, i.e., a canonial well-established way to handle mode decomposition methods which are of central relevance for the theory of waves.
Also, second-order hyperbolic equations imply conse... | https://physics.stackexchange.com |
404,198 | [
"https://math.stackexchange.com/questions/404198",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/42339/"
] | Consider a partial function $f : X \rightarrow Y$ where $X$ and $Y$ are topological spaces and $Y$ is Hausdorff. Note that, although the <em>source</em> of $f$ is $X$, the actual <em>domain</em> of $f$ is a (not necessarily proper) subset thereof.
Given this data, we can define a new partial function $f^\lambda : X \r... | You did fine with reflexivity, and with symmetry and antisymmetry.
Now, let's look at transitivity:
We can summarize the relation as follows: $xRy$ if and only if $x$ and $y$ differ by $1$.
So, suppose $xRy$ ($x$ and $y$ differ by one) and $yRz$ ($y$ and $z$ differ by one),
What may be the case about the differen... | To disprove, you only need to find a counter example.
Clearly $R 0 1$ and $R 1 0$ hold, but then it would also have to be the case that $R 0 0$ holds, which is not true.
In general, transitive and symmetric would imply reflexive (on its domain) [which would be a contradiction to $R$ not reflexive for 2, which <em>is<... | https://math.stackexchange.com |
130,868 | [
"https://cs.stackexchange.com/questions/130868",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/127115/"
] | I am working on a problem where you're given <span class="math-container">$n$</span> distinct numbers, and you want to find the number of permutations such that it takes bubble sort at most 1 pass to complete.
e.g., if <code>n=3</code>, then the following permutations would only require 1 pass
<pre><code>1 2 3
1 3 2
... | I'm assuming that a pass of bubble sort on the array <span class="math-container">$A[1],\ldots,A[n]$</span> proceeds as follows:
<ul>
<li>If <span class="math-container">$A[1] > A[2]$</span> then swap <span class="math-container">$A[1]$</span> and <span class="math-container">$A[2]$</span>.</li>
<li>If <span class="... | Bubble sort isn’t completed when the array is sorted - it is completed when we <em>know</em> the array is sorted.
Take the case 1-3-2. We have x-y-z and bubblesort figures out in the first pass that x is less than y and y is greater than z. It doesn’t know how x and z are related and therefore doesn’t know whether the ... | https://cs.stackexchange.com |
90,567 | [
"https://biology.stackexchange.com/questions/90567",
"https://biology.stackexchange.com",
"https://biology.stackexchange.com/users/55734/"
] | I was told in my microbiology course that blood agar can be put in GasPak system (anearobic) to grow strict anaerobes, but why would someone use blood-dependent bacteria in this experiment as these blood-dependent bacteria will be aerobes or at least facultative
| You can put any media in a GasPak or other anaerobic system depending the type of anaerobic growth you are looking for. Sometimes blood is simply added to media to meet nutritional requirements of an organism. I use Columbia Blood agar often as a general purpose anaerobic medium. In a collection of 100+ obligate anaero... | Blood agar is prepared by heating the blood so that there will be lysis of RBC. Blood agar is mostly used to grow pathogenic organisms such as Haemophilus influenzae and Neisseria gonorrhoeae which cannot grow on other media.Neisseria gonorrhoeae can grow in the absence of oxygen. Haemophilus influenzae which is a facu... | https://biology.stackexchange.com |
42,233 | [
"https://mechanics.stackexchange.com/questions/42233",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/15071/"
] | Didn't see this asked from searching but I've always been in debates with whether Loctite should be used on suspension components. To be clear, I'm talking about components that do <strong>not</strong> utilize a cotter pin.
I do look up torque specs on all aftermarket suspension installs and re-torque after 500 mil... | Since there is a need to re-torque the fastener, <em>it doesn't make sense to use Loctite</em>. This is true for two reasons (after the Loctite has set):
<ul>
<li>With the Loctite holding the fastener in place, it will give you a false torque reading. The fastener interface (bolt to nut) will not want to move due to t... | most cars you will never undo that nut again, personal choice, me I use grease and a torque wrench, so the poor buger who gets the car will think of me and smile.
| https://mechanics.stackexchange.com |
12,492 | [
"https://cogsci.stackexchange.com/questions/12492",
"https://cogsci.stackexchange.com",
"https://cogsci.stackexchange.com/users/9121/"
] | I've once watched a movie in which CIA agent went into a room just for a few seconds and on the next day he could recall every detail of that room, including what was on the monitors.
And I am wondering is there a way to improve my memory to this level?
I would also like to know if there are studied ways of accomplis... | You can read book: Trick of the mind - Derren Brown. Derren Brown is a mentalist and in his book you have very powerfull methods to improve your memory based on natural mental processes.
The easiest way for me is to create short story about something, that i want to recall, in the fantasy way - for exemple - i want t... | Your best bet is to start looking on YouTube and the Internet for various memory methods used by card memorizers, magicians, and other stunt people. I have used them extensively, and they work. You can also look on Amazon for books. Tony Buzan, Harry Lorraine, Dominc O'Brien. Also the book Moonwalking with Einstein.... | https://cogsci.stackexchange.com |
34,229 | [
"https://mathoverflow.net/questions/34229",
"https://mathoverflow.net",
"https://mathoverflow.net/users/8047/"
] | In his book "Riemannian Geometry" do Carmo cites the Hopf-Rinow theorem in chapter 7. (theorem 2.8). One of the equivalences there deals with the cover of the manifold using nested sequence of compact subsets. This made me wonder whether the following lemma holds:
<strong>Lemma:</strong> Let $M$ be a compact Hausdorff... | Note: whilst typing this, Martin posted his answer. As I come to a completely different conclusion, I'd be very interested in knowing who's right!
<hr>
False. Let $M = [0,1]$ and $K_i = \{0\} \cup [\frac{1}{i},1]$.
The flaw in the proof is the assumption that the $U_j$ are increasing; ie that $U_j \subseteq U_{j+1... | [I edited this after Andrew's comment!]
$M$ has to carry the <strong>colimit topology</strong> for the lemma to become true. Besides it is well-known and frequently used in, say, homotopy theory. Indeed, it implies for example, that homotopy groups commute with nice filtrations.
Here is a generalization to non-hausdo... | https://mathoverflow.net |
12,360 | [
"https://electronics.stackexchange.com/questions/12360",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/3089/"
] | I have a dewalt 18V cordless drill. I am wondering if it is feasible to build an adapter that can power the drill from a standard US wall socket?
A typical DeWalt drill needs 2.6 amps with no-load. I am assuming this jumps significantly higher under load. Most DeWalt motors have a stall current over 250 amps...
Any i... | It would be possible to build such and adapter. It would depend on the rating of your drills and how you want to plug in the power.
Either way a cordless drill has a DC motor so it will require a step down transformer and a full wave bridge rectifier. Probably also need a regulator and a few capacitors. You mig... | The answer is simple: Don't. If you did, odds are that you'd spend lots of money on high-current step-down transformers or other kind of power supply and run the risk of destroying your cordless drill. Corded drills, new from Home Depot, start at thirty dollars and will have as good or better performance than a $15... | https://electronics.stackexchange.com |
87,442 | [
"https://mechanics.stackexchange.com/questions/87442",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/2618/"
] | This is a very high level, conceptual question: it seems to me like every engine is designed so that pistons are extracted from the top, which requires removing cylinder heads, a huuuge pain in the rear end.
My question is, why aren't they designed to enable extraction through the bottom, after the rods are detached fr... | Well, if you believe the seals are in good shape, there's nothing saying you can't reuse them. However, considering you have it all apart and the seals are relatively cheap considering the amount of time it would take to tear it all apart to replace these specifically, it only makes sense to replace them while you're i... | As inexpensive as those seals are, and as hard as they are to get to, you should absolutely replace them.
Do not reuse them.
| https://mechanics.stackexchange.com |
261,641 | [
"https://physics.stackexchange.com/questions/261641",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/58749/"
] | Would the gravitational energy released in the explosion affect life in any way if it were on a planet close by?
| You would not want to be very close to a black hole merger. Suppose you have two black holes of the same mass $M$ and $m = GM/c^2$. The radius of each black hole is then $r = 2m$, and the horizon area is $A = 4\pi r^2$ $ = 16\pi m^2$. Two constraints are imposed. The first is that the type-D solutions have timelike Kil... | Your question differs from the title, in that an "exploding" black hole happens when the the mass is very tiny and thus the Hawking effect causes an almost instantaneous release of all the remaining mass as energy. This would not have much effect on anything, although if it happened right inside your body the total io... | https://physics.stackexchange.com |
707,586 | [
"https://physics.stackexchange.com/questions/707586",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/-1/"
] | Say you have a metallic sphere that holds a charge <span class="math-container">$Q$</span> uniformly. If we cut the sphere into two equal halves, each half of the sphere will hold a charge of <span class="math-container">$Q/2$</span>. Also, electric charge is quantized. That is, <span class="math-container">$Q=ne$</spa... | <blockquote>
Now, say that the charge on the sphere Q is 3e. What happens when we cut the sphere into two equal halves? What charge will each half hold?
</blockquote>
At the level of electrons the answer is : 2 on one half and 1 on the other, or all three on one side and zero on the other. It is the same problem as if ... | Essentially you are asking to cut an electron in half.
But an electron is an elementary particle. It cannot be so cut.
Theres nothing more to say about this.
| https://physics.stackexchange.com |
109,003 | [
"https://stats.stackexchange.com/questions/109003",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/44969/"
] | This might come as a very trivial thing and way below standards of this group but I am struggling to figure out what do the authors mean when they say that they have used initial level of income in growth regressions? assuming that the first obervation in the sample is 120, is it something like this:<br/>
Year GDP<br/... | I would think the authors meant something like this:
$gdp.growth_{i,t} = \beta_0 + \beta_1 gdp_{i,0} + \beta_2 pop.growth_{i,t} + \beta_3 investment_{i,t} +...$
where $i$ is the index of the country, and $t$ the index of the time period. In this regression you want to assess the effect on $gdp.growth$ of eg. populat... | Your first example sounds right. In the second case all observations after 1991 would typically be dropped from the analysis, so that is not what you want. Your third option would be called lagged GDP and not initial GDP.
| https://stats.stackexchange.com |
6,055 | [
"https://electronics.stackexchange.com/questions/6055",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/1272/"
] | I'd like to understand this simple schematic to see if I get things clearly
<img src="https://i.stack.imgur.com/vGqHl.jpg" alt="alt text">
If I understand things correctly:
<ul>
<li>when the switch is open, the current at the right black point is zero, the voltage is 12V.</li>
<li>when the switch is closed, the curr... | (In ideal conditions)
You're correct in your understanding of the first case. When you close the switch, you short one end of the resistor to ground, so there's a 12V drop across it and I=0.02A.
In your second case, with the switch closed, you are creating a voltage divider so the point between the resistors is at 6V.... | I see where you are coming from, but you have 1 concept wrong.
From what you show, it is unknown what happens at vout. If you just have it connecting to something that is measuring the voltage, say a dmm or a microcontroller, then you can assume you have a very large resistor from vout to ground.
So case that the swi... | https://electronics.stackexchange.com |
129,048 | [
"https://dba.stackexchange.com/questions/129048",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/60415/"
] | I'm not sure how to accurately phrase this question.
Essentially, say I have a bunch of salespeople on different sales teams. Like, the Blue Region, the Orange Region, the Red Region, whatever.
Now, these sales people are each connected to one sales region, but may, on occasion, change sales regions over time.
Say B... | I wouldn't organize your "helper table" that way. I would keep only {Region, Salesman, StartDate}. To create a view of intervals, join that table to itself to create data ranges <code>where a.StartDate < b.StartDate</code>. Use an outer join, so that NULL represents an EndDate of "now", which you can coalesce wit... | You do not need to create a view for this. View is generally used to improve the performance of code. For this you have to find out the current month values always using the order by of year and month.
Find below solution of your problem:
<pre><code>select er.region, er.month, er.year, sum(es.sales)
from employee_sal... | https://dba.stackexchange.com |
68,603 | [
"https://stats.stackexchange.com/questions/68603",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/29627/"
] | In an online game the chance of succeeding at an action starts at 5% and goes up 5% every time the action fails.
Upon success the chance resets back to 5%.
(So you know how they say a die has no memory of prior rolls? Here it does.)
The question: How many attempts do I need to have a 50/50 chance of success?
Altern... | This <strong>probability tree</strong> represents the game and guides the calculations:
<img src="https://i.stack.imgur.com/CvRZy.png" alt="Tree">
The blue node at the left represents the start. At this point there is a 5% chance of success (leading to the up and left). If success is achieved now, only one attempt ... | Make a 19-state Markov chain and solve for its stationary distribution, then look at the probability of the first state. This will be the long-term expected number of successes per mouse click.
| https://stats.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.