Creation of electric field inside a conductor

Question: My book says that as soon as the two ends of a conducting wire touches the two terminals of a battery, it generates an electric field inside the conductor. Why?
Comment: Imagine a pipe filled with water with both ends sealed. You tilt the pipe by a certain angle with respect to the horizon, nothing happens. Now you and your friend simultaneously unseal the pipe from both ends and water leaks out of the pipe. The same happens to the metal rod (water - electrons in metal; gravity - potential difference between the terminals; insulating material, say air, between the rod's ends and the battery terminals - sealing on the pipe's ends; electron current - water leaking down the pipe).
Answer: There is an electric field between the battery terminals even before you connect the wire. For example, positive ions in the air will be attracted towards the battery's negative terminal (and repelled by the battery's positive terminal). Vice versa for negative ions. The mean magnitude of the electric field strength is given by $$E=\frac{\text{pd between terminals}}{\text{distance between terminals}}.$$
When you connect a wire across the terminals, there will be some redistribution of free electrons in the wire, resulting in an electric field in the wire, parallel to the axis of the wire, constant in magnitude all along it and directed from the positive terminal of the battery towards the negative. The magnitude of the field strength will be$$E=\frac{\text{pd between ends of wire}}{\text{length of wire}}.$$Free electrons will flow through the wire as a result.
The initial redistribution of free electrons, rendering the field in the wire as described above, will be almost instantaneous, but not quite, as electric field disturbances travel at approximately the speed of light.
Comment: umm...I would like to ask a question on this.....the thing is that gauss's law says that if there are equal and opposite charges inside a Gaussian surface then the net electric field created outside the surface  is zero ....so my question is that are both the terminals/electrodes holding the same amount or unequal amount of charge??
Comment: Equal and opposite, I'd suppose, but I'm not sure whether you're making valid use of Gauss's law. Where/what is your Gaussian surface and what are you deducing in this particular case?
Comment: @SayantanDas Gauss's law does not implies the field to be zero in the case you described, rather it says that net electric flux through a surface is zero .
Comment: Sorry, but I don't understand how you are applying Gauss's law. I'd stand more chance of doing so if you could give me answers to my previous questions: (1) Where/what is your Gaussian surface? (2) What are you deducing in this particular case, and how does it relate to my answer above?
Answer: Think of it this way, one side of the battery has a higher pressure and the other has a lower pressure as there is no such thing as a negative anywhere in our universe. when they are connected the higher pressure flows to the lower pressure as this is with all our universe. the wire will then create a magnetic field that surrounds the wire which in turn is surrounded by an electric field at 90 degrees from the magnetic field on the outside of the wire. at no time is an electric field created inside of a wire as this is an external force and the fact that a copper wire is a dielectric reflector so it is quite obvious that the Author is fooling himself and it's students.
an electric field from the chemically induced battery begat current flow and as such will create and electric and magnetic field around the wire.


Is the sum and difference of two irrationals always irrational?

Question: If $x$ and $y$ are irrational, is $x + y$ irrational? Is $x - y$ irrational?
Comment: What is $\sqrt{2} - \sqrt{2}$?
Comment: $ (\pi) $ and $ (1 - \pi) $ are irrational. But $ (\pi + (1 - \pi)) = 1$ is not.
Comment: If $x$ and $y$ are irrational, then at least one of $x+y$ , $x-y$ is irrational. Maybe that's what you want.
Answer: The short answer to your question is that is not necessarily true. For instance, $\sqrt{2}, \sqrt{2}-1,1-\sqrt{2}$ are all irrational but $$\sqrt{2} + (1-\sqrt{2}) = 1 \in \mathbb{Q}$$ and $$\sqrt{2} - (\sqrt{2}-1) = 1 \in \mathbb{Q}$$

However, it is worth noting that if $x$ and $y$ are irrational, then either $x+y$ or $x-y$ is irrational i.e. $x+y$ and $x-y$ cannot be both rationals. The proof for this is given below.
Proof
If both $x+y$ and $x-y$ are rational, then we have that $x+y = \dfrac{p_1}{q_1}$ and $x-y = \dfrac{p_2}{q_2}$, where $p_1,p_2 \in \mathbb{Z}$ and $q_1,q_2 \in \mathbb{Z} \backslash \{0\}$.
Hence, $x = \dfrac{\dfrac{p_1}{q_1} + \dfrac{p_2}{q_2}}{2} = \dfrac{p_1q_2 + p_2q_1}{2q_1q_2}$ and $y = \dfrac{\dfrac{p_1}{q_1} - \dfrac{p_2}{q_2}}{2} = \dfrac{p_1q_2 - p_2q_1}{2q_1q_2}$.
Now $p_1q_2 + p_2q_1, p_1q_2 - p_2q_1 \in \mathbb{Z}$, whereas $2q_1q_2 \in \mathbb{Z} \backslash \{0\}$.
This contradicts the fact that $x$ and $y$ are irrationals. Hence, if $x$ and $y$ are irrational then either $x+y$ is irrational or $x-y$ is irrational.

Below are some statements worth knowing.

1 Sum of two rationals is always a rational.
Proof: Let the two rationals be $\dfrac{p_1}{q_1}$ and $\dfrac{p_2}{q_2}$, where $p_1,p_2 \in \mathbb{Z}$ and $q_1,q_2 \in \mathbb{Z} \backslash{0}$. Then $$\dfrac{p_1}{q_1} + \dfrac{p_2}{q_2} = \dfrac{p_1q_2 + p_2q_1}{q_1q_2}$$
where $p_1q_2 + p_2q_1 \in \mathbb{Z}$ and $q_1 q_2 \in \mathbb{Z} \backslash \{0\}$. Hence, the sum is again a rational.

2 Sum of a rational and an irrational is always irrational.
Proof: Let the rational number be of the form $\dfrac{p}{q}$, where $p \in \mathbb{Z}$ and $q \in \mathbb{Z} \backslash \{0\}$ while the irrational number be $r$. If $r + \dfrac{p}{q}$ is a rational, then we have that $r + \dfrac{p}{q} = \dfrac{a}{b}$ for some $a \in \mathbb{Z}$ and $b \in \mathbb{Z} \backslash \{0\}$. This means that $r = \dfrac{a}{b} - \dfrac{p}{q} = \dfrac{aq-bp}{bq}$ where $aq-bp \in \mathbb{Z}$ and $bq \in \mathbb{Z} \backslash \{0\}$. This contradicts the fact that $r$ is irrational. Hence, our assumption that $r + \dfrac{p}{q}$ is a rational is false. Hence, $r + \dfrac{p}{q}$ is a irrational.

3 Sum of two irrationals can be rational or irrational.
Example for sum of two irrationals being irrational
$\sqrt{2}$ is irrational. $\sqrt{2} + \sqrt{2} = 2 \sqrt{2}$ which is again irrational.
Example for sum of two irrationals being rational
$\sqrt{2}$ and $1-\sqrt{2}$ are irrational. (Note that $1-\sqrt{2}$ is irrational from the second statement.) But, $\sqrt{2} + (1-\sqrt{2}) = 1$ which is rational.
Comment: For the first proof, wouldn't this be simpler: if $x + y, x - y \in \mathbb{Q}$, then $(x + y) + (x - y) = 2x \in \mathbb{Q}$, so $x \in \mathbb{Q}$, and similarly for $y$?
Comment: @Dancrumb I'd assume we've already established that $\mathbb{Q}$ is a field. Alternatively we can use **1** above as a lemma.
Comment: good answer... **+** $\sqrt 2 +(1-\sqrt 2)$
Comment: $\sqrt 2 - 1$ is irrational being the sum of a rational and an irrational.
Comment: @Abhishek: Yes, that's the point: Marvis has given examples of irrational numbers with rational sum or difference.
Comment: @ecatmur, that seems like a circular argument. You're assuming that  the sum of two rationals is a rational in all stages of your argument.
Comment: @ecatmur Yes. It would be simpler.
Comment: @user17762 And there's a populist badge for ya.
Answer: The two are the same question, since $x-y=x+(-y)$, and $-y$ is irrational if and only if $y$ is irrational. The answer is not necessarily: $\sqrt2+(-\sqrt2)=\sqrt2-\sqrt2=0$, which is rational.
Answer: Hint:
$(2+\sqrt{2}) +(2-\sqrt{2}) = 4$ and $(2+\sqrt{2}) -(-2+\sqrt{2}) = 4.$
Answer: Using the language of group theory, a couple of the observations in user17762's excellent answer can be generalized considerably.

Proposition 0. Let $H$ denote a subgroup. Then: $$HH^c \subseteq H^c \,\mbox{ and }\,H^c H \subseteq H^c$$
That is: "An element of a subgroup times a non-element will always be a non-element."

Proof. We're trying to show:
$$\mathop{\forall}_{x,y \in G}(x \in H \wedge y \in H^c \rightarrow xy \in H^c)$$
Equivalently:
$$\mathop{\forall}_{x,y \in G}(x \in H \wedge xy \in H \rightarrow y \in H)$$
So assume $x \in H$ and $xy \in H$. Then $x^{-1} \in H$, so $x^{-1}(xy) \in H$, so $y \in H$. QED
Remark. The above proposition doesn't hold if "subgroup" is replace by "submonoid." For example, let $H$ denote the set $\{0\} \cup \{2,3,4,\cdots\},$ viewed as an submonoid of the group $\mathbb{Z}.$ Then $2 \in H$ and $2+1 \in H$, but it would not be correct to say that $1 \in H$.
Anyway, as a special case, we deduce:

Corollary. $$\mathbb{Q} +\mathbb{Q}^c \subseteq \mathbb{Q}^c$$ That is: "A rational number plus an irrational number will always itself be irrational."

The opening observation of user17762's answer is trickier. It would be nice if the following were true:

Wishful thinking (Version A). Let $H$ denote a subgroup of $G$. Then: $$\mathop{\forall}_{x,y \in G} \left(x \in H^c \wedge y \in H^c \rightarrow xy \in H^c \vee xy^{-1} \in H^c\right)$$

But this is completely false, even in the Abelian case. For instance, let $H$ denote the subgroup $2\mathbb{Z}$ of $\mathbb{Z}$. Then $3$ and $1$ are non-elements of $H$, but despite this, both $3+1$ and $3-1$ are elements of $H$. In short: something has gonna horribly, awfully wrong!
Before going on, lets spend a few paragraphs to "improve" our wishful thinking in a very sensible way, despite that it will still be false. Then, later, we will add a premise to make it true.
Lets start off by strengthening Proposition 0 to the following:

Proposition 1. Let $H$ denote a subgroup of $G$. Then: $$\mathop{\forall}_{x,y \in G} \left(xy \in H \rightarrow (x \in H \leftrightarrow y \in H)\right)$$

Once again, the (extremely straightforward) proof is left as an exercise to the reader.
Remark. As before, the above proposition doesn't hold if "subgroup" is replace by "submonoid." For example, once again let $H$ denote the set $\{0\} \cup \{2,3,4,\cdots\},$ we observe that $2+1 \in H$, but it would not be correct to say that $2 \in H \leftrightarrow 1 \in H$.
Anyway, we can use the above theorem to remove improve our wishful thinking. Observe that under contraposition, the (false) claim under question is logically equivalent to
$$\mathop{\forall}_{x,y \in G} \left(xy \in H \wedge xy^{-1} \in H \rightarrow x \in H \vee y \in H\right)$$
But since we're assuming $xy \in H$, the statements $x \in H$ and $y \in H$ are equivalent, so this becomes:
$$\mathop{\forall}_{x,y \in G} \left(xy \in H \wedge xy^{-1} \in H \rightarrow x \in H \wedge y \in H\right)$$
Now contraposing again, we obtain:

Wishful thinking (Version B). Let $H$ denote a subgroup of $G$. Then: $$\mathop{\forall}_{x,y \in G} \left(x \in H^c \vee y \in H^c \rightarrow xy \in H^c \vee xy^{-1} \in H^c\right)$$

The case of the missing premise.
In order to see the problem with this (still bogus) "theorem," let us make a tentative attempt at proving the contrapositive. So assume: $$(0)\: xy \in H \qquad (1)\: xy^{-1} \in H.$$
The goal is to show that $x \in H$ and that $y \in H.$ Well from $(1)$, we know that $yx^{-1} \in H$. But $(0)$ says that $xy \in H.$ Hence, we can deduce $yx^{-1}xy \in H,$ or in other words we can deduce $y^2 \in H$. Unfortunately, we're now stuck. Fortunately, we've just found our missing premise! This becomes a definition:

Definition 0. Whenever $G$ is a group, call subgroup $H$ "square-root closed" iff it satisfies $$\mathop{\forall}_{x \in G}(x^2 \in H \rightarrow x \in H).$$
In symbols: $H^{1/2} \subseteq H$.

Remark. I don't think this is equivalent to $H \subseteq H^2$. Can anyone think of a counterexample?
Okay, we come to it at last:

Proposition 2. Let $H$ denote a square-root closed subgroup of $G$. Then: $$\mathop{\forall}_{x,y \in G} \left(x \in H^c \vee y \in H^c \rightarrow xy \in H^c \vee xy^{-1} \in H^c\right)$$

The proof is as above, and except that we use the square-root closedness of $H$ to finish it.
Returning to the subject of the rational numbers, note that since $\mathbb{Q}$ is being viewed as an additive subgroup of $\mathbb{R}$, hence to say that $\mathbb{Q}$ is square-root closed in the above sense is really just saying that $$\frac{1}{2} \mathbb{Q} \subseteq \mathbb{Q},$$ which is clearly true. Hence, we get

Corollary.
$$\mathop{\forall}_{x,y \in \mathbb{R}} \left(x \in \mathbb{Q}^c \vee y \in \mathbb{Q}^c \rightarrow x+y \in \mathbb{Q}^c \vee x-y \in \mathbb{Q}^c\right)$$
That is: "If either $x$ is irrational, or $y$ is irrational, then either $x+y$ is irrational, or $x-y$ is irrational."

This suggests an interesting question:
For which matrices $A \in \mathbb{R}^{2\times 2}$ is true that for all $x \in \mathbb{R}^2$, if one or both of the entries in $x$ fail to be rational, then one or both of the entries in $Ax$ will fail to be rational? We've just proved that the matrix $$\begin{bmatrix}1 & 1\\1 & -1\end{bmatrix}$$ has this property, but which others?
Answer: Example: $\log_2(8) = 3$
can be rewritten as:
$\log_2(24) – \log_2(3) = 3$
It is easy to see that $\log_2(24)$ and $\log_2(3)$ are both irrational, due to the fact that $24$ and $3$ are not integer powers of $2$.
If you assume that there is some simplified rational number $\frac{a}{b}$ in which $a$ and $b$ are both integers, $b$ is not $1$,  and $2^\frac{a}{b} = 3$, this implies that:
$$2^a = 3^b $$
which is impossible because raising $2$ to any integer power cannot magically yield $3$'s in its prime factorization, it is impossible for it to equal an integer power of $3$.
Similar reasoning can be applied to $24$, because $24$ does not contain all $2$'s in its prime factorization. A power of $2$ can never equal a power of $24$.
Prof. Yeager
ChickenCrossRoad
Answer: Let $x$ be irrational and $q$ rational.
Then
$$y=q-x\text{ and }y=q+x\text{ and }y=\frac qx\text{ and }y=qx$$ are irrational, while $x+y,x-y,xy,\dfrac yx$ are rational.

This also word with integers, $y=n-x,n+x,\dfrac nx,nx$ are irrational while  $x+y,x-y,xy,\dfrac yx$ are integer.
Answer: Proof of sum of two irrational nos. is rational:
Let one irrational no. be 0.989889888 and other irrational no. be 0.121221222. Then 0.989889888+0.121221222=1.1111111 bar.
Proof of sum of two irrational no. is irrational:
Let one irrational no. be 1.4142135.... and other ben1.7350208....
If we add both of them we get 3.14626436..... which is irrational
Hence we conclude that sum of two irrational nos. can be rational or irrational
Comment: $0.989889888 =  \frac{989889888}{10^k}$ for some $k$...


What are your "current parameters" in Minibatch Stochastic Gradient Descent?

Question: I was reading a book on Deep Learning when I came across a line, more like a few words that didn't make apparent sense.

Thus, we will often settle for sampling a random minibatch of examples every time we need to compute the update, a variant called minibatch stochastic gradient descent.
In each iteration, we first randomly sample a minibatch B consisting of a fixed number of training examples. We then compute the derivative (gradient) of the average loss on the minibatch with regard to the model parameters. Finally, we multiply the gradient by a predetermined positive value η and subtract the resulting term from the current parameter values.

We can express the update mathematically as follows ($∂$ denotes the partial derivative):

$(w,b) \leftarrow (w,b) - {η\over |B|} {\Large \Sigma}_{I \in B} \partial_{(w,b)}l^{(i)}(w,b).$
The set cardinality $|B|$ represents the number of examples in each minibatch (the batch size) and $η$ denotes the learning rate.
What does "current" parameter values mean in this context?
You can find the book here -
https://d2l.ai $\rightarrow$ Chapter Linear Neural Networks, Part 18.104.22.168
Answer: The current parameter values are the values of the weights $w$ and the biases $b$ in the neurons in each layer.  What you are calculating is the gradient of the average loss of the batch relative to the weight and the bias.  Since the gradient points "up", or toward greater loss, you multiply by the learning rate and subtract it from the current values.


Linear regression vs Time series analysis

Question: I am confused that when I should use static model (like cross-sectional regression) or other forms of time series model. I see some examples of analyzing time ordered data by crosss-sectional regression model. For instance, model GDP by using other economic factors but not time series analysis. Does such analysis a correct way to do? Do we still need to consider additional lags if the regression model already fulfill all its assumptions well? And do we need to add lagged term of dependent variables considering that GDP indeded has serial correlation?
Comment: I thought that the whole point of a _cross-sectional_ study is to "remove" the _time_ factor from the model. In that case, _time series_ analysis isn't applicable by definition. Please correct me, if I misunderstood your question.
Answer: What you typically want from a model is that the parameter estimators be consistent and have a known distribution (typically normal or asymptotically normal). Given these properties, you can rely on them without further adjustments and use the estimated model for inference, policy implications etc. Consistency and distributional properties can be achieved if the model satisfies the statistical assumptions underlying the estimation method. These assumptions are testable, so it makes sense to test them after you have estimated the model.
If these assumptions are not satisfied, your parameter estimators may be inconsistent or have weird distributions. Then you cannot readily use them and you have to be more careful about inference.
Some more background:
There are different traditions of modelling and thus different modelling approaches. A review article by Gilbert (1986) throws some light on that.
Some would start from a theoretical model which is supposed to be "true" (i.e. correctly specified) in the subject-matter sense, estimate it, find out it does not withstand the tests on statistical assumptions underlying the estimation method, and then start tackling the problem of how to estimate the parameters of the supposedly "true" model in a good way.
Others would say that not passing the test means the "true" model is misspecified (here we see an implication from the statistical domain carrying over to the subject-matter domain). They would rather not postulate a "true" model at the start but would build a reasonable specification so that the statistical assumptions are satisfied.
This is a crude take-away, at least how I understood it. Almost 30 years have passed since the publication of the paper, and perhaps one of these approaches is the dominating one now, but I do not have the data on that so I cannot claim anything with certainty.


Do native english speakers use both the retroflex and bunched "r" sound?

Question: I've read that some native speakers say the "r" sound by bunching their tongue (bunched "r") and some by pointing their tip at the alveolar ridge (retroflex "r"). When I say it, it sometimes feels more natural to pronounce it one way, and sometimes the other, depending on the sounds around it. Do native speakers also do this? Should I practice only saying it one way?
Comment: If the r is at the beginning of the word it feels different, like in "run" it starts with the bunched. But an r at the end of the word may use the retroflex.
Comment: @Tilen: A while ago I looked at a number of ESL websites, and various English teachers had all sorts of strange rules for when to use the bunched 'r' and when to use the retroflex 'r' (at least strange to me). So use whichever you feel is most natural. They're allophones in English, which means we can't tell the difference (like the Japanese can't tell the difference between 'r' and 'l') unless the listener is somebody trained in phonetics and is listening closely.
Comment: I'm American.  We are the kings of the rhotic R.  I've never used a retroflex R in English.  Maybe Brits do.  I only use the bunched R.  The most difficult rhotic Rs appear following each other in an unstressed syllable (e.g., error, clearer, fairer).  Try saying the name Rory Rohrer.  According to a Harvard study, even about one-third of native speaking Americans will stumble on that name, often saying something that sounds more like Roy Roar, the unstressed "rer" sound being the most difficult to articulate, and it's all with the back of the tongue at the throat.
Comment: @Benjamin: *error, clearer, fairer* aren't hard when the first 'r' is a retroflex and the second a bunched one. That's the way I pronounce them (and I'm American).
Comment: Also there are rhotic and non-rhotic pronunciation zones.
Comment: W.E. so does the retroflex r only appear in r-colored vowels? And should it appear in any specific ones?
Answer: Yes. According to Mielke, Baker & Archangeli (2010), in American English, some speakers consistently use only one shape, some others employ both interchangeably, and others alternate the two consistently depending on environment.
Consonants that involve the tongue body (especially [ʃ] and [k]) and [i] are more or less bunched already, so /r/ adjacent to these sounds tends to be bunched. Retroflex /r/ is common when next to labials, word boundaries, and back vowels because these sounds do not interfere with retroflexion.
As seen in Zhou et al. (2007), however, there are various degrees of bunching/retroflexion and the shape of /r/ can often be somewhere in-between.
As for your practice, you need not worry or be conscious about it so long as you can produce either of them because there is very little audible difference. You should use whichever you find easier to pronounce; in fact that's what native speakers do.
Comment: Using bunched next to the consonants [ʃ] and [k] makes sense to me. However, [i] is a front vowel, and using a retroflex [ɻ] or alveolar [ɹ] is so much easier for me in this case.


MinRole Topologies

Question: What are MinRole topologies and what is the best practice to configure topologies in SharePoint 2016? What are the differences between front end servers and Distributed Cache servers?
Answer: Without using the Custom MinRole, MinRole High Availability will require a minimum of 9 servers; 3 Distributed Cache, 2 Web Front Ends, 2 Search, and 2 Application Servers. Licensing and hardware availability will determine what topology you will pick; this will determine the route for 'best practice'. I suspect many companies will continue to use a Custom role, provisioning services manually.
Distributed Cache servers run DC, while FEs run a variety of services, including the Foundation Web service (DCs also run this, but you shouldn't use them as FEs using the dedicated MinRole).
MinRole Overview

MinRole Topologies


Slimy inside of green onions

Question: I've never had a problem when they are out of season, but sometimes when I buy big, beautiful, local green onions, inside the green part is VERY slimy! I have asked the produce guys about it on different occasions and they all look at me like a deer in headlights!  Any answers?
Comment: Maybe you are in a region where it is not customary to use the raw green parts, so customers rarely ask?
Answer: Yes?
That is, I'm not entirely sure what your question is... but if you're asking if they are, than yes, insides of green onions can be slimy.
Since you're seeing the problem in in-season, fresh, local, big green onions, I suspect the slime you're seeing is simply - sap.  The green onions may be fresh enough to still contain living sap, and large enough to keep their moisture.  Out of season and non-local, shipping and storage then you're probably not getting onions with quite so much life in them.  If this is the case, I would expect the sliminess to also correlate with really bright, fresh flavor.
If your question is what can you do about it, if you don't want the sliminess?  You might let the onions sit in your fridge for a few days - that should give the plant time to dry out a bit.  You might buy slightly older, drier onions.  you might chop them to size, then let dry (or rinse and then let dry) before using in other preparations.  If the issue is the freshness of the sap, there's nothing else to be done.

Slimy inside of green onions


Display message box from Task Scheduler on top of all other windows

Question: Is there a nice way to get a message box to pop up at a scheduled time on top of other windows? The default "Display a Message" action uselessly appears below everything else.
Answer: How about using Window's built-in msg command like so?
msg * "Message you would like to send"
You can add other parameters such as /TIME:x where x is the number of seconds you want the message to display. Of course, msg /? will show you all the options available.
This implies Windows XP and higher as the system where you want to display the message. If you have a Home Edition of the applicable OS, you're out of luck. See http://ss64.com/nt/msg.html for available parameters.
If you have a Home Edition, the following batch script will pop-up a message using VBSCript's PopUp method:
@echo off
::See http://msdn.microsoft.com/en-us/library/x83z1d9f(v=vs.84).aspx
::for an explanation of the PopUp method
::

::Use the directory from whence script was called as working directory
set CWD=%~dp0

::Use a random file name for the temporary VBScript.
set usrmsg=%CWD%%random%.vbs

::First parameter is the timeout in seconds. 0 = wait forever
set _timeout=%~1

::Second parameter is the message, enclosed in quotes.
set _Message=%~2

::Third parameter is the title of the window, enclosed in quotes.
set _Title=%~3

::This last variable is used to display a button/icon on the window.
::Setting this to 4096 sets the window to Modal (on top of everything else)
set _nType=4160

::Create the temp script using the provided information.
ECHO Set wshShell = CreateObject( "WScript.Shell" )>%usrmsg%
ECHO wshShell.Popup "%_Message%" ^& vbCrLf, %_Timeout%, "%_Title%", %_nType%>>%usrmsg%

::Run the script.
WSCRIPT.EXE %usrmsg%

::Delete the script.
DEL %usrmsg%

::Exit the batch file
exit /b

Hope this helps!
Added: Gregg mentions in the comments that in order for this to work in Windows 10, you must use "/time:0" if you want the message to stay on-screen longer than 60 seconds.
Comment: FYI msg automatically closes after 60sec unless you specify `/TIME:0`. This is on Win10 x64 v1607 Enterprise LTSB. I was wondering why my script tested fine, but I never got message when I put in Task Scheduler. Shameful plug: https://serverfault.com/a/931932/131761
Comment: What are you talking about? What is `msg`? I get nothing if I try to run it from the Run box or from the command prompt.
Comment: You didn't specify in your question which version of Windows you have. If you have a Home edition, you're out of luck. http://ss64.com/nt/msg.html
Answer: Also see https://www.howtogeek.com/136894/how-to-create-popup-reminders-with-no-additional-software/. In case of link death, I'll summarize here:

Open Windows Task Scheduler (search 'Task Scheduler' in the Start menu)
Under Actions, click 'Create Task'
In the General tab, make sure 'Run only when user is logged on' is checked, and 'Hidden' is NOT checked
In the Triggers tab, click 'New' to set a time for the message to trigger
In the Actions tab, click 'New' and make sure the selected action at the top is 'Start a program'
In 'Program/script', type CMD
In 'Add arguments', copy and paste this:

/C TITLE [Your title here] &ECHO.&ECHO.&ECHO [Your message here] &ECHO.&ECHO.&TIMEOUT [timeout]

Replace [Your title here] and [Your message here] with your preferred text (do not include the brackets)
Replace [timeout] with the number of seconds you want the message to wait before timing out, or -1 if you don't want it to time out (either way, a key press while the console window is in focus will close it)
Click 'OK'!

This will generate a console window with the given text, which will appear ON TOP of your current window, but won't automatically steal the focus (you can keep interacting with your current window as usual).
This was the best solution I found, hope it helps someone!
Comment: This should be the accepted answer very slick, thank you!
Comment: To run ever hour : https://www.dummies.com/computers/pcs/create-a-task-to-display-a-pop-up-message-in-windows-task-scheduler/
Answer: Use msgbox in vbs. like this:
Set filesys = CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("Shell.Application")
Set wshShell = WScript.CreateObject( "WScript.Shell" )
PCName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
msgbox "Dear user on " & PCName & vbcrlf & " " & vbcrlf & "This is a message box on top of all other windows.", &h51000, "I am msgbox"
shell.Open "C:\Users"

Code &h51000 will make sure msgbox in central and on top of all other windows all the time.
If you only want to schedule a msgbox, you can simply use task scheduler, there is a built in function to schedule a message. see location of [start a program] in task scheduler.
Answer: Display a Message is deprecated, and msg command didn't work for me in Windows 10 1703. I'm using powershell to display the message box from a scheduled task, use this as arguments when defining the action:
-WindowStyle hidden -Command "& {[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('<message body here>','<window title here>')}"

It's ugly AF, but it works.
Comment: You might want to state what happens when you use your solution. The error may be helpful to other users.
Comment: I don't get what is missing from my response. When I use the `powershell` solution a message box appears. When using the `msg` solution nothing happens, as I state in my comment.
Comment: I tried the same with

    `powershell -WindowStyle hidden -File ""`

but it doesn't work, it works only with `-Command` argument, so:

    `powershell -WindowStyle hidden -Command "& ''"`


Serial Comma During Change of Articles

Question: Does a change of articles "reset" the item count when it comes to serial commas? For instance, if using the serial comma, does the statement "I am the author of the book XYZ, a presenter and teacher," require a comma after presenter, or does the change in article reset the number of items to two? I don't have a specific reason why it would, but in writing a similar sentence it struck me as a possibility.
Answer: In order to maintain parallel structure in your sentence, you would repeat the article, like this:

I am the author of the book XYZ, a presenter, and a teacher.

Personally, I prefer the serial comma but it is considered a style choice. You could omit the comma there and the sentence would still be clear. You would still need the article for parallel structure though:

I am the author of the book XYZ, a presenter and a teacher.

Serial Comma During Change of Articles


Which cookware is best from health perspective?

Question: Cookwares are made up of various materials. Which cookware is best from health perspective? Please include anodised aluminium and stainless steel in your answer.
Answer: The best cookware is made up of clay. It is very healthy and good for you body.
Clay pots prove good for slow cooking as their porous nature allows both moisture and heat to circulate easily through them. ...
Clay being alkaline in nature helps in neutralising the pH balance of the food by interacting with the acid present in the food.
Wood is also very beneficial for your health.. while Plastic is really dangerous from all perspectives.
Comment: You can't claim that wood's good for your health - ever tried chewing it. The alkaline part only makes sense as long as your food is acidic (which it isn't necessarily), once you start eating pretzels and alike (which are already alkaline), it's the negative effect you wanted to avoid. Please explain how clay is good for your body? Should we all start to consume pallets of clay and wood?
Answer: The only safe alternative I've seen is ceramic (not glazed with lead/nickel/aluminium etc)
You should avoid especially aluminium and stainless as it can leach and cause bad health effects(aluminium leaches alot more). Avoid the non stick scam,they are coated with plenty of plastic/polymers causing various lymphatic illness.
There is ceramic that is safe, and maybe graphite cookware .
Source with 12 studies linked :https://donate.ewg.org/images/ewg_teflontempinfo_c02.pdf
In the meantime you can cook your food at less high temperature(avoid higher than 240 celcius,which makes it almost useless) ,or cook in glass/borosilicate or ceramic in the oven,until you get a pan. Using oil to cook and not leaving it unattained will reduce alot of non-stick,and you can wash it straight after also.There is natural stick resistant ceramic enough for any if not most foods needs.
Also don't trust any compagny using fluoride/chloride(or polymers/plastics) in cookware,I will not enter into the who would want people to ingest that,but the same thing is in water,in some transformed food ,which blocks the thyroid,pineal and alot of glands if not all of them. Notice how overcommercialised it is and almost everyone has one ? Also the Fda is so biased and hiding cures that I don't trust anything from them.
According to Environmental Working Group :
" Exposure to PFCs has been associated with kidney and testicular cancer,
high cholesterol, abnormal thyroid hormone levels, pregnancy-induced
hypertension and preeclampsia, obesity and low birth weight – all good
reasons to reduce your exposure. "
I don't really have the time to find all the studies, altought I have checked on Ncbi/Pubmed ,on that website aluminium is very proven to leach(example aluminium cookware in oven and cofee percolator, stainless also but to a much lower extend(stainless is very often alloyed with nickel,chromium,molydbenum, it is still a health risk on the long term. Just another way of getting cancer or another illness.
I also don't have the concrete proof but I've seen people claiming fluoride increased aluminium effect/transportation in the brain.
Comment: Do you have any reputable scientific references for this claim? It is my understanding that, when used properly (i.e. not overheated or scratched) PTFE (aka, Teflon if you're DuPont) coated cookware is perfectly safe. Here is [one:] (http://swac.web.unc.edu/thepipettepen/ask-a-toxicologist-is-it-safe-to-use-teflon-pans/)
Comment: I found one study that links 12 studies https://donate.ewg.org/images/ewg_teflontempinfo_c02.pdf
At 680° F (360 degres celcius) Easily attainable on stove...!
Toxic gasses released:
TFE (tetrafluoroethylene)
animal carcinogen
HFP (hexafluoropropene)
worker toxicant
TFA (trifluoroacetic acid)
poisonous to plants
DFA (difluoroacetic acid)
Animal kidney toxicant
MFA (monofluoroacetic acid)
lethal to humans at low doses
PFOA (perfluorooctanoic acid)
animal carcinogen
Comment: While 680° might be easily attainable on a stove, it is almost never encountered during normal cooking. And we're talking about normal PTFE, not the byproducts it produces when overheated.
Comment: Alot of people cook on the highest setting so yes it is encountered in normal cooking. This is a concern also for stainless,iron or aluminium recipients.
Theres not only PTFE, and we're talking about cookware in general.
Comment: Palm oil has a smoke point of 455°F and auto-ignites a few degrees above that, so I hope anyone cooking on a pot heated to 680°F isn't using anything but 30w crankcase oil.
Comment: Please include resources in your answer.


General Approach in Zen-Theming: 3 different fixed-width layouts based on viewport-size

Question: I am building a zen-subtheme which should have 3 breakpoints depending on viewport-size, but none of the layouts has sidebars, there is a small horizontal navigation for all layouts.
By default, Zen provides a responsive-sidebars.scss and fixed-width.scss - since i need media-queries on one hand but no fluid sidebars etc. on the other hand, i don't know, what's the best way to go.
Comment: try omega theme.
Comment: You could also remove all sidebar references in your subtheme and customize it for your needs... it's all plug and play :)
Comment: thanks for your hints! i think i'll give omega-theme a try.
Answer: Zen 5 has mobile/responsive built-in, and it works really well. I found the conversion from Zen 3 fixed to Zen 5-Responsive fairly easy, and I went with the dev version (Jan 2013). As suggested, you could take out all the sidebars, but they don't really get in the way.
I had to spend some time learning responsive images, in particular responsive background images.


how to detect firewall with scapy

Question: I open a port 4000 on  computer A and send a packet from another remote computer B
but A didn't get the packet, I think maybe the enterprise firewall filtered the packet
how can I detect this?
are there any traceroute functions in scapy or other tools that can detect this?
thanks!
Answer: what was the function that you used in scapy and how did you open a port?
detection of the firewall depends to type of the firewall and term of network.
traceroute in scapy ==>
traceroute("www.google.com", maxttl=10)
Answer: first probe the port using nmap through different tcp scan types (ex:-sS/-sT) to check if it's open or not, if it works then craft a packet similar to this one:
"ans,unans=sr(IP(dst="rhost here"/TCP(flags="S",sport=RandShort(), dport=4000, verbose=0, timeout=2"
then -> ans.show()
if you get SA(SYN/ACK) response then port is open and filtering is disabling on this port
otherwise it's closed when you get RA(RST/ACK) or filtered if no response(SYN flag set)

how to detect firewall with scapy


Spacecraft localization beyond Earth orbit

Question: How does a spacecraft localize itself after leaving earth orbit? In robotics you can either use known broadcasting information or do real-time position tracking(some type of SLAM) but I suspect that probably isn't going to work in this case given the scale.
Comment: Related: https://space.stackexchange.com/q/45245/6944 "There are multiple methods by which a satellite may determine where it is." That is mostly for Earth orbital, but this addresses deep space navigation https://space.stackexchange.com/q/10717/6944
Comment: Another related question:https://space.stackexchange.com/q/21336/6944
Answer: Spacecraft in between planets oftentimes do not know where they are, and if they do it's because they maintain a rough estimate based on more precise estimates occasionally sent from Earth. The key problem with maintaining position and velocity state is that it is impossible to measure gravity. Gravitational acceleration has to be estimated based on position and velocity. Non gravitational acceleration can be sensed; this is what an accelerometer measures. The estimated gravitational acceleration plus the sensed non-gravitational measurements can be integrated to update velocity estimates, which in turn can be integrated to update position estimates. This is called dead reckoning. Occasional fixes are needed lest the vehicle become dead.
Spacecraft oftentimes do know where they are pointing (attitude). Pointing information can easily be obtained using star trackers, with a once per a tenth of a second to a once per a ten second update rate, and maintained in between star tracker updates using rate gyros. Dead reckoning is a much less significant issue for attitude as opposed to location, for many reasons. First and foremost, the updates can be obtained on the spacecraft. Even low-cost spacecraft are now outfitted with star trackers. Secondly, the updates are frequent. The drift with a ten second lag between star tracker updates is not that much. Thirdly, the integration is direct (sensed rate integrates directly to attitude) as opposed to rather indirect (sensed+estimated acceleration integrates to velocity, which in tern integrates to position).
This is problematic for vehicles that will land on another object, be it a planet, moon, asteroid, or comet. Landing with some landing legs two meters higher than others is a recipe for a tip over disaster. Here, local state information is much more important than global state information. Landers use a number of sensors and algorithms, mostly vision-based, to perform landing. A big problem is avoiding hazardous terrain. The Apollo program relied on human eyes and human brains. Hazard avoidance while landing an autonomous vehicle on a planet, moon, asteroid, or comet -- that's challenging.
Answer: Usually the spacecraft position is computed on Earth and therefore it does not know where it is. This computation is made using Deep Space Network (DSN) where we send a signal to the spacecraft which sends it back to us.  From this signal we can then calculate its position and send back a maneuver if necessary.
The problem is that these signal exchanges can be long and it can quickly become a problem when the spacecraft is far away.
If the spacecraft knew its position, this would eliminate the processing on Earth and the satellite could navigate itself, by sending just one signal from Earth to the spacecraft. However, this requires having a very precise clock on board.  GPS satellites carry atomic clocks to help us get to our destinations on Earth, but those clocks require updates several times a day to maintain the necessary level of stability. Deep space missions would require more stable space-based clocks.
The Deep Space Atomick Clock has been developed for this, you can see this article for more information.


Does max aperture affect photo quality even when shooting with smaller one?

Question: I notice that my faster lenses seem to make better photos even when shooting at f8 or higher. Or  is it just because of the quality of the glass (faster lenses are usually more expensive) or am I just fooling myself?
Answer: Yes, faster lenses are generally higher quality.
There's another aspect too - when autofocusing, the lens is generally opened up to its widest aperture. This narrows the DOF which can affect the accuracy of the focus.
Comment: In addition, on many cameras, wider/better AF points can be used (those that require f/2?8 or better).
Answer: Any broken bottle of f/4 or higher will be great stopped down to f8.
There is certainly a difference when it comes to phenomena like flare, coma, spherical aberration, spherochromatism, low contrast etc which haunt, especially non-aspherical, primes when wide open. They will often be better corrected in eg an f/1.4 50mm at f/2 than a "native" f/2 50mm. Of course, it always depends to some degree at what you are comparing.
Also, you can focus with the lens wide open, which will make AF performance better for many systems, and will make MF easier (or get you a usable finder image AT ALL in very low light situations!).
Mind that some effects that depend on there being an aperture-stop-shaped aperture stop  (eg sunstars, many bokeh factors) will also be different...
Answer: Results depend on the specific lenses you are using and your expectations. Some people may not care as much about some lens characteristics. So equipment one person considers acceptable may be considered poor by another, and vice versa.
Faster lenses are often, but not always, of higher quality than slower lenses because manufacturers tend to put more care into manufacturing them. But some slower lenses may be more suitable for different tasks.
Also, as you push the aperture smaller (F8 and higher), diffraction degrades image quality. Better-made lenses (which often have faster apertures and cost more) tend to handle it better.
Examples of lenses that make different trade-offs with respect to speed, image quality, and price.

Canon EF-S 24/2.8 STM – "Slow", but sharp and inexpensive.
FujiFilm XF 35/1.4 – Fast, sharp, and 5x the cost of a Neewer lens.
Minolta AF 50/2.8 Macro – "Slow", but sharp with low distortion. Focuses from infinity to 1:1.
Neewer 35/1.2 – Fast, but not sharp and poor flare handling. What to expect from such a cheap lens?
Answer: Focusing accuracy of low f lenses doesn't have anything to do with DOF, but with the higher luminosity (light that goes thru the glass) of the faster lenses –what you see in the viewfinder of a DSLR with a pentaprism is always the lowest f-stop or larger aperture available in that lens and focusing is done thru the lenses at this f-stop– compared with slower one specially noticeable in low light situations.
If you are buying brand name fast lenses, f-stops below f1:2.0, you are not probably buying a zoom lens but your single focal distance and you are also paying top dollars for them. 90% of that translates in much better lens design and manufacturing than what you would find in cheaper lenses.
Anyways the sweet aperture (best result) of most, if not all, fast lenses are obtained when they are stopped down to f1:5.6 or f1:8 but almost never when you approach any of the extremes f1:1.4 or f1:22.


what does 0 indicate in socket() system call?

Question: what 0 indicates in following line?
what are other flags i can use?
server = socket(AF_UNIX, SOCK_STREAM, 0)

Answer: As others have likely said, the third argument to socket is generally an int indicating the protocol.  0 indicates that the caller does not want to specify the protocol and will leave it up to the service provider.
Other than zero, another common one is IPPROTO_TCP.
Full details can be found on the man page using man 2 socket on your machine or visiting here.
Answer: From the man pages of socket:
int socket(int domain, int type, int protocol);

The  protocol  specifies  a
  particular  protocol  to be used with
  the socket.  Normally only a single
  protocol
         exists to support a particular socket type within a given protocol
  family, in which case protocol can be
  speci‐
         fied  as 0.  However, it is possible that many protocols may
  exist, in which case a particular
  protocol must be
         specified in this manner.  The protocol number to use is specific to
  the "communication domain" in which
  commu‐
         nication  is to take place; see protocols(5).  See getprotoent(3) on
  how to map protocol name strings to
  proto‐
         col numbers.
Answer: The best thing to do here is read the man page. This document states that the third parameter is the protocol, which in this case is SOCK_STREAM but can be others.
Comment: SOCK_STREAM is for the second parameter, type, not the third.


What do we call a person who is obedient to someone even though he knows that that person is taking advantage of him

Question: Some people are willing to follow someone who is no good to them but they just follow them even when he is using them and they know it very well but still they are committed to obeying him. For example, they know that them being hurt will not move that person and that they are inferior to him but they do everything to not upset him. Is it clingy, sticky or what?
Comment: ...like a slave?
Comment: It's a 'lickspittle'. You can look this up in an in-house search; some will say that there's no true duplicate, but one can almost guarantee that the same group of synonyms will appear (sycophant, toady, brown-noser, drudge, doormat, kowtower, obsequious person, minion, hanger-on, leech, puppet, spaniel ...).
Answer: I can think of sycophantic, servile, subservient, grovelling, toadying, fawning, ingratiating, bootlicking.
Do any of those work?
Comment: You left out brown-nosing. Otherwise, looks complete. ^_^
Answer: Edwin's synonyms are all good. To get at this part: "they know them getting hurt will not move that person"—try doormat or whipping boy:
- I'm tired of being your doormat.
- I didn't want to grow up to be someone's whipping boy.
Answer: The term that comes to mind is "Punching bag"
Answer: The person you describe sounds a little masochistic (adjective). In other words, he is a masochist (noun). There is not necessarily a sexual component to this kind of masochism. I'm thinking of the third definition of masochistic:

A willingness or tendency to subject oneself to unpleasant or trying experiences.

As for why a person will endure all kinds of abuse, well, there could be any number of reasons. Perhaps a low self-image is at the heart of the kind of masochism you describe. Perhaps the issue is powerlessness and the feeling that nothing can be done to fix the situation.
Or perhaps the victim fears the victimizer's reprisals, almost as if the person in control is extorting the victim, and the victim fears what will happen if he protests against the abuse.


Anybody have any idea why this piston is powered?

Question: Anybody have any idea why this piston is still powered? There is not redstone power connected to directly to it, and the nearest sources are either an off torch or a repeater. If it helps I'm using minecraft version 1.16.4.
Comment: Possible duplicate of [Why are these pistons pushing?](https://gaming.stackexchange.com/questions/314678/why-are-these-pistons-pushing)
Answer: The piston receives power through quasi-connectivity from the block the torch is attached to. QC power acts upon elements that can receive it (pistons, droppers, dispensers) in situation where a block above the element in question would be activated - imagine placing a redstone lamp on top of the piston; if the lamp is lit, the piston is powered. In this case, the torch goes off after the block receives power, so the piston doesn't retract.
There's more to QC (related to block updates) but it's not relevant here. Regardless, what QC broke, QC can fix. Move your torch with all its power infrastructure a block up, and the piston will be out of range of the solid block's QC - and while it will be out of reach of the torch direct power downwards, the block space right above it won't. In other words, this works:
Comment: Thanks, will try this


Remove zombie buffers from recentf

Question: I want to get rid of invalid recentf entries, that is buffers that no longer exist on disk, because I renamed or just plain deleted them ; I just did a M-x recentf-cleanup and apparently lost all my history :/ what would be a sure and safe way to clean this list up?
Comment: What's the value of the variable `recentf-exclude` and the value of `recentf-keep`?
Answer: recentf-cleanup shouldn't remove all your history. According to the documentation (C-h f recentf-cleanup RET):

recentf-cleanup is an interactive compiled Lisp function in
'recentf.el'.
(recentf-cleanup)
Cleanup the recent list.
That is, remove duplicates, non-kept, and excluded files.

One can also edit recentf list manually with the following bit of elisp :
(delete "/the/file/you/want/to/remove.example" recentf-list)

(I'm not an expert, it may introduce bugs or there's probably a cleaner/more appropriate way to do it, I don't know. But it appears to work on my emacs.)
Edit : There's also :
M-x recentf-edit-list RET

recentf-edit-list is an interactive compiled Lisp function in
` recentf.el'.
(recentf-edit-list)
Show a dialog to delete selected files from the recent list.

Remove zombie buffers from recentf


Detecting a device joining WLAN

Question: Using Wireshark packet capture, I want to be notified when a new device joins my wifi network. Is it possible to determine this by capturing 802.11 control packets? If so, what filters will let me find this packet?
Answer: Not really.
Re-associations by existing devices (e.g.: coming out of hibernation, roaming from other APs etc) would appear identical to a new device joining.
Short of writing a display filter that matched associations NOT from existing MACs on your network, this would be very complex to do.
You would be better off tackling this from another perspective - e.g.: monitoring new DHCP leases (since most DHCP servers will maintain MAC-to-IP mappings for existing devices).
Answer: Every successful connection to Access Point will pass following steps:

Probe
Authentication
Association/Re-association

So filtering Association/Re-association Response packets will help to find out connected devices. Consider that these packets are management packets (not control). Following display filter of Wireshark shows Association/Re-association Response packets:
wlan.fc.type_subtype == 0x01 || wlan.fc.type_subtype == 0x03

Detecting a device joining WLAN


Failing to disclose contagious illness

Question: Suppose a doctor prescribes a family member (who lives in the same home) some test for an infectious disease, and then that family member tests positive. Is it a violation of medical ethics to fail to disclose this illness to other members of the household, given that the illness is highly contagious?
https://www1.nyc.gov/site/doh/providers/reporting-and-services/notifiable-diseases-and-conditions-reporting-central.page
Comment: In which jurisdiction? It's a big old world. You'd need to specify the disease too, as some are mandated to be reported, some not - again, it depends where - and pure infectiousness isn't the deciding factor.
Comment: In the US and not mandated to be reported in my state.
Answer: Whether it's ethical or not is a moot question because in the US it would be illegal under federal law to do so unless the doctor has the patient's written permission to inform the others.
The law that prohibits this is known as the Health Insurance Portability and Accountability Act of 1996 (HIPAA). Specifically, the Privacy Rule of HIPAA identifies Protected Health Information (PHI) as follows:

Protected Health Information. The Privacy Rule protects all "individually identifiable health information" held or transmitted by
a covered entity or its business associate, in any form or media,
whether electronic, paper, or oral. The Privacy Rule calls this
information "protected health information (PHI)."

Source
The specific restriction is as follows (same link, emphasis is mine):

Basic Principle. A major purpose of the Privacy Rule is to define and limit the circumstances in which an individual's protected heath
information may be used or disclosed by covered entities. A covered
entity may not use or disclose protected health information, except
either: (1) as the Privacy Rule permits or requires; or (2) as the
individual who is the subject of the information (or the individual's
personal representative) authorizes in writing.

Nowhere in the Privacy Rule does it permit informing family or cohabitants about infectious diseases -- or any PHI at all -- without the patient's permission.
Comment: You might want to add a section about the [mandate to report some diseases to health authorities](https://www.floridahealth.gov/diseases-and-conditions/disease-reporting-and-management/_documents/reportable-diseases-list-practitioners.pdf), and how via contact tracing etc. the relatives might be informed (i.e. sometimes the risk of covid exposure is discussed with the individuals [at least in some European countries], for which you need to share the potential spreading event), for the sake of completeness
Comment: Many US states also have exceptions to HIPAA for when the life or safety of an identifiable person are at risk. For example, if your patient is planning to murder their sister.
Comment: @IanCampbell I will include that along with Narusan's point. I'll also add that HIPAA itself contains an exception for notifying parents of minor children who are harming or threatening to harm themselves. But all these points are beyond the scope of the question asked, so they're rather incidental.
Comment: @Narusan Good point. I'll add more about that.
Answer: Failure of ethics for whom?

If the contagious patient does not disclose the risk for her/his family (and fails to protect them otherwise), endangering their health is a clear unethical violation.
For medical staff: at least depending on the jurisdiction, there are areas where all patient data is highly confidential unless the patients wants the medical staff to talk, with the exception of the patient directly endangering herself/himself or others. A classical examples is a patient in an altered mental state who cannot understand that driving quite is likely to kill himself or a child on the road, or a HIV positive patient who is not willing to inform and protect partners. This is always a balance of the thread to confidentiality vs. thread to life of the patient and third parties, and requires a real and direct danger that cannot be resolved otherwise. In these cases medical staff is allowed (and required) to prevent immanent danger, and if necessary break confidentiality - as much as really necessary.

In addition, there are common obligations to tell about serious infections (depending on the disease for clinical practitioneer and/or diagnostic lab, either anonymously or by name), to allow health care authorities to monitor outbreaks and possibly take countermeasures for the endangered public.
In cases of doubt and when time allows, fellow team members (e.g. your supervising professor, clinic attorney) or a medical ethics board my be involved in the decision.
Regarding your example: if the disease causes substantial harm and is likely to be transmitted, it would be unethical (and unlawful depending on the jurisdiction) to force the family to suffer.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).

Failing to disclose contagious illness


Reinstall OS on Karbonn A1+

Question: I have Karbonn A1+, android system of my phone totally hanged. i want format my phone and reinstall operating system. please suggest me method. (Android Operating System : Android 2.3 Gingerbread)
Answer: Do you want to void your warranty? If not, contact the Karbonn Customer Care and ask for the Official Flash Tool and a copy of the Stock ROM. Reboot your phone in recovery mode and reinstall the android using that tool.

Reinstall OS on Karbonn A1+


Using Kate text editor, how to compare two files and find differences

Question: I am using Kate text editor, and I would like to compare two files, and find (highlight) their differences.
Maybe there is a plugin to do that?
I would be open to solutions other than using Kate, e.g. a shell script, but I would like to integrate that somehow with Kate.
Comment: I've seen good recommendations of Kompare, the KDE diff viewer. But I don't use it myself and I don't know if it has any kind of integration with Kate. What do you mean by "integrate that somehow" anyway? It's a really vague statement.
Comment: Thank you @Gilles! I will have a look to Kompare. With the integration I mean something that allows me to do it while still in Kate, e.g. a script that I can launch in Kate's terminal. Or something that would open the results (different parts in the files, with line numbers) in Kate.
Answer: Using Kate 20.12.2, when you have at least two tabs open, you can right-click any tab and select "Compare with active document".
The choices I have in Debian 11 are "kdiff3", "kompare", and "meld". (These packages are not installed with the distro, and will need to be installed before they can be used.)

Alternatively, if you have a file open in Kate and the file is modified by another program, switching back to Kate will trigger a prompt that the file has been modified, and there will be a "View Difference" button that will compare with the previous version of the file.
Comment: I ave moved to the Flatpak version of Kate, and now this doesn't work anymore...
I still have meld installed, and the menu appears, when I right-click on the tab with two documents. However, I get a message: "The selected program can not be started. Maybe is not installed". I guess this has to do with the "sandboxing" of Flatpak. I have messed with some of the settings for Kate  in "Flatseal" (the sandboxing manager for Flatpak", but I can't get meld back. Maybe I need to export an environment variable? but which one?
Comment: There is a better answer now. Kate now comes with a built-in diff viewer. The context menu option noted in the answer now will now open that diff viewer. To be able to use an external diff tool there is another option below this one.


Hamburger icon to X usability?

Question: Is it more usable to toggle a hamburger icon to X to represent to signal users to open close a menu specially in mobile devices?
Answer: The state of the button shows what will it do when you click it.
In the page the hamburger button transmits there is a Navigation Drawer or sidebar to be opened. In my opinion, once opened, the hamburger icon shouldn't be used in the button as it would transmit clicking it opens a new Navigation Drawer.
Now, a close icon seems good to me. In Material design, however, they don't use a button to close it. So the way to close the sidebar is to either click on an element, on the page or to drag the sidebar (in touch devices).
Answer: I think you're asking if toggling a hamburger menu icon to an X when the drawer opens is better than leaving the icon unchanged?
If so I would argue that yes it's helpful, especially if you animate the transition. Updating state to reflect new capabilities is a good thing in my book. However abruptly changing symbols on people is a no-no.
If possible, you might want to reconsider having a hamburger menu at all. Nngroup has some compelling arguments against using them: https://www.nngroup.com/articles/hamburger-menus/
If you must use one, here's some guidelines to enhance navigability despite the hamburger: https://www.nngroup.com/articles/support-mobile-navigation/
Cheers
Answer: It depends. In the case of an app with a hamburger menu, there is no need for an X icon as users know that it is enough to swipe left to minimise the menu. However, it is different in websites in the case of which, because they usually don't support all the gestures present in apps, it is better to show some kind of close icon.
Comment: I've never swiped left to close a menu. Have clicked/tapped outside of the menu, used an X, used the back button on the device, but never swiped.
Comment: But apps which comply with Material Design always offer this kind of functionality and most people use it, thus if the website is supposed to be user-friendly and it doesn't have this feature, it should have a visible and obvious alternative like the mentioned X.

Hamburger icon to X usability?


Is it possible that my connection speed could effect my FPS?

Question: Recently I got my laptop repaired. I started it up, updated drivers and started up smite. However, when I began playing I noticed my FPS was low, even in the menu. It told me my FPS was 15.32 my ping was 132 and the number under that was 45. The other number is usually around 6 on other laptops. Is this 3rd factor stopping me from playing at an average frame rate?
Comment: just wanted to mention, Smite is like an EA game, where you log in to HiRes servers whenever you start the game, not just when you enter matchmaking. This could mean intermittent behavior, even in the menus, if your connection to their server isnt solid. It could be analogized to a website thats static, which loads once and is done, or a site that continuously updates a news crawler on the page; if that crawler lags, it could be you, the server, maybe a hiccup in the login process... Its not out of the realm of possibility that lag could look like an FPS issue.
Answer: Connection speed isn't directly connected to FPS usually. Most likely, connection speed would cause for lag in player movement, events, and other things that happen online to everyone. An example would be if TNT goes off on a minecraft server, if you have a bad connection, you might not see it for a few seconds or you might get kicked all together. Hardware and resources of your PC is what affects FPS.
Answer:
Depending on your laptops Plasma/LED/LCD screen resolution which works
  with your video/graphic driver/card to project the image onto the
  screen.. In essence, your internet connection doesn't have a barring
  on the FPS. However.. a slow/laggy/chop connection can mask or project
  something similar to an FPS issue.

Found that on a similar question. I don't know if it helps, but internet connection speeds don't affect you FPS, especially heavily. But again as said above.


When building mopub sdk, cannot find symbol: class org.fest.assertions.api.ANDROID

Question: I am building Mopub SDK as a module using Intellij Idea.
I have copied test-assert-core-2.0M10.jar to libs folder under Mopub. However, when building it, the line import org.fest.assertions.api.ANDROID; shows red color at the word "ANDROID". Compilation error message says:
Error:(20, 31) java: cannot find symbol
  symbol:   class ANDROID
  location: package org.fest.assertions.api

Have searched, but found nothing about this particular error.
Anybody using Mopub under Intellij Idea can offer some hint? Thanks!
Answer: I've found the solution. I deleted all files under /mopub-sdk/src/test, and it builds successfully.


How do I install Perl 5.8 and Perlfect on IIS 7.5?

Question: I've got an old website that I need to keep running on a new server - Windows Server 2008 R2 with IIS 7.5.  The website uses Perlfect search (http://www.perlfect.com/freescripts/search/), which requires both Perl and the DB_File Perl module.  The latest versions of ActiveState Perl (5.10 and above) come with a script to correctly work with IIS 7.5, but for some reason are unable to run DB_File (details are available on the ActiveState site).  The latest version of ActiveState Perl that will run DB_File on windows is 5.8, but that version does NOT come with the script that configures IIS 7.5.
Answer: I couldn't make any headway on the "No DB_File for Perl 5.10 + on windows", so I decided to tackle integrating Perl 5.8 with IIS 7.5.
I installed ActiveState Perl 5.8.7 (32 Bit).  I installed DB_File using ppm (install DB_File).  I verified that Perlfect worked at the command line by running the indexer.pl script first, then running searches using the search.pl script.
To get Perl scripts working in IIS I adapted the instructions for PHP in IIS 7.5 at http://www.go2inbox.com/infob/readinfo.php?readinfo=1688

Open IIS
Click on the webserver name in the left hand panel
Double click on the Handler Mapping icon in the IIS section of the middle pane
Click on "Add Script Map" located at the right hand side under Actions.
In the pop up window set "Request path:" to "*.pl", "Executable:" to "c:\perl\bin\perlis.dll" and the "Name" to "Perl" and click OK.
Say "yes" to the dialog box that asks if you want to enable this ISAPI script
Click on "Application Pools" on the left hand pane in IIS.  In the middle pane, right click on the application pool you are using (in my case "DefaultAppPool").
Choose Advanced Settings
Set "Enable 32 Bit Applications" to True (I did not test the 64 bit version of Perl).
Click on the webserver in the left hand pane, then click on the "Restart" link that appears in the right hand pane.

That worked for me.  I should be able to limp along until we upgrade the search function to the 21st century.
Comment: Thanks for much!  I also had to set the pipeline mode to classic in the app pool settings...
Comment: If it worked for you, why don't you mark your question answered?
Comment: Sorry about that - I couldn't mark it as answered right away and I haven't been back to Serverfault since.
Comment: Thank you so much for writing this, Mr. Robbie Canuck! This was the ultimate HowTo that I needed, to get Perlfect search running on IIS 7.5. Of course I tried to contact you in person, for sending you a bunch of Euros and German chocolate, but unfortunately I did not succeed. Vergelt's Gott!
Answer: It was because of oddities with packages, I moved from ActivePerl to Strawberry Perl.  It is much closer to a *nix Perl, and since it installs a C compiler, you can use CPAN natively.


Rendering interval by frames

Question: I am new here and i hope i am not making anything wrong.
So, my problem is : I want to render my animation, i have 5+ computers to do that and the scene has 2730 frames.
Its possible for example : on computer 1, render from frame 1 to 500; on computer 2 from frame 500 to 1000;on computer 3 from frame 1000 to 1500 and so on ?
If yes, how can i attach each rendered animation to the other ?
Comment: Related https://blender.stackexchange.com/questions/47083/how-to-render-specific-frame-ranges-of-an-animation-in-batch-mode
Answer: Another option that is available if the machine are on the same network, is to enable placeholders and disable overwrite in the render output settings, then have each machine render to the same network folder. Each machine can then render the same frame range but each will render different frames.
While getting a little more complex, there is also a network render addon included with blender.
Answer: You can set the rendered frame range from either the render properties next to dimension settings, or from the time line Start and End range sliders.

You should always render animations to image sequences, and combine to video afterwards in post production.

Rendering interval by frames


How filesystem atomically writes a block to disk?

Question: Block is an abstraction provided by filesystem, block size is integer multiples of disk sector size. Suppose a filesystem uses 4K as its block size, and the disk sector size is 512B, when the filesystem issues a write request to the disk driver, how to atomically write the entire 4K block to disk(avoid partial write)?
I want to know how modern kernel addresses this problem, but I don't want to dive into Linux codebase to find the answer. Any help will be appreciate.
Comment: What kind of atomicity guarantees are you interested in? Generally speaking, only sectors can be considered to be atomic in storage; a partially written sector will result in FEC failure when read back so you'll get an I/O error (if the write proceeded too far to recover the previously written data). If you want more than that, and this is unrelated to the issue of physical write alignment, you should be reading up on journaled file systems.
Answer: A disk should grant that a sector is written atomically. The sector size was 512 bytes and today is typically 4096 bytes for larger disks.
In order to get no problem from partially written "blocks", it is important to write everything in a special order.
Note that the only reason why there could be a partially written part in the filesystem is a power outage or something similar.
The method is:

First write all file content and verify that this worked
Then write the meta data and make sure that all data structures in the meta data fit in a single disk sector and do not span a sector boundary. This is e.g. important for variable length file names as directory content.
Comment: Thanks for your answer. And can you give me some more references? I tried to google it but didn't find something useful.
Comment: The related information usually is part of the filesystem specific documentation. What I wrote is about general rules that all filesystems need to follow.
Comment: How to align 512byte data so that it doesn't cross the boundary of a disk sector.
Answer: That depends on the underlying storage technology.
Some storage allows a certain block size to be stored atomically, typically a power of 2 which is at least 256 and usually in the 1kB—4kB range. If that's the case, then the filesystem layer can replace blocks in place, provided that the replacement of the block yields a valid system state. This is fine when writing the content of a file (Unix doesn't give any atomicity guarantees for that) but not always when writing filesystem metadata.
Another approach that doesn't require any cooperation from the disk layer (other than knowing that writing to a block cannot damage the content of other blocks) is to never erase existing blocks, but always write to storage blocks that are currently not in use. If the write is successful, then a reference to that block can be added to another block, replacing a reference to an earlier version of this block; the block containing the earlier version is marked as free. This is slower since updating a block requires updating another block, which in turn requires updating another block, etc. The recursion stops at a block for which the system keeps multiple copies; if there's a crash while writing one of the copies, the other copies are used instead. Choosing the right copy can be done based on a majority comparison if there are three or more, or based on checksums if there are two copies.
Then there are log-structured filesystems, where blocks keep being added at the end of the block list. The basic metadata of the filesystem is whatever is found in the last valid block. The last block is determined by checking block timestamps and checksums.
(Note: this answer is about generic filesystem implementation issues, I haven't gone and checked what various filesystems on various storage media on various Unix variants actually do.)
Answer: Generally, all moderm OSes 'll have a system call for writing data to a file (in Linux we have write system call).
And because all system call should be atomic. So writing the entire block size (using only 1 system call) will be atomic.
Comment: That is not guaranteed when the size of data to be written does not equal the sector size. When the size of data to be written is identical to the sector size *and* the write is properly sector-aligned, you can generally trust that the write is fully atomic, *but* if it fails part-way through (for example due to an unfortunately timed power outage) the sector will later come back as unreadable, not as a mix of old and new data.


Does a tubular sodium reabsorption cause a stimulation of β2-adrenergic receptors?

Question: I read the study "The Role of Aldosterone in Obesity-Related Hypertension" and there is one thing I didn't understand. They write: "According to norepinephrine-induced tubular sodium reabsorption, stimulation of β2-adrenergic receptors leads to activation of the Na–Cl cotransporter through suppression of the serine-threonine protein kinase WNK4 in the distal tubule." Is According to meant like due to? So does a tubular sodium Reabsorption cause a Stimulation of β2-adrenergic receptors?
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4886496/
Answer: You've got it backwards. "norepinephrine-induced tubular sodium reabsorption" is the whole process. The β2-adrenergic receptors respond to norepinephrine (this is the "norepinephrine-induced" bit). The receptors then suppress WNK4 in the distal tube ("tubular"), which causes the Na-Cl cotransporter to activate, which in turn causes sodium reabsorption.
This was probably a poorly phrased sentence on the part of the writers, but the sentence follows the same logic as "According to the First Law of Thermodynamics, energy cannot be created or destroyed". The description of the process is just complicated by multiple clauses.


What is the origin of the expression "brassed off"?

Question: Brass bands were being discussed today which naturally led to someone claiming to be brassed off about something, meaning disgruntled or annoyed. Does anyone know the origin of this expression? Michael Quinion over at World Wide Words suggests the phrase may have arisen from the Royal Navy's use of cleaning brasswork as a punishment, but that doesn't seem altogether convincing.
Answer: This NGram suggests brassed off came later than brass monkey, as used in the expression cold enough to freeze the balls/nose off a brass monkey. I know some of the earlier usages for brass monkey here don't actually have that figurative meaning, but plenty do.
In light of that, I would simply say that "brassed off" actually derives from the earlier expression. If you've been kept hanging about in the cold, that's a typical situation where you'd be "brassed off".
Huge numbers of slang expressions are assigned naval/military origins, and I suppose it's always possible sailors were more in the habit of using that colourful metaphor for biting cold, but I doubt it's got anything to do with actual specific things made of brass on ships or similar.
Answer: The OED reckons it came from "Service slang", and cites 'browned off' as a comparison. The earliest use there is 1941; taken together with the Ngram, this leads me to believe it arose suddenly and untraceably, as slang does, among the troops (probably the RAF, who were very inventive in such matters), and proved so useful it spread everywhere.
Comment: The OED calls a lot of things "service/naval slang" even when they're not exactly sure of precise origins. Young men account for a huge proportion of all slang, and through the 40s many of them were conscripts, so it's hardly surprising the OED would say that in this case, even though in many ways they weren't properly "service personnel" in the normal sense. But even if it *was*, say, an airman who coined this particular variant, I still think that would not have been possible without the antecedent "brass monkeys".
Answer: Eric Partridge, A Dictionary of Slang and Unconventional English, fifth edition (1961) has this roundabout explanation for the origin of the phrase:

brass off, v.i. To grumble : military : C. 20. F[raser] & Gibbons[, Soldier and Sailor Words and Phrases (1925)]. Perhaps ex part brass-rags.

And here's Partridge's entry for part brass-rags:

part brass-rags. To quarrel : naval (from ca. 1890) > by 1900 military. Bowen[, Sea Slang (1929)], 'From the bluejacket's habit of sharing brass cleaning rags with his particular friend'.

It appears from these references that brass off was in use by the 1920s. The same meaning of brass off appears in Eric Partridge, [Slang To-day and Yesterday] (1935).
The "Supplement" section in Partridge's Dictionary of Slang, fifth edition, which collects all of the addenda to the first edition (of 1937), runs to almost 400 pages. It contains the following additional entries for brass off and brassed off:

brass off.—2. To reprimand severely: Services: since about 1939. H[unt] & P[ringle, Service Slang (1943)].
...
brassed off. Disgruntled, fed up: Services, orig. (?): Royal Naval since ca. 1927; general since ca. 1939. ,,, Sometimes a synonym for browned off; sometimes regarded as a shade milder.

However, John Ayto & John Simpson, The Oxford Dictionary of Modern Slang (1992) have a more conservative estimate of the date of origin of brassed off:

brassed off [adjective orig services'] Fed up. 1941– P. Brennan et al. Very tired and brassed off, we bundled our kit on our shoulders (1943).

A Google Books search for the various relevant phrases produces some interesting and fairly early results. From Mary Gaunt, Moving Finger (1895):

"You boy, trim that lamp," said Harper angrily. "Look here, my lad, you just keep your tongue lashed amidships, and don't go gassing about things that don't concern you in the least, or you and I'll part brass rags."

And from George Goodenough, The Handy Man Afloat & Ashore (1901):

A "monkey's fist" is anything that puzzles us, of which we can't make out the meaning or reason. Chums are often called raggies, from the fact that they generally establish a partnership in the brass rags used for polishing stanchions, &c., on deck. To part brass rags signifies a dissolution of partnership and friendly relations.

From Charles Gardner, First Blood for the R.A.F.: The Valorous Story of the Advanced Air Striking Force in France (1940) [combined snippets]:

My last two nights in Paris I had a good time. Noel and I met Cobber—up for a day's leave to see the 73 Squadron doctor off to England. Cobber said he was "brassed-off," especially after he had got half-way home once, only to be called back to hand over his flight and teach two new-comers the way around. If ever anyone deserved a rest that boy does.

This use of brassed off certainly appears to mean "fed up" in the sense of being at one's limit to tolerate (without any sense of boredom). Two other sources source from 1941 have interpretations of their own. From John Hammerton, ABC of the RAF: Handbook for All Branches of the Air Force (1941) sees brassed off as being not merely a related term to browned off, but a diminutive of it.

Brassed off Diminutive of "browned off."
...
Browned off To be "fed up."

From Bernard De Voto, Saturday Review (1941) [snippet view]:

Brassed Off. To be very much fed up with boredom. (See also Browned off; Completely cheesed.)
Browned off. To be fed up with boredom.
...
Completely cheesed. Pretty much fed up with it all.

So whereas Hammerton sees brassed off as a diminutive of browned off with no particular connection to boredom, De Voto regards it as an intensifier of browned off—both of which, unlike completely cheesed, he links particularly to boredom.
Two newspaper accounts give further accounts of the term. One—from "When Is an Airman Cheesed?" in the [Gawler, South Australia] Bunyip (July 18, 1941)—at least partially endorses De Voto's view:

There are three degrees of dejection. The first is the Stage of being "browned off," the second being "brassed off," and the third, which means that there is no hope for you, of being completely "cheesed."

But the second—published about 10 months earlier—reports the reprimand meaning that Partridge mentions in his 1961 Dictionary of Slang and Unconventional English. From William McGuffin, "Better 'Flap' Your Hardest, You 'Erks', or You'll be 'Buttoned Up' by the 'Nasties'," in the Santa Cruz [California] Sentinel (September 15, 1940):

If you would converse intelligently with the modern warrior you should know the following additions to the slanguage which have come out of a year of war:
Brassed off—bawled out.

I find it hard to believe that brassed off in the attested (but divergent) World War II senses of "bawled out" and "fed up" has no connection to brass off in the 1920s and 1930s sense of "to grumble." However, Google Books and Elephind searches don't yield any published examples of brass off (or brassed off) in conversational or descriptive use during the 1920s and 1930s, so the print record isn't especially helpful here.
Answer: "Top Brass" meant command, because of their brass insignia. "Brassed Off" might mean told off by military authority, in a slang sense.
Answer: Brassed off comes from the over cleaning of brass, with a rag and abrasive polish, which resulted in the brass being rubbed through to the base metal underneath the brass coating, and  certainly a centaury before the nineteen thirty's as some 'experts' suggest.
Comment: To be useful here, this would need a reference.
Comment: Sorry for the misspell of centuary
Answer: My understanding of the phrase is that it originated from the practise of sharpening an engineer's twist drill. The sharp cutting edge was dulled. Otherwise the sharp cutting edge would bite into the brass and chatter. If the cutting edge was removed  it could cut into brass sheet or solid bar without any trouble. Hence the drill had been brassed off. I cannot see the connection between the usual understanding of the phrase as in hacked off, pissed off etc.
Comment: Hi Alan, welcome to EL&U. This is an interesting explanation, but do you have any evidence to support it? We're looking for an *authoritative* answer, as distinct from a personal viewpoint or even a misconception. For further guidance, see [answer] and take the EL&U **[Tour]**. :-)


Create a user using a single PHP file

Question: I have tried every possible ways to create a user account using only a single PHP file without writing a module. I want to create a portal in which visitors can subscribe or register themselves and do something after they logged in. I have also a mobile application (Android and iOS) in which my app users can register (subscribe) and use the app in their mobile phone. Both the web application and the mobile application use the same API to create a Drupal 8 user. Is there anyone who help me out to achieve this?
Answer: If you want a single php file you can use a drush shell script:
<code>#!/usr/bin/env drush

use Drupal\user\Entity\User;

    $user = User::create(['name' => 'testuser', 'status' => TRUE]);
    $user->save();
</code>
For more information see https://github.com/drush-ops/drush/blob/master/docs/shellscripts.md
A better approach might be to use REST, see https://www.drupal.org/node/2754633
Answer: Eyosiyas Tadele, Like 4k4 said, You don't even need to write any PHP code, not even single file and definitely not a module if you are using Drupal 8 core REST module.
Here is a sample Drupal 8 Android app https://github.com/onedrupal/One-Drupal-Android that uses core REST API to POST node. Similarly you can POST to user registration API.
You can use https://www.drupal.org/project/restui contrib module to enable and configure these APIs
once you have enabled, you can export as a config yml file if you want to move the REST API config from dev environment to prod environment like the yml file at https://cgit.drupalcode.org/one_api/tree/config/install/rest.resource.entity.user.yml

Create a user using a single PHP file


Finding displacement from acceleration and time

Question: Can someone open my eyes my disproving the formula that I arrived. I understand it is wrong but where exactly is the mistake?
Comment: You have confused v = average velocity and v= final velocity.
Answer: Velocity is defined as displacement per unit time. But when the motion is accelerated one then you can't directly apply
$displacement = (velocity )(time)$
The above formula is applicable only when the motion is uniform for the given time i.e. your velocity remains the same in that given time.
But for an accelerated motion ( i.e. velocity is not uniform )    the formula for displacement becomes
$s =ut + \frac{1}{2} at^2$ .
So using $s ={v}{t} $  or
$v=\frac{s}{t}$.
for an accelerated motion was your mistake.
Hope it helps .


Fuzzy hash of a file

Question: Could someone please explain this to me: When you use a fuzzy hash algorithm (ssdeep, tlsh, sdhash... or any other) to calculate the hash value of a file, does it calculate the hash based on the whole file (e.g. a PDF file consists of a trailer dictionary, a central directory stream, etc.), so does it take these elements into account? Or does it calculate the hash based only on the content of the file (but in the case of a PDF file, the content is compressed and stored in a binary file along with all other information , so how can the algorithm "extract" the content of the file in such a case?
Comment: For every extension (.pdf, .docx, etc) you need to open the file and read it as plain text. Most of the formats will be compressed, so most similarity hashes won't perform well.
Answer: None of the three algorithms you mention has anything specific to file formats in their documentation, which suggests that they simply treat input as an unstructured binary stream.
Of course, when using these algorithms one can preprocess the input and apply the hashes to extracted information, like not applying the hash to a full mail itself but only to included attachments and texts.

Fuzzy hash of a file


This is about modification in Dijkstra's algorithm

Question: I know Dijkstra's algorithm finds the shortest path from one source to all destinations. But let say we found 2 paths to a vertex from the source which are minimum distance. So the issue is the path should be chosen based on number of fewest edges. How to do that ? what can be modified in algo ?
Answer: Two distances can be computed for each node: $d_1$, the least total cost of edges along a path to the node as in the standard algorithm, and $d_2$, the least number of edges in a path to the node that costs $d_1$. Visited nodes can update the distances of their neighbors by first comparing $d_1$ and breaking ties using $d_2$.
Answer: Hint:

Add some really small number $\varepsilon$ to the weight of each edge (how small – it depends on the graph).
Instead of using some small numbers, you can also use pairs $w'_e = (w_e, 1)$ with pointwise addition and ordered lexicographically.

I hope this helps $\ddot\smile$


How to move selected track to top of playlist

Question: In foobar2000's playlist editor, is there any simple way to move the currently selected track(s) either to the top of the list or to after the currently playing track? I used to have a shortcut key to do this in winamp (can't remember if that required a plugin or not), and am missing the ability to do it in foobar2000.
Answer: There might be a component for this but I'm not sure. You can right-click (or Shift+right-click depending on your context menu setup) one or more files and select Add to playback queue. This won't change the track order but it will change the playback order. After the current track ends it will jump to the tracks you've added to the queue (the Playing column will show numbers in brackets for these). If you want you can also assign a direct keyboard shortcut to Add to playback queue via Preferences > Keyboard Shortcuts.
Answer: Windows copy/cut/paste hotkeys work with items in the playlists, so you can quickly cut an entry from the bottom; Home key; paste at the top.


Suppose that for each $a\in \mathbb{C}$ at least one coefficient of the Taylor's series $f$ about $a$ is zero. Show that $f$ is a polynomial.

Question: Let $f:\mathbb{C}\rightarrow\mathbb{C}$ be a holomorphic function. Suppose that for each $a\in \mathbb{C}$ at least one coefficient of the Taylor's series $f$ about $a$ is zero. Show that $f$ is  a polynomial.
Answer: Say that at least one of the coefficients of the Taylor series vanishes is the same as saying that for every $a\in \mathbb{C}$ there is $m\in \mathbb{N}$ such that $f^{(m)}(a)=0$.
Consider $A_{n}:=\left\{z\in\mathbb{C}:f^{(n)}(z)=0\right\}$ for each $n\in \mathbb{N}$.  Note that:

$f$ is polynomial iff $A_{n}$ is not countable for some $n\in  \mathbb{N}$.

Indeed, if $f$ is polynomial of degree $n$, then $f^{(n+1)}(z)=0$ for all $z\in \mathbb{C}$, then $A_{n+1}=\mathbb{C}$, so, $A_{n+1}$ is not countable.
Conversely, if there is $n\in \mathbb{C}$ such that $A_{n}$ is not countable, then $A_{n}$ has a limit point, then by Identity principle we have $f^{(n)}(z)=0$ for all $z\in  \mathbb{C}$, so, $f$ is a polynomial of degree at most $n-1$.
Therefore, tt suffices to show that there is $n\in \mathbb{N}$ such that $A_{n}$ is not countable. Indeed, consider $\bigcup_{n\in\mathbb{N}}A_{n}$, by hypothesis for each $a\in \mathbb{C}$ there is  $m\in \mathbb{N}$ such that $f^{(m)}(a)=0$, then $\mathbb{C}\subseteq \bigcup_{n\in\mathbb{N}}A_{n}$. Therefore, $\bigcup_{n\in\mathbb{N}}A_{n}$ is not countable, then there is $n\in \mathbb{N}$ such that $A_{n}$ is not countable.
Comment: @ Diego : why $A_n$ has a limit point.
Comment: : Also i wantto knpw that if $f^{(n)}(z) = 0$ for all $z \in \mathbb C$,  then $f$ is a polynomial. please tell me about two point. thank you


F1 key action in HP probook

Question: Can someone please explain what this F1 hotkey does? On pressing fn+F1, I  get a blank (dark) screen for 1 second and then it goes back to normal (displays what was there before). It doesn't seem to be doing anything at all, at least in Ubuntu!
Answer: That key is used to switch between connected displays to the PC. I think the symptom you explained of black screen is because you do not have any external display connected to your pc.
Reference: Support HP Check the section titled Keys with icons or symbols.
Answer:
Can someone please explain what this F1 hotkey does?

It switches to Presentation mode.  I would assume the Presentation mode only supports Windows and/or you don't have another monitor connected to your device.

Switch to another display mode when an external display is connected.

HP PCs - Keyboard Shortcuts, Hotkeys, and Special Keys (Windows)

F1 key action in HP probook


Which distributions on [0,1] other than the beta distribution form nice compounds with the binomial distribution?

Question: For which distributions x, other than beta, is the x-binomial distribution nice?  The beta and binomial distributions are famously conjugate but I am curious if other non-conjugate distributions will give comparably simple compound pmfs.  By nice I mean that the pmf is nice to compute without resorting to numerical integration; I'm not referring to the easyness of sampling from the compound distribution.
Comment: Nice question. I was going to suggest a Jeffreys prior, but it turns out that's just [a special case of the beta distribution for binomial models](http://www.cs.berkeley.edu/~jordan/courses/260-spring10/lectures/lecture7.pdf).  I'll keep thinking and see if I can come up with any others.  I have some vague sense that there are transformations of Gaussians that work, but Google isn't helping me pin that down.
Answer: If you just want to be able to write down the probability mass function, you have a lot of flexibility, basically because you can repeatedly use integration by parts. As long as you can integrate the distribution of $X$ repeatedly to get closed form expressions, you get at worst a double sum of closed form expressions for the pmf of the compound distribution. I think you often get single sums, so maybe there is an even simpler way of expressing these.
For example, let $\text{pdf}_X(x) = -\log x$ on $[0,1]$.
$$ \int_0^1 {N\choose k}x^k (1-x)^{N-k} (-\log x) ~dx \\\ = \frac{1}{N+1}\sum_{i=k}^{N} \frac1{i+1}.$$


Var /export shows 403 forbidden error

Question: I created a module to custom export certain data from my site. The CSV is created in var/export. but when I try to give a link to download this file from server the link gives me 403 forbidden error. I see that the file has 777 permission. What can be the issue?
Answer: It's due to magento has security measures to disallow public to access var folder.
see /var/.htaccess file
Order deny,allow
Deny from all

I would recommend you to save your csv file else where. May be create a new folder in root and just save the file there.
If you really want to save file in var
Remove above code from .htaccess file. But this is very bad practice. You should avoid this never do this.
Thanks to @fschmengler - As soon as var/cache is accssible, attackers can read sensitive configuration data. At most, add an exception for the CSV files in var/export.
Comment: ***Not only avoid it, NEVER do it.*** As soon as `var/cache` is accssible, attackers can read sensitive configuration data. At most, add an exception for the CSV files in `var/export`
Comment: Thanks will try  to save it creating a folder in root. Thanks for the quick reply :)
Comment: Would be helpful if you accept my ans.
Comment: Thanks a ton.. it worked really well. I cant upvote it at this moment as I dont have enough reputation. Will you also look the following question. its bothering me for a long time now
Comment: http://magento.stackexchange.com/questions/103392/no-valid-data-sent-on-customer-export

Var /export shows 403 forbidden error


Are there differences in the accent of NY and California English?

Question: Are there differences in the accent of NY and California English?
Comment: Yes. Wikipedia has a whole page on [NYC English](http://en.wikipedia.org/wiki/New_York_dialect), which differs from all other accents in the U.S. (although it is quite close to the accents of the surrounding suburbs). One reliable NYC (and surroundings) shibboleth: *horror* is pronounced with the vowel of *borrow* rather than that of *sorer.*
Comment: If by LA you mean "Los Angeles," then the answer is that an LA accent *is* a California accent, by definition (if by LA you mean Louisiana, that's entirely different). While some people say that NorCal and SoCal accents differ, neither is more "California" than the other. BTW, I've lived in both NorCal and SoCal, and I've never heard a discernible difference between the local accents.
Comment: This question was a little too broad for a really great answer to be given.
Answer: In large geographic areas that speak the same language, there will always be differences between locations that are distant from each other. You see this effect all over Europe, more so because of the many borders where languages can intertwine more, but it still happens in the US. You can see differences between Northern and Southern California because of this. You can see the same types of differences in other parts of the east coast, Texas, the midwest, etc. Accents and idioms are all slightly different.
Comment: This is correct. Also, when I lived abroad, the expat community was almost equally composed of British nationals, Americans, Canadians, Australians, and New Zealanders, with lesser numbers of Irish and South Americans. Curiously, all of the non-Americans could easily discern a southern California accent which is markedly different from New England and New York English. The chief marker is speed of production. SoCal natives are slow in speech, northern East Coasters speak at perhaps twice the speed.
Comment: And yet, when I (a SoCal native) want to imitate a Southern (Mis'sipi or Alabama) accent, the most effective thing I can do is to slooooooooowwww dooooowwwwwwwnnnn.  It's a much stronger signifier than any quirks of pronunciation, or even "Lawd sakes, honeychile!"
Answer: yeah i think there is difference between various accents in the US. specially from east to west. but there is something that should be said, we mostly watch movies that have been made in cities that are located in west of THE US and it makes us so familiar with this accent.
thank you
Comment: You've never heard of "Friends", "30 Rock", "Saturday Night Live", "Late Night with David Letterman/Conan O'Brien/Jimmy Fallon", "The Today Show", "The Wire" or "Law & Order"? I can think of all those East Coast shows that have been exported outside of the US, and I don't really watch television.


dependency issues with app while deploying in tomcat-server

Question: i am using hbase 0.94.7 and hadoop 1.0.4 and tomcat 7
i wrote a small res-based application which performs crud operations on hbase.
earlier i used to run the app using maven tomcat plugin.
now i am trying to deploy the war in tomcat-server.
since hadoop and hbase jars already contain org.mortbay.jetty jsp-api and servlet-api jars of older verisons,
i am getting Abstract Method Exceptions
here's the exception log
so then i made a exclusion of org.mortbay.jetty from both hadoop and hbase dependencies in pom.xml. but it started showing more and more such kind of issues like jasper.
so then i added scope provided to hadoop and hbase dependencies.
now tomcat is unable to find the hadoop and hbase jars.
can someone help me in fixing this dependecy issues.
Thanks.
Answer: Do one thing,
<code>- Right click on project
- go to property,
- type java build path,
- go to third tab of library,
- Removed dependency of lib and maven,
- Clean build your project.
</code>
might be solve your problem.