Are detective stories a part of Science Fiction and fantasy site?

Question: Can I include questions about detective stories in this site? If not, on which site can I post them?
Comment: You could try the proposed Literature SE (http://area51.stackexchange.com/proposals/80865/literature). Example questions can be asked.
Answer: Maybe. As taken from this question;

If it's marketed as SF, it's on-topic.
If magic, futuristic science or technology, alternate history, or other sf-nal
  concept is an important part of the overall plot, it's on-topic.
  (Alice in Wonderland, Clockwork Orange, etc.)
If the question is specifically about an sf-nal element, even if it's only a minor part of the work, it's on-topic.
If it's set in an on-topic universe, it's on-topic.
If you're not sure it's SF but you think a good case can be made for it, it's on-topic.
If there is a minor supernatural element (e.g. a fortune teller's prediction comes true, or someone sees a ghost, or a story for
  children involving anthropomorphic animals) but it's just a throwaway
  plot element that's not particularly relevant to the question, it's
  off-topic.

So if the story contains elements of science fiction or fantasy, you might be able to ask it here.
If the story in question has been turned into a film or TV series, you may want to take a look at Movies.SE and try there.
Answer: Are "detective stories" on topic?
Per the site's FAQ, detective stories are not on topic for the site unless they contain elements that are science fictional or in some way fantastical:

What topics can I ask about here?
Science Fiction & Fantasy Stack Exchange is for questions targeted
  towards science fiction and fantasy enthusiasts. This includes
  questions about:

Plot, character, or setting explanations
Historical or societal context of a work
Behind-the-scenes and fandom information
Story identification
Franchise/series reading or viewing order

You may wish to note that this question specifically asked about whether the Sherlock Holmes stories are on topic. The overwhelming vote was that they are not.
Where can I ask them?
On-site there's nothing to stop you raising it in chat. Failing that, Quora has a good reputation for more general questions, as does Yahoo Answers
Comment: @Aneek - Maybe try http://www.sherlockforum.com/?
Comment: @Wikis - I admit that was just cruel
Comment: Yahoo Answers?!
Comment: No, if I ask a Sherlock Holmes question suppose?
Comment: @Aneek - This has been discussed extensively in chat. The consensus of opinion is that Sherlock is not on topic, albeit one of the short stories contains *some* fantasy content (a man appears to turn into a monkey after drinking a mysterious potion).
Answer: It depends if they're Sci-Fi or Fantasy detective stories or not. For example Leviathan Wakes by James S. A. Corey is a Detective story set in a Sci-Fi context. Your traditional Agatha Christie detective novels would be off topic.


Will a PLB (Personal Locator Beacon) work overseas?

Question: I'm starting to do some solo hiking here in Italy, and I'm going to buy a PLB soon. I was wondering if I went to Germany or Australia for example, if I activate the beacon will the beacon still get me the emergency services I would need? Thanks!
Comment: Please note that you should try to use cellular services first, if available, as you'll be able to give much more precise information about your situation. When not in some depressed area surrounded by mountains on all sides, I've often had coverage in the Alps.
Comment: According to the data provided by the accepted answer, the result is ambiguous, and you should be careful and act under the assumption that the German authorities may **not** heed your beacon. Be careful!
Answer: The call would be routed to the international COSPAS-SARSAT network.
Here are the Beacon Regulations Handbooks for each country: http://www.cospas-sarsat.int/en/documents-pro/beacon-regulations-handbook
They have an INCOMPLETE and somewhat contradictory summary of countries: http://www.cospas-sarsat.int/en/beacon-ownership/national-beacon-regulations-for-serial-coded-plbs
Comment: This is interesting. Thank you. However, even after looking up Germany in the "Beacon Regulations Handbooks for each country" link you provided, I'm still confused: if you take a serial-coded PLB with you to Germany and use it (let's assume you were unaware of this restriction), will you receive emergency services (end then possibly be fined), or will they just ignore you because yours is serial-coded? Ie: "Serial-coded PLBs are not allowed in Germany"
Comment: Yeah @Loduwijk I was pondering on the same question myself :)  I guess Herr Hauptmann would get an alert, come over, fine you and drive back home ;) Seriously though - I reckon you would not have ANY rescue at all. I would be conservative and assume it to be this way.


How long remains a boron control rod?

Question: I was wondering today, how long boron control rods remains in a nuclear power plant? When a boron atom absorbs two neutrons, it becomes the unstable isotope boron-12 and and the boron nuclei starts decaying. After some time it looses two protons and two neutrons (alpha-decay), so it decays into lithium and is not boron anymore.
So, how long does it take until a control rod is completly depleted (no absorbing boron atoms left), that they are useless and have to be exchanged? And I also don't know why they use boron for control rods? Why can't you use any other stable element, because boron is also unstable when it absorbs up to 2 neutrons. What is the special with boron?
Comment: Any nuclei that absorbs enough neutrons becomes unstable. And I believe you are incorrect on the decay channels for boron-12.  Beta decay (most likely) leads to carbon-12 (stable), while beta+alpha leads to 3 alphas, which are also stable. No lithium is involved.
Answer: This publication by IAEA is a good summary of considerations relating to control rod (CR or RCCA) material selection and lifetime management.
I was wondering today, how long boron control rods remains in a nuclear power plant?

As low as 4 years, as high as 30 years.
Depends on the CR location in the core, since power varies with radial distance from the center the of core and sometimes with polar coordinate in the core (BWRs?). Also, depends on operating conditions, time spent inserted at power, vibration, etc.
The location of each CR is rotated cycle-to-cycle to spread the fluence (neutron absorption) on the rod over many years.

So, how long does it take until a control rod is completely depleted (no absorbing boron atoms left), that they are useless and have to be exchanged?

Control rods rarely absorb so much that they have lost their effectiveness. This is especially true in PWRs since power control is performed by soluble boron in the coolant and very little of the operating cycle is spent with CRs inserted.
Some plants will still measure CR lifetime in B-10 % remaining, but this is for ease of comparing simulation results since B4C pellet swelling has been correlated to a certain B-10 %.
The reason both BWR and PWR control rods are retired are due to structural issues related to:

absorber-cladding interaction due to absorber fluence (main PWR reason)(see 'why boron' below)
irradiation-assisted stress corrosion cracking
cladding neutron embrittlement
vibration induced wear on the fingertips.

And I also don't know why they use boron for control rods? What is the special with boron?

Boron-10, which is about 19.8 percent of natural boron, has a high neutron absorption cross-section. It is relatively inexpensive. These qualities make it a good CR material.
Boron is usually used in the form B4C. This material has a tendency to swell once it has absorbed a lot of fluence, which makes the material interact with the CR cladding. This is usually the end of life for PWR control rods.

Why can't you use any other stable element? Other isotopes in control rods are used.

Element stability is not of concern in CR isotope selection. Cost, swelling, and mainly absorption cross-section are of interest.
AgInCd - Silver, Indium, Cadmium rods are used. For most CRs using this material, only the tips contain it since the tip sees the highest fluence and it swells less than boron. These have good absorption qualities, though, as it might sound, are expensive.
Hafnium is a significantly better absorber because most Hf isotopes absorb a neutron and become another high absorption cross-section Hf isotope. It is also disproportionately more expensive, some argue because of the nuclear navy hoarding all the Hf.

How long remains a boron control rod?


On what basis U.N. inducts new member states?

Question: For example if a new nation is formed (e.g. South Sudan) then what are the necessary conditions a nation must satisfy so that they could be eligible for getting inducted into U.N. ??
Comment: http://www.un.org/en/sections/member-states/about-un-membership/index.html
Answer: As shown in Michael_B's reference About UN Membership

Membership in the Organization, in accordance with the Charter of the United Nations, "is open to all peace-loving States that accept the obligations contained in the United Nations Charter and, in the judgment of the Organization, are able to carry out these obligations". States are admitted to membership in the United Nations by decision of the General Assembly upon the recommendation of the Security Council.

...

The procedure is briefly as follows:

The State submits an application to the Secretary-General and a letter formally stating that it accepts the obligations under the Charter.
The Security Council considers the application. Any recommendation for admission must receive the affirmative votes of 9 of the 15 members of the Council, provided that none of its five permanent members — China, France, the Russian Federation, the United Kingdom of Great Britain and Northern Ireland and the United States of America — have voted against the application.
If the Council recommends admission, the recommendation is presented to the General Assembly for consideration. A two-thirds majority vote is necessary in the Assembly for admission of a new State.
Membership becomes effective the date the resolution for admission is adopted.

The necessary conditions are listed in the UN Charter. For example, article 2 of chapter 1 says

The Organization and its Members, in pursuit of the Purposes stated in Article 1, shall act in accordance with the following Principles.

The Organization is based on the principle of the sovereign equality of all its Members.
All Members, in order to ensure to all of them the rights and benefits resulting from membership, shall fulfill in good faith the obligations assumed by them in accordance with the present Charter.
All Members shall settle their international disputes by peaceful means in such a manner that international peace and security, and justice, are not endangered.
All Members shall refrain in their international relations from the threat or use of force against the territorial integrity or political independence of any state, or in any other manner inconsistent with the Purposes of the United Nations.
All Members shall give the United Nations every assistance in any action it takes in accordance with the present Charter, and shall refrain from giving assistance to any state against which the United Nations is taking preventive or enforcement action.
The Organization shall ensure that states which are not Members of the United Nations act in accordance with these Principles so far as may be necessary for the maintenance of international peace and security.
Nothing contained in the present Charter shall authorize the United Nations to intervene in matters which are essentially within the domestic jurisdiction of any state or shall require the Members to submit such matters to settlement under the present Charter; but this principle shall not prejudice the application of enforcement measures under Chapter Vll.


How can I play a particle system only when it's visible?

Question: I am making a game and it has a lot of particle systems in it as special effects, and all of them are supposed to be playing at the same time, but doing that will be heavy on the game's performance, then I thought:
Is it possible to play a particle system only when it is visible to the camera and stop playing it when it is out of range or hidden from the camera, maybe with physics raycasting? If it is, can someone help me to write codes that will do so.
Comment: Are you asking about the old ["Shuriken" particle system](https://docs.unity3d.com/Manual/PartSysUsage.html) or the new ["Visual Effect Graph" system](https://blogs.unity3d.com/2018/11/27/creating-explosive-visuals-with-the-visual-effect-graph/)? If your game is very particle-heavy, you might want to look into the latter. It allows to create much more impressive effects with much higher framerate in most cases.
Comment: @Philipp The VFX graph is targeted for HDRP, am building for the mobile platform, and it is not available for LDRP yet.
Comment: I was talking about the old one, but I'll check out the VFX graph. Thanks!!
Answer: There are two Unity event methods you can implement for this purpose: OnBecameVisible() and OnBecameInvisible(). You can use that to pause and unpause the particle system on the same GameObject.
This doesn't use raycasting but instead hooks into the frustum culling and occlusion culling system of the engine which determines the visibility of all game objects anyway.
Comment: I didn't know that! Thanks, I'll try that.
Answer: Note that Unity already does a form of this on its own for frustum culling of particle systems (it's more efficient for systems that can be efficiently predicted - see this article for a detailed breakdown)
On the particle system's main module, you'll see a "Culling Mode" dropdown. As described in the Unity docs:

Culling Mode  Choose whether to pause Particle System simulation when particles are offscreen. Culling when offscreen is most efficient, but you may want to continue simulation for off-one effects.

Automatic   Looping systems use Pause, and all other system use Always Simulate.
Pause And Catch-up  The system stops simulating while offscreen. When re-entering the view, the simulation performs a large step to reach the point where it would have been had it not paused. In complex systems, this option can cause performance spikes.
Pause   The system stops simulating while offscreen.
Always Simulate The system processes its simulation on each frame, regardless of whether it is on screen or not. This can be useful for one-shot effects such as fireworks, where during the simulation would be obvious.

So far as I'm aware, this applies only to frustum culling (ie. determining whether or not the particle system's bounds overlap with the camera's view frustum). It does not necessarily cull/pause particle systems that are occluded behind walls or other barriers, so a custom solution may be needed for that case.
You can use Unity's Culling Groups to have more explicit control over culling, as demonstrated for particle systems here.


Hidden field in acf

Question: I want to have a "like" field for every post, this field supposes to hold the number of likes for every post. But the problem is i don't want it to be visible when editing post and no one except my code can change it. How can i do this with acf ?
Comment: The whole point of ACF is to have visible fields for editing the post. Why do you need ACF?
Answer: Create a field group for just that field. In the Location panel under Rules, set Show this field group if to Current User Role is equal to Administrator - that way, your users won't see the field group but you still will (good for debugging).

Hidden field in acf


Android project in "Titanium Studio"

Question: Can we able to start an Android project in "Titanium Studio". I am using the free version of this software. If Titanium Studio is good for Android development what are the main points. How to run the application.
Comment: Honestly heard only about Eclipse and IntelliJ Idea for Android Dev.
Answer: Yes, you can start an Android project in the free version of Titanium Studio. You can also start an iOS project.
When you develop in Titanium, your code is in JavaScript and you use special Titanium functions and objects to access the Android or iOS device. Some advantages are that if you know JavaScript you can code for Android and iOS without having to learn Java or objective-C and most of your code will be reusable if you want to later deploy your app on iOS. Some disadvantages are that there are bugs in Titanium that make some functions behave differently in Android and iOS. Also, if smart phones were to add a new device function you won't be able to access it until Titanium added that function. You give up some control for easier multiplatform deployment.
Titanium's Quick Start guide will show you what you need to do to setup your computer for Android and iOS development: http://docs.appcelerator.com/titanium/2.0/#!/guide/Quick_Start

Android project in "Titanium Studio"


Heisenberg Hamiltonian in terms of spinon operators

Question: In Chapter 9 of Xiao-Gang Wen's book Quantum Field Theory of Many-body Systems, the spin operator $\textbf{S}_i$ is represented by
$$\begin{equation}\textbf{S}_i=\frac{1}{2}f^{\dagger}_{i\alpha}\boldsymbol\sigma_{\alpha\beta}f_{i\beta},
\end{equation}$$
where $f_{i\alpha}$ denotes the spinon operator at site i with spin $\alpha=\uparrow,\downarrow.$ Then it states that the Heisenberg Hamiltonian
\begin{equation}
H=\sum_{<ij>}J_{ij}\,\mathbf{S}_i\cdot\mathbf{S}_j,
\end{equation}
can be written as, in terms of the spinon operators,
\begin{equation}
H=\sum_{<ij>}-\frac{1}{2}J_{ij}f^{\dagger}_{i\alpha}f_{j\alpha}f^{\dagger}_{j\beta}f_{i\beta}+\sum_{<ij>}J_{ij}\left(\frac{1}{2}n_i-\frac{1}{4}n_in_j\right).
\end{equation}
So there are 3 terms in total. By using the relation $\boldsymbol\sigma_{\alpha\beta}\cdot\boldsymbol\sigma_{\gamma\epsilon}=2\delta_{\alpha\epsilon}\delta_{\beta\gamma}-\delta_{\alpha\beta}\delta_{\gamma\epsilon}$, I can get the third term, and my confusion lies in the first 2 terms. Why is there a minus sign in the first term as well as an extra second term? From my computation, there should be no minus sign, and no second term at all.
Any help is appreciated.
Answer: I think you probably haven't fully taken into account the anticommutation relation $
\{ f_{i\alpha}, f_{j\beta}^\dagger\} = \delta_{ij} \delta_{\alpha\beta}$. After applying the Pauli matrix relation in your post, you should have the third term, as well as
$$
\sum_{\langle ij\rangle} J_{ij} \frac{1}{2} f_{i\alpha}^\dagger f_{i\beta} f_{j\beta}^\dagger f_{j\alpha} = \sum_{\langle ij\rangle} J_{ij} \frac{1}{2} f_{i\alpha}^\dagger f_{i\beta} \left( \delta_{\alpha\beta} - f_{j\alpha}f_{j\beta}^\dagger  \right) = \sum_{\langle ij\rangle} \left[ -\frac{1}{2} J_{ij} f_{i\alpha}^\dagger f_{j\alpha} f_{j\beta}^\dagger f_{i\beta} + J_{ij} \frac{n_i}{2}\right]
$$
which gives you the sign change in the first term, as well as the second term.


What is the fundamental difference between CNN and RNN?

Question: What is the fundamental difference between convolutional neural networks and recurrent neural networks? Where are they applied?
Comment: Better do not think about RNN/CNN as different networks, but as different network capabilities: a network can be stateless or stateful ( as RNN, LSTM, deep ); a network can/cannot have spatial operators (as 2D convolution, like CNN); ...
Answer: Recurrent neural networks (RNNs) are artificial neural networks (ANNs) that have one or more recurrent (or cyclic) connections, as opposed to just having feed-forward connections, like a feed-forward neural network (FFNN).
These cyclic connections are used to keep track of temporal relations or dependencies between the elements of a sequence. Hence, RNNs are suited for sequence prediction or related tasks.
In the picture below, you can observe an RNN on the left (that contains only one hidden unit) that is equivalent to the RNN on the right, which is its "unfolded" version. For example, we can observe that $\bf h_1$ (the hidden unit at time step $t=1$) receives both an input $\bf x_1$ and the value of the hidden unit at the previous time step, that is, $\bf h_0$.

The cyclic connections (or the weights of the cyclic edges), like the feed-forward connections, are learned using an optimisation algorithm (like gradient descent) often combined with back-propagation (which is used to compute the gradient of the loss function).
Convolutional neural networks (CNNs) are ANNs that perform one or more convolution (or cross-correlation) operations (often followed by a down-sampling operation).
The convolution is an operation that takes two functions, $\bf f$ and $\bf h$, as input and produces a third function, $\bf g = f \circledast h$, where the symbol $\circledast$ denotes the convolution operation. In the context of CNNs, the input function $\bf f$ can e.g. be an image (which can be thought of as a function from 2D coordinates to RGB or grayscale values). The other function $\bf h$ is called the "kernel" (or filter), which can be thought of as (small and square) matrix (which contains the output of the function $\bf
 h$). $\bf f$ can also be thought of as a (big) matrix (which contains, for each cell, e.g. its grayscale value).
In the context of CNNs, the convolution operation can be thought of as dot product between the kernel $\bf h$ (a matrix) and several parts of the input (a matrix).
In the picture below, we perform an element-wise multiplication between the kernel $\bf h$ and part of the input $\bf h$, then we sum the elements of the resulting matrix, and that is the value of the convolution operation for that specific part of the input.

To be more concrete, in the picture above, we are performing the following operation
\begin{align}
\sum_{ij}
\left(
\begin{bmatrix}
1 & 0 & 0\\
1 & 1 & 0\\
1 & 1 & 1
\end{bmatrix}
\otimes
\begin{bmatrix}
1 & 0 & 1\\
0 & 1 & 0\\
1 & 0 & 1
\end{bmatrix}
\right)
=
\sum_{ij}
\begin{bmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
1 & 0 & 1
\end{bmatrix}
= 4
\end{align}
where $\otimes$ is the element-wise multiplication and the summation $\sum_{ij}$ is over all rows $i$ and columns $j$ (of the matrices).
To compute all elements of $\bf g$, we can think of the kernel $\bf h$ as being slided over the matrix $\bf f$.
In general, the kernel function $\bf h$ can be fixed. However, in the context of CNNs, the kernel $\bf h$ represents the learnable parameters of the CNN: in other words, during the training procedure (using e.g. gradient descent and back-propagation), this kernel $\bf h$ (which thus can be thought of as a matrix of weights) changes.
In the context of CNNs, there is often more than one kernel: in other words, it is often the case that a sequence of kernels $\bf h_1, h_2, \dots, h_k$ is applied to $\bf f$ to produce a sequence of convolutions $\bf g_1, g_2, \dots, g_k$. Each kernel $\bf h_i$ is used to "detect different features of the input", so these kernels are different from each other.
A down-sampling operation is an operation that reduces the input size while attempting to maintain as much information as possible. For example, if the input size is a $2 \times 2$ matrix $\bf f = \begin{bmatrix} 1 & 2 \\ 3 & 0 \end{bmatrix}$, a common down-sampling operation is called the max-pooling, which, in the case of $\bf f$, returns $3$ (the maximum element of $\bf f$).
CNNs are particularly suited to deal with high-dimensional inputs (e.g. images), because, compared to FFNNs, they use a smaller number of learnable parameters (which, in the context of CNNs, are the kernels). So, they are often used to e.g. classify images.
What is the fundamental difference between RNNs and CNNs? RNNs have recurrent connections while CNNs do not necessarily have them. The fundamental operation of a CNN is the convolution operation, which is not present in a standard RNN.
Answer: Basically, a CNN saves a set of weights and applies them spatially. For example, in a layer, I could have 32 sets of weights (also called feature maps). Each set of weights is a 3x3 block, meaning I have 3x3x32=288 weights for that layer. If you gave me an input image, for each 3x3 map, I slide it across all the pixels in the image, multiplying the regions together. I repeat this for all 32 feature maps, and pass the outputs on. So, I am learning a few weights that I can apply at a lot of locations.
For an RNN, it is a set of weights applied temporally (through time). An input comes in, and is multiplied by the weight. The networks saves an internal state and puts out some sort of output. Then, the next piece of data comes in, and is multiplied by the weight. However, the internal state that was created from the last piece of data also comes in and is multiplied by a different weight. Those are added and the output comes from an activation applied to the sum, times another weight. The internal state is updated, and the process repeats.
CNN's work really well for computer vision. At the low levels, you often want to find things like vertical and horizontal lines. Those kinds of things are going to be all over the images, so it makes sense to have weights that you can apply anywhere in the images.
RNN's are really good for natural language processing. You can imagine that the next word in a sentence will be highly influenced by the ones that came before it, so it makes sense to carry that internal state forward and have a small set of weights that can apply to any input.
However, there are many more applications. In addition, CNN's have performed well on NLP tasks. There are also more advanced versions of RNN's called LSTM's that you could check out.
For an explanation of CNN's, go to the Stanford CS231n course. Especially check out lecture 5. There are full class videos on YouTube.
For an explanation of RNN's, go here.
Comment: IMHO, this is a quite confusing explanation.
Answer: CNN vs RNN

A CNN will learn to recognize patterns across space while RNN is useful for solving temporal data problems.
CNNs have become the go-to method for solving any image data challenge while RNN is used for ideal for text and speech analysis.
In a very general way, 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.) while an RNN will similarly learn to recognize patterns across time. So a RNN that is trained to convert speech to text should learn first the low level features like characters, then higher level features like phonemes and then word detection in audio clip.

CNN
A  convolutional network (ConvNet) is made up of layers.
In a convolutional network (ConvNet), there are basically three types of layers:

Convolution layer
Pooling layer
Fully connected layer

Of these, the convolution layer applies convolution operation on the input 3D tensor. Different filters extract different kinds of features from an image. The below GIF illustrates this point really well:

Here the filter is the green 3x3 matrix while the image is the blue 7x7 matrix.
Many such layers passes through filters in CNN to give an output layer that can again be a NN Fully connected layer or a 3D tensor.

For example, in the above example, the input image passes through convolutional layer, then pooling layer, then convolutional layer, pooling layer, then the 3D tensor is flattened like a Neural Network 1D layer, then passed to a fully connected layer and finally a softmax layer. This makes a CNN.

RNN
Recurrent Neural Network(RNN) are a type of Neural Network where the output from previous step are fed as input to the current step.

Here, $x_{t-1}$, , $x_{t}$ and $x_{t+1}$  are the values of inputs data that occur at a specific time steps and are fed into the RNN that goes through the hidden layers namely $h_{t-1}$, , $h_{t}$ and $h_{t+1}$ which further produces output $o_{t-1}$, , $o_{t}$ and $o_{t+1}$ respectively.
Answer: On a basic level, an RNN is a neural network whose next state depends on its past state(s), while a CNN is a neural network that does dimensionality reduction (make large data smaller while preserving information) via convolution. See this for more info on convolutions
Comment: This is misleading. CNNs are not strictly used for dimensionality reduction. Furthermore, it is the down-sampling operation that reduces the dimensions of the input (not necessarily the convolution).
Answer: In the case of applying both to natural language, CNN's are good at extracting local and position-invariant features but it does not capture long range semantic dependencies. It just consider local key-phrasses.
So when the result is determined by the entire sentence or a long-range semantic dependency CNN is not effective as shown in this paper where the authors compared both architechrures on NLP takss.
This can be extended for general case.


Doctor Who: Big Bang 2.0 is driving me crazy

Question: In Doctor Who 2005: Big bang 2.0, the Doctor appears with a hat or something and a mop in his hand to rescue himself and Amy Pond after he is sealed shut inside the Pandorica. How can the Doctor come out of the Pandorica to do this? What event triggered this? Is it the act of universe on itself to re-establish the balance to the natural order of events, or is he an entirely new doctor from another time rescuing himself? I did understand everything that happened before and after the Doctor came back in time and gave Rory his sonic screw driver but I am not able to figure out the appearance of the Doctor himself...
Comment: It's a fez, for Pete's sake!
Comment: @MrLister: Fezes are cool!
Comment: @bitmask Nah. *Stetsons* are cool!
Comment: http://media.giphy.com/media/x8fxHLeqUvKgw/giphy.gif
Answer: The Doctor was rescued because he later came back in time (using the vortex manipulator (the thingy wrapped to his wrist)) to enable his rescue by giving Rory the screwdriver. Thus, he is freed (by Rory with the screwdriver) to come back in time and enable his rescue.
Again, he can only go back in time, because at the time he departs (where he is in the museum, with Amelia, Amy and Rory) he was already freed.
This is commonly called an ontological paradox, although it's a slight misnomer as it isn't actually a paradox; It's just something that cannot be logically traced to an initial cause. The effect causes the cause of itself, that's why we have such a hard time grasping it (which we should as it's fiction).
Doctor Who lore typically resolves this problem by simply calling it wibbly-wobbly timey-wimey and be done with it.
Comment: I think it's better known as a [Stable Time Loop](http://tvtropes.org/pmwiki/pmwiki.php/Main/StableTimeLoop) (TVTropes)...
Comment: Believe it or not, an episode Dora the Explorer uses a bootstrap paradox. In it, she tells the story about how she learns (from asking you, the viewer) how to repel Swiper the Fox. This happens before Episode 1, when she teaches you (the viewer) the same thing.... and then you teach her.... then... etc.
Comment: +1 for proper use of Wibbly-Wobbly in a answer about paradox
Comment: I too did some digging and found a paradox called as Bootstrap paradox and I think it resembles this situation....
Comment: @bitmask It had also been the first time Dora had met Swiper. But... here I am explaining plot intricacies of Dora the Explorer. Maybe I should ask my daughter which episode that was... :)
Comment: In theory you could handwave it away with something silly, like by saying the collapsing universe damaged the pandorica and freed him the first time, which allowed him to go back and kickstart the cycle of him freeing him freeing him freeing hi- et cetera. But that'd be silly. Timey. Wimey.
Comment: @ChrisDwyer: Not necessarily a bootstrap paradox; Could just be a forgetful mind.
Comment: The bootstrap paradox is also used frequently in *Bill & Ted's Excellent Adventure/Bogus Journey* (I forget which, but it's probably both).
Answer: Stable time loops
Yes, it's a paradox wherein the effect is the cause and vice versa. Causality often loops in Doctor Who episodes. As the Doctor himself has said in the past, time is not a straight line from cause to effect. Here, he is able to get out of the Pandorica because a future version of himself comes back in time. And since he gets out, a future version can come back to save him. This is how causality is violated here. This is called a "Stable time loop".  He can't get out of the pandorica unless his future self rescues him, and his future self can't rescue him unless he gets out !
Answer: There are numerous possible explanations for what constructed the apparent paradox we are shown in the episode.
Closest to the narrative itself, we see that the pandorica itself exists in close proximity to the TARDIS explosion that broke the universe, and the incongruity can be explained away by simply realizing that by this point time is already kinda broken.
Going a bit further afield, we could instead assume that there is an aborted timeline we were not shown, in which river pilots the tardis without the doctor and crashes, or sets up the stable time loop, or even a pair of such.  The Tardis itself could also have exerted some effort.
And,  of course,  if you are willing to go even further afield,  such actors as the church of the silence or the moment could have played a part as well.  (the latter being more likely,  but I'm endeavoring to avoid potential spoliers.)
Answer: When the doctor is out of viewer site and alone, we, the audience can't assume that he/she isn't time travelling outside the particular time-line which we are viewing in the episode.  While all the characters are up above ground, there was nothing stopping the doctor from using River's vortex manipulator to do a bid of time travel. The doctor could have time travelled anywhere/anytime to set-up the rest of the time-line for the episode.  He returns the vortex manipulator back to River which I suspect is a hint that there's an explanation, but we, the viewers, just haven't figured it out.....
Comment: Hi, welcome to SF&F.  A stable time loop like you describe is explained in the first 2 answers.  Please don't post a new answer with the same information unless you have substantial new details to add.  You might want to read [answer] and take the [tour].


When does the Cauchy-Schwarz inequality hold

Question: If we have a hermitian matrix $M$, and we define an inner product on $\mathbb{C}^n$ by $\left\langle u,v \right\rangle=u^{\dagger}Mv$, does it follow that
$$\left|\left\langle u,v \right\rangle\right|^2\leq \left\langle u,u \right\rangle\left\langle v,v \right\rangle$$
or, are there additional conditions on $M$ in order for this to be true?
Comment: You just need to have $\langle u,u \rangle \ge 0$ for all $u$. It does not have to be positive definite, but only positive.
Answer: If you have positive definite matrix (i.e. all its eigenvalues are strictly positive), not just a Hermitian matrix, then $\langle u, v \rangle$ is an inner product; positive definiteness helps prove the positive definiteness axiom of inner product. The Cauchy-Schwarz inequality therefore holds, by the usual proofs.
If you have a negative definite matrix, then $-M$ is positive definite, hence $-\langle u, v \rangle$ forms an inner product. By the Cauchy-Schwarz inequality, we get
$$|-\langle u, v \rangle|^2 \le (-\langle u, u, \rangle)(-\langle v, v \rangle),$$
which is equivalent to the inequality stated.
The definiteness in both cases can be relaxed to indefiniteness too. You won't get an inner product, but Cauchy Schwarz still holds. For example, in this proof, note that definiteness is never used. So, in a sense, we just require all the eigenvalues of $M$ to be greater than or equal to $0$, or all less than or equal to $0$.
If $M$ has eigenvalues that are each strictly positive and strictly negative, then the inequality doesn't hold. Take $u$ an eigenvalue corresponding to $\lambda > 0$ and $v$ corresponding to $\mu < 0$. Then
$$\langle u, u \rangle \langle v, v \rangle = u^\dagger M u v^\dagger M v = \lambda \mu (u^\dagger u)(v^\dagger v) < 0 \le |\langle u, v \rangle|^2.$$
Comment: The inequality may hold in the semidefinite cases, but the usual statement of the theorem includes the inequality only being saturated for parallel vectors. That part fails for singular $M$.
Answer: Cauchy-Schwarz inequality holds for any positive-definite bilinear form.
Let $\xi>0$ positive-definite square pattern, and $x_1,...,x_n\in V$
Define Gramian matrix $B_\xi(x_1,...x_n)_{ij}=\xi(x_i,x_j)$
and $G_\xi(x_1,...,x_n)=det(B_\xi(x_1,...x_n))$
We can show $G_\xi(x_1,...,x_n)\geq0$  given $\xi>0$, and the equality attained iff $x_1,...x_n$ are linearly dependent.(Using Sylvester's theorem and the fact $\xi>0$ )
Cauchy-Schwarz can now be derived as a special case of $n=2$ (Note that $n$ is not necessarily $dim(V)$)
$G_\xi(x,y)=det\begin{bmatrix}\xi(x,x)&\xi(x,y)\\\xi(y,x)&\xi(y,y)\end{bmatrix}= \xi(x,x)\xi(y,y)-\xi(x,y)\xi(y,x)\geq0$
If we arrange the inequality and use the symmetry property of $\xi$ we get
$\xi(x,x)\xi(y,y)\geq|\xi(x,y)|^2$ with equality iff x and y are linearly dependent.


Open url links to the Washington Post in the Washington Post app

Question: Is there any way to force my phone (pixel, Android 8.0) to open url links to the Washington Post with the Washington Post app? This kind of desired behavior works automatically with other apps/urls for me like the New York Times and Google Maps, but for some reason not with the Washington Post.
Answer: This behavior is decided by the app developer, if Washington Post doesn't let such action, then you won't be able to do it.
If they do allow it, then usually the first time you press on a link it will ask you how you want to open it. So it's possible that you have selected the browser as the default. To change that, go to settings>apps>[name of your browser]>defaults>clear defaults


Is dual card SLI worth it for non gamer?

Question: I am considering building a pc, and have decided I want an NVIDIA graphics card (either a gtx 780 ti, or a quadro), but I am unsure if getting 2 cards and running them with SLI is worth it. I don't play videogames, but I do a lot of graphic design/3d rendering. Price doesn't matter to me, I just want to know if there will be a noticeable performance increase.
Comment: Depends.  Games have to be designed with SLI in mind.  You don't get performance increases from SLI with Super Time Force for example.
Comment: You should consider getting a workstation graphics card instead. These cards use the same underlying graphics processors, but are specially tuned for professional applications with drivers to match. They can be far more expensive (see [this question](http://superuser.com/questions/690388) for why), but they'll perform much better for the applications you intend to run.
Comment: @dragonlord by workstation card do you mean something like the nvidia quadro series?
Comment: Yes. You can also look at AMD FirePro.
Comment: @dragonlord ok, i will definitely take a look at the AMD firepro as well. Thanks!
Answer: Well if price really doesn't matter to you then I'd advise you to use the money to get a SINGLE high-performance card, rather than dual SLI. Not all applications can be easily configured to run on both graphic cards. The performance increase won't be noticeable if the work you are doing doesn't even need that much alllocation!
More reasons: (Quote from another superuser question)
SLI - require some tweaking, set up to work
Two cards require more power.
Two cards add heat.
Two cards run two fans = a bit more noise.
Most would suggest that one single more powerful card will give you less headache, work with more software, and use less power.
Here's an example(although the subject is gaming):

I just swapped out 2x gtx280 for 1x gtx590 and can safely say it's performance is outstanding while at the same time it is soooo much quieter to run under load versus the old 280sli setup as well as giving the benefits of less heat, lower power consumption and less importantly it frees up a mass of power cabling versus the sli setup as well as freeing up a PCI-E lane for future use.

If you were building a gaming rig, then you should probably go for the dual setup. But if it's graphic design, then it's better to stick with one better card.
EDIT: Yes, as Ramhound said, modern games are designed for SLI in mind, so if you aren't a gamer, go for one high-performance one instead.


How to measure a dovetail slot and it's mating component?

Question: I have had some trouble determining the best way to measure a dovetail slot and it's mating component. The parts have some difficulty mating occasionally, and our QC department is having trouble getting accurate measurements of the angles using a CMM and other basic measuring devices. I was thinking we might be able to make a go/no-go gauges, but I'm not convinced this is the best route. And ideas would be helpful. Thanks!
Comment: are you looking for the angles or for the distances in the corners? couldnt you use angle gauges (cut a part of if need be)?
Comment: Better quality CMM?
Answer: You could take an over or between pins measurements if it's the male or female part. Take 2 measurements using 2 different diameter pair of pins. Assuming the edges are fairly straight you should be able to deduce the dovetail angle.
Answer: I assume measuring the depth of the dovetail is not an issue.
The classic manual technique is what jko describes, using two pairs of gage pins (or just one pair if the angle is known to be good a-priori). When doing this, you should also account for any difference in depth on the two sides, by the way.
If the CMM machine has some kind of spherical probe you might be able to use that in an equivalent way to get angles and widths.


Hash of concatenated values (one public, one private)

Question: Assume two end-points $A, B$. $A$ sends to $B$ a $Hash(pv||key)$, where $pv$ is a public value that can be intercepted by attackers. The $key$ is a common secure shared key in both end-points, and $||$ denotes concatenation. Obviously, end-point $B$ has all the info required to check the received hash. I was wondering though if in this particular setup there is some security risk due to the concatenation of a public value with a private key. $pv$ is always 48-bits.
Comment: The key is 72-bits
Comment: The comments are turned into answer...
Answer: Let's assume $A$ sends $h =\text{Hash(pv||key)}$ to $B$ with $pv$ is a public $48$-bit information. The aim of attacker is to access $key$ given $h$. This is postfix construction.
The attackers must slightly modify the pre-image attack so that they must find not an arbitrary pre-image but they need to find one that has the $pv$ as the prefix. The must include all the input space to figure out the $key$
If we assume that $Hash$ is a secure cryptographic hash function like SHA2, SHA-3, BLAKE2, etc. then all are secure against all attacks. So. the only meaningful way is brute-forcing the input space. When the input space is small, we have the usual problem with the hash function; small-input space problem. In this case, the attacker can search the input space one by one with their possible massive parallel computers, ASIC/FPGAs, etc;

Summit can reach $\approx 2^{74.6}$ hashes in one year.
Bitcoin miners reached $\approx 2^{79.8}$ SHA-256D hashes per hour on 7 February 2021.

Therefore, we suggest the usual advice; increase the key size to > 128 for non-quantum adversaries or to 256 for all adversaries.
One may consider that; okay we send 256-bit then $B$ hashes it and trim to 72-bits. Don't do this since, in the attacker's sense, you are still using a 72-bit keyspace. When they have the change, they will attack where the 72-bit is used.
Keep the keys safe! Use effective 256-bit key.


Joining QGIS Property Parcel Mapping shapefile to an Excel file and displaying symbol in Parcel Mapping Shapefile

Question: I am new to QGIS. I am a land surveyor and I have all of the property parcel mapping information in a shape file for my area.  I am trying to link/join an Excel file which has all of the survey files indexed which contain survey information and plans for various properties.
The parcel mapping file has  a field entitled PID.... the excel file has a file called PID and also a field called Plan No.
I am not sure of the correct terminology but I would like to join the two, and have a symbol displayed in the parcel mapping which would represent that I have a Plan No. for that parcel.
At this point I think I have joined the Parcel mapping to the Excel file, but do not know what to do next.
Answer: I am assuming that you could either set a label or a custom symbol in the center of the polygon. For the label simply use the field that you have joined. If you want a custom symbol you can do it in 2 ways, either export the centroid of your current layer using the tool in the processing toolbox (this will also export the joined excel table to the new file). Another way is to go in the symbology, use categorized geometry, for the symbol use the geometry generator to get the centroid (see image) and don't forget to lock your base style to prevent it from changing.

Though if you are using the geometry generator your symbology will be altered in the legend, if you have a legend.
Is this what you wanted?
Comment: Not really....perhaps we can begin with the first part...joining the tables...my parcel mapping layer is called "Export_output" and I have attached my Excel file as a table and that is called "Survey Files nov 24".  Both the shapefile and the Excel file have a PID column in common.  What are the steps to join these two using the PID column....i am using QGIS 3.4
Comment: @kencormier this should help : https://www.qgistutorials.com/en/docs/performing_table_joins.html
Answer: Ken,
first ensure your join has been correctly set up. Right click on your layer then in Properties / Joins you should see a listing of the join(s) existing on your layer.
If the join is correctly set you can then open your attribute table you should be able to see the additionnal attributes coming from your joined layer (your xls file).
You then decide what you do with these extra data ! A common choice is to setup a categorized symbology (properties/symbology/categorized) based on the attributes you joined (choose the right column for that).
Care about the relation existing beetwen your 'properties' and your excel file (1-1 relation or 1-n relation) ... if it's a 1-n relation you'll certainly have to aggregate your data (by "properties") to help qgis understand what you want to map ...


Do Institutions (large trading firms) use market orders?

Question: It is well known that Institutional traders (Large trading firms, market makers) most of the time use LIMIT orders or Hidden limit orders. My question is, do they ever use market orders in their trading?
Answer: The short answer is yes but the way in which this happens is much more complicated so while eventually a market order is executed, it does not start as a market order. Big institutions often have large trades which cannot just be executed as a market order. They might even get in trouble with a regulator for moving the market if they aren't careful with such large orders. In fact, big firms, don't think of market or limit orders per se - they think of execution algos which are proprietary "orders". So an execution algo might use a market order. You certainly wouldn't use a market order on a $20 million trade because you'll swipe the order book and lose a lot of money purely on execution.
It seems to me that you are looking at such trading from the eyes of a retail investor? A market order makes a lot of sense for a retail investor and makes little sense for an institution.


Is there a way to visually see if htmlunit is performing the correct commands?

Question: Is there a way to visually see if htmlunit is performing the correct commands? I have a hard requirement to use htmlunit.  I just don't know if it's filling out all the form correctly.
Answer: HTMLunit is designed to be GUI less browser and for your requirements you can consider using Webdriver or Watir or Selenium etc such tools. In case you are in to Ruby, take a look at Celerity which wrapped HtmlUnit in a Watir-ish API; In fact Celerity is itself being wrapped by Culerity, which integrates Celerity and Cucumber and that could be of more interest to you.
Answer: Yes. you can see the HTTP traffic by using proxy like webscarab, fiddler..etc.
Make sure the following

Set the proxy details to Htmlunit via contsructor. I think it is webclient
Make sure you either trust all the certs or add proxy certificate to truststore
Answer: What do you mean by "correct commands"?   HtmlUnit itself won't give you a running description of what it's doing, if that's what you mean.  As suthasankar says, HtmlUnit is a headless browser (intentionally so) and will never give you the cool Watir experience of watching pages fly by.
Any time I've wanted to know what's happening during a test's execution, I have added logging statements at various points in the test code and then watched them in the console.  You could send messages to any other monitoring system you instead.
It wouldn't take much to then write wrappers around the "commands" you're interested in, like "getPage" and button clicks and form entries and the like.
Answer: It's not possible to view what HtmlUnit is doing unless you code logging and some sort of display yourself. I have done this in the past, and it's helpful to a certain degree but it's not really possible to have a visual feedback to see what HtmlUnit is doing. Even with logging, it's not possible to know every single detail what HtmlUnit is doing or where it goes wrong, so it's an extremely time consuming task. I even resorted to outputting the current page viewed but this is pretty limited as an html page cannot tell the actual "commands" HtmlUnit is executing on that page.
Another approach would be to use Selenium, which executes your "commands" in a visual manner you can see where things go wrong instantly by watching it.


Why buoyancy is applied on centroid?

Question: My book says: "The point of application of the buoyancy force is the geometric center(centroid) of the submerged part of the body, whereas the specific gravity of the fluid is constant."
But why buoyancy is applied on centroid?
Answer: Because otherwise it would induce a torque, i.e., a rotation. When a (pseudo)force applies to a whole body considered as solid, you can consider it as ponctual at settled at its centroid (exactly as for gravity force).
Answer: The statement in that book is not fully correct. It's only correct if the composition of the fluid surrounding the body is of the same material, thus having the same density at every point around the body. In this specific case only does the center of buoyancy coincide with the geometric centroid of the body. A more correct statement for the book would have been "The point of application of the buoyancy force is the center of gravity of the submerged part of the body...."
And to further answer your question,there are situations in mechanics, dynamic analysis where one can combine (sum) all the vector forces on a body and effectively replace those vectors with a single vector that acts through one point in the body. And in such a case the actions on the body can be treated as if the body were a point in space with all the mass of the body concentrated at that point. But as Fabrice pointed out in his answer, such treatment falls apart if not all the forces effectively act through a single point but rather two points separated by a distance within the body. And in this case you have a vector couple - which leads to torque and rotational motion. - and a single point representation of a more massive body) cannot be used to analyze rotational motions.
Comment: I think you meant to say "the center of gravity of the displaced fluid" (which is the same as the geometric center if the density stays same), not "the submerged part of the body". The buoyancy force doesn't care how heavy the submerged body is, or where its heavy parts are.
Comment: @PaŭloEbermann You are right! It's not the solid, but the homogeneity of the fluid surrounding the body that matters.

Why buoyancy is applied on centroid?


Why is anekdota written with a "k" in Czech but a "g" in Polish (anegdota)?

Question: So I decided to compare the languages Czech and Polish. The devolving of voiced consonants to voiceless consonants are pretty much the same. However, one of the differences were, words with [g] written with "k" in Czech were written with "g" in Polish. For example, "kdyby" is written "gdyby" in Polish. Why does Polish use G for [g] more than Czech does. In Czech, G is generally only used in loanwords. Why can't "gbur" be written "kbur" in Polish? What's this aspect of using K instead of G for [g] in Czech but not in Polish?
Answer: It is just a convention. An etymological one, if you want. The pronunciation is of course /gd/.
In Proto-Slavic there was a yer between the k and the d or t: kdy < *kъdy.
In Czech all these pronouns begin with k. Also, in certain dialects (and in Slovak) you can have a vowel between the k and the d which makes it more apparent. E.g.: "kedy" for "kdy".  This is reminds the original yer and makes the pronunciation to really use /k/. "Kdyby" comes from "kdy" + "by".
In Polish they decided to write it closer to the pronunciation, but it is just a convention as well. One possible choice.
The origin of "gbur" is German and hence the "g" is original. Of course, loanwords can adopt a different orthography, but there is very little reason for doing that here.
The reason why Polish has no problem with G is because the original Slavic G did not become H as in Czech, Slovak or Ukrainian. For this reason, Czech only has /g/ due to voicing assimilation while Polish has loads of them where Czech has /h/.
And I forgot the "anekdota" from the title, as it was not mentioned in the question itself. This is again etymological orthography in Czech similar to French or English "anecdote" originally from Greek. And in Polish the decision was to adjust spelling in relation to the pronunciation.
Comment: *gbur* is with *g* like in German, and so is *gwałt*, but *kształt* is with *k*.   They were all borrowed from Middle High German, if we believe Wiktionary.  In German pronunciations, the following consonant often affects how that prefix is pronounced.  Maybe preceding a voiceless consonants make the g unvoiced in German or Polish?
Comment: Is it because, Polish spelling is more focused on phonetic spelling while Czech, etymological?
Comment: @AdamBittlingmayer Due to the voising asimilation a word like kštalt or křtalt (existing in Old Czech) has unvoiced /k/ due to the unvoiced /š/ or /ř/. In Polish it is the same.
Comment: @AkshatGoswami At least in this particular case. But I would like to stress the analogy with other pronouns like kudy, kam, který... It is important.
Comment: Fun fact: In some cases the [k] became a [g]. For example jn 13th century, Kde had the K making a [k] sound but in 15th century, it became voiced [g]. But K was retained probably for etymology/tradition. However, Anekdota became Anegdot, spelling it the phonetic way. That's why, Polish is considered more phonetic than Czech. It's also spelled gdo in Serbo Croatian. Kdo could be really written "gdo" like in Serbo Croatian and Polish. It's a more phonetic spelling It would look strange at first but so did anegdota when it superseded Anekdota. Half of the time, K is just a G in Czech.


Softball foul ball rules

Question: If a ball is hit fair, but rolls foul before passing third of first then is it foul or fair ?I am asking this because this happened and my P.E. teacher called the ball fair, and I believe that it is foul. Please help resolve this issue.
Comment: Please be precise about the rule set you're using.
Answer: If it rolls foul before reaching first or third base, it is foul.  If it is fair at that point, and then rolls out, it is fair.  You are correct.

Here are 3 of 8 regulations for a foul ball

Settles or is touched (not caught) on or over foul territory between home and first base or between home and third base.
Bounds or rolls past first or third base on or over foul territory.
While over foul territory, touches the person, attached or detached equipment, or clothing of a player or an umpire or any object foreign to the natural ground

ASA Softball: Fair or Foul Ball
1 and/or 2 apply in your example.  The blogger is directly referencing the rule book with this listing, but the link in the blog is outdated.
Comment: That link is dead. Also, unless it includes an ISF document, then no, it's not the rule book.
Comment: @Nij - thanks for the heads-up, there was a typo in the link. There is no difference between the ISF and ASA rules on foul ball definition, unless you can point to something that says otherwise.  I've looked at the ISF rules, and they are identical to what is listed in my answer.  There is no difference.
Comment: Better to make that clear, and best to use the international rules reference either way.

Softball foul ball rules


Do I need a visa if I am travelling from London to India, but plan to book a ticket with a layover in Bucharest and Riyadh?

Question: I am an Indian citizen travelling from London to India and I am planning to book a ticket with a self transfer at Bucharest and Riyadh. I only have one cabin bag. Do I need a visa for the self transfer?
Comment: Its much headache and probably expensive than a connection made by airline to arrange the visas.
Comment: For self-transfer bookings, you need to fulfil the entry requirement for the destination of each ticket (PNR), whether that entails getting a visa or being eligible for visa on arrival or visa-free entry. So you need to fulfil the entry requirements for Romania and Saudi Arabia to be allowed boarding.
Comment: Are you an Indian citizen?
Comment: Yes I am. I am in uk on student visa
Comment: Related: https://travel.stackexchange.com/questions/171352/do-i-always-need-to-go-through-immigration-if-i-have-a-self-transfer/171372#171372
Answer: Assuming that you are an Indian citizen :

Romania - Transit Visa

Visa required.
Visa Exemptions
Passengers with a "D" visa issued by Bulgaria, Croatia, Cyprus or a
Schengen Member State for a maximum stay of 90 days. TWOV (Transit
Without Visa)
Passengers transiting through Bucharest (OTP), Cluj-Napoca (CLJ),
Sibiu (SBZ) or Iasi (IAS) with a confirmed onward ticket for a flight
to a third country within 24 hours. They must stay in the
international transit area of the airport and have documents required
for the next destination.

Saudi Arabia - Transit Visa

Visa required.
Visa Exemptions
First-degree family members of passengers with a 'Saudi Premium
Residency' card. TWOV (Transit Without Visa)
Passengers transiting through Dammam (DMM), Jeddah (JED) or Riyadh
(RUH) with a confirmed onward ticket for a flight to a third country
within 12 hours. They must stay in the international transit area of
the airport and have documents required for the next destination.
Only one transit stop-over in Saudi Arabia is permitted.

As you are doing self tranfers, you will need both a Saudi Transit Visa first (if you don't get it first, your Romanian visa will be denied :

Supporting documents to get a B-type visa:

visa issued by the state of destination;

and then get a Romanian B visa, to be applied on the Romanian visa platform
Comment: OP mentions that he has only hand luggage. Wouldn't he be able to stay in the transit area in that case, hence be exempt from getting visa?
Comment: It will depend on if they can check in online, if they can't, they will for sure need a visa
Comment: I guess you checked Timatic for transit, but you must check it for destination since they are both self-transfers and each airline will most likely consider the next connection to be the final destination (especially if it is a low-cost airline). This makes transit through OTP require a visa, and transit through RUH not require one (visa on arrival, as OP has a UK visa).
Comment: @jcaron Saudi VOA is only for tourist and business visa, not for a student visa hodlder
Comment: @NicolasFormichella Ah indeed. So two visas required.
Comment: @Sabine They might, but typically for self-transfer as far as each airline is concerned the *final* destination is the one to which they are transporting the passenger, so they may well deny boarding.


No stairs to lower bomb spot?

Question: It seems that in Couter Strike:Global Offensive on de_nuke there are no stairs in the outside area (head right from terrorist base) to the lower bomb spot. This was the case in CS 1.6 and seems to be the case in VODs from tournaments. I assume it just is not there and another version is played in tournaments, right? Or is there a button or trick to open/reveal the stairs?
Comment: What map is this question about?
Comment: Sorry, I had de_nuke in the title, then deleted and forgot to add somewhere else.
Comment: de_nuke, most likely. It could also be de_aztec but that's not played in tournaments.
Answer: The version used by most tournaments is de_nuke_ve, which was remade by professional player Volcano. You can read more about the changes he made here. The main (relevant) difference is that he moved the stairs down to lower to a more accessible area outside. Note that this is unlike any previous version of de_nuke.
Valve's rationale behind the removal of this pathway was that the stairs were very underutilized anyway and that this thus streamlines the action, and while that was true removing it makes the terrorist options incredibly limited and allows the CT's to consolidate even more easily.
As of the patch on December 12, Valve has integrated most of the key aspects of de_nuke_ve into the standard version of de_nuke used by matchmaking.
Comment: Hm, ok, so there really are no stairs in the CS:GO version. I like the streamlining of the maps (the smaller demolition maps are more action, less camping/sneaking long periods) but on de_nuke I really dislike the change. The de_nuke_ve would have been a better choice for CS:GO competitive mode matches.
Comment: @Konsta There has been a large debate in the community about Valve's refusal to put the more competitive versions of maps (generally _se maps) into matchmaking. It cheapens the potential of the system and forces people to pay for things like ESEA, which is pretty annoying.

No stairs to lower bomb spot?


Radioactive Decay Equations and Some Related Confusion on Discrete vs. Continuous Growth/Decay, Continuously Compounding Interest, etc.

Question: UPDATE: I've gotten some great answers regarding the first part of my question, related to radioactive decay specifically - thanks! However, I'd still very much appreciate a response to the second part of my post, regarding discrete vs. continuous compound interest and other such stuff I'm still confused about. Really everything starting with "More specifically, this new discovery..." is still uncertain to me.

While there are a number of questions on this site already regarding radioactive decay, my question has not, I believe, been asked here.
Essentially, I am confused by the fact that Wikipedia (and other sources) lists three formulas for decay that are said to be equivalent but look quite different from one another:
Wikipedia screenshot here
Previously, I had always used the simple half-life equation with 1/2 being raised to a power (the first equation on the above-linked list). That made sense to me.
But now I see from my research that there are other equations for decay involving the number e! And I am consequently confused about the relationship between the half-life equation I've always used and these other equations with e in them.
More specifically, this new discovery is prompting me to question some of my old understandings about the simple half-life equation. First, I'd always thought that the simple half-life equation graph created a smooth curve for even non-integer numbers of half lives. But if continuity is already achieved WITHOUT using e in the equation, what is so special about e? I always thought there was something unique about e that applied to continuous growth (think continuously compounding interest) ... whereas other growth wouldn't be continuous. I know I'm missing something here but I can't quite put it into words.
More broadly, this has really started to make me wonder about the difference between "regular" compound interest and continuously compounded interest. Does "regular" compounding create a smooth curve, or does it technically just create a set of discrete points? The formula for ordinary compound interest - let's say compounding annually for simplicity: [final amount = P(1+r)^n] - is clearly a continuous formula without "gaps" in the graph, since I never see it limited to integer numbers of years (n). But compounding would appear intuitively to be discrete (except in the special case of continuous compounding). E.g., you don't make any extra interest between January and May if the compounding date is December 31, right?
I wonder if one of my sources of confusion could be the difference (if there is one) between continuous compounding and a continuous function...?
Note that I am only in Pre-Calculus, so while I understand the general concept of a derivative as the instantaneous rate of change, I don't know too much about them (and I know basically NOTHING about integrals). So if possible please avoid resting your answers on Calculus topics I haven't learned yet.
Anyway, I apologize for the length. But I really hope someone here has a way of explaining this that can resonate with me. I really like to fully understand math concepts and find being confused really uncomfortable. Thank you so much. :)
Answer: $\frac{1}{2}=e^{-ln2}$.  Therefore $\frac{ln2}{t_{1/2}}=\frac{1}{\tau}={\lambda}$ shows that they are all essentially the same in defining radioactive decay.
Answer: These are all the same equation with the time constant defined differently to give the same result.
$$N(t)=N_0\left(\frac 12\right)^{\frac t{t_{1/2}}}\\N(t)=N_0e^{-\frac t\tau}\\N(t)=N_0e^{-\lambda t}$$
The second two are related by $\frac 1\tau=\lambda$ where $\tau$ is the mean lifetime and $\lambda$ is the decay rate.  For the first, we can use the fact that $e^{-\log 2}=\frac 12$ to write it as
$$N(t)=N_0\left(e^{-\log 2}\right)^{\frac t{t_{1/2}}}=N_0e^{-\frac{t \log 2}{t_{1/2}}}$$
and with $\frac {t_{1/2}}{\log 2}=\tau$ we recover the second.  There is nothing magic about using $e$ or $\frac 12$ or something else as the base of the exponent.  You just need to adjust the constant correctly.  Using $e$ is natural because it comes out of solving the differential equation $$\frac {dN(t)}{dt}=-\lambda N(t)$$
This is also the motivation for calling $\lambda$ the decay rate.


What was the biggest region in the Holy Roman Empire that was never Protestant, if any?

Question: It is well known that Germany is denominational divided. This comes from the time of Reformation and esp. the Peace of Augsburg 1555, when the right of each prince of the Empire to decide over the denomination in their territory (at least of the Third Estate) is defined. The most of today's Catholic regions were (more or less) Protestant at some point, but their princes managed to recatholise them during the "Counter-Reformation" esp. with help of the Jesuits later on.
This leads to the question, if there were any region that did not need to get recatholised, but stayed Catholic the whole time. In detail I mean:

"the whole time" is between 1500 and 1800 or an earlier date, when modern religious freedom came in force.
"Protestant" means to have a officially protestant pastor and/or known Protestant noblemen living there.
"region" means a connected area in the Holy Roman Empire following administrative or ecclesiastical borders and including at least one parish (Kirchspiel, Pfarrbezirk)

I know (2) is bit difficult to identify in the beginning of the reformation, but I think, we can deal with this.
Answers should give only one region. The biggest region (per area), that is properly explained, will get the checkmark. Of course an detailed explanation why we won't find such a region is correct too.

In the map we see that (nearly) the whole Empire (the rest of Europe is not interesting for me) was some kind of disputed between the denominations or fully protestant in 1560. But this map has no high resolution. I search for local spots that resisted the reformation. More accurate: that never recognised the exercise of the Protestant religion.
Comment: @TomasBy: Eek! None of Spain or Portugal were ever in the H.R.E. - despite being at times part of a personal union with the Empire.
Comment: Roughly half of it, starting with what is now modern Austria and Bavaria. that's what the Thirty years War was all about.
Comment: Yes, Spain, Italy, Portugal, etc.  VTC for no research.
Comment: @PieterGeerkens good point, I was about to delete the comment as I realised it myself.
Comment: Something like "What was the largest contiguous area in the Holy Roman Empire be to remain Catholic" would make a much more accurate headline given the actual request you are making.
Comment: @PieterGeerkens et al. I don't understand the closure of my question. Please point me to the "standard reference source" that answers *my question* on parish level (not principalities!) in the H.R.E.
Comment: @BrianZ Thanks. That may be a good idea. I will wait till I understand the reasons for the closure before I edit something.
Answer: Short Answer:
The Holy Roman Empire was larger than you might think, even in 1789, and included lands in France and Italy that might possibly never have had any Protestant clergy.
There were many ecclesiastical states ruled by Roman Catholic clergy remaining in the Holy Roman Empire in 1789.  Most of the prelates who ruled those states would have been strongly opposed to Protestantism, though there were examples of prelates who didn't oppose it.  Any ecclesiastical state which had an unbroken succession of anti Protestant rulers from three centuries since the Reformation might possibly never have had a single Protestant pastor in a single parish.  The ecclesiastical states seem like a good place to look for parishes without Protestant pastors for 300 years.
Long Answer:
In 962 Otto I the Great, the mighty King of the East Franks or Germany and of Italy or Lombardy, was crowned Emperor in Rome.  From 962 the positions of King of Germany and King of Italy were attached to the position of Emperor.  In 1032 Emperor Conrad II acquired the Kingdom of Arles or Burgundy and from 1032 the position of King of Arles or Burgundy was attached to the position of Emperor.
The Kingdom of Arles or Burgundy included western Switzerland and the southeastern sixth of Modern France.  The Kings of France gradually acquired various fiefs in the Kingdom of Burgundy over the centuries.  And it is common for historical maps to show such fiefs as being in the Kingdom of France and no longer in the Holy Roman Empire after being acquired by the King of France.  But is it accurate?
I note that the title of the King of France in the Kingdom of France was King of France and of Navarre.  Here is an example from 1690 in the Reign of Louis XIV:

(Jan 1690) [5: tome 23 (1883); p.503]
  < Louis XIV (+1715), King of France 1643 >
  Louis, par la grace de Dieu roy de France et de Navarre

http://eurulers.altervista.org/france.html1
But in Provence and Forcalquier in the Kingdom of burgundy in the Holy Roman Empire the title of the King of France was King of France and of Navarre, Count of Provence, Forcalquier and adjacent Lands.  Here is an example from 1789:

(Mar 1789) [3: p.164; Doc.# LXXXIII]
  < Louis (+1793), King of France (Louis XVI) [1774-1792]; Count of Provence [1774-1789] >
  Louis, par la grace de Dieu, roy de France et de Navarre,
  comte de Provence, Forcalquier et terres adjacentes

http://eurulers.altervista.org/provence.html2
In Dauphine the title was King of France and of Navarre, Dolphin of Viennoise, Count of Valentinois, Diois.   Example from 1789:

(July 1789) [55: p.9]
  < Louis (+1793), Dolphin of Viennois; King of France (Louis XVI) [1774-1792] >
  Louis par la grâce de Dieu Roi de France et de Navarre,
  Dauphin de Viennois,
  Comte de Valentinois et Diois

http://eurulers.altervista.org/dauphine.html3
So it seems to me that a lot more of the Kingdom of Burgundy remained in the Holy Roman Empire than most historical maps show.
In Italy, lands that remained part of the Holy Roman Empire until the French Revolution included Piedmont, Genoa, Modena, Montferrat, Mantua, Parma, the Grand Duchy of Tuscany, etc.
Ecclesiastical states which lasted until the French Revolution included The Archbishoprics of Salzburg, Trier, Mainz, & Cologne; the Bishoprics of Augsburg, Bamburg, Brixin, Constance, Eichstatt, Friesing, Hildesheim, Liege, Paderborn, Passau, Regensburg, Speyer, Strasborug, Trent, Worms, and Wurzburg; plus 23 imperial abbeys in the Bench of Swabian Prelates and 19 imperial abbeys in the Bench of Rhenish Prelates.
https://en.wikipedia.org/wiki/Prince-bishop4
https://en.wikipedia.org/wiki/Princely_abbeys_and_imperial_abbeys_of_the_Holy_Roman_Empire5
Since most of the prelates who ruled those states would have fought strongly against the reformation (though there ae examples of prelates who didn't), a state where each and every clerical ruler for 300 s years was strongly opposed to the Reformation might not have ever had a single Protestant pastor in any parish.  Thus the individual history of each of those states, and especially whether all of the rulers strongly opposed the Reformation, would be a strong clue to which of them would most likely have had parishes that never had Protestant pastors.
Comment: Yes that are candidates to look for, but it is not clear any of this fiefs remained catholic the whole time. For example in Cologne there were strong protestant movements and it got almost reformed in the 1540s. Large parts of Mainz got reformed and some stayed even till the end. In France there were a eight wars between catholics and protestants. Can you point me to any single parish that remained catholic?
Comment: @K-HH  No, I am not an expert on the history of individual states in the Holy Roman Empire, let alone on parish level history.  But if the Italian fiefs of the Holy Roman Empire count for your question I have the impression that there was very little Protestant activity in Italy.  In any case you will have to find states that were consistently Catholic and anti Protestant to start a search for a parish that was consistently Catholic for 300 years.


Stable and Unstable point for GEO satellite

Question: For GEO satellite, 24h period, it has four equilibrium points (two stable point and two unstable point). At the equilibrium point, the transverse acceleration is zero, so semimajor axis changes slowly.
At stable point, satellite will oscillate around it. But at the unstable point, satellite will drift and move to the closest one of a stable point.
My question is, why does satellite at the stable point just oscillate around it while at the unstable point the satellite will drift to the closest one of a stable?
Comment: The straight down orientation is the pendulum's stable equilibrium point. The straight up orientation (an inverted pendulum) is the pendulum's unstable equilibrium point. The pendulum doesn't oscillate about the unstable equilibrium point.
Comment: By way of analogy, think of an undamped pendulum that starts at zero angular velocity at initial deflection angle with respect to straight down. With two exceptions, the pendulum will oscillate about straight down. The two exceptions are when the pendulum is initially in the straight down orientation or initially in the straight up (perfectly inverted) orientation. In both cases, the pendulum just stays there, forever. A tiny deviation from straight down results in tiny oscillations about straight down, but a tiny deviation from straight up results in huge oscillations about straight down.
Answer: As you have written, an object (infinitesimal near) near an unstable point will drift to a stable point, but it will not stop there but drift further. So an object (starting infinitesimal near) an unstable point will also oscillate around a stable point. But while the "amplitude" near a stable point is very small, an object at an unstable point has an amplitude of nearly 180 deg. it will accelerate to the stable point, "overshoot" it, be decelerated till it nearly reaches the other unstable point and go back again and again...
..::EDIT::..
(I started this as a comment but its to long and actually part of a valid answer:)
@ElisaFitri the amplitude near a stable point is SMALL. So basically all objects oscillate around stable points. But for example: there is a stable point at about 108 deg. If you start at 107deg, you drift to 109 deg, and back to 107 and so on. Starting at 8 deg lets you drift to 208 deg and back. All this comes from the shape of the earth.
Looking from top earth is more elliptical than circular. So somewhere on orbit (not at the four equilibrum points at the axis) where is always "more" earth right or left from the zenit, so you will be ac-/de-celerated towards. For LEO, this compensates in one tour around earth.
Comment: Thank you very much for your answer @CallMeTom.

Would you explain why does the amplitude of oscillation near a stable point is very much, while at an unstable point has an amplitude of nearly 180 deg?
Comment: Also, thank you to @uhoh for the correction.
Comment: I added an explanation to my answer @ElisaFitri
Comment: mhh, I try to rewrite it
Comment: Hope it is clearer now
Answer: Let's step away from satellites and just look at stable vs. unstable equilibrium. (I'm making use of standard examples from 1st-semester Calculus textbooks).  The top of a hill is unstable equilibrium, because an object there won't move on its own. The only force is gravity, pointing straight down. But the tiniest push in any horizontal direction moves the object to a slope, and then it moves away from the top of the hill, never to return.
A stable equilibrium is a valley, or better a bowl. Again, at the very bottom, the only force is gravity, straight down.  But now a small horizontal push causes the object to move uphill, and when that push is terminated, gravity pulls the object back towards the bottom of the bowl
In the absence of friction (as with the satellite), the object will continue to move up and back down in a sinusoidal motion.
But be warned - the satellite's  "stable equilibrium" is a local minimum , so a large enough push will move it into an unstable non-equilibrium orbit.
Comment: I got it, thank you so much


remove nvidia graphics card and use integrated intel graphics

Question: I have a desktop ubuntu 14.04 system that has an nvidia graphics card and intel graphics on the motherboard. I Want to remove the nvidia card from the system and use only the intel graphics.  The system is currently running the nvidia 3.41 driver.  I'm new to linux and need help with the steps I have to take to switch over to the intel integrated graphics. Any help greatly appreciated.
Comment: http://www.webupd8.org/2014/01/prime-indicator-lets-you-quickly-switch.html this allows you to select which driver you are using
Comment: also https://github.com/beidl/prime-indicator
Answer: If you don't want to install any extra packages, switching between the nVidia GPU (Performance Mode) and the Intel GPU (Power Saving Mode) could be achieved by using the NVIDIA X Server Settings, which has already been installed along with your driver.
First thing you will need to do is to find the NVIDIA X Server Settings application from your dash:

And go to the PRIME Profiles page

From there, after entering your password you will be able to switch between your GPUs:

The last step is to log out, and it's done!
Comment: As you're a reputation 1 user: don't thank the answerer, but click the grey **☑** under small number at the left of this text, which means "yes, this answer is valid"!  ;-)


How did this notable figure end up in the Old West?

Question: At the end of the Magnificent Eight (ep 11) in Legends of Tomorrow, it turns out the boy who had tuberculosis is H.G. Wells. But Wells was born and raised in Kent, UK. Was this simply the writers being cheesy, or is it one of the differences of the DC universe to ours?
Comment: Maybe he built a Time Machine?
Comment: I don't see any problem here. The mother said the boy wanted to see the west before he died. I didn't get any impression that they had any intention of moving there permanently.
Answer: This is a change introduced by the Legends of Tomorrow writers. To my knowledge, H.G. Wells never appeared in the American West in any other version of the DC universe.
Within the context of the show, Wells was brought to Dakota by his mother partly to satisfy the boy's "bucket list" dream of seeing the American West, partly on the advice of his doctor:

Sarah: He's been like this on and off for about a year now. He always wanted to see the American West. Our doctor thought a constitutional might do him some good.
Legends of Tomorrow Season 1 Episode 11: "The Magnificent Eight"

This is obviously impossible to reconcile with our real world, for a couple of reasons:

Although Wells did visit America, his first visit was in 1906, not 1871; he wrote a book about the experience
As well, Wells was born in 1866, meaning he would have been five years old when the events of "The Magnificent Eight" ocurred. The child we meet in the episode is not five years old

To my knowledge there is no indication of why the writers of the show decided to include Wells as a character.
With the lack of other evidence, I'm forced to conclude that this is just one of the ways the Arrowverse differs from our own universe.
Comment: What about the possibility that some time-travel shenanigans changed Well's age (he was born earlier) and made him travel to the US?
Answer: I think it was simply a way to "cover" the events that just occurred. The futuristic events that happened in front of the town folk would be explained away by H. G. Wells stories. Artistic license.
Comment: Even Startrek was more precise with such time  loops. They give Mark Twain a little too old look (in reality he wasn't yet grey)?  Time arrow episode precisely had put two notable figures, him and Jack London, present in right town and right time.


How to describe someone whose eyes sparkle mischievously?

Question: I've been told that I'm telling instead of showing when I say my characters' eyes sparkle 'mischievously.' How do you describe something like that? I've been looking it up and trying different tricks that usually help, but nothing is working.
Comment: Imho the secret here is to show from the POV of the narrating character. "Her eyes sparkled with a mischievous glint" sounds like an opinion to me, rather than a 'tell' from the narrator. I don't think you're that far off, personally.
Answer: Eyes that sparkle with humor, mischief, or ja ne se qua are already 'showing.' The phrase is so well-worn that it is not recognized as a deeply internalized observation of one person's attraction towards another.
What that writing advice is shows me, is that whomever is you telling this are trying to cloak their feedback inside an appeal to authority — their appeal to show don't tell.
What they should have told you was that phrase is cliche.  And, if it is an important moment in the story, then it deserves powerful narratives and description and not tired old retread phrases written by god knows who over a hundred years ago.
This doesn't mean that we should never use cliches, they are true memes. Furthermore, because everyone knows what they mean, they are very efficient ways to communicate elements about character, setting or mood — It was dark and stormy night, he was a man that looked foul but seemed fair.
In my opinion, cliches work best went the stakes are low and there isn't much at stake in the story.
Answer: Show it elsewhere:
There's nothing wrong, in my opinion, with having some tell in your show. It is, in fact, very difficult to eliminate all together. To carry off the show with less tell, you'd need to communicate the intent with other body parts.
So the person has a smirk on their smiling face, and their face crinkles a bit as they tell a sarcastic tale. Their eyes glint as they squint. They seem ready to break out in barely-suppressed laughter. A point-of-view character might recall this expression from another time when the character did something else full of mischief. The person might bounce with energy. They relay their plans through conversation. If it IS the point-of-view character, then you have their own thoughts you can reveal.


My UIActivityIndicatorView disappears too soon making it useless, would delay be the best way to fix this?

Question: Need a loader and spinner to show on my pages that display a list of people on my parse.com database. Right now I'm concentrating on one controller my UITableViewController.
Here is my code:
- (void)viewDidLoad
{
    [super viewDidLoad];
    dispatch_queue_t downloadQueue = dispatch_queue_create("downloader", NULL);
    UIView *taggedView = [[LoadingView alloc] initWithFrame:[[self view] bounds]];
    [taggedView setTag:17];
    [[self view] addSubview:taggedView];

    dispatch_async(downloadQueue, ^{
        //Load my data from parse.com here into an NSMutableArray
        //which is the used in my datasource methods
        NSLog(@"downloading");

        dispatch_async(dispatch_get_main_queue(), ^{
            //Here is where I hide the loader view
            NSLog(@"downloading done.");
            UIView *viewToRemove = [[self view] viewWithTag:17];
            [viewToRemove removeFromSuperview];
        });
    });

I've taken out the code that loads my data from parse.com to make things cleaner but the commeting makes it clear where it all goes.
I never see the loader unless I comment out the viewToRemove lines. Then it just obviously stays on the screen. The problem is it just loads and is taken away too quickly. Also for some reason I can also see the table row lines and I do not wish to see them. I want the loader view view to cover the whole area until data is loaded then maybe a second or 2 later remove itself.
LoaderView file (found this on the web):
#import "LoadingView.h"

@implementation LoadingView

#define LABEL_WIDTH 80
#define LABEL_HEIGHT 20

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setBackgroundColor:[UIColor whiteColor]];
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake((self.bounds.size.width-LABEL_WIDTH)/2+20,
                                                                   (self.bounds.size.height-LABEL_HEIGHT)/2,
                                                                   LABEL_WIDTH,
                                                                   LABEL_HEIGHT)];
        label.text = @"Loading…";
        label.center = self.center;
        UIActivityIndicatorView* spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
        spinner.frame = CGRectMake(label.frame.origin.x - LABEL_HEIGHT - 5,
                                   label.frame.origin.y,
                                   LABEL_HEIGHT,
                                   LABEL_HEIGHT);
        [spinner startAnimating];
        [self addSubview: spinner];
        [self addSubview: label];
    }
    return self;
}

So my mission is to have a white backgrounded view with a spinner and word "Loading". Is my method of achieving this efficient or is there a better way to do this? If so I'd appreciate some help here.
Kind regards
UPDATE
Parse code that gets the data for me.
// Grab data for datasource and store in people array
 NSLog(@"view will appear");
people = [[NSMutableArray alloc] init];

PFQuery *query = [PFQuery queryWithClassName:@"People"];
[query whereKey:@"active" equalTo:@1];
[query orderByDescending:@"createdAt"];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {

    if (!error) {
        for (PFObject *object in objects) {
          //  NSLog(@"%@", object);
            Person *person = [[Person alloc] init];
            [person setName:[object objectForKey:@"name"]];
            [person setNotes:[object objectForKey:@"notes"]];
            [person setAge:[[object objectForKey:@"age"] intValue]];
            [person setSince:[object objectForKey:@"since"]];
            [person setFrom:[object objectForKey:@"from"]];
            [person setReferenceNumber:@"14-334544"];

            PFFile *userImageFile = object[@"image"];
            [userImageFile getDataInBackgroundWithBlock:^(NSData *imageData, NSError *error) {
                if (!error) {
                    UIImage *image = [UIImage imageWithData:imageData];
                    [person setImage:image];
                }
            }];

            [person setActive:[[object objectForKey:@"active"] intValue]];
            [person setObjectId:[object objectId]];
            [people addObject:person];

        }

        dispatch_async(dispatch_get_main_queue(), ^ {
            [[self tableView] reloadData];
        });

    } else {
        // Log details of the failure
        NSLog(@"Error: %@ %@", error, [error userInfo]);

    }

}];

Comment: What is the Parse method you're using to download? Is it a `downloadInBackground` method or does it block the thread it's on?
Comment: Yep it's findObjectsInBackgroudWithBlock
Answer: Since you're using findObjectsInBackgroundWithBlock the code that is to be executed on the main thread is executed immediately, and the block is executed when the objects are found.  Your code to remove the loader should be executed within the dispatch async that's already in that block:
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
    // do something with the objects
    dispatch_async(dispatch_get_main_queue(), ^{
            [[self tableView] reloadData];
            // remove the loader
            NSLog(@"downloading done.");
            UIView *viewToRemove = [[self view] viewWithTag:17];
            [viewToRemove removeFromSuperview];
    });
}];

For the question about seeing the cells prior to the objects loading, you should make sure that you're reusing cells and that your tableViewController's delegate methods are responding to the number of objects appropriately, so that before you have downloading the objects you are returning no data to be placed into the tableview.
Answer: All of your Parse code is asynchronous, so it finishes nearly immediately.  By the time the view actually appears (after viewDidLoad, viewWillAppear, viewWillLayoutSubviews, and viewDidLayoutSubviews all finish), all your Parse code is done since it returns immediately.
For the effect you're looking for, you should block your background Parse thread.
For example, change:
[userImageFile getDataInBackgroundWithBlock:^(NSData *imageData, NSError *error) {
    if (!error) {
        UIImage *image = [UIImage imageWithData:imageData];
        [person setImage:image];
    }
}];

to:
NSError *error;
NSData *imageData = [userImageFile getData:&error];
if (!error) {
    UIImage *image = [UIImage imageWithData:imageData];
    [person setImage:image];
}

You'll need to similarly change [PFQuery -findObjectsInBackgroundWithBlock:] to use the synchronous version.
However, consider the alternative: don't show a loader, keep using the background blocks, and then display data as it comes in.  This is a much nicer experience than showing a loader.
tl;dr: you're using both GCD async blocks AND Parse's background blocks.  Just use one or the other.
Comment: I considered using the alternative method but I notice that a split second before the data is loaded I see the words "Title" and "Subtitle" in place of where the actually data will be. That's the main reason I wanted a loader. To hide all of that taking place.
Comment: Just set those strings to blank in your xib/storyboard.
Comment: You can also change them programmatically in your awakeFronNib method.
Comment: I tried this the other day in the storyboard options. Deleted the text in subtiles and title and then my data stopped showing in the table so I undone the deletion and they showed again.
Comment: I don't want to veer off-topic (editing labels would be a separate question), but you should be able to do this.  Maybe an issue with the size of your frames after you deleted the text?  Anyway, I believe I've answered this question. If you want to work on the storyboard bit, you should mark an answer here accepted and post a separate question for that.


How to show one post content in another post content which has same terms?

Question: I am trying to solve a problem for last two weeks but still I haven't not found  any solution yet.
Let me explain my problem first:
I have two custom post types: one is football_fixture and second is football_league.
These two CPT have two common taxonomies: one is "competition" and second is ''session".These two taxonomies have terms also; for example: laliga, EPL, Seria and 2016-17, 2015-16 respectively.
Now what I want :
In my football_league  post , I want to show the content of football_fixture according to following condition:
1)In football_league post If  I select term of competition taxonomy  and session taxonomy then it will show only the content of football_fixture posts which has those terms.
See image for more explanation:

Suppose, I have published 5  football_fixture  posts  with competition terms "laliga" and session term "2026-17".
Now if I published a football_league post with competition terms "laliga" and session term "2026-17" then it will show those 5 football_fixture's 5 post.
Is it possible?
I used following codes:
Answer: I have solved the problem myself:
What I did is:
First created single-football_league.php template where i placed following codes:
<?php while ( have_posts() ) : the_post(); ?>
                    <?php get_template_part( 'content-parts/content', 'league' ); ?>
                <?php endwhile; ?>

Second:
In content-league.php, I placed following codes, and it works:
$terms = wp_get_post_terms( $post->ID, array('competition', 'session') );
$term_slugs = wp_list_pluck( $terms, 'slug' );
 $season = wp_get_post_terms( $post->ID, 'session' );
$season_slugs = wp_list_pluck( $terms, 'slug' );
$args = array(
        'post_type' => array( 'football_fixture' ), // profile and letter are CPTs
            'tax_query' => array(
                array(
                'taxonomy' => 'competition',
                'field' => 'slug',
                'terms' => $term_slugs
                ),
               array (
              'taxonomy' => 'session',
              'terms' => $season_slugs,
              'field' => 'slug')
            )
    );


Origins of Zariski topology

Question: Why did Zariski feel the need to define his famous topology? Was this notion used in one form or another prior to him in algebraic geometry?
Answer: Zariski introduced his topology in this paper: The compactness of the Riemann manifold of an abstract field of algebraic functions, Bull. Amer. Math. Soc., 50 (1944), 683-691.  You can read it online here. See also p. 79 of his talk at the 1950 ICM: The fundamental ideas of abstract algebraic geometry, pp. 77-89 in "Proceedings of the International Congress of Mathematicians, Cambridge, Mass., 1950", vol. 2, Amer. Math. Soc., Providence, R. I., 1952. Scroll down to the volume 2 link for the 1950 ICM here.
Some pages about the importance of the Zariski topology in algebraic geometry are this MO page and MSE pages here, here, here, and here.
The idea that maximal ideals (not yet prime ideals) in a commutative ring could be profitably viewed as the points in a space can be seen in Gelfand's work in the 1930s, and whether or not that might have had an influence in algebraic geometry was asked on the MO page here.
Comment: Very interesting stuff ! Now I understand better the deep reasons of introducing that notion. These reasons are usually not apparent in a first introductory course in algebraic geometry, where the introduction of Zariski topology seems a bit artificial. But it seems that in the end, the ultimate notion is that of Grothendieck topology, which allows to define properly etale coholmology.
Comment: Oh yes I meant algebraic geometry of course ! (edited). Anyway, thank you fot your answer very usefull indeed.
Comment: OK, I edited my answer to account for your typographical error and I added a link to another MO page at the end.

Origins of Zariski topology


HTML5 Audio Tag in Safari

Question: I have a question about the  tag in Safari. I have a page with many audio players on it and have set preload="none" so that page loads faster. In all other browsers, there is no text inside the player, but Safari (5.1.7, Mac) shows the text "Loading..." in the player. I personally don't mind it, but I know it will confuse users who think they should be waiting for something to download and may never click the play button.
Is there a way to set that text to something else, or even better, hide it completely?
Any help is appreciated!
Thanks,
Brett
Answer: As far as I know, this is something that Safari does by default and can't be changed. However, you could use some sort of jQuery HTML5 player and add a function to display the "loading" text only when the audio is buffering.

HTML5 Audio Tag in Safari


Does a one time additional payment reduce the interest paid on a Prosper or Lending club personal loan

Question: I have a loan with Lending Club with a certain interest rate. So every month I pay the principal as well as about $200 in interest. Assuming the loan balance left is $20000 and the interest rate is 7%, What affect does an additional $5000 payment will have on the interest savings (if any?)
Answer: Depends on the terms of the loan.
Some loans apply the additional payment as advance payment of the next billing cycle. For those, the only advantage of paying in advance is that it build a buffer against possible missed payments late.
Some loans apply additional payment to the principal. That _does reduce the total interest you'll pay, perhaps more than you would expect due to compounding.
Many are willing to do either, but if you don't tell them that you want the additional money applied to the principal they usually default to taking it as a prepayment only.
Check with your lender to find out what options are available to you and how to tell them what you want them to do.