message stringlengths 2 17.7k | message_type stringclasses 2
values | message_id int64 0 19 | conversation_id int64 0 1.03k |
|---|---|---|---|
Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.
I don't understand the part marked in bold.... | instruction | 0 | 300 |
The confusing term seems to be "respecting". This is a somewhat different meaning of "respect", that is still in common use:
respecting (prep):
* in view of : considering
* with respect to : concerning
The first amendment states that Congress shall pass no law related to (or with regard to) the establis... | output | 1 | 300 |
Why are people unwilling to share information about their salary? | instruction | 0 | 301 |
People are unwilling to talk openly about their salaries because there is a social taboo surrounding the practice.
Like all taboos, there isn't necessarily a good rationale behind its existence. And the taboo can, in fact, be detrimental, as it is here.
Around the time of the industrial revolution, you were not allow... | output | 1 | 301 |
In D&D, how many attacks can a fighter with two-weapon fighting make at 5th level? | instruction | 0 | 302 |
Answer: 3 attacks on your turn (if you don't use Action Surge). (It could go up to five with Action Surge, though.)
The Two-Weapon Fighting rule states (PHB, page 195):
>When you take the Attack action and attack with a light melee weapon that you’re holding in one hand, you can use a bonus action to attack with a di... | output | 1 | 302 |
Consider the following code:
```avgDists = np.array([1, 8, 6, 9, 4])
ids = avgDists.argsort()[:n]
```
This gives me indices of the ```n``` smallest elements. Is it possible to use this same ```argsort``` in descending order to get the indices of ```n``` highest elements? | instruction | 0 | 303 |
If you negate an array, the lowest elements become the highest elements and vice-versa. Therefore, the indices of the `n` highest elements are:
```
(-avgDists).argsort()[:n]
```
Another way to reason about this, as mentioned in the comments, is to observe that the big elements are coming last in the argsort. So, you ca... | output | 1 | 303 |
Can a woman give birth to twins with different fathers? | instruction | 0 | 304 |
Yes, this is possible through something called heteropaternal superfecundation (see below for further explanation).
Of all twin births, 30% are identical and 70% are non-identical (fraternal) twins.
Identical twins result when a zygote (one egg, or ovum, fertilized by one sperm) splits at an early stage to become twin... | output | 1 | 304 |
Relationship between SVD and PCA. How to use SVD to perform PCA? | instruction | 0 | 305 |
Let the real values data matrix $\mathbf X$ be of $n \times p$ size, where $n$ is the number of samples and $p$ is the number of variables. Let us assume that it is centered, i.e. column means have been subtracted and are now equal to zero.
Then the $p \times p$ covariance matrix $\mathbf C$ is given by $\mathbf C = \... | output | 1 | 305 |
What is the English term for when someone thinks they are doing something nice for you but it ends up making things worse. EX: Someone buys you an elephant -- nice gesture and cool! But now you have to take care of it, and it becomes a burden on you. | instruction | 0 | 306 |
In fact, the English expression for a burdensome gift is literally white elephant:
> a thing that is useless and no longer needed, although it may have cost a lot of money [OALD]
So-called white elephants, or albino elephants, are found in many parts of South and Southeast Asia. In Buddhist countries they may be vene... | output | 1 | 306 |
Did Hillary Clinton propose to punish flag burners in 2005? | instruction | 0 | 307 |
The proposed law co-sponsored by Clinton in 2005 prohibits flag burning under specific circumstances. It does not attempt to make flag burning illegal in general (i.e. outside of those specific circumstances). Clinton has voted against a proposed amendment to the Constitution that would allow Congress to ban flag burni... | output | 1 | 307 |
There are several questions here about the definition of depth of field, about focal length, and about subject distance. And of course there's the basic how does aperture affect my photographs. And plenty of how do I get super-shallow d.o.f questions. There's related questions like this one. But there's no be-all-end-a... | instruction | 0 | 308 |
I'm going to dispense with the formulas, photos of rulers and definitions of "magnification" and go with what you actually experience in practice. The major factors that actually matter to shooting are:
* Aperture. Wide aperture lenses give you a shallower depth of field. This is probably the least controversial facto... | output | 1 | 308 |
Why did the NES not allow rotated sprites? | instruction | 0 | 309 |
For each sprite displayed on a scanline, the hardware fetches two bytes from memory, and then clocks the pixels out one by one. The sprite is eight pixels wide, and each pixel is two bits, which is why it's two memory accesses per sprite per scanline. You can imagine that this arrangement just needs a couple of shift r... | output | 1 | 309 |
I want to merge two dictionaries into a new dictionary.
```
x = {'a': 1, 'b': 2}
y = {'b': 3, 'c': 4}
z = merge(x, y)
>>> z
{'a': 1, 'b': 3, 'c': 4}
``` | instruction | 0 | 310 |
Here is what you can do for the case you described:
```
z = dict(list(x.items()) + list(y.items()))
```
This will, as you want it, put the final dict in ```z```, and make the value for key ```b``` be properly overridden by the second (```y```) dict's value:
```>>> x = {'a': 1, 'b': 2}
>>> y = {'b': 1... | output | 1 | 310 |
There are many "standards" for the JSON content type:
application/json
application/x-javascript
text/javascript
text/x-javascript
text/x-json
Which one do I use, and where? I assume security and browser support issues are a factor. | instruction | 0 | 311 |
According to RFC 4627:
The MIME media type for JSON text is application/json. The default encoding is UTF-8.
For JSON text, you should use:
```
application/json
```
For JSONP (runnable JavaScript) with callback, you should use:
```
application/javascript
``` | output | 1 | 311 |
What's the goal of Minecraft and what can users achieve in this world? | instruction | 0 | 312 |
The thing about Minecraft is, unlike most games you set your own goals. Here's a list of common (and uncommon!) things people have done with Minecraft:
* Building a massive structure
* Recreating real-world objects
* Survival (Deleting map upon dying)
* Making amusing videos
* Creating an adventure map for others to p... | output | 1 | 312 |
If I have sampled a signal using proper sampling methods (Nyquist, filtering, etc) how do I relate the length of my FFT to the resulting frequency resolution I can obtain?
Like if I have a 2,000 Hz and 1,999 Hz sine wave, how would I determine the length of FFT needed to accurately tell the difference between those two... | instruction | 0 | 313 |
The frequency resolution is dependent on the relationship between the FFT length and the sampling rate of the input signal.
If we collect 8192 samples for the FFT then we will have:
$$\frac{8192\ \text{samples}}{2} = 4096\ \,\text{FFT bins}$$
If our sampling rate is 10 kHz, then the Nyquist-Shannon sampling theorem s... | output | 1 | 313 |
I wanted to produce a 1 GB random file, so I used following command.
```dd if=/dev/urandom of=output bs=1G count=1
```
But instead every time I launch this command I get a 32 MB file:
```$ dd if=/dev/urandom of=output bs=1G count=1
0+1 records in
0+1 records out
33554431 bytes (34 MB, 32 MiB) copied, 0,288321 s, 116 MB... | instruction | 0 | 314 |
```bs```, the buffer size, means the size of a single read() call done by dd. For example, both ```bs=1M count=1``` and ```bs=1k count=1k``` will result in a 1 MiB file, but the first version will do it in a single step, while the second will do it in 1024 small chunks.
Regular files can be read at nearly any buffer s... | output | 1 | 314 |
The treads on my road bike's 28C tires are almost completely gone—they only persist along the shoulders of the tire. Do the treads matter? What is a good indicator of when the tire as a whole needs to be replaced? | instruction | 0 | 315 |
The tread on a road bike's tires is really quite unimportant and purely cosmetic. Road bike tires have tread patterns because they sell better, not because they perform better.
Here's some questions to ask to decide about replacing a tire:
* Can you see any of the fabric?
* Are you getting flats more easily than you u... | output | 1 | 315 |
Is there a way to create an index on a property/column using fluent configuration, instead of using the new ```IndexAttribute``` ? | instruction | 0 | 316 |
Currently there is no "first class support" for creating a index via the fluent API, but what you can do is via the fluent API you can mark properties as having attributes from the Annotation API. This will allow you to add the ```Index``` attribute via a fluent interface.
Here are some examples from the work item fro... | output | 1 | 316 |
Both races have the same limits on their strength, and athletics, but it's hard to imagine why. A Goliath could feasibly lift and throw a gnome, yet the Gnome, following rules as written, can pin down a Goliath, fairly easily, if statted correctly.
Is there an in-universe explanation as to why such dramatically differ... | instruction | 0 | 317 |
D&D is a terrible reality simulator.
The problem that you're having here is that, in real life, most people who are 7 feet tall are going to be faster, stronger, and all-around more physically powerful than a person who is 3 feet tall. If you compare two people of similar athleticism, the person who is 4 feet taller i... | output | 1 | 317 |
So I'm pretty far into writing my dystopian novel and I was reading over what I had. Something that helps me when I first start a novel is to get a clear picture of my characters in my head and put a face to a name, so I usually sculpt a personality and find a Google image of someone who I think matches that, and I pu... | instruction | 0 | 318 |
The answer I'll give you here is the same as the ones I've already given you and others: write what works for you. If these are who the characters are, then that's who they are. If you're forcing diversity, then it will come off as forced. That includes making some characters white just to be diverse.
Will you alienat... | output | 1 | 318 |
When I do ```\footnote{}``` for a value in a table, the footnote doesn't show up. How do I get it to show up? Also, is it possible to get it to show up at the bottom of the table rather than the bottom of the page? | instruction | 0 | 319 |
This is a classic difficulty in LaTeX.
The problem is how to do layout with floats (figures and tables, an similar objects) and footnotes. In particular, it is hard to pick a place for a float with certainty that making room for the associated footnotes won't cause trouble. So the standard ```tabular``` and ```figure`... | output | 1 | 319 |
Why is kVA not the same as kW? | instruction | 0 | 320 |
Both watts and volt-amps come from the same equation, $P=IV$, but the difference is how they're measured.
To get volt-amps, you multiply root mean square (RMS) voltage ($V$) with RMS current ($I$) with no regard for the timing/phasing between them. This is what the wiring and pretty much all electrical/electronic compo... | output | 1 | 320 |
Elon Musk and his partner want to name their child X Æ A-12.
Is that name allowed in California, US? | instruction | 0 | 321 |
We could start with what the statutes say (HSC 102425)
(a) The certificate of live birth for a live birth occurring on or after January 1, 2016, shall contain those items necessary to establish the fact of the birth and shall contain only the following information; (1) Full name and sex of the child.
It says nothin... | output | 1 | 321 |
In this Creation magazine reprint of a 1994 article titled Exploding stars point to a young universe, Young-Earth Creationist, Jonathan Sarfati argues that the scarcity of Supernova remnants (SNRs) in the sky suggests the Milky Way galaxy is less than billions of years old.
On average, a galaxy like our own, the Milk... | instruction | 0 | 322 |
There are many reasons why this is wrong. The first one is the assumption of 1 supernova per 25 years. That was the value arrived at in Gustav Tammann's article published in 1970. Others got values up to 100 years (Tammann himself changed his value later). All these values are really only good guesses.
Worse errors ar... | output | 1 | 322 |
Why is there so much technical detail of whaling included in Moby-Dick? | instruction | 0 | 323 |
There are multiple purposes behind the novel structure of Moby-Dick.
In the first instance the author was himself a whaleman, having spent 18 months as an ordinary seaman aboard the whaler Acushnet in 1841–42. In his experience the literature of the day, such as Miriam
Coffin or The Whale-Fisherman by Joseph Hart, d... | output | 1 | 323 |
Why are we building larger land-based telescopes instead of launching larger ones into space? | instruction | 0 | 324 |
Because it's cheaper.
(1) With adaptive optics you can get 0.1 arc second resolution on the ground (admittedly only on a mountain top with particularly good air flow, but still!). This eliminates one of the major advantages of space until you get above several meters mirror diameter.
(2) Rocket fairings are the shrouds... | output | 1 | 324 |
Why can we see the dust particles in a narrow beam of light (and not in an all lighted area)? | instruction | 0 | 325 |
Your inability to see the dust until you narrow the slit has nothing to do with the narrowness of the beam but instead the dynamic range of light that your eye can see at one time.
A bit of searching turns up reports of a contrast ratio for you eye at one time as between 100:1 and 1000:1. This means if you're in a room... | output | 1 | 325 |
I can not initialize a List as in the following code:
```List supplierNames = new List();
supplierNames.add("sup1");
supplierNames.add("sup2");
supplierNames.add("sup3");
System.out.println(supplierNames.get(1));
```
I face the following error:
Cannot instantiate the type ```List```
How can I instantiate ```List`... | instruction | 0 | 326 |
If you check the API for ```List``` you'll notice it says:
```Interface List
```
Being an ```interface``` means it cannot be instantiated (no ```new List()``` is possible).
If you check that link, you'll find some ```class```es that implement ```List```:
All Known Implementing Classes:
```AbstractList```, ```AbstractS... | output | 1 | 326 |
What is the difference between ```warnings.warn()``` and ```logging.warn()``` in terms of what they do and how they should be used? | instruction | 0 | 327 |
Here are the differences:
* ```logging.warning``` just logs something at the ```WARNING``` level, in the same way that ```logging.info``` logs at the ```INFO``` level and ```logging.error``` logs at the ```ERROR``` level. It has no special behaviour.
* ```warnings.warn``` emits a ```Warning```, which may be printed t... | output | 1 | 327 |
In Greek mythology, the words "Titan" and "God" seem to be used interchangeably. For example, Zeus is a God, but Cronus (his father) was a Titan. So what is the difference between a Titan and a God in Greek mythology? | instruction | 0 | 328 |
A 'god' is synonymous to a 'deity'; the Titans and Titanesses were gods, they were members of the second order of divine beings - after Gaia and Uranus, and the other primordial deities.
Cronus and his fellow Titans comprised the second Ancient Greek pantheon (the first comprising of deities such as Ananke, Gaea, and ... | output | 1 | 328 |
How do weather models work? | instruction | 0 | 329 |
All numerical atmospheric models are built around calculations derived from primitive equations that describe atmospheric flow. Vilhelm Bjerknes discovered the relationships and thereby became the father of numerical weather prediction. Conceptually, the equations can be thought of as describing how a parcel of air wou... | output | 1 | 329 |
I am currently trying to decipher Mazur's Eisenstein ideal paper (not a comment about his clarity, rather about my current abilities). One of the reasons I am doing that is that many people told me that the paper was somehow revolutionary and introduced a new method into number theory.
Could you explain exactly what s... | instruction | 0 | 330 |
First, Mazur's paper is arguably the first paper where the new ideas (and language) of the Grothendieck revolution in algebraic geometry were fully embraced and crucially used in pure number theory. Here are several notable examples: Mazur makes crucial use of the theory of finite flat group schemes to understand the ... | output | 1 | 330 |
Tracing XML request/responses with JAX-WS | instruction | 0 | 331 |
Here is the solution in raw code:
```Endpoint ep = Endpoint.create(new WebserviceImpl());
List handlerChain = ep.getBinding().getHandlerChain();
handlerChain.add(new SOAPLoggingHandler());
ep.getBinding().setHandlerChain(handlerChain);
ep.publish(publishURL);
```
Where SOAPLoggingHandler is (ripped from linked examples... | output | 1 | 331 |
In Vim, how do I insert characters at the beginning of each line in a selection?
For instance, I want to comment out a block of code by prepending ```//``` at the beginning of each line assuming my language's comment system doesn't allow block commenting like ```/* */```. How would I do this? | instruction | 0 | 332 |
The general pattern for search and replace is:
```:s/search/replace/
```
Replaces the first occurrence of 'search' with 'replace' for current line
```:s/search/replace/g
```
Replaces all occurrences of 'search' with 'replace' for current line, 'g' is short for 'global'
This command will replace each occurrence of 'sear... | output | 1 | 332 |
Why doesn't the nuclear fusion in a star make it explode? | instruction | 0 | 333 |
The fusion that occurs in the core of the Sun occurs in nothing like the conditions you might be thinking of in a bomb, or a fusion reactor. In particular, it occurs at much lower temperatures and at a much lower rate. A cubic metre of material in the solar core is only releasing around 250 W of power by fusion.
The fu... | output | 1 | 333 |
Does hot water freeze faster than cold water? | instruction | 0 | 334 |
In certain settings, cold water freezers slower than hot water. This is called the Mpemba effect:
Hot water can in fact freeze faster than cold water for a wide range of experimental conditions. This phenomenon is extremely counterintuitive, and surprising even to most scientists, but it is in fact real. It has been s... | output | 1 | 334 |
O que é Reflection. Por que é útil?
* É recomendável usar em projetos?
* Como usar?
* Em quais situações Reflection pode ser usado? | instruction | 0 | 335 |
Reflection é um termo usado para indicar a capacidade de obter metadados sobre o próprio programa compilado, em português pode-se referir a isso como reflexão mesmo.
Como assim, metadados?
Obter informações sobre os tipos de dados, de forma dinâmica, é muito importante para códigos que atuam sobre objetos que não se co... | output | 1 | 335 |
What is the difference between minimum and infimum? | instruction | 0 | 336 |
The minimum is attained, the infimum isn't necessarily.
Example.
Let $f(x) = \frac{1}{x}$. Then $f$ has no minimum value on the interval $(0,\infty)$. The minimum is the smallest element in the set. That is
$$
\min\{f(x)\mid x\in (0,\infty)\}
$$
doesn't exist because there is not smallest number in the set.
Another ex... | output | 1 | 336 |
I had a Nespresso Vertuo Next machine. It stopped working properly and during the troubleshooting video call, the Nespresso support agent said that the machines should not be connected to a GFCI outlet because they can potentially damage the machine. As part of our home inspection when we purchased the house, it was ... | instruction | 0 | 337 |
> the Nespresso support agent said that the machines should not be connected to a GFCI outlet
Where do they think Nespresso machines are used? Bedrooms? No, they're kitchen appliances and GFCIs are widely used in kitchens. GFCIs are code requirements and have been for ~20 years. If they are unable to make a GFCI-comp... | output | 1 | 337 |
I have extremely bad posture, what can I do? | instruction | 0 | 338 |
You can do stretches, strengthening and breathing exercises to improve your posture. But you also have to become aware of your posture and find a way to interrupt prolonged sitting intervals with brief breaks. A good ergonomic chair is also helpful.
## Musculo-Skeletal Effects of Poor Sitting Posture
Poor sitting po... | output | 1 | 338 |
How to add margin top to ```class="row"``` elements using twitter bootstrap framework? | instruction | 0 | 339 |
Editing or overriding the row in Twitter bootstrap is a bad idea, because this is a core part of the page scaffolding and you will need rows without a top margin.
To solve this, instead create a new class "top-buffer" that adds the standard margin that you need.
```.top-buffer { margin-top:20px; }```
And then use it... | output | 1 | 339 |
In FTL: Faster Than Light, what triggers crew experience increases? | instruction | 0 | 340 |
###Piloting
A crew member who is controlling a helm gains one point of experience for each incoming projectile that is dodged during combat. This includes asteroids, so long as you are in combat at the time. (Note that the dodges do not count while you ship is under the effects of +60% evasion from a cloak.)
This can... | output | 1 | 340 |
In Adobe Photoshop I am able to select multiple layers at once with Shift+Click.
How can I do that in GIMP? | instruction | 0 | 341 |
It's not possible. The only thing you can do is link layers together or merge them.
Instead, there are several alternative methods of handling multiple layers, each appropriate to a different task. You can chain layers to move or transform them, shift-click objects on different layers in the canvas to align them, or c... | output | 1 | 341 |
In the python built-in open function, what is the exact difference between the modes ```w```, ```a```, ```w+```, ```a+```, and ```r+```?
In particular, the documentation implies that all of these will allow writing to the file, and says that it opens the files for "appending", "writing", and "updating" specifically, bu... | instruction | 0 | 342 |
The opening modes are exactly the same as those for the C standard library function ```fopen()```.
The BSD ```fopen``` manpage defines them as follows:
The argument mode points to a string beginning with one of the following sequences (Additional characters may follow these sequences.):
* ``r'' Open text file for ... | output | 1 | 342 |
How can democracy not be the rule of the poor? | instruction | 0 | 343 |
Here are some possible explanations why democracy is not necessarily the rule of the poor:
* Voters voting by habit, not by analysis. Many people vote the same way their parents voted. Other vote exactly the opposite way. Neither involves analysis of their objective economic interest.
* A middle class believing to be ... | output | 1 | 343 |
How can I write colored text to the Windows console with C++? That is, how can I write different text with different colors? | instruction | 0 | 344 |
ANSI escape color codes are: 0=black 1=blue 2=green and so on to 15=white; colorattribute = foreground + background * 16.
To get red text on yellow use 4 + 14*16 = 228, light red on yellow would be 12 + 14*16 = 236.
Here is an example for coloring text in the Windows console:
```
HANDLE hConsole = GetStdHandle(STD_... | output | 1 | 344 |
What's the best way to create a temporary file in Android?
Can File.createTempFile be used? The documentation is very vague about it.
In particular, it's not clear when temporary files created with ```File.createTempFile``` are deleted, if ever. | instruction | 0 | 345 |
Here is an example:
```
File outputDir = context.getCacheDir(); // context being the Activity pointer
File outputFile = File.createTempFile("prefix", ".extension", outputDir);
```
Explanation:
1. The `getCacheDir()` method returns the directory on the filesystem where your app can create cache files.
2. The `createTem... | output | 1 | 345 |
I have javascript function like this:
```function myFunction(number) {
var x=number;
...
... more initializations
//here need to wait until flag==true
while(flag==false)
{}
...
... do something
}
```
The problem is that the javascript is stuck in the while and stuck my program. so my que... | instruction | 0 | 346 |
Because javascript in a browser is single threaded (except for webworkers which aren't involved here) and one thread of javascript execution runs to completion before another can run, your statement:
```while(flag==false) {}
```
will simply run forever (or until the browser complains about a non-responsive javascript l... | output | 1 | 346 |
According to this famous blog post, the effective transcript length is:
$\tilde{l}_i = l_i - \mu$
where $l_i$ is the length of transcript and $\mu$ is the average fragment length. However, typically fragment length is about 300bp. What if when the transcript $l_i$ is smaller than 300? How do you compute the effective l... | instruction | 0 | 347 |
The effective length is $\tilde{l}_i = l_i - \mu + 1$ (note the R code at the bottom of Harold's blog post), which in the case of $\mu
Regarding choosing a particular transcript, ideally one would use a method like salmon or kallisto (or RSEM if you have time to kill). Otherwise, your options are (A) choose the major... | output | 1 | 347 |
What is the significance of 1/1/1753 in SQL Server? | instruction | 0 | 348 |
The decision to use 1st January 1753 (```1753-01-01```) as the minimum date value for a datetime in SQL Server goes back to its Sybase origins.
The significance of the date itself though can be attributed to this man.
Philip Stanhope, 4th Earl of Chesterfield. Who steered the Calendar (New Style) Act 1750 through the ... | output | 1 | 348 |
I saw this video where someone says that electromagnetic wave is a chain reaction of electric and magnetic fields creating each other so the chain of wave moves forward.
I wonder where the photon is in this explanation. What is the relation between electromagnetic wave and photon? | instruction | 0 | 349 |
Both the wave theory of light and the particle theory of light are approximations to a deeper theory called Quantum Electrodynamics (QED for short). Light is not a wave nor a particle but instead it is an excitation in a quantum field.
QED is a complicated theory, so while it is possible to do calculations directly in... | output | 1 | 349 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.