What's an intuitive explanation for integration?

Question: I have never taken a formal calculus course, however I know some of the basics like differentiation and limits. I'm currently reading a book that is mathematically intensive, and I come across integration notation quite often but lack an intuitive understanding to be able to apply it to the physical world, or in this case to understand what is going on. I have read online explanations and it seems that they discuss finding the area under the curve but lack a fundamental explanation. I would appreciate if someone could explain integration to me for the sake of gaining an intuitive understanding of it so I can apply it to physical concepts.
Comment: Computing mass from density is a good example to keep in mind. It would be easy to compute the mass of an object if its density were constant. So chop the object up into pieces so tiny that the density is approximately constant for each piece. Add up the masses of all the little pieces.
Comment: An [Intuitive Introdution to Calculus](http://davidlowryduda.com/?p=1259) that I wrote once for my students might interest you.
Comment: Isn't the concept of work intuitive enough? It is even used to give intuitive meaning to contour integrals in complex analysis...
Comment: You may want to look at the often-cited-here book [**Calculus Made Easy**](https://en.wikipedia.org/wiki/Calculus_Made_Easy) by Silvanus P. Thompson.
Comment: You might start by reading a bit about Reimann (Sp?) sums.  Essentially, you create rectangles between your two bounding curves (usually between the x-axis and some function of x), find the areas of the rectangles and then sum those areas. This produces an approximation of the area below the curve. The width of each rectangle you can consider delta x. Take the limit of these sums as delta x approaches zero (as your rectangles get very skinny). That is essentially - roughly speaking - what you are doing with integration.
Comment: good choice is to think of averaging process.
Comment: Just curious, why isn't the idea of area very intuitive? It is something visual, and visual is often intuitive?
Comment: Well, area under the curve is calculated by really, really thin rectangles (or trapezoids) and the height of those depend on the rate at which the curve change values.
Answer: "Area under the curve" only works if you have been trained (or trained yourself) to associate the area under some curve with the phenomenon you're trying to understand. This works fine as a visualization of the mathematics of an electromagnetic effect if you already understand that effect mathematically. That does seem a bit backwards.
In other words, I think you have an excellent question.
You have gotten at least one good answer. The following is (or should be, if I explain it correctly) completely consistent with the other answer(s), just from a slightly different perspective.
Consider a physical property such as the charge in a capacitor. We start with a capacitor with a certain amount of charge on each side and discharge it slowly through some device. While it's discharging, we keep track of the remaining charge on one side; let's say we choose the side with a negative charge.
As you may imagine, we can consider the charge to be a function of time,
which we might name $Q(t).$ The derivative of that function with respect to time,
$\frac d{dt} Q(t),$ is the rate at which the charge changes
(positive in this case, since charge is getting less negative), that is,
the current, $I(t),$ flowing into that side of the capacitor at each instant in time.
Now, the integral of a function is often called an antiderivative.
If you can understand how a physical quantity (for example, $Q(t)$)
relates to its derivative (for example, $I(t)$),
then you can work that relationship in reverse.
Instead of measuring $Q(t)$ as a function of time and computing $I(t)$ from it,
measure $I(t)$ as a function of time and compute $Q(t)$ from it.
If you know the charge at all times, you can reconstruct the measurement of current;
if you know the measurement of the current at all times,
you can (in a sense) reconstruct the charge.
More precisely speaking, you can reconstruct how much charge was added or removed since
the instant when you started measuring the current.
Sometimes you are measuring a quantity as a function of something other than time,
but the principle is the same; all that changes is the variable or dimension over which
you take your derivative.
So the name "antiderivative" is very apt: given a function, $f,$ that is a
derivative of some physical quantity,
we take the antiderivative (integrate $f$) to reconstruct (at least partly)
the original physical quantity, which is itself a function, $F.$
Sometimes integration is done over an area or volume. Again, this is just reversing
a differential/derivative, but now the derivative is defined over multiple dimensions
instead of just one, and it is often thought of as some kind of density.
And we should expect that the tools of calculus will mostly apply relatively directly
to physical processes, since that's a very large part of the reason they were
first developed.
Answer: The integral $\newcommand{\dx}{\,\mathrm{d}x}\newcommand{\mm}{\mathrm{m}}\newcommand{\ss}{\mathrm{sec}}$
\begin{equation*}
\int\limits_a^b f(x) \dx
\end{equation*}
represents how much of something is being accumulated as you sweep $f(x)$ along the $x$-axis from $a$ to $b$. Accumulation is a great word here. Let's illustrate with some examples:

Area under the curve — Considering the graph of $f$, you can always think of $f(x)$ as the distance between the $x$-axis and the point $(x,f(x))$. As $x$ moves from $a$ to $b$ along it's axis, these heights $f(x)$ are sweeping out a region, and $\int_a^b f(x) \dx$ counts how much area you're accumulating in that region while $x$ moves from $a$ to $b$. Note that the units makes sense here: if $x$ and $f(x)$ are measured in meters $\mm$, then the units of $\dx$ must be $\mm$, and so the units of $f(x) \dx$ must be $\mm^2$. Taking the integral $\int$ you're just summing up a bunch of things with units $\mm^2$ so the integral itself will have units $\mm^2$, signifying that it's an area.

Velocity accumulating distance over time — If your function $v(t)$ models the velocity of some object at time $t$, then $\int_a^b v(t) \,\mathrm{d}t$ counts how much distance the object has accumulated as $t$ sweeps from $t=a$ to $t=b$. Note again the units makes sense: the units of $v(t)$ are $\mm/\ss$ and the units on time $t$ are $\ss$, so the units on $\int_a^b v(t) \,\mathrm{d}t$ must be $\mm$.

Accumulating charge over time by integrating the current (David's answer)

Cross-sectional areas sweeping out a region along an axis — Suppose you have some region $R$ that lives along some axis in space $z$, and suppose the function $A(z)$ returns the area of a cross-section (slice) of $R$ at that particular value of $z$. As $z$ sweeps along the axis from $a$ to $b$, $\int_a^b A(z) \,\mathrm{d}z$ counts how much volume we accumulated inside $R$. So if $A(z)$ is accurate along the entire $z$-axis, $\int_{-\infty}^{\infty} A(z) \,\mathrm{d}z$ is the volume of $R$. Measuring everything in meters, note the units of $A(z)\,\mathrm{d}z$ are $(\mm^2)(\mm) = \mm^3$, the units of a volume.

Accumulating mass by integrating density — Suppose you have a region $R$ in three-dimensional space and you want to think of that region as having mass with a function $\delta$ that returns the density of mass in the region at that point. Then the integral $\iiint_R \delta \,\mathrm{d}R$ counts how much total mass the region has.

Note that there's no mention of calculus here at all. All of these examples explain only what the notation $\int_a^b f(x)\dx$ means, but not how to compute $\int_a^b f(x)\dx$. The computation of the values of these integrals happens to involve the anti-derivative of $f$, and that is the true magic you get from the fundamental theorem of calculus.
Answer: In Probability
Integration in probability is often interpreted as "the expected value". To build up our intuition why, let us start with sums.
Starting Small
Let's say you play a game of dice where you win 2€ if you roll a 6 and lose 1€ if you roll any other number. Then we want to calculate what you should expect to receive "on average". Now most people find the practice of multiplying the payoff by its probability and summing over them relatively straightforward. In this case you get
$$\text{Expected Payoff} = \frac{1}{6} 2€ + \frac{5}{6}(-1€) = -0.5€$$
Now let us try to formalize this and think about what is happening here. We have a set of possible outcomes $\Omega=\{1,2,3,4,5,6\}$ where each outcome is equally likely. And we have a mapping $Y:\Omega \to \mathbb{R}$ which denotes the payoff. I.e.
$$
Y(\omega) = \begin{cases}
  2 & \omega = 6,\\
  -1 & \text{else}
\end{cases}
$$
And then the expected payoff is
$$
  \mathbb{E}[Y] = \frac{1}{|\Omega|}\sum_{\omega\in\Omega} Y(\omega)
  = \frac{1}{6}(2 + (-1) + ... + (-1))
  = -0.5
$$
where $|\Omega|$ is the number of elements contained in $\Omega$.
Introducing Infinity
Now this works fine for finite $\Omega$, but what if the set of possible
outcomes is infinite? What if every real number in $[0,1]$ was possible,
equally likely, and the payoff would look like this?
$$
Y: \begin{cases}
 [0,1] \to \mathbb{R} \\
 \omega \mapsto \begin{cases}
  2 & \omega > \frac{5}{6} \\
  -1 & \omega \le \frac{5}{6}
 \end{cases}
\end{cases}
$$
Intuitively this payoff should have the same expected payoff as the previous
one. But if we simply try to do the same thing as previously...
$$
  \mathbb{E}[Y] = \frac{1}{|\Omega|}\sum_{\omega\in\Omega} Y(\omega)
  = \frac{1}\infty (\infty - \infty)...
$$
Okay so we have to be a bit more clever about this. If we have a look at a
plot of your payoff $Y$,

we might notice that the area under the curve is exactly what we want.
$$
   -1€\left(\frac56-\frac06\right) + 2€ \left(\frac66 - \frac56 \right) = -0.5€
$$
Now why is this the same? How are our sums related to an area under a curve?
Summing to one
To understand this it might be useful to consider what the expected value of
a simpler function is
$$
 \mathbf{1}: \begin{cases}
  \Omega \to \mathbb{R}\\
  \omega \mapsto 1
 \end{cases}
$$
In our first example this was
$$
 \frac{1}{|\Omega|} \sum_{\omega\in\Omega} \mathbf{1}(\omega) = \frac{|\Omega|}{|\Omega|}
$$
In our second example this would be
$$
 \int_{\Omega} 1 d\omega = \int_0^1 1 d\omega
$$
Now if we recall how the integral (area under the curve) is calculated we might
notice that in case of indicator functions, we are weighting the height of
the indicator function with the size of the interval. And the size of the
interval is its length.
Similarly we could move $\frac{1}{|\Omega|}$ into the sum and view it as the
weighting of each $\omega$. And here is where we have the crucial difference:
In the first case individual $\omega$ have a weight (a probability), while
individual points in an interval have no length/weight/probability. But while
sets of individual points have no length, an infinite union of points with
no length/probability can have positive length/probability.
This is why probability is closely intertwined with measure theory, where a
measure is a function assigning sets (e.g. intervals) a weight (e.g. lenght,
or probability).
Doing it properly
So if we restart our attempt at defining the expected value, we start with a
probability space $\Omega$ and a probability measure $P$ which assigns subsets
of $\Omega$ a probability. A real valued random variable (e.g. payoff) $Y$ is a
function from $\Omega$ to $\mathbb{R}$. And if it only takes a finite number
of values in $\mathbb{R}$ (i.e. $Y(\Omega)\subseteq \mathbb{R}$ is finite),
then we can calculate the expected value by going through these values, weightening them by the probability of their preimages and summing them.
$$
 \mathbb{E}[Y] = \sum_{y\in Y(\Omega)} y P[Y^{-1}(\{y\})]
$$
To make notation more readable we can define
$$
\begin{aligned}
 P[Y\in A] &:= P[Y^{-1}(A)] \qquad\text{and} \\
 P[Y=y]&:=P[Y\in\{y\}]
\end{aligned}
$$
In our finite example the expected value is
$$
\begin{aligned}
 \mathbb{E}[Y] &= 2 P(Y=2) + (-1) P(Y=-1)\\
 &=2 P(Y^{-1}[\{2\}]) +(-1)P(\{1,2,3,4,5\})\\
 &= 2 \frac16 -1 \frac56 = -0.5
\end{aligned}
$$
In our infinite example the expected value is
$$
\begin{aligned}
 \mathbb{E}[Y] &= 2P(Y=2) + (-1)P(Y=-1)\\
 &= 2P\left(\left(\frac56, 1\right]\right)
 - P\left(\left[0, \frac56\right]\right) = \int_0^1 Y d\omega\\
 &= 2 \frac16 - \frac56 = -0.5
\end{aligned}
$$
Now it turns out that you can approximate every $Y$ with infinite image
$Y(\Omega)$ with a sequence of mappings $Y_n$ with finite image. And
that the limit
$$
 \int_\Omega Y dP := \lim_n \int_\Omega Y_n dP := \sum_{y\in Y_n(\Omega)} y P(Y=y)
$$
is also well defined and independent of the sequence $Y_n$.
Lebesgue Integral
The integral we defined above is called the Lebesgue Integral. The neat thing
about it is, that

Riemann
integration is a special case of it, if we integrate over the Lebesgue Measure
$\lambda$ which assigns intervals $[a,b]$ their length $\lambda([a,b])=b-a$.
$$\int_{[a,b]} f d\lambda = \int_a^b f(x) dx$$
Sums and series are also a special case using sequences $(a(n),
n\in\mathbb{N})$ and a "counting measure" $\mu$ on $\mathbb{N}$ which assigns a
set $A$ its size $\mu(A) = |A|$. Then

$$
\int_{\Omega} a d\mu = \sum_{n\in\mathbb{N}} a(n)
$$
The implications are of course for one, that one can often treat integration
and summation interchangeably. Proving statements for Lebesgue integrals is
rarely harder than proving them for Riemann integrals and in the first case
all results also apply to series and sums.
It also means we can properly deal with "mixed cases" where some individual
points have positive probability and some points have zero probability on
their own but sets of them have positive probability.
My stochastics professor likes to call integration just "infinite summation"
because in some sense you are just summing over an infinite number of
elements in a "proper way".

The lebesgue integral also makes certain real functions
integrable which are not integrable with riemann integration. The function
$\mathbf{1}_{\mathbb{Q}}$ is not riemann integrable, but poses no problem
for lebesgue integration. The reason is, that riemann integration subdivides
the $x$-axis and $y$-axis into intervals without consulting the function that is
supposed to be integrated, while lebesgue integration only subdivides the
$y$-axis and utilizes the preimage information about the function that is supposed to be integrated.

Back to Intuition
Now the end result might not resemble our intuition about "expected values"
anymore. We get some of that back with theorems like the law of
large numbers which proves that averages
$$\frac{1}{n} \sum_{k=1}^n X_k$$
of independently, identically distributed random variables converge (in various
senses) to the theoretically defined expected value $\mathbb{E}[X]$.
A note on Random Variables
In our examples above, only the payoff $Y$ was a random variable (a function
from the probability space $\Omega$ to $\mathbb{R}$). But since we can compose
functions by chaining them, nothing would have stopped us from defining the
possible die faces as a random variable of some unknown probability space
$\Omega$. Since our payoff is just a function of the die faces, their
composition would also be a function from $\Omega$. And it is often convenient
not to define $\Omega$ and start with random variables right away, as it allows
easy extensions of our models without having to redefine our probability space.
Because we treat the underlying probability space as unknown anyway and only
work with known windows (random variables) into it. Notice how you could
not discern the die faces $\{1,...,5\}$ from payoff $Y=-1$ alone. So
random variables can also be viewed as information filters.
Lies
While we would like our measures to assign every subset of $\Omega$ a number,
this is generally not possible without sacrificing its usefulness.
If we wanted a measure on $\mathbb{R}$ which fulfills the following properties

translation invariance (moving a set about does not change its size)
countable summability of disjoint sets
positive
finite on every bounded set

we are only left with the $0$ measure (assigning every set measure 0).

Proofsketch: Use the axiom of choice to select a representative of every
equivalence class of the equivalence relation $x-y\in \mathbb{Q}$ on the set
$[0,1]$. This set of representatives is not measurable, because translations
by rational numbers modulo 1 transforms it into distinct other representation
sets of the equivalence relation. And since they are disjoint and countable
we can sum over them and get the measure of the entire interval
$[0,1]$. But an infinite sum of equally sized sets can not be finite if they
are not all $0$. Therefore the set $[0,1]$ must have measure 0 and by translation and summation all other sets in $\mathbb{R}$

For this reason we have to restrict ourselves to a set of "measurable sets"
(a sigma Algebra) which is only a subset of the powerset $\mathcal{P}(\Omega)$
of $\Omega$. This conundrum also limits the functions we can integrate with
lebesgue integration to the set of "measurable functions".
But all of these things are technicalities distracting from the intuition.
Comment: A briefer answer would be more helpful
Comment: This is actually an amazing post, although late.
Comment: @MikePierce I agree, it got a bit out of hand - any ideas where to cut?
Comment: Good point of view!
Answer: The integral is basically the total change found from the rate of change.
The way I like to see it is when I look at a package of printing papers, say 500 papers on top of each other, it reminds me of the volume of the package found by slice method namely the integral of the area is the volume.
It is related to the area under the curve where the curve is positive.
For example if you have the rate of money flow you can integrate to find the total money flow.
If you have a formula for the speed you can integrate to find the total distance traveled, or the arc-length.
Answer: Suppose you have some process that, over time, adds to (or subtracts from) a physical quantity. For example, a moving object has velocity, and over time that velocity results in a change in position. Or, if you apply a [variable] force to an object through a distance, over time you exert more and more work to move the object.
In simple cases, one can compute the total amount of [quantity] by multiplying: if the velocity is constant, then $d = rt$. If the force is constant, then $W = Fd$. But what if the process does not proceed at a constant rate? That is one of the problems that integration addresses. So if your force changes over time, you can imagine approximating the force over some small interval of time by a constant (since presumably over a small interval, the force doesn't change much). Do that over the entire range of times you're concerned with; over each such interval it's easy to approximate the work, since the force is roughly constant. So the total work is approximately the sum of each of those easy-to-calculate pieces. Now let the small intervals get smaller and smaller. At least if the force function is reasonable, the sum of those pieces of work gets closer and closer to the total work performed. That total work is the integral of the force over time, and the areas that successively approximate it are various Riemann sums on that time interval.
Answer: Just meant as info***
I wanted to post this link here for you without it getting lost among comments:
Riemann sums
Understanding Riemann sums, and what happens with Riemann sums when you evaluate the limit as delta x tends toward 0, is a great way to build a more intuitive understanding of integration.
Answer: For intuition from a physics point of view, I would probably not suggest thinking of integrals as areas unless the problem was actually about area.  An obvious intuitive interpretation of integration is reversing differentiation.  Suppose you know the velocity of a car over a period of time, how do you figure out where it is now?  Integrate your data.  What about that annoying constant that you get when you integrate?  Well, that corresponds to needing to know where the car was at time 0.
For a real example, look at pre-GPS inertial guidance systems.  They measure acceleration and perform double integration to calculate position.  Inertial navigation system
Measure the rate of energy going into a system, e.g. the voltage and current of an electrical supply, how do you know the total energy?  Integrate the power.
Answer: There are lots of formulae from beginning physics and other areas that multiply two things together to get a third thing.  Like Area=length x width.  Force = mass x acceleration.  Distance = rate x time.   These formulae are easy to apply if the two factors are constant.  Note that you can represent any of them as the area of a rectangle.
But what do you do if one of the factors starts to vary?  You have a rectangle, but with one side all wiggly.  If the rectangle represents mass x acceleration and the acceleration keeps changing, then the area under the wiggly curve is still the force.
Integration cuts the wiggly "rectangle" into little tiny real rectangles, computes mass x acceleration for each one, and then adds them up to get the whole force.  Integration means "whole-ification."
Answer: Integrals represent the area under a curve as you already know, but the area means a lot of things. It mainly represent an area (obviously) but also the sum of a change (defined by a derivative). That is why finding an integral of a function f(x) is equal to finding a derivative that will give you f(x).


Water Heater on/off switch

Question: My water heater and dryer are connected to the same circuit breaker. Consequently, when the washer-dryer combo is in use the water heater (tank type) is working too and consuming electricity. Can I use a 240v extension cord with an on/off switch to connect my water heater? If it is possible, could someone provide me with a wiring diagram to connect this switch? Recommendations will be appreciated..
Comment: Where are you on this planet, and is getting another homerun pulled for the water heater at all an option?
Answer: No, because you are talking about a 30A load, and that is way, way, way too much current for common switches.  By the time you pay for the exotic switches you would need, you would just be better off wiring a subpanel.
It might be possible to wire that legally, but I rather doubt that's what happened.  It sounds like an ugly hack job that's just waiting to electrocute someone.  I wouldn't touch any of it with a 10-foot pole, especially if you are a tenant in somebody else's house.
You simply need to train your laundry people that they cannot run the dryer 30 minutes after anyone uses hot water. That shouldn't be in the way of washing clothes; hot water is only used at the beginning of the cycle, and the water heater should have caught up by the time the cycle ends and it's time to go in the dryer.
Stacking loads (drying one while the next one is in the wash) is not allowed unless they select "Cold" water.

Water Heater on/off switch


I want to filter to show orders that their ending date is today

Question: I am using Drupal 7 and I have a webform where people can order a product and they enter the date that they will pick up that product. I want to make a view that will show me the poeple that are picking a product today, but when I try to make a filter for that the fields that are given are only the date that they submited the order not the date_field. Here is a picture of which fields are given to select.
Answer: In order to use webform fields in views filter/sort, you will need to add relationship with them. They should be available for relationship in the format or Webform submissions: Data :XXX.
Once you add them, you can further use them in filter/sort with more conditions. Hope it helps !!


BMX pedal thread pitch

Question: I found a bmx in the garbage and fixed it up but when went to replace the pedals bought the wrong size. I'm wondering if someone can help me out. I was testing the old thread in my socket set an it screws into a 15/32 inch socket.
Comment: Are you sure that you didn't try to screw the left pedal into the right crank and vice-versa?
Answer: Most pedal threads are 9/16" with the left pedal being left-hand thread (ie backwards to normal)   Kids bikes might have 1/2" axles or 9/16"
There were some crazy metric threads used in the 80s but they were very rare and never took off.
Not sure how you got it to work into a 15/32" other than that's vaguely close to 1/2" suggesting a kid's BMX.
Answer: Most (all?) bicycles with one-piece cranks accept "standard" 1/2" pedals. The thread is 1/2-20, with the left pedal being left-hand threaded. The wrench size and type varies depending on the pedal. Many cheap or old-school BMX bikes have one-piece cranks.

BMX pedal thread pitch


Is a correspondence principle valid for physical information?

Question: I could find some physical interpretations of information for quantum systems, but not for classical physics. Can some interpretation of information for macroscopic phenomena given? Say, the electronic interpretation, when a bunch of photons/electrons/ions deliver a bit of information, can it be related to the "bit of physical information"?
Comment: this might help https://en.wikipedia.org/wiki/Information_theory
Comment: "Information theory is the scientific study of the quantification, storage, and _communication of digital information_." I mean that in classical physics other that digital information exists.
Answer: Yes, definitely. As in Wolphram jonny's link on information theory, there is definitely a notion of information in classical physics. If we have a single classical two-state system which has even odds of being in either state, then it takes exactly one bit of information to fully specify which of the two states it is in. Since real systems are never exactly two-state and we never exactly know which state they're in, we never have a precise notion of information in real systems, but we have very good approximate notions.
One way to describe uncertainty in classical physics is to give the probability density that the system is in a certain range of states specified, in the Hamiltonian formalism, by positions and conjugate momenta. Liouville's theorem tells us that this phase space density is conserved by Hamiltonian dynamics, meaning that since classical physics is deterministic, it can't destroy (or create) information. However, random dynamics can destroy information, and even deterministic dynamics can render information inaccessible by spreading it into the wider world (dissipation) or into microscopic degrees of freedom (chaos).


Closed form for $\int_0^\infty\frac{\sin x\,\cdot\,\operatorname{Ci}x-\cos x\,\cdot\,\operatorname{Si}x}{\sqrt{16\,x^2+1}}dx$

Question: Is it possible to find a closed form for this integral?
$$\mathcal{S}=\int_0^\infty\frac{\sin x\cdot\operatorname{Ci}x-\cos x\cdot\operatorname{Si}x}{\sqrt{16\,x^2+1}}dx,$$
where $\operatorname{Ci}x$ is the cosine integral and $\operatorname{Si}x$ is the sine integral:
$$\operatorname{Ci}x=-\int_x^\infty\frac{\cos t}t dt,\ \operatorname{Si}x=\int_0^x\frac{\sin t}t dt.$$
Numerical integration gives
$$\mathcal{S}\approx0.133456902778362645676629...$$
Comment: Oh, surely we can always believe that an integral arising naturally in physics either has a close form or defines a nice function...
Comment: The form is tantalizing, but still I want to know if there is a particular reason why you are expecting it to have a closed form. Or can you suggest a context where it arises if it have such one?
Comment: If I may ask, in what kind of problem did you find such an integral ?
Comment: I do not have a strong reason to believe it has a closed form, but the integrand looks kinda nice. This integral arises as part of longer calculations related to physics (I wouldn't post them here for several reasons).
Comment: According to http://eqworld.ipmnet.ru/en/auxiliary/inttrans/FourSin2.pdf, $\sin x\cdot\operatorname{Ci}x-\cos x\cdot\operatorname{Si}x$ may convert into some improper integrals.
Answer: Not sure if you consider this a closed form, but the integral $\mathcal{S}$ can be expressed in terms of the generalized Meijer $G$-function (see formula $(3)$ here for the definition) and the modified Bessel function of the $2^{nd}$ kind $K_\nu(x)$:
$$\mathcal{S}=\frac{G_{2,4}^{4,2}\left(\frac18,\frac12\middle|\begin{array}{c}\frac12,\frac12\\0,0,\frac12,\frac12\\\end{array}\right)}{16\,\pi}-\frac\pi8K_0\left(\frac14\right).$$
Answer: Simplifying Cleo's answer as in here, we get
$$
\mathcal{S}=-\frac{\pi}{8}\left.\frac{d}{d\nu}L_{\nu}\left(\frac14\right)\right|_{\nu=0}
$$
And a more general result:
$$
\mathcal{S}(a)=\int^{\infty}_{0}\frac{\sin x\operatorname{Ci}x-\cos x\operatorname{Si}x}{\sqrt{a^{-2}x^2+1}}dx=-\frac{a\pi}{2}\left.\frac{d}{d\nu}L_{\nu}\left(a\right)\right|_{\nu=0}.
$$


MacBook Pro OS X and Windows Crash

Question: I have a Mac-Book Pro on which i have windows 7 installed on Bootcamp partition, yesterday while working it suddenly crashed, I saw a blue screen for less than half a second and the system restarted and went on to boot windows again and it crashed again.
So i tried booting it to OS X, it booted but i couldn't see anything except for a black screen with a cursor. I searched for solutions to the black screen problem and tried some but none on them worked. So i shut it down to look for the problem in morning.
Now in morning it started misbehaving more, sometimes it would not show startup Manager even when Option key was pressed and would randomly boot into Windows or OS X. I tried booting in windows in safe mode but it would still crash

And OS X also started crashing

I tried running First Aid in Disk Utility in Recovery Mode (which opened sometimes only, sometimes Mac would ignore CMD+R and go on to boot os of its choice). When i ran First Aid it said

I also ran Windows repair and it said

Now i can't understand what the Problem is with my System ?
ALSO
A month earlier my hard drive cable had failed and got it replaced.
I had updated OS X El Capitan to OSX Sierra. And i don't think there is a problem with my hard drive becasue i was able to see my windows data while exporting registery data in windows repair .
Answer: There was a problem with my Hard drive cable, got it replaced.

MacBook Pro OS X and Windows Crash


How to completely disable English(US) keyboard so that switcher doesn't notice it?

Question: I would like to completely disable the English (US) keyboard, so that I can use English (Dvorak) everywhere.  The reason I'm concerned about this is that there's a new hotkey for switching between input methods:

It is mentioned in this question:
Where to change default <Super>+<Space> keyboard switch key by a terminal?
And this bug report: https://bugs.launchpad.net/ubuntu/+source/gnome-screensaver/+bug/1244548

For my use case, I simply don't want to be bothered with switching (I use Dvorak all the time). I'll note that disabling the hot keys and selecting ONE keyboard seems to work just fine under Unity!  However, changing to a binding other than Super+Space does not seem to have any effect under Ratpoison. (The binding is actually associated with the keys Control+Space on my computer, which does not play nicely with Emacs.) I have also removed all other input sources from gnome-control-center, but clearly English (US) is not really completely gone.
Answer: The problem was that Keyboard Input Method System was not set to "none" inside the Unity Language Support preferences panel.  Changing that made the chooser go away across all window and login managers.


Install gdal executables

Question: Trying to search for gdal executable versions anywhere like the version from Unofficial Windows Binaries for Python Extension Packages before it was change to wheel but no luck(e.g. GDAL-1.10.1.win-amd64-py2.7.exe). Are gdal executables still available? Or was this replaced with wheel?
Comment: For Windows I have used the binaries and libs from http://www.gisinternals.com/ - developers will need to match to your compiler (version of Visual Studio) - if you don't have a compiler then just pick one, in 32 or 64 bit to match your OS, and download the gdal-XXX-XXXX-core.msi which has the tools in it, then optionally ECW, MRSID and python bindings.
Comment: Are you on Windows, Mac or one of the many flavors of Linux?
Comment: Was there something special about those particular binaries that aren't in the official distributions?
Comment: If I'm going to use the binaries from the gisinternals.com, there are still libraries needed for gdal to run smoothly that should be installed. While if I'm going to install the executable there is no other libraries needed to install. Is that right?
Comment: They work fine for me with no other libraries (except the correct visual studio runtimes). You only need external libraries if you're building from source.
Answer: The OSGEO4W setup provides you with GDAL executables in Advanced install, including python bindings for python 2.7 and python 2.7 to run them.
Gisinternals is another source, but not python.
Comment: GisInternals has the python bindings as well but only for a few versions of python. Another good way is to install QGIS which comes with most of the tools - but you can get that from the OSGEO4W installer too!
Comment: Gisinternals offers the latest dev builds as well, if you stumble on a bug that has been fixed recently. And all Gisinternal zipped GDAL versions live happily on my hard disk without interfering.
Comment: You are right, but you need to install python and dependend packages separately. I updated my answer.
Comment: Bindings for python 2.7 suits me, that's what ArcGis uses and it's bad to have more than one python version installed. The OSGEO4W is (arguably) the best method, or at least the best for not getting into trouble as it automatically selects dependencies. I have 3 versions of GDAL installed, all via different methods, each one has its benefits and limitations. GisInternals has the C# wrappers that I haven't seen in OSGEO4W - only important to C# developers that want to use GDAL though; interestingly in C# GDAL is in the OSGeo namespace...
Answer: Don't be intimidated by the switch from .exe to .whl. While the former were installed by double-clicking, the later needs to have a command prompt to install.
First make sure you have pip
Let's take a typical example with Python installed in C:\Python27. If you have Python 2.7.9 or later, then you already have pip in C:\Python\Scripts, otherwise for older versions you need to first install pip from a command prompt, e.g.:
cd C:\Users\someone\Downloads
C:\Python27\python.exe pip-9.0.1-py2.py3-none-any.whl/pip install pip-9.0.1-py2.py3-none-any.whl

But honestly, it is almost simpler to install a more modern version of Python, which all have pip included.
Installing / uninstalling .whl with pip
After ensuring you have pip, it is simple to install downloaded .whl files from a command prompt:
C:\Python27\Scripts\pip install GDAL‑2.1.2‑cp27‑cp27m‑win_amd64.whl

And if you need to uninstall:
pip uninstall gdal

Comment: @user and once you install the wheel, the gdal executables (i.e `gdal_translate.exe` etc) will be in `(python dir)\Lib\site-packages\osgeo`.

Install gdal executables


WiFi Data transfer problem with Nex 6

Question: I have a Nex 6, although I managed to use the photo transfers from my camera to my computer initially, I am having trouble doing this process now.  My camera is giving me the message "Connected to the access point.  Cannot connect to the computer to be saved".
Can someone help please!
Comment: What troubleshooting have you tried? It sounds like you are using the Sony downloader software, if that is true please state that explicitly in your question. Is your computer a laptop? Desktop? Mac? PC? No one can help you with the little bit of info you've provided.
Answer: To me it sounds more of a technical problem unrelated to actual photography, so places like SuperUser might yield more/better answers.
Having said that, my initial guesses would be that the target computer is not connected to the same WiFi, or not reachable from there due to a firewall, for example. Another thought might be that whichever software running on the target computer, that accepts the images, might be switched off — I don't know if the Nex 6 uses some form of service, or a program you have to start manually, or uses normal windows file shares. In case of the latter, it might be removed, or the access rights revoked.
I wish I could give more specific information, but not having experience with that WiFi transfer system there, I cannot "home in" better on the causes.
Answer: You don't say if it's a Mac or PC, and this question is old. But if someone with a Mac comes looking for an answer, here is one possibility:
When you download pictures using the included Sony Downloader software for the NEX when it is done it shows a little popup with some buttons that will do things like open the folder where your photos were downloaded to. You have to close that popup before another download can happen.

WiFi Data transfer problem with Nex 6


Increasing matter density in the Friedman equations?

Question: From what I understand, the Friedman equation is $H^2=\frac{8\pi G}{3} \rho$ and the $H$, the Hubble constant, is a measure of the rate of expansion of the universe. What I am confused about is that this seems to say that as the matter density of the universe increases, the rate of expansion of the universe increases. Should this not be the other way around because greater matter density means greater spacetime curvature (greater force of gravity) so everything gets pulled back more?
Comment: The spacetime curvature is proportional to $H^2$. One hand wavy way to think about spacetime curvature is that it is a measure of how the local spacetime geometry is changing. So in cosmology, a large spacetime curvature means a large expansion rate (ie the spacetime is changing rapidly), which by einsteins equations (or if you prefer the Friedman equation) is driven by a large density. So there is no contradiction.
Comment: @Andrew thanks for your reply! But I'm still not sure why greater matter density would result in greater expansion rate- shouldn't greater matter density mean a greater force of gravity so slower expansion rate?
Answer: $H$ tells us how fast the universe is expanding, relative to how much it has already expanded. It has units of inverse time. For example, if $H=0.1\ \mathrm{s}^{-1}$, then the universe is expanding by 10% every second. Suppose that the density of mass-energy in the universe was so small that deceleration was negligible, and suppose that at $t=1$ s, we have $H=0.1\ \mathrm{s}^{-1}$. Now a billion years go by. At $t=1$ billion years, clearly the universe is no longer expanding 10% per second. The value of $H$ is going to be much smaller. But this doesn't mean that the expansion has been decelerating. In fact, in this special case of the Friedmann universe, with negligible matter density, we have flat spacetime, so it makes sense to talk about the velocity of one galaxy relative to some other, cosmologically distant galaxy. This velocity hasn't changed at all, but $H$ has gone down.

But I'm still not sure why greater matter density would result in greater expansion rate

It isn't really a straightforward cause-and-effect relationship where the density causes a certain expansion rate. In the example given above, expansion has actually caused a decrease in density, while density has had no effect on the rate of expansion.


Why is the U/L bit inversed in EUI64?

Question: This inversion is bijective, so I can't figure out what is it's use.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
Answer: RFC 4291 provides instructions on how to create the EUI64 address:
Links or Nodes with IEEE 802 48-bit MACs

[EUI64] defines a method to create an IEEE EUI-64 identifier from an
IEEE 48-bit MAC identifier.  This is to insert two octets, with
hexadecimal values of 0xFF and 0xFE (see the Note at the end of
appendix), in the middle of the 48-bit MAC (between the company_id
and vendor-supplied id).  An example is the 48-bit IEEE MAC with
Global scope:

|0              1|1              3|3              4|
|0              5|6              1|2              7|
+----------------+----------------+----------------+
|cccccc0gcccccccc|ccccccccmmmmmmmm|mmmmmmmmmmmmmmmm|
+----------------+----------------+----------------+

where "c" is the bits of the assigned company_id, "0" is the value of
the universal/local bit to indicate Global scope, "g" is
individual/group bit, and "m" is the bits of the manufacturer-
selected extension identifier.  The interface identifier would be of
the form:

|0              1|1              3|3              4|4              6|
|0              5|6              1|2              7|8              3|
+----------------+----------------+----------------+----------------+
|cccccc1gcccccccc|cccccccc11111111|11111110mmmmmmmm|mmmmmmmmmmmmmmmm|
+----------------+----------------+----------------+----------------+

And RFC 2373 provides the 'why' behind flipping the 7th bit:
The motivation for inverting the "u" bit when forming the interface
identifier is to make it easy for system administrators to hand
configure local scope identifiers when hardware tokens are not
available.  This is expected to be case for serial links, tunnel end-
points, etc.  The alternative would have been for these to be of the
form 0200:0:0:1, 0200:0:0:2, etc., instead of the much simpler ::1,
::2, etc.

But that is a bit of a mouthful.  So in simpler terms...  In MAC address architecture, the 7th bit signifies whether the MAC address was universally or locally assigned. A value of 0 indicates the address is universally administered. For instance, the when IANA assigns an Organizationally Unique Identifier (OUI) to a NIC card vendor, the 7th bit will be 0, indicating the OUI was universally assigned. Should a user manually change their MAC address, this 7th bit would be set to 1, indicating the Ethernet address was locally administered.
There is also some more information about this at PacketLife.
Comment: "A value of 0 indicates the address is universally administered". Isn't it the opposite?
Comment: I still don't get it.  If an admin doesn't want 0200, then he/she can just manually configure the /128 ipv6 address as they see fit, regardless of what they do with their mac address configuration.  The only possible benefit I see here is in a situation where the link local address can't be manually changed, which would be the only scenario where an admin would see a benefit.  In other words, as an admin if I have a problem with my eui-64 ipv6 address showing 0200, then I'll just manually change that address, assuming I can manually change my link-local address
Comment: and this link indicates that manually configuring a link-local address is possible https://community.cisco.com/t5/ipv6/manually-configuring-link-local-global-unicast-cannot-use-eui-64/td-p/3310648
Comment: Wouldn't the `ff:fe` inserted in the middle be sufficient to avoid collisions? And if not, wouldn't it have been easier to move those 1 bits a little rather than adding this bit flip to the MAC?
Answer: It is done to classify hand-assigned addresses such as prefix::1, prefix::2 etc. as local.
Suppose that you're setting up a network in prefix 2001:db8:dead:beef::/64.  You'll probably use MAC-based IPs for most of your nodes.  For some nodes, however, such as the DNS server, the directory server, etc., you'll want to use addresses that are easier to type and easier to memorise than the MAC-based addresses.  For the DNS server, you'll probably want to use
2001:db8:dead:beef::53

Note that the U/L bit is set to 0 — which, due to the bit's inversion, classifies the host-id as local.
Comment: The U/L bit inversion only applies to EUI64 addresses. A manually configured address has no such meaning. The inversion is so interfaces without a MAC can generate one (i.e. all zeros) without the local bit making a mess of it. (if you use a locally generated MAC as-is, there will always be a bit set making "::#" impossible.)
Answer: In short, because in the ethernet MAC, seventh bit is defined to mean local/#global, while in IPv6 seventh bit in the 64-bit interface ID is defined to mean global/#local.
Answer: EUI 64 means only an MAC Address (48Bit) which has
..:FF:FE:..

in the middle of it to fill up all the 64bits. Hence the name EUI-64. To be exactly you mean modified EUI-64 which means the EUI-64 combined with a bitflip of the 7th bit.
The Seventh bit is changed because in the MAC Addresses this 7th bit indicated the difference between a local one (0) and global (1). Local in this sense is, for example, a Serial interface.
Since all this is to automatically create a public address which all will be on an interface which is global (in MAC terms) this would result in a 1 at the 7th position.
They changed that bit, so you don't have to write down the hole address and you can you the Shorthand notation of "::"
Example (from the RFC 2373):
...
The alternative would have been for these to be of the
form 0200:0:0:1, 0200:0:0:2, etc., instead of the much simpler ::1,
::2, etc.

Short Answer
Even though every MAC Adress would end up in an IPv6 Address which would have a HEX Number higher than 0 at some position in the IPv6 Address. This makes it possible to have Zeros there so you could use the shorthand notation.
Answer: EUI-64 Process
EUI also known as EUI-64 process defined by IEEE, EUI is the abbreviation of Extended Unique Identifier. The process uses a client's 48-bit Ethernet MAC address and inserts an extra 16 bits in the middle of the 48-bit MAC address to create a 64-bit Interface ID. Ethernet MAC addresses are represented in hexadecimal containing two parts:
Organizationally Unique Identifier (OUI)– This is the first part of MAC address called OUI. An OUI is a 24-bit number which uniquely identifies a vendor or manufacturer of the device. The organizations purchased an OUI from the IEEE. The first three octets of a MAC address are Organizationally Unique Identifier (OUI).
Device Identifier– The last three octets of the MAC address uniquely identify the device. It is also a 24-bit (6 hexadecimal digits) value within a common OUI. The device identifier bits assigned by the organization to their device.
A EUI-64 Interface ID has three parts represented in binary:
24-bits Organizationally Unique Identifier (OUI) from the client MAC address with a reversed 7th bit. For example, if the 7th bit of the OUI is 1, it becomes a 0, and vice versa in the EUI interface ID.
24-bits Device Identifier from the client MAC address
Hexa decimal value FFFE (16 bits) between Organizationally Unique Identifier (OUI) and Device Identifier.
EUI-64 process using the MAC address of BC:78:ba:b1:f8:55.
Get the mac address of the host or device for example in this case BC:78:ba:b1:f8:55
Insert ff:fe in the middle: bc:78:ba:ff:fe:b1:f8:55
Reorder the above hexadecimal digits in IPv6 notation. bc78:baff:feb1:f855
You can see that now it's 4 hextet, convert the first octet from hexadecimal to binary: BC-> 10111100
Flip the 7th bit: 10111100 ->10111110
convert changed octet back to hexadecimal:01000111 ->BE
Now change the first octet with new value one: bc78:baff:feb1:f855
Insert the link-local prefix at the beginning : fe80:: bc78:baff:feb1:f855
There are some more information about eui 64 on my Blog
Comment: "_if the 7th bit of the OUI is 1, it becomes a 0, and vice versa in the EUI interface ID._" That is a misunderstanding. The U/L bit must be set for a modified EUI-64 interface ID. You do not clear it. That is a misconception that seems to be prevalent  Setting the bit means that you are locally creating the address, which is why you set it, not clear it. Setting it is specified in _[RFC 4291, IP Version 6 Addressing Architecture](https://tools.ietf.org/html/rfc4291)_ in Appendix A
Comment: This explain how to build the EUI-64 address from the Mac address but doesn't answer the question, nor does the link provided. Please carefully read the question and genuinely try to answer it.
Comment: @RonMaupin you should really expand that into a full, proper answer. The misconception about flipping the bit comes from the EUI-64 example which shows how to convert an EUI-64 identifier to a modified EUI-64 identifier. If the EUI-64 identifier is derived from an *IEEE-assigned* OUI/OUI-36, then U/L will always be 0 and flipping the bit will net the desired, but that is not generally the case. For instance, made-up MAC addresses should feature U/L=1, in which case the bit *must not* be flipped.
Comment: Then again, flipping might be always appropriate and I have to stand corrected. It seems that a generated interface identifier needs not be created in a way that the address is marked as global or local, c.f. RFC 4291, 2.5.1. The Linux stack, for instance, doesn't differentiate suffix purposes. The interface identifier as used by SLAAC is the same for both global unicast and link-local addresses.
Comment: @Ionic, read Eddie's answer and the RFC. Remember that there are protocols that use 64-bit MAC addresses, and you would not set the U/L bit because such an address is assigned. Creating a modified EUI-64 from a 48-bit MAC address means that it is not universally assigned, so the bit needs to bet set to `1`, not flipped to `0`. In any case, this is really no longer used as modern OSes use Privacy Extensions with Random Addressing.

Why is the U/L bit inversed in EUI64?


Transfer money from a bank account to a bitcoin wallet

Question: How do I transfer or pay money from a bank account into a bitcoin wallet address? Please assist
Answer: You cannot transfer dollars from a bank account directly into a bitcoin wallet.
You'll need to sign up with a bitcoin exchange service, there are many in existence. Once you have an account with one of them, you can transfer dollars to the exchange's bank account, and then your user account will be credite. Next you will be able to purchase bitcoins at the current market rate through the exchange.
After that, you can withdraw your bitcoins to a bitcoin wallet you control.
There are other ways to purchase bitcoins too, but I think exchange services are perhaps the most commonly used


Shul and the Divine Presence

Question: Someone told me that when people are talking during davening it causes the Divine Presence to leave or depart from a shul. Is there a halachic source for this?
Comment: Who and what were they talking about? Sounds more like they were polemicizing.
Comment: They were talking during tefillah.
Comment: They told you this during tefillah and caused the Shekhina to leave, or they told you during tefillah that another talker had already caused the Shekhina to leave, or they told you after tefillah that a talker had caused the Shekhina to leave earlier than it should have?
Comment: I jest, but maintaining kavannah and keeping people in the spirit of davaning is a tricky matter, and some old guys yapping it up does make it _feel_ like the Shekhina has departed. Does it actually?  How could any of us humans know for sure?
Answer: I saw at The Yeshiva World a post that included the words:

One who speaks during Chazoras Hashatz causes the Shechinah to leave Klal Yisroel, and it is as if he has sinned with Avodah Zorah.
  Drush Chasam Sofer vol2pg309b

but I didn't see it here on a quick check.
Comment: Is there anything mentioned that if one speaks during Chazoras Hashatz in his shul the Shechinah leaves from that shul?
Comment: @ChiddusheiTorah The quote above is all I found.

Shul and the Divine Presence


Why doesnt the SARS-Cov-2 affect other animals?

Question: Why doesn't the coronavirus affect animals like dogs and cows? I know that the SARS-CoV-2 is a zoonotic virus i.e. it can affect both humans and other animals.  I also know that the DNA composition and cell structure of almost every animal on earth  is the same.
Comment: "I also know that the DNA composition and cell structure of almost every animal on earth is the same." -- that's quite the generalization. Do you not think that the differences that cause the great variety in physical appearances across animals could also cause differences in susceptibility to disease?
Answer: Even though the DNA sequence may be 90+% similar between two species, individual amino acids can make a huge difference in the interaction between two proteins. In this case, the most relevant proteins are the coronavirus spike protein and the ACE2 enzyme expressed on the surface of target cells. Even in the limited amount of time SARS-CoV-2 has existed and been studied, researchers have found single amino acid mutations in its spike protein that meaningfully affect how well it binds to ACE2. When constructing animal models for COVID-19, and for the original SARS, in some cases it has been necessary to introduce a human ACE2 gene to allow infection. It is worth noting, however, that this is not always the case--for instance ferrets and hamsters can be infected by SARS-CoV-2 without any genetic modification at all.
This paper gives a summary of the work so far: Muñoz-Fontela, C., Dowling, W.E., Funnell, S.G.P. et al. Animal models for COVID-19. Nature 586, 509–515 (2020).
Comment: Also cats and tigers: https://www.cdc.gov/coronavirus/2019-ncov/daily-life-coping/animals.html  And there have been fairly recent news reports about large numbers of mink (a fairly close relative of ferrets) dying from the virus.
Comment: This looks like a reasonable answer and it is great that you provided a supporting reference. However, please include the complete reference information since links can (and do) break — e.g. when a journal reorganizes its website. One easy way to get that information is to search for the paper on [Google Scholar](https://scholar.google.com/) and click on the " symbol to get reference information. This is a good example of how to [format references](https://biology.stackexchange.com/a/59698/46609). Thanks!


adb - pull data from non-rooted android

Question: I am trying to backup data from Xiaomi Mi 9t which has a software error and is non-functional:

the screen is stuck at 'Just a sec'
in settings I am only able to connect to wifi and bluetooth
USB debugging is enabled
phone is not rooted

I am able to connect to device using adb shell but I am not able to pull any data.
Here are few commands that I tried:
<code>➜  Downloads adb devices
List of devices attached
897b97e8    device

➜  Downloads adb root
adbd cannot run as root in production builds

➜  Downloads adb pull /sdcard ./
adb: error: failed to stat remote object '/sdcard': No such file or directory

➜  Downloads adb shell
davinci:/ $ ls
ls: ./init.zygote64_32.rc: Permission denied
ls: ./init.mishow.ctl.rc: Permission denied
ls: ./init.rc: Permission denied
ls: ./init.usb.rc: Permission denied
ls: ./ueventd.rc: Permission denied
ls: ./init.zygote32.rc: Permission denied
ls: ./init.recovery.hardware.rc: Permission denied
ls: ./init: Permission denied
ls: ./init.miui.google_revenue_share_v2.rc: Permission denied
ls: ./init.batterysecret.rc: Permission denied
ls: ./init.miui.cust.rc: Permission denied
ls: ./init.environ.rc: Permission denied
ls: ./init.miui.post_boot.sh: Permission denied
ls: ./init.miui.qadaemon.rc: Permission denied
ls: ./init.batteryd.rc: Permission denied
ls: ./verity_key: Permission denied
ls: ./init.recovery.qcom.rc: Permission denied
ls: ./init.mi_thermald.rc: Permission denied
ls: ./init.miui.rc: Permission denied
ls: ./init.usb.configfs.rc: Permission denied
ls: ./init.miui.google_revenue_share.rc: Permission denied
ls: ./init.miui.nativedebug.rc: Permission denied
ls: ./init.miui.early_boot.sh: Permission denied
acct apex bin bugreports cache charger config cust d data debug_ramdisk default.prop dev etc lost+found mnt odm oem proc product product_services res sbin sdcard storage sys system vendor
1|davinci:/ $ cd /sdcard
/system/bin/sh: cd: /sdcard: No such file or directory
2|davinci:/ $ cd sdcard
/system/bin/sh: cd: /sdcard: No such file or directory
2|davinci:/ $
</code>
EDIT 1:
<code>➜  Downloads adb pull /storage/emulated/0
adb: error: failed to copy '/storage/emulated/0/O,muoupUzTcgD9bevATC1B' to './0/O,muoupUzTcgD9bevATC1B': remote open failed: Required key not available
</code>
Comment: @alecxs I tried but getting this error: `adb pull /storage/emulated/0
adb: error: failed to copy '/storage/emulated/0/O,muoupUzTcgD9bevATC1B' to './0/O,muoupUzTcgD9bevATC1B': remote open failed: Required key not available`
Comment: Does this answer your question? [copy encrypted internal storage to pc ( in twrp mode )](https://android.stackexchange.com/questions/221041/copy-encrypted-internal-storage-to-pc-in-twrp-mode)
Answer: Your device seems to be encrypted using File Based Encryption (FBE). After you enter lock screen PIN the first time after boot these files will become available. But based on your description the system fails before it reaches lock screen. I don't know if there is a way to enter PIN via adb so that the encrypted files can be accessed (assuming the necessary keys are still present and not corrupted).
Extracting the encrypted files (if it would work) doesn't make sense as the necessary key is only present on the device and can't be extracted.
As the device is not rooted (and therefore I assume also not bootloader unlocked) you can't boot into recovery and eventually decrypt and extract the files using recovery.
So from my perspective I don't think it is possible to extract your files.

adb - pull data from non-rooted android


What is the difference between 美人 and 佳人?

Question: Both words mean "beautiful woman", but I guess the reason two words exist is because of some nuance. Am I right ?
Answer: I see no semantic difference, but 佳人 is an uncommon outdated word. On BCCWJ, there are over 2000 instances of 美人 and only 28 instances of 佳人, most of which are part of certain old book titles (incl. 佳人之奇遇) or idioms (incl. 佳人薄命). If you said 佳人 in casual speech, the listener probably wouldn't even understand it. On the other hand, on 青空文庫検索, there are many instances of 佳人 from novelists of the 19th century. So unless you want to write something stiff mimicking the writing style of old novelists, you should not use 佳人. (BTW there is also 麗人, which is equally rare)
Answer: From super daijirin:

び-じん [1][0] 【美人】
美しい容貌の女性。美女。麗人。
〔古くは,男子もさした。「玉のやうなる―,…もらひまして聟にいたします/浮世草子・胸算用 2」〕

(Woman of beautiful appearance. In old times, was used for boys too.)
...

か-じん [1][0] 【佳人】
美しい女の人。

(A beautiful woman)
...
Also note the small differences between the kanji meanings (from jisho.org):
美: beauty, beautiful
佳: excellent, beautiful, good, pleasing, skilled
...
Also note the different contexts that show up when you look for example sentences:
美人: https://ejje.weblio.jp/sentence/content/%E7%BE%8E%E4%BA%BA
佳人: https://ejje.weblio.jp/sentence/content/%E4%BD%B3%E4%BA%BA
By comparing the example sentences, 佳人 seems more poetic and much less common.
Answer: Not a native language speaker, but I've seen a phrase in a Chinese historical romance (set in ancient times) that went something like this: meiren (美人) is easy to find, jiaren (佳人) is difficult to seek.
Which in this context I interpreted as meiren referring to outer, superficial beauty--i.e. anyone who is very very pretty suffices to be called it. Whereas jiaren requires beauty at a deeper level--i.e. someone who is not beautiful merely in that skin-deep sense.
I think the difference in nuance might be of relevance only in an ancient setting, when language was much more complex, and more laden with subtle and hidden meanings. In modern novels, I've rarely if ever seen jiaren be used; and if it were used, it would probably be used interchangeably with meiren, more or less.
That's my two cents.
Comment: In what sense was language (Japanese? Chinese?) more complex in the past?
Answer: According to the dictionary, it seems that 佳人 can only refer to a woman, while 美人 may also refer to a man.
https://dictionary.goo.ne.jp/jn/40900/meaning/m0u/
https://dictionary.goo.ne.jp/jn/286724/meaning/m0u/
Comment: **現代の**日本で男に「美人」は使わないですよ。
Comment: [決]{●}[し]{●}[て]{●}使わないですか?それとも、使いましたら特別なニュアンスになるのですか?


Definition of (Finite) Signed Measure

Question: My class notes define a signed measure on a measurable space $(X, \mathcal{R})$ as a $\sigma$-additive function $\nu : \mathcal{R} \to \mathbb{R}$. (I take this to mean we're only considering finite measures.) I'm confused on what I'm supposed to interpret $\sigma$-additive to mean here. My first guess would be that if $A = \bigcup_nA_n$ where $A_1,A_2,\ldots$ are disjoint, then
$$\nu(A) = \sum_{n=1}^\infty \nu(A_n);$$
i.e., just the usual definition of $\sigma$-additivity. But this seems problematic when the series on the right doesn't converge absolutely, because then its value depends on the order of the $A_i$, which my gut tells me shouldn't be the case. Does $\sigma$-additivity here also involve the claim that the series on the right always converges absolutely? The wikipedia page on signed measures does require this, but no other source I found online, or my class notes, explicitly states it.
Comment: @EricTowers That argument works for regular (nonnegative) measures, but in this case how can we say that sequence is monotonically increasing? If even one of the terms in the series is negative that isn't the case.
Comment: I observe the following from the referenced by uncited Wikipedia page: "The series on the right must converge absolutely when the value of the left-hand side is finite."
Answer: $\nu$ takes only finite values. So disjointness of $(A_n)$ implies that $\sum \nu(A_n)$ is a convergent series. So is any rearrangement of terms since disjointness still holds. If a series of real numbers converges whenever the terms are permuted then the series is absolutely convergent. Hence $\sum |\nu (A_n)| <\infty$.
Comment: Got it, thanks!
Comment: Wait I don't understand why disjointness implies the series converges?

Definition of (Finite) Signed Measure


Can I get credit for an event if I don't stick around?

Question: If I contribute toward the completion of a dynamic event, but either leave the area or log out of the game before it is finished, will I still get credit in the event that another player completes it? Can I receive my karma in absentia?
Comment: I know if you are still within the zone you still get credit. do not know about the cases where you log off or leave the zone. my hunch is that logging out will still net in rewards (because of internet disconnects and the such)
Answer: Yes, you can. I have had this happen many times, where I'll be walking along and suddenly get rewarded for an event in a previous zone. I have also logged in to find rewards for an event which I was working on before I logged out.
Comment: I'm not sure you can get rewards if you log out, or leave the zone before the event is completed. I've been playing since launch and it's never happened to me; are you sure about this (it's completely possible that I just haven't noticed)?
Comment: You can also get "accidental" event awards. If you walk into an area with an event going on and you help hurt a monster that is part of the event, you will get credit (usually bronze level) for the event. I have this happen when I go to an area with a heart quest and the monsters you need to kill overlap an active event.
Comment: I haven't played in a little while, but I'm almost certain I remember logging in and having rewards for events I logged out in the middle of.
Comment: @TapenZee, I do this all the time, except not on accident.
Comment: I know I've definitely missed at least one event completion due to leaving the zone - not the area, but the map (i.e. Gendarran Fields, Diessa Plateau, etc)
Comment: Hmmm... I may be misremembering what happens when you leave the zone, but I'm pretty sure about logging out.
Comment: Logout credit might be given if the event is completed soon after you go off (as someone said, maybe to battle disconnects). I wouldn't count on it unless I were sure of the timeframe, and I'm not, and assuming most players think like me, it's best to just stay around (online and in the instance) unless you're ready to forfeit your rewards.


PD controller in C#

Question: I am currently building a line-following mobile robot. I've done all my image processing work in C#, and now I am in the control phase. I am looking for a PD controller program written in C# to start with. I've searched a lot but without success. My robot is not an Arduino based, it has a motherboard with a Core i3 CPU, and I am using a Camera not an LDR sensor.
Comment: At the risk of sounding pedantic, did you try looking for a "PD controller *algorithm*"?
Answer: Your problem is not the P[I]D controller, but extracting control parameters from your system. A PID controller by itself is something like this (assuming a periodic control task):
/* 1. get current position */
cur_position = get_current_position();

/* 2. calculate error */
err = goal_position - cur_position;

/* 3. calculate the output */
proportional = Kp * err;
derivative = Kd * (err - last_err);
integral = Ki * (last_sum + err);
output = proportional + derivative + integral;

/* 4. keep history */
last_sum += err;
last_err = err;

/* 5. apply control output */
apply_control_output(output);

where last_sum and last_err are persistent (they are defined outside the scope of the control loop, e.g. they are global or are a class member or on stack of caller who's calling the control task in a loop). In a PD controller, Ki is zero.
Now steps 2 through 4 are very simple and probably that code runs on any C-derived language without modification. Needless to say, the control parameters Kp, Kd and Ki need to be tuned to your application (which is a problem of its own, but in this case you can just fiddle with it to get a good idea (hint: Ki is really small)). The problem is thus steps 1 and 5. Step 1 depends on your input and step 5 depends on your output.
In step 1, you need to get an image from your camera, process it and understand how far off you are from the line. That would be your position. Note that you may also like to extract the direction of the line, in which case steps 2 through 4 could be done on 2D data! But PID rather sucks anyway and a line-following robot is not a serious application either, so you may not want to bother with that.
Let's take an example.  Imagine you see the following image on your camera:

One simple way to calculate your position with respect to the line would be to take the distance d from the center of the image to the line that needs to be followed (or to its tangent if its curved):

In this case, your cur_position would be d (which would be negative if it's on the other side of the line) and your goal_position would be 0.
This is a very simplistic solution and likely the robot may move in a weird way, since it doesn't take direction into account. If you think of the robot position as the pair of data containing distance from line and direction of line (its angle with respect to a vertical line), your goal would also be to make that (0, 0). This still doesn't take non-smooth lines in consideration.
That done, step 5 remains. Step 5 takes the output of the controller and makes the robot follow it. This of course depends on how the robot acts. For example, if your robot has two speed-controllable wheels in the front and a passive omnidirectional one in the back for balance, then you need to tell the motors turning the wheels to maintain what speed.
For example, if the output parameter is positive, it may mean that you are on the right side of the line. What you need would be then to turn left. To do that, you can set a higher speed for the right wheel and a lower speed. The higher the output, the higher the ratio of speed between the two wheels.
Comment: thanks for clarifying the approach, but i have a question, what are the techniques to obtain the center of the black line ?
Comment: I thought "you've done your image processing" already? I'm not an expert in image processing. Feel free to ask another question specifically on that!
Comment: Yes i've done the most part but i still sicked with this question, i will post it as a separate one ...
Answer: You may take a look at this library running on Arduino in 'standard' C.  The author has a line by line explanation on his blog. Hence, easy to change to other system as needed.  See the blog for the autotune utility too.
PID
http://playground.arduino.cc/Code/PIDLibrary
Full description by author
http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/
By the way, you need analogue reading (no just on and off) on the line. That is, analogue of 512 out of 1023 menas the sensor is at 50% edge of the line.
Advanced use can detect the analogue signal from the sensor diode,
giving an continuous reading on the "percentage of hitting the
white/black line".  (says, n% of voltage is, as tested by experiment,
is 60% on line and 40% outside the line).  This analogue input can use
PID control to provide smooth and continuous (no just on and off) and
provide best optimal drive speed as in the enclosed video.
This is 3PI, showing the analogue reading from 5 sensors, note the
initial spinning for the robot to calibrate through n% of crossing the
line and analogue reading from sensors.  If 2 sensors reading 50%, the
line is at the middle between the 2 sensors.
https://www.youtube.com/watch?v=ylyRi1Qlbl0&feature=player_embedded
See page 18 pf 3pi manual  http://www.pololu.com/docs/pdf/0J21/3pi.pdf  for a very clever use of IO pins.
The sensor can be read WITHOUT ADC converter.  This method is widely
used in mass produced consumer electronic, as i worked for factory,
where high resolution (16 bits) is needed and the reading speed is ms
range or slower (1 to 10ms or slower). MCU only has 10 to 12 bits high
speed ADC and this circuit give higher resolution.
Fast example
Product
https://www.youtube.com/watch?v=6ENIiMv7LvM
Hope this helps
Comment: Thanks for the help i appreciate it, but i missed to clarify that am not working in an Arduino based robot, but am working on a computer motherboard based robot, with Core I3 CPU, plus am not using a LDR sensors but am using a camera ...
Comment: Thanks for clarification. You may consider using webcam, within budget, choose one with highest frame rate at says, 640 X 480 resolution, no need for too high res as slower frame rate. Consider software library like OpenCV. My posting 2 weeks ago on another topic has opencv learning information, etc.  The sensing part is functionally 'same' as above and gives an analogue percentage value relative to line position. The PID part is same for PC or Arduino as in C language.
Comment: By the way, for information, LDR (CdS) is a bit slow (ms to tens of ms). Photo diode is popular choice as fast, wide variety of well controller beam acceptance angle (with/without build-in lens) and widely available due to mass manufactured for appliance remote control, etc.    For information, camera is good as easily start and widely available. For best performance (may be phase 2 after camera), consider TSL1401 which give 10,000 update per second, but, needs IC chip level hardware interfacing. There are many open source web example using Arduino and similar MCU for those need extreme speed
Comment: thanks for the infos, in fact i am using a Full HD Logitech camera with 30 FPS with pan and tilt capabilities, am using EmguCV rather than OpenCV, but they are the same one with C++ the other with C# ...

PD controller in C#


Macbook Air - i5 vs i7

Question: I am buying a Macbook Air and would like to know about the difference between the i5 and the i7 option. The i7 is only 100mhz faster and has 1mb of extra cache on the CPU. Does that small difference make a big difference to performance? Or is it so small that its not really worth the AU$100 extra?
Answer: AnandTech did a report comparing the two options and came to the conclusion that there isn't really a noticeable difference.  Just 7-12% improvement on certain benchmark tests.
Below are the figures they got for reference.
Answer: Technical Details
I see you are in Australia. There was a recent article published by PC World Australia that goes into some detail on the differences between these processors at a technical level.
The i7 has a larger on-chip cache than the i5 (4 MB instead of 3 MB). A larger cache can speed up intensive operations like video encoding.
MacBook Air 2011 i5 vs. i7
Mac Crazy published an article specifically directed at answering your question with relation to the MacBook Air it was titled, "MacBook Air 2011 i5 vs i7 – Is the upgrade worth it?".
They include this table detailing the two i5 and single i7 CPUs used in the mid-2011 MacBook Air models.

There bottom line was this,

People who would find the upgrade to the i7 worthwhile would be those
  doing heavy media work, particularly video encoding, or people who are
  very speed-sensitive.

I would argue that people who are that speed sensitive would probably do better to buy a MacBook Pro.
Air vs. Your Current Machine
I am a designer who makes extensive use of Photoshop and I have been very happy with my recent purchase of a MacBook Air i5. The MacBook Air easily beats my MacBook Pro. Here's a video from the article showing a MacBook Air i5 beating a 2010 MacBook Pro 15″ Core 2 Duo 2.66 GHz:
Comment: I totally agree on your comments about choosing the MBP over the Air, but you cannot deny the portability of the Air.  I have a 15" MBP and am seriously thinking the Air will be my next notebook.
Comment: It appears I was not clear. I currently own (and am very fond of) a 13" MacBook Air i5. My previous computer was a MacBook Pro 15" and I made the choice to move to an Air for the same reasons you are considering it.
Comment: I don't know where this canard originated (I've seen it in other articles too), but video encoding is a perfect example of something that gains very little benefit from cache.
Comment: Kevin, I don't know that much about the technical details of processors so I am very open to being wrong on this one. The claim made above is found in the article I linked to. Would you mind substantiating your claim? I'd love to learn more about the architecture and uses of these chip designs.

Macbook Air - i5 vs i7


Disable tableView, but enable UINavigationController's back button

Question: I am disabling a UITableView while displaying a UIActivityIndicatorView, and I just wanted to know how I could enable the UINavigationController's back button while the UITableView is disabled?
Answer: I assume you meant to disable any user events from UITableView. Recall UINavigationController user events queue is independent of UITableView user events.
So, by disabling UITableView the UINavigationController isn't affected.
Set the views userInteractionEnabled boolean value property to NO.
This ignores user events and removes UITableView user events from the queue.
i.e.
controller.view.userInteractionEnabled = NO;
OR
self.view.userInteractionEnable = NO;
(depending where your setting the property).
and right before disabling UITableView
set the UINavigationItem property assuming the UINavigationController property is not hidden. The UINavigationItem will use the default "back" UIBarButtonItem if no new lefBarItem is set.
i.e.
[self.navigationItem setHidesBackButton:NO animated:YES];
Answer: What do you meant by disabling the UITableView? Do yo mean disabling the scroll? UITableView inherits from UIScrollView, so you can change the scrollEnabled property to NO, which shouldn't affect the UINavigationController at all.


Can I use this rf module with HT12E and HT12D?

Question: I have recently made RC car using HT12E and HT12D connected to a cheap ASK RF module of 433 MHz frequency,but it's range is not good only a few meters and also so prone to electrical noise generated from DC motors,I have tried every solution like covering motor with metal chasis which is connected to ground and low pass filter....but nothing works so finally decided to change frequency,found this
but unlike normal module,it has 6 pins,I know it's transreceiver so I will buy two pcs but how to use them with HT12E and HT12D,what are PROG and CTS pins and how to use them?
Answer: According to the datasheet that module has an async UART interface so it won't be compatible with the HT12E and HT12D. Those are designed to interface with "dumb" RF modules that have a simple data input and output that don't implement any higher level protocols.
I'd suggest attempting to debug your existing solution further or try some alternative transmitter / receiver modules. In my experience the 433MHz modules are normally good for around 20-50 meters at least if the power supply is clean and you have a relatively decent antenna.
Maybe just as a test you could try powering the HT12D / receiver (I assume that's on the motor side?) from a seperate power supply like a battery and see how that goes. I'm guessing if your range is that low with those modules unless they have a defect you may have the same problem with different modules / frequencies.
Comment: Thanks PeterJ for your answer,all that's tempting me to use this module is because of it's range 2 km along with it's low cost,could you please suggest me a nice website to learn about UART and also how can I make my rc car run by using this module(UART communication,no matter even if I have to change my hardware).
Comment: @pra, you'd need to use a microcontroller to realistically use that module, maybe take a look at an Arduino that's probably the simplest way. But looking at the module specs that range is really optimistic - it says 1km typical when the antenna is 10m above ground and line of sight. Under those circumstances I'd expect you could get hundreds of meters with your current module, I really think you have some other problems.
Comment: Thanks again PeterJ,I will stick with my present module,mine frequency is 433 so is 35 cm length wire enoug as antenna?
Comment: ok PeterJ,I will use my present module what should be it's antenna wire length?35 cm?
Comment: @pra, that's about a half wavelength so should be good.


Using two Likert scales - one for agreement, the other to weight it by importance

Question: I worked years ago on a research project that used a survey design that had two Likert scales for each statement. One measured agreement, the other importance. I've been asked about this again, and I can't recall what this is called. I'm hoping there is a survey expert out there that can remind me what this approach is called, and maybe point me to some examples I can share?
Answer: There are a couple of different approaches to this, but most of these approaches have very similar objectives. The idea is to weight satisfaction by importance. Say you asked respondents about how satisfied they were with seven different services, and then you asked them how important each of these seven different services were. If an individual is extremely dissatisfied with a service he/she thinks is very important, this is will likely contribute to greater dissatisfaction with the 'overall programme of services', than for example, if a person was extremely dissatisfied with a service they did not regard as important at all.
Let's assume your Likert data is on a five-point scale. You keep the satisfaction data as it is (1,2,3,4,5), but then you recode importance to range like (-2,-1,1,2,3). You then multiply satisfaction by importance for each item, and then average across all items. (Note how we did not include a 0 in recoding importance, because we do not want to multiply by 0.) You then may want to convert these into some sort of standard measures, ranging from 0 to 1, or some such.
The Cummins Comprehensive Quality of Life Scale is a good example of this. In the document I linked to, the author does a very good job of explaining how his scale should be calculated, and how results should be interpreted. In short, he asks about satisfaction with and the importance of seven different quality of life domains. The approach given by Cummins is more involved than the very brief sketch I gave above, but his full approach (too long to be summarized here) is definitely superior.


Should questions regarding bible study methodology be considered on-topic or off-topic for Christianity.SE?

Question: Stemming from this meta post about the specific question: If we want to know what the Bible says about an issue, what methods can help us to find all the relevant scriptures? - which seems to have generated a diverse response from the community, it is suggested that we discuss questions of this type more generally. Can questions of a similar nature be on-topic for this site and if so, what principles will ensure they are well-formed?
Answer: These questions are fine as long as the're focused and answerable. For example I think all these questions would be acceptable:

What is the 'Swedish Method' for studying the Bible?
What is the history of the 'Swedish Method'?
Why do some people say it is dangerous to do word studies?
What is the Biblical/traditional basis for the historical-grammatical/analogical interpretation approaches?
What interpretative methods did Billy Graham usually use?
Comment: I think all of these would/should be on-topic and are interesting.
Comment: I actually upvoted before I googled, but if I could, I would upvote again just for introducing me to the Swedish method.
Comment: I think the last one is probably not answerable, unless Billy Graham is here to answer for himself.  If the question was modified slightly, to which ones does he promote, or something similar, it might be answerable.
Comment: It may or may not be, depending on what he has said. A lot of famous preachers do talk about their methodology. But anyways, it was just an example I had to think of quickly!


Won't start unless I step on gas

Question: So I have a Mini Cooper 2012 Base Model. My car will only start if I step on the gas. There is black smoke and some gas coming out form the exhaust. I ran a code scanner and all it shows is the ambient air sensor, but would that affect the engine? I thought it was only for like AC. My coolant sensor looks fine but I'll double check. Thank you for the help
Comment: "There is black smoke and some gas coming out form the exhaust." Do you mean **gasoline**? If so, are you sure it isn't liquid water or water vapour (which are normal when the exhaust system is cold)
?
Comment: Was the check engine light on?  What exactly was the code #? What exactly was the code translation?  "Ambient air sensor" is NOT the entire message.  You aren't telling us everything. How many miles/KM on the vehicle?  How long has the check engine light been on?  How long has this no start problem existed?
Answer: A faulty ambient air sensor may very well cause the problem you are having at startup.  Clear the code before troubleshooting further.
The ambient air sensor has nothing to do with a/c.  It monitors outdoor temperature so that the computer remaps the air-fuel mixture in the cylinders accordingly.  The idea is that cold air is more dense and contains more oxygen than warm air.  If your sensor inaccurately reads the outside temperature as colder than it really is, the computer will deliver too much fuel to the cylinders.  Black smoke will come out of the tailpipe.
Answer: Re: Ambient air sensor =  Mass Air Fuel Sensor? , if so that will throw off all your Air/Fuel ratio causing lean/rich condition.
Also something to consider ,is your engine affected by carbon buildup ,where by the valves are carboned up causing misfire? .It affects engines that  do have direct injection technology.
Black smoke = rich condition (too much fuel) , carbon = low volume of air from valves
Did you floor the accelerator on startup?

Won’t start unless I step on gas


How can I make Firefox display favicons in the address bar?

Question: Firefox 14 drops the icon from its address bar - what is a good way of getting it back?
I fully understand the security concerns, but I am missing the icon - having it in the tab only isn't the same.
I would prefer an about:config entry, if such exist, but I will settle for a small extension.
Comment: On a personal note: usually I embrace all UI changes - no point in going against them, but not this one... First, I like them icons. Second, I am missing some features, like the Google's mail count, or calendar date - the change make these websites a little less usable, in my opinion...
Comment: [The official announcement](https://blog.mozilla.org/ux/2012/06/site-identity-ui-updates/) (?), linked from the [Firefox 14 release notes](http://www.mozilla.org/en-US/firefox/14.0.1/releasenotes/).
Comment: Please note that this question is **not** about ubuntu, or any specific OS. I just chose a link with ubuntu screenshot.
Comment: But change makes sense, before you would see favicon double on the tab itself and next to url... this doubling had no advantage for user. Try it out for few days, you are going to get used to it :) What you are experiencing is normal, happens to all kinds of UI changes, look how much people complain when facebook changes graphics etc.
Answer: You may try Favicon Restorer addon which brings the website favicons back into the Location Bar in Firefox 14 and later.
Comment: Not bad! It does have some minor issues (like a small delay when changing tabs), but it shows both the favicon and a lock icon, which is very nice. I'll use it for a while, see how it goes, and I'll come back to accept this answer when I'm happy `:)` Thanks!
Answer: I've created a patch for the omni.ja file that uses the old code and style. You can check here for the patch and a patched omni.ja file.
Answer: Install the Custom Buttons add-on first and then install the Urlbar Favicon Inserter Button. Next you only need to customize your toolbar and drag the new button to your toolbar and you're done: the favicon is back. Right now, this is the only solution to get the favicon back into the urlbar that I know of.
If you feel the need to modify your Site Identity Button colors, you may want to check out yet another extension: Site Identity Button Colors.


How is coke missing from a sealed can?

Question: This question has actually been asked but my scenario involves different circumstances. I have a can of Coke from 2016, that I was keeping because it was a promotional one. Once, after a about a year past its best before date it swelled up considerably around the base. Anyway, I completely forgot about it and moved one  with my life. I found it today in the attic and to my surprise it was almost completely empty. It also wasn't swollen anymore and the bulge at the bottom of the can had now become concave again although I did have a few cans at the time so I can't be 100% sure it is the same can. What is intriguing the most is that when I shake the can the remaining liquid still fizzes, so if it is in the process of the evaporating through a pinprick hole how is it still carbonated? Can anyone shed any light?
Answer: It might be a 'pin prick' hole towards the base of the can. That hole was significant when it was in bulged form and leaked significant amont of liquid slowly and that leaked liquid got evaporated without leaving any trace on the can. Since the hole was on the liquid side hence it does not leak any co2. Over time, as more and more liquid got leaked, internal preassure got reduced, some of the dissolved co2 also got out from the liquid into the empty space inside but not all, bulging started to go away and the pin prick hole also started to reduce. Due to the less liquid coupled with less pressure, the sugar might got oversaturated and started to crystalize. Few of these sugar crystal might have clogged the pin prick hole from any further leaking of liquid. This is the situation your coke can might be in now. Since the internal pressure of the can was never close to the outside air pressure, hence there are still some co2 left in the luquid in disslived state, that is still causing some fizzle.

How is coke missing from a sealed can?


Problem understanding CDMA and W-CDMA

Question: I found it relatively easy to understand TDMA and FDMA but I just can't figure out CDMA and W-CDMA. For CDMA I think it is something like TDMA without time slots. At transmission side you can use whole bandwidth to send any signal from 0 to time "t". The one thing that secures you that signals wont interfere with each other is by "applying" to each signal different code (modulating that signal into that code). Receiver side only needs to know which code you used for which signal in order to "demodulate" it. I don't think I got it right, so any intuitive explanation would be helpful!
Comment: In my intuition, it's the same way a boring old AM demodulator works by multiplying the incoming antenna signal with a sine wave and then averaging, except that it's not a sine wave that you're multiplying it with.
Comment: @immibis I think I don't get the part "multiplying the incoming antenna signal with a sine wave and then averaging". Maybe I have holes in understanding demodulation...
Answer: The code is a frequency hopping, direct sequence or Spread Spectrum algorithm to make the signal look like random frequency Gaussian noise but at a faster symbol rate than the data which boosts the conversion from CNR to SNR and allows high traffic to share a wide bandwidth.

It can be synchronous or asynchronous to all the other traffic.
Comment: The key is that the pseudorandom codes of the various network users are all orthogonal to each other - see also [Gold Code](https://en.wikipedia.org/wiki/Gold_code). So they interfere with each other only sometimes. And that Tb is *huge* compared to the code (chip) rate, so you might only get 700 out of 1024 chips above the noise floor, but that's enough.
Comment: So basically that is some kind of "dynamic modulating"? You have your signal and you modulate it into pseudorandom code carrier signal which dynamically changes frequency of itself (changes frequency of modulated signal which contains pseudocode signal+your signal). Transmitter and receiver both know those pseudorandom code frequencies so during the time, receiver is "constantly" unmodulating the signal from that random frequencies. Bear in mind that I imagine you are sending one signal at a time and at the receiver end only after unmodulating that signal fully you can send next one.
Comment: @Part 2 If I make such pseudorandom code to change frequency (to hop from one to another frequency) theoretically every second, than what benefits I have when speed of signal hoping from one frequency is greater?
Comment: It spreads the spectrum of each transmitter randomly in a coherent manner so they do not collide.
Comment: @TonyStewart.EEsince'75 I'm sorry could you be more specific, I'm bit an amateur. Maybe some explanation through example in simple fashion would help me "decode" what are you trying to say to me. Thanks!

Problem understanding CDMA and W-CDMA


Crystal Report Pie Chart Formula Labels

Question: Using VS 2013 and Crystal Report in an ASP.net application and streaming a crystal report to pdf.  The problem I have is my pie chart display.  I want to use the label name of my formulas to be displayed on the pie chart.  So I named my formulas as follows: A, B, C, D, E, F, G, H, I, J
Each formula as the same formula except that dataset value:
Example for the A formula:
numberVar taxVal := 0;

if isNumeric({DataTable1.tjdPYAuthPercenTax01}) then
    taxVal := toNumber({DataTable1.tjdPYAuthPercenTax01})
else
    taxVal := 0

For the B Formula:
numberVar taxVal := 0;

if isNumeric({DataTable1.tjdPYAuthPercenTax02}) then
    taxVal := toNumber({DataTable1.tjdPYAuthPercenTax02})
else
    taxVal := 0

Under the Chart Export I set the options to only show labels:

In the "Data" tab the fields are added:

Everything works except it shows the label as "Sum of @A" for example:

If I change it to "For each record" then it removes the "Sum of", but it still has the @ before the formula name in the output:

Output:

How do I just display the formula name like A, B, C, D, etc. ?
Answer: Well it seems the fix was not to use a formula field at all and just use a DataSet values directly.

Crystal Report Pie Chart Formula Labels


Make OS X El Capitan announce time only when screen is unlocked or during night time

Question: I use the incredibly useful feature on OS X to announce time on the hour for my time management by checking the option in Date & Time preferences.

However, the time announcements keep going on during the night unless I shutdown my iMac (which I don't want to). Is there a way to silence it during night time or to make it not announce time when the screen is locked?
I know there was a related question for OS X Lion but posting this to see if there is a better/different solution for El Capitan.
Answer: Do you have 'Do Not Distrub' mode set on?
Go to System Preferences -> Notifications and set up as needed.


new and fresh ideas with stack exchange dataset

Question: I'm a new bee for data analysis . i need to work on a research project in big data analysis. first of all i search for a dataset and i found interest in stack exchange  data dump. however i browse for researches i found a lot .And whatever i thought about a idea based on this dataset , its already done by someone else .
please help me out with a new and useful idea for my research .
Answer: It might help to have a bit more information on what you want to do, but have a look at Kaggle - it's a regular big data science competition, all of the data sets are huge and available for download.
There's also some smaller datasets made available by Tableau.
Hope that give you some inspiration!


$L_{\infty}[0,1]$ and extended linear functionals from $C[0,1]$.

Question: From different books I realized two things: 1) dual space of $L_\infty[0,1]$ is the absolutely continuous functions or AC measures on $[0,1]$, 2) dual space of $C[0,1]$ is $BV_0$ function spaces or equally the bounded variation measures. The questions is how in this example Hahn - Banach theorem works? How can I understand 1) how it is not contradiction: if we are going to extend linear functional that is integration against some bounded variation function to $L_\infty[0,1]$, how it is gonna change to AC function? 2) Is there any proof of fact 2) using this Hahn-Banach theorem?
Answer: The dual space of $L^{\infty}[0,1]$ consists of integration with respect to finitely-additive set functions of finite variation.
If you want to use the Hahn-Banach Theorem to determine the dual $C[0,1]^*$ of $C[0,1]$, then you can direct application of more difficult results for the dual of $L^{\infty}[0,1]$ by starting with a bounded linear functional $F$ on $C[0,1]$, and extending it to a bounded linear functional $\tilde{F}$ on $L^{\infty}[0,1]$ with the same norm by applying the Hahn-Banach Theorem. This can be done because $C[0,1]$ is a closed subspace of $L^{\infty}[0,1]$, and an isometric embedding. Then define
$$
                          \rho(t)=\tilde{F}(\chi_{[0,t]}).
$$
Then $\rho$ is a function of bounded variation. To see this let $\mathscr{P}=\{t_0,t_1,t_2,\cdots,t_n \}$ be a partition of $[0,1]$. Let $\alpha_j$ be a unimodular constant such that $|\rho(t_j)-\rho(t_{j-1})|=\alpha_j\{\rho(t_j)-\rho(t_{j-1})\}$. Then
$$
              \sum_{j=1}^{n}|\rho(t_j)-\rho(t_{j-1})| = \tilde{F}\left(\sum_{j=1}^{n}\alpha_j\chi_{(t_{j-1},t_j]}\right) \le \|\tilde{F}\|\|\sum_{j=1}^{n}\alpha_j\chi_{(t_{j-1},t_{j}]}\|_{\infty}=\|F\|
$$
So $V_{0}^{1}(\rho) \le \|F\|$. If $t_j^* \in [t_{j-1},t_j]$ and if $f\in C[0,1]$, then
$$
          \lim_{\|\mathscr{P}\|\rightarrow 0}\left\|\sum_{j=1}^{n}f(t_j^*)\chi_{[t_{j-1},t_{j}]}-f\right\|_{L^{\infty}[0,1]}=0.
$$
Therefore,
$$
   \lim_{\|\mathscr{P}\|\rightarrow 0}\tilde{F}\left(\sum_{\mathscr{P}}f(t_j^*)\chi_{[t_{j-1},t_j]}\right)=\tilde{F}(f)=F(f) \\
   \lim_{\|\mathscr{P}\|\rightarrow 0}\sum_{j=1}^{n}f(t_j^*)\{\rho(t_{j})-\rho(t_{j-1})\}= F(f).
$$
This last limit is the definition of the Riemann-Stieltjes integral of $f$ with respect to $\rho$, which gives
$$
   \int_{a}^{b}f(t)d\rho(t) = F(f).
$$
You can use various constructions to lift this to a Riemann-Stieltjes integral, and to define a signed Borel measure $\rho$, but nothing is gained in determining a representation of $F$.
Comment: Thank you very much. JIC Hahn-Banach theorem can be applied to any linear subspace not always closed.
Comment: @Rick_Student : That's right. But I did want to mention that $C[a,b]$ is properly embedded in $L^{\infty}[a,b]$ even though the essential sup norm is being used.


Safestrap app won't run after installing recovery -- "Unfortunately, Safestrap has stopped"

Question: I can install Safestrap 3.72 (Safestrap-JFLTE-3.72-kk-B01.apk) and then install and use the custom recovery without a hitch. However, once the custom recovery has been installed and the phone is rebooted, the Safestrap GUI app no longer runs (I want to run it in order to uninstall the custom recovery, and the manual instructions for uninstalling from a shell prompt that I found here didn't work). Every time I try to start it, I get the error message

Unforunately, Safestrap has stopped

I've tried reinstalling the APK, both with and without uninstalling the app first. It always installs successfully, and SuperSU requests root permissions the first time I run it after reinstalling, but it always crashes immediately. I've also tried uninstalling and reinstalling BusyBox.
This also happens if I start from scratch, by re-flashing the stock NC5 ROM and doing a factory wipe/reset from the stock recovery (yes, I've also tried wiping from the Safestrap recovery). Starting from the out-of-the-box config, I follow this process:

Root the phone using Towelroot
Install BusyBox
Launch the BusyBox app and click INSTALL to install the tools
Install Terminal Emulator
Launch Terminal Emulator and invoke su and then setenforce 0
Install the Safestrap APK.

At this point, the Safestrap app runs just fine, and I can install the custom recovery. However, after that, Safestrap won't run anymore (crashing immediately with the error message above).
Phone info:

Model: SCH-I545
OS Version: KitKat 4.4.2
Build: NC5 (same issue if I upgrade to NG6)
Answer: Okay, it turned out to be something silly. The problem is that SE status reverts to Enforcing when you reboot. So, you have to set it to Permissive with setenforce 0 again before the first time you use Safestrap after a reboot.