How to pass an HTML string to javascript function in a UIWebView, iOS

Question: How can I pass a HTML string markup read from a file in objective C and pass it to a javascript function that takes a parameter ?
In my webViewDidFinishLoad I try to call like this
NSString *jsfile = [[NSBundle mainBundle] pathForResource:@"setcontent" ofType:@"js"];
NSString *js = [NSString stringWithContentsOfFile:jsfile encoding:NSUTF8StringEncoding error:&errDes];
[webView stringByEvaluatingJavaScriptFromString:js];
[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"showHtml('%@');", filecontent]];

my javascript file is loaded with a function
function showHtml(param1)
{
    alert(param1);
    document.getElementById('section1').innerHTML = param1;
}

I tested this piece of code with explicit string values such as @"
 test
" and it works by setting the element contents. If I change this to @"
 test
" i.e. with single quotes to the id attribute, it is not working. In order for the latter to work, I have to change the string formatter '%@' to \"%@\" in objective C code.
the above problem is not that serious but it is not working either way when reading the contents of a resource file containing multiple html tags that has to be set as an innerHTML  to the #section1 to a div element.
Do I need to encode the contents somehow  ? before calling the stringByEvaluatingJavaScriptFromString method ?
Can anyone give me point me, what am I doing wrong ? if anyone know a better way to do this, please write.
Kind regards
Answer: there is a length limit here and you seem to run into it when passing a whole file to js


Is it always rational to act according to your beliefs?

Question: Is it always more rational to act according to one's beliefs than to refrain from acting on  them?
Comment: If you have an irrational belief, would it be rational to act on it?
Comment: 'Beliefs' is a pretty vague term.
Comment: You ask two different things.
Comment: @KristianBerry What is the difference between an irrational belief and simply a wrong one?
Comment: @Sam What is rational is determined by what you know. Consider the following. Believing there are aliens on Mars is generally regarded to be irrational. However, if tomorrow, an alien spaceship (emblazoned with "from Mars") greets you on your doorstep, your new knowledge will rationally support a belief in Martians. This belief would have been correct the day before you saw the Martians with your own eyes, but it wasn't rational then. For the converse, I'm sure you can construct a rational but incorrect belief yourself.
Comment: @KristianBerry If you conert your comment to an answer, I will accept the answer as "most interesting"
Comment: @legionwhale I think a belief can be rational but incorrect if it is based on an inductive argument. If based on a deductive argument, a rational belief would necessarily be a correct one.
Answer: If a person experiences cognitive dissonance, and has two (or more) beliefs that are in contradiction with one another, it cannot be rational for them to act according to both.  Refraining from acting on at least one of that pair of beliefs is necessary for such a person to act rationally, in the absence of jettisoning at least one of them.
Answer: Yes, at least in the absence of cognitive dissonance as mentioned by Sofie.
That is because to act rational, we have to follow the "best" action according to our knowledge. Since our beliefs are the prior we assume about the world (I think we can simplify it like that), it would be irrational to act against them. Note also that beliefs may not be binary. A belief could be "I believe there is a 90% chance it is not going to rain", but the person also values not getting wet 10x higher than the inconvinience of bringing an umbrella if it doesn't rain, so they bring an umbrella.
Answer: The answer is straightforward (if you really meant what you've asked): YES.
Explanation: The question is essentially a pleonasm.
Acting according to a belief is rational, because rational decisions (and further actions) are based on subjective knowledge (which is not necessarily shared knowledge, not necessarily scientific knowledge, etc.); and subjective knowledge is essentially a set of beliefs.
So, you are basically asking if "acting according to [subjective] reason is rational". And regarding "subjective reason": there's no other. Then, the question is if "acting according to reason is rational": that is a pleonasm, like asking if we smile with a smile.
Answer: No, because the law dictates that some expressions are "unlawful".
It's generally e.g. unlawful to act on an impulse to kill, even if you would find it "rational". Yet a serial killer may well claim that "they act based on their rational". But their rational is unlawful.
You may debate on moral philosophies, but a "normative idea" is that norms only make sense, if everyone is forced to obey them through expecting others to obey them. It's not about "your rational" or "my rational", but that we have agreed upon, which rationalities we don't want to be applied on us. And those who make an exception to such rule are breaking a social contract, even if they have an individual rational. So i.e. an individual reason cannot overarch a collective rule.
I find racism rational in some cases. It doesn't seem to justify being racist though, even when I find it rational. So is "my rationality" enough? Again if you ask the law, it's not, if it's not legal. I can still believe it to be right, but if the law says it's not, then I should not act on it.
Answer: We have beliefs, some stronger, some weaker, and sometimes we are wrong. If you always follow your beliefs then sometimes you will get it wrong, and sometimes the outcome may be fatal.
So you don't just unconditionally follow your beliefs as a rational person, you will also consider the possibility that you are wrong. The probability that you are wrong, and how bad the outcome would be if you are wrong.


QGIS XYZ Tiles extents / bounds?

Question: I have added a online tile source in the 'XYZ Tiles' option, and added it as a layer, which works fine. But im trying to understand where the extents shown in the layer properties is coming from? When I just loaded a simple JPEG as a raster background, my coord system and extents was just the pixels of the background, and origin 0,0 in a corner. But now with the tile source the origin is the middle (which is not a big deal) but the extents are like (big, see image) it would seem totally disconnected from the actual image widths, which is throwing out my coord system.
Answer: The coordinates for the zxy tile system are based off of the Web Mercator Projection: 3857. More information on the coordinate system is here:
https://epsg.io/3857
You bounds are covering the whole world, and the width and height are the size of the world, when approximating a sphere.
40075016 meters is basically the circumference of the earth at the equator: https://en.wikipedia.org/wiki/Earth%27s_circumference
0,0 in the coordinate system is where the prime meridian meets the equator. Sometimes referred to as Null Island:
https://en.wikipedia.org/wiki/Null_Island
Comment: Ah ok, makes sense, thanks, is there some way to change this ? Im making a flat fictional game map, so not spherical, and would prefer it say 0-256 for example.

QGIS XYZ Tiles extents / bounds?


How does quantum decoherence occur?

Question: My question is how does quantum decoherence happen. What happens with a quantum system when "observed?" Can you give a mathematical explanation that is simple, precise, and easy to understand?
Comment: *Can you give a mathematical explanation that is simple, precise, and easy to understand?* No.
Comment: @Christoph at least try the best you can!
Comment: One of the better intuitive explanations of decoherence I've seen is [at LessWrong](http://lesswrong.com/lw/pp/decoherence/).  The site also has [a few other articles](http://wiki.lesswrong.com/wiki/Decoherence) with various takes on the subject.
Comment: @NathaNReed but I also want a mathematical explanation at a calculus level ...
Comment: This question was answered in full, and simply, at the location http://physics.stackexchange.com/questions/150146/is-decoherence-continuous/150175#150175
Answer: When a particle passes through an ideal pair of slits, it's wave function can be written in the form $$\psi(x) = \alpha\, \psi_1(x) + \beta \,\psi_2(x)$$ where $\psi_{1,2}(x)$ are the wave-functions you would get by closing either slit 2 or slit 1, respectively. We say that the wavefunction is in a coherent superposition.
What is coherent about this superposition? Well, let's place a detector screen at $x$ and measure the rate at which particles accumulate there. This rate will be proportional to $P(x) = \left|\psi(x)\right|^2$ by the usual rules of quantum mechanics. Coherence comes about because the two components of the wavefunction can interfere:
$$P(x) = |\alpha|^2 |\psi_1(x)|^2 +  \alpha^*\beta\,\psi^*_1(x) \psi_2(x) + \alpha\beta^*\,\psi_1(x) \psi^*_2(x) + |\beta|^2 |\psi_2(x)|^2$$
Here the middle two terms are interference terms, and give a behaviour that is counter-intuitive from a classical probability point of view. Classically, the rate should just be proportional to the sum of the probabilities of the particle going through either slit 1 or slit 2.
Now suppose our particle met a mote of dust on its way to the screen. The wavefunction of the system, particle + dust, should now be written as $$\psi(x_p,x_d) = \alpha\, \psi_1(x_p) \phi_1(x_d) + \beta \,\psi_2(x_p) \phi_2(x_d)$$
where now $\phi_1(x_d)$ is the wavefunction of the dust mote if the particle went through slit 1, and $\phi_2(x_d)$ is its wavefunction if the particle went through slit 2. Again, we place a detector at $x_p$ to measure the probability of detecting a particle there. The rules of quantum mechanics instruct us to sum over the position of the dust mote when squaring the wavefunction:
$$P(x) = \int\!dx_d\, |\alpha|^2 |\psi_1(x_p)|^2  |\phi_1(x_d)|^2+  \alpha^*\beta\,\psi^*_1(x_p) \psi_2(x_p) \phi_1^*(x_d) \phi_2(x_d)\\ + \alpha\beta^*\,\psi_1(x_p) \psi^*_2(x_p) \phi_1(x_d) \phi^*_2(x_d)+ |\beta|^2|\psi_2(x_p)|^2 |\phi_2(x_d)|^2$$
Firstly, the wavefunctions $\phi_{1,2}(x_d)$ are normalized. Secondly, depending on how the dust mote encountered the particle, it may have radically different final wavefunctions, so in general $\phi_1$ and $\phi_2$ do not have much overlap: $\int\!dx_d \phi^*_1(x_d)\phi_2(x_d) \ll 1$. Putting this together, we find
$$P(x) = |\alpha|^2 |\psi_1(x_p)|^2 + |\beta|^2|\psi_2(x_p)|^2$$
Compare this probability to the one we found when there was no interaction with the dust mote, and the immediate difference is that the interference terms have vanished. There is no longer a coherent superposition but rather an incoherent sum, and the probabilities add classically. One speaks of decoherence due to an interaction with the environment.
Comment: @user929304, probably. Beginning students aren't always exposed to it, so I wanted to make it more accessible. Maybe if I have some time, I'll edit it. Worth the effort?
Comment: Regarding the orthonormality, I am not integrating over $x_p$, so technically I am not taking that inner product. If you want to phrase it in terms of spin, then you might ask what is the probability of measuring spin up along the x direction, in which case you get those cross terms. If you measure spin in the z direction, you will not.
Comment: Can you also explain about the density matrix formulation?
Comment: do these products $\psi_1(x_p) \phi_1(x_d)$ and $\beta \,\psi_2(x_p) \phi_2(x_d)$ imply a tensor product  or a normal one? (why was it allowed there to just multiply the two wavefunctions there when you took dust into account?) Last point I didn't get, why $\phi_1$ and $\phi_2$ **do not** have much overlap? (should one just regard *dust* here as *noise*?) Very last point if I may: what happens to the first expression you gave for $P(x)$ if $\psi_1$ and $\psi_2$ are orthogonal states? (spin up and down e.g.) Then wouldn't the interefence vanish $<\psi_1|\psi_2>=0$? thanks in advance.
Comment: If you view the positions $x_p$ and $x_d$ as indices on a vector, then you can regard $\psi(x_p)\phi_1(x_d)$ to be the tensor product of the two vectors $\psi(x_p)$ and $\phi_1(x_d)$. Numerically it is just ordinary multiplication. But if you are working with spins or something, then the fact that it is a tensor product is really more manifest.

The reason that the two dust wavefunctions have little overlap is that depending on the slit the particle went through, the two wavefunctions might have very  different momenta. So upon collision, the dust will have very different momenta.
Comment: @lionelbrits thanks for answering, I honestly think it would have been a lot more clearer had you used the Dirac notation throughout this answer.
Comment: @lionelbrits yes I really think it is worth it ;)

How does quantum decoherence occur?


How much voltage/current do I need for multiple chips?

Question: I have a Huzzah ESP826 Wifi breakout chip which requires 3.3V power voltage and peaks at 500mA of current, and an LED strip which requires 12V and 1A.  How can I power both with one dc jack (I have a 12V 5A power supply) on one breadboard?
Answer: You need a voltage regulator for the esp. Preferably a dc-dc step down, which will neither waste power nor heat up. Other, passive solutions are possible but not desirable. The regulator can be found on ebay amazon etc.
EDIT:
One more thing about the LEDs: depending on the model you have, they might or might not work with 3.3V input (I'm assuming you want to drive the LEDs from the esp).
In case they take only 12V input, you will need some interface solution, like this one, for example.


Does differentiability on a set imply continuous differentiability on the set? Counterexample?

Question: Of course, differentiability implies continuity, but for a function to be differentiable on a set, say $[a,b]$, then, for the limit to exist, would we not need it to be defined on the set? I hear teachers talk as if it's implied at times, and I have an epsilon from the limit, but I do not have a delta. Could anyone provide a counterexample? Thanks!
Comment: Whenever differentiability is given in a closed bounded set, I think the standard assumption is one sided differentiability on the end points.
Comment: It sounds like you're confused about the definition of "continuously differentiable".  Reread it carefully.
Comment: I'm pretty sure it means that the derivative of the function is continuous.
Comment: A differentiable function can have a very discontinuous derivative. Here is a nice discussion: http://math.stackexchange.com/questions/112067/how-discontinuous-can-a-derivative-be
Answer: What exactly does "continuously differentiable" mean?  If it means the derivative is continuous, then it does not follow.
Let
$$
f(x) = \begin{cases} x^2\sin\dfrac 1 x & \text{if } x\ne 0, \\[8pt] 0 & \text{if } x = 0. \end{cases}
$$
Finding $f'(0)$ is done by going back to the definition of "derivative" and finding the limit by squeezing, relying on the fact that the sine of any real number at all is $\le 1$ and $\ge -1$.  You get $f'(0)=0$.
But the lack of continuity of the derivative is shown by looking at the wild oscillations of the derivative as $x\to 0$.  To see that, you will need to compute the derivative at $x\ne0$.
So this function $f$ is everywhere continuous and everywhere differentiable but its derivative is not everywhere continuous.


Enterprise library exception handling problems with WCF services

Question: my application consists of 3 layers and is very straightforward.

class library with all the business logic
WCF service that exposes the class library
asp.net web UI.

At the class library layer, I have an enterprise library exception handling policy defined so that it logs all exceptions to the database.  In the underlying code, exceptions are thrown, and they coalesce up to the facade.  In the facade, I trigger the EL policy to log the errors, and then I toggle a sucessStatus boolean in the response and have a method to convert all my exceptions to a friendly list so that the ultimate consumer can dig through this to get any idea of whats going on.
My facade in my class library sort of looks like this:
public SomeResponse DoSomething(SomeRequest request)
        {
        SomeResponse response = new SomeResponse();
            try
            {
                response.data = SomeOperationThatWillThrowAnException;
            }
            catch (InvalidOperationException ex)
            {
                var exceptionManager = EnterpriseLibraryContainer.Current.GetInstance<ExceptionManager>();
                exceptionManager.HandleException(ex, "StandardPolicy");
                response.Errors.Add(Utility.ExceptionToError(ex));
                response.SuccessStatus = false;
            }
        return response;
    }

If I build a simple winform client and have it talk to my class library, this works.
However when I use the full stack, I get "fault exception was unhandled by user code".  I can't seem to configure EL at the WCF layer in any way to keep this from happening.
My WCF service is just a simple wrapper for my class library facade.
public SomeResponse DoSomething(SomeRequest request)
{
    return new MyFacade.DoSomething(request);
}

What I want is to have the class library handle the error silently, and not trigger any exceptions at the WCF or UI level.   I want the consumer (in this case the ASP.NET webform UI) to have to check the response message contents to get a clue of what happened instead of having an exception stop execution dead in its tracks.
Answer: You likely have an error in your configuration file resulting in GetInstance() or HandleException() throwing an exception. Have you tried debugging the WCF service?


Video Players malfunction in various ways

Question: Here's a screenshot of VLC Media Player on a DVD:

IF I try to play a CD by using Videos, it says that "DVD Source is required to play the file, but is not installed" If i follow the link from there to Software, it displays a big frowny face, presumably because it is not a happy camper.  Yes that is literally what happens.
Pretty much everything else works on the screen - websites display normally, programs work fine.
Here is what I've done so far:
sudo apt install libdvdcss2 libdvdread4 libdvdnav4 ubuntu-restricted-extras

sudo dpkg-reconfigure libdvd-pkg

Remove and reinstall VLC Media Player.
What should I try next?
Ubuntu 18.04.3 LTS
VLC Media Player 3.0.7 Vetinari
I do not have Nvidia-settings installed
Here is the output of dmesg.  I have no idea what any of this means but one of the posts I read about such problems indicated it was relevant:
dmesg | tail

[ 1360.631367] sr 2:0:0:0: [sr0] tag#15 CDB: Read(10) 28 00 00 3c 4b 2c 00 00 01 00
[ 1360.631369] print_req_error: I/O error, dev sr0, sector 15805616
[ 1360.631375] Buffer I/O error on dev sr0, logical block 3951404, async page read
[ 1360.731321] sr 2:0:0:0: [sr0] tag#17 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 1360.731326] sr 2:0:0:0: [sr0] tag#17 Sense Key : Illegal Request [current]
[ 1360.731329] sr 2:0:0:0: [sr0] tag#17 Add. Sense: Read of scrambled sector without authentication
[ 1360.731332] sr 2:0:0:0: [sr0] tag#17 CDB: Read(10) 28 00 00 3c 4b 2d 00 00 01 00
[ 1360.731334] print_req_error: I/O error, dev sr0, sector 15805620
[ 1360.731339] Buffer I/O error on dev sr0, logical block 3951405, async page read
[ 1361.109201] UDF-fs: INFO Mounting volume 'MILK', timestamp 2008/12/15 21:06 (1000)

Answer: I was able to find the answer in this Youtube video:
https://www.youtube.com/watch?v=wN9tGhmRvns
Which recommends disabling hardware accelerated decoding in VLC's settings panel.


Two seemingly equal ways of changing column names for R data.frame - only the other one works

Question: I have a dataframe and I need to add suffix to some of the variable names. In my case that's all numerical variables after spreading a variable to wide format. Could someone explain me why the first option does not work but the second does:
df <- data.frame(ID = "id", var1 = 1, var2 = 2, var3 = 3)

1.
colnames(df[,2:ncol(df)]) <- paste0(names(df[,2:ncol(df)]), "_X")

2.
colnames(df) <- c("ID", paste0(names(df[,2:ncol(df)]), "_X"))

Answer: Your fist command contains syntax errors. We can fix it to:
colnames(df[,2:ncol(df)]) <- paste0(names(df[,2:ncol(df)]), "_X")

That doesn't return an error, but still doesn't work. You assign column names to a subset of a data.frame, but that subset is never stored and the command doesn't change the names of the full data.frame.
You need to assign to a subset of the names:
colnames(df)[2:ncol(df)] <- paste0(names(df)[2:ncol(df)], "_X")

Answer: You are subsetting your df, in essence creating a second data.frame, and renaming it. This does not reflect on your original data.frame.
colnames(df[,2:ncol(df)]) <- paste0(names(df[, 2:ncol(df)]), "_X")

would be equal to
df2 <- df[,2:ncol(df)]
colnames(df2) <- paste0(names(df[, 2:ncol(df)]), "_X")

> df
  ID var1 var2 var3
1 id    1    2    3
> df2
  var1_X var2_X var3_X
1      1      2      3

The correct way would be
colnames(df)[2:ncol(df)] <- paste0(names(df[, 2:ncol(df)]), "_X")

or using sprintf
colnames(df)[2:ncol(df)] <- sprintf("%s_X", names(df)[2:ncol(df)])


How can infrasounds pass through walls and other solid objects without dissipation?

Question: I have to do a physics project about infrasounds and i tried to search for some basic things about that but i couldnot find anything, can someone explain me why infrasounds can pass through walls without dissipation,thank you
Comment: https://en.wikipedia.org/wiki/Infrasound
Answer: A seismic wave can have a wavelength larger than a building.   Thus, the
wave may MOVE the building, but not cause structural strains, because
the building is like a tiny cork, bobbing up and down on long, gentle waves.
Infrasound, if its wavelength is larger than an obstacle, goes around the
obstacle without deflecting or losing energy.
It is possible for a large wall to deflect a fraction of a millimeter without
much energy absorbed.   For the same wall to ripple one millimeter at high frequency, over several-wavelengths distances, would dissipate much
more energy.   More closely spaced bending, done more often, means more
work.
Similarly, human eyes don't focus ultraviolet light, because the fibrous inner
structure of the lens is cloudy to the short wavelength.   Longer (visible) wavelengths shine right through (the fibers are smaller than visible lightwaves).
Size of the fibers makes them incapable of blocking of the longer wavelengths.


Why does HER not work with on-policy RL algorithms?

Question: I'm wondering because I don't appreciate what is wrong with just applying HER to an otherwise on-policy algorithm? Like if we do that will the training stability just fall apart? And if so why? My understanding is that on-policy is just a category created by humans meaning that "the default algorithm doesn't do off-policy optimization". But why does that prohibit adding off-policy elements?
Answer: On policy algorithms contain policy and/or value update calculations that assume data was generated by the current policy. Breaking that assumption will cause them to miscalculate, or not function at all without some kind of intervention.
As an example SARSA has the TD target (new estimate for $q(S_t,A_t)$) of:
$$R_{t+1} + \gamma q(S_{t+1},A_{t+1})$$
The main problem here is the value of $A_{t+1}$ (there's a couple of minor issues with $S_t, A_t$ as well, but those also apply to off policy and are why you usually want your behaviour policy to be close to the target policy).
In an experience replay table you will have historic data from when the policy was different. So the value of $A_{t+1}$ that might be stored may not be the one that the current policy would take. Learning from that action would skew the value table to learning about whatever policy has just been sampled, instead of more accurately improve knowledge of the current policy.
To fix this, you could resample the action choice, or even use an expected q value across all actions that SARSA could currently take. That fixes things, but actually it also changes your method to off-policy Expected SARSA . . .
Similar issues apply to using experience replay tables with other on policy methods. They become inaccurate if used naively, and if you fix the issues with that, you reinvent off-policy methods (when possible, not all on policy methods have an off policy equivalent)
Answer: In principle replay mechanisms as HER, PER, etc cannot be applied to on-policy algorithms, like SARSA and Policy gradient as stated by @Neil Slater.
Anyway, If you are willing to "adapt" your on-policy algorithm you can introduce importance sampling weights, $\rho$, that basically weight the actions $A_t$ coming from another policy (say $\pi_b$) compared to the current policy, $\pi$. For example the gradient of the RL objective would be weighted by:
$$\rho = \frac{\pi(a\mid s)}{\pi_b(a\mid s)}$$
The ACER algorithm basically does this (see section 3) in order to work with a replay buffer, potentially improving sample-efficiency too. Moreover, HER is suitable for goal-based RL, meaning that the experience tuple also includes a goal $g\in G$, and so the policy should also account for $g$ and so the ratio $\rho$.
Comment: Worth noting that when using $A_t$ to $A_{t+n}$ to calculate a value, then you don't weight $A_t$ and if you are using a bootstrap from your target policy then you don't weight $A_{t+n}$ either. This is why you don't see importance sampling corrections in single step Q learning.


Integrality certification for product of two matrices $A B^{-1}$

Question: Let's consider two non-singular integer matrices $A,B \in\mathbb{Z}^{n\times n}$. I want a test to check if $A\times B^{-1}$ is integral (or no denominators). I am referring the unimodular certification paper by Storjohann. The inverse of a matrix $M$ can be written as a $x$-adic expansion: $$M^{-1}=c_0+c_1x+ c_2x^2+\cdots $$
If the matrix $M$ is unimodular, the $x$-adic expansion is finite and Storjohann provides a fast algorithm to check this. (Here $x\in \mathbb{Z}_{>2}$ is relatively prime to determinant of $M$).
My approach was: I computed few $x$-adic terms of $B^{-1}$. Say: $B^{-1}=b_0+b_1x+\cdots$. I can write matrix $A$ as a finite $x$-adic expansion. Let $A=a_0+a_1x+\cdots +a_m+x^m$. Similarly, if $A\times B^{-1}$ is integral, I should be able to write it as a finite $x$-adic expansion. Hence, I checked if $a_0 \times b_i$ (or $a_j\times b_i$) becomes zero at some point. I test for some examples (for matrices over Number fields), but it didn't work. Is there any problem with the theory? or Can someone suggest me a way to certify integrality of the product $A\times B^{-1}$.
Comment: In "the inverse of a matrix $M$ can be written as a[n] $x$-adic expansion", what is $x$?
Comment: This question is likelier to get an answer if you get more specific to the paper you are referring (which section? which criterion?) and explain what $x$ is (a big prime?).
Comment: My first attempt is to try for linear lifting section 2.1. Linear lifting algorithm is similar to the Dixon algorithm in paper :Exact Solution of Linear Equations §https://link.springer.com/article/10.1007/BF01459082§ for linear systems solving: $Ax=I$ taking RHS matrix $I$ to be the identity matrix. In this case $x$ is a prime or anything which does not divide Determinant of $A$. When it comes to the fast algorithm Double-plus-one Section 3, $x$ should be large enough. $x>max{10000, 3.61 n^2[A]} $, maximum entry =[A]
Answer: I considered  $x$-adic expansions for $B^{-1}$ and $A$  separately and try to check whether product of terms becomes zero. It is not possible to test integrality of the product $AB^{-1}$ in this way as the series ($x$-adic expansion) grows (diverge) when B is not unimodular. Hence, I applied Dixon's algorithm to solve the linear system $yB=A$. This will compute the $x$-adic expansion of $AB^{-1}$ directly. Hence, I can check if this expansion becomes finite. Now, the next step is to modify "fast-Double-plus-One algorithm" to achieve this certification.


The transformations on the nome and Landen's transformation

Question: Could someone please explain how to transform the nome $q = e^{-\pi K'/K}$ from $q^2$ to $q$ and then to $-q$? In other words, how does changing $q^2$ to $q$ and then $q$ to $-q$ affect $k$ and $K$. Here, $k$ is the elliptic modulus, $K = K(k)$ is the complete elliptic integral of the first kind, and $K' = K(k')$, where $k' = \sqrt{1 - k^2}$ is the complementary modulus. I know that the transformation of $q$ is somehow connected to Landen's transformation, but I do not understand how these two concepts are related. Thank you in advance.
Answer: I tend to look at this using Jacobi thetanull functions,
as these are usually expressed in terms of the nome $q$:
$$\begin{align}
 \vartheta_2(q) &= q^{1/4}\sum_{n\in\mathbb{Z}} q^{n(n+1)}
& \vartheta_3(q) &= \sum_{n\in\mathbb{Z}} q^{n^2}
& \vartheta_4(q) &= \sum_{n\in\mathbb{Z}} (-q)^{n^2}
\end{align}$$
As to the connection of your question with Landen's transformation,
let me just remark that Landen's transformation gives rise to the
arithmetic-geometric mean iteration step, which in turn resembles
the transformation of $\vartheta_3^2$ and $\vartheta_4^2$
under $q\mapsto q^2$. To answer your question,
it suffices to do that step backwards.
I will focus on the Jacobi thetanulls here, and thus get along without
considering integrals and Landen's transformation as such.
Expect some ambiguity from inverse powers.
The formulae we need are
$$\begin{align}
 \vartheta_2(-q) &= \pm\sqrt{\pm\mathrm{i}}\,\vartheta_2(q)
& \vartheta_2^2(q) &= 2\,\vartheta_3(q^2)\,\vartheta_2(q^2)
\\ \vartheta_3(-q) &= \vartheta_4(q)
& \vartheta_3^2(q) &= \vartheta_3^2(q^2) + \vartheta_2^2(q^2)
\\ \vartheta_4(-q) &= \vartheta_3(q)
& \vartheta_4^2(q) &= \vartheta_3^2(q^2) - \vartheta_2^2(q^2)
\end{align}$$
The formulae for $q\mapsto-q$ are obvious,
and the last one of those for $q^2\mapsto q$ has been proven
elsewhere on this site.
The remaining ones follow in a similar manner.
For the relations of the Jacobi thetanulls
to the complete elliptic integral of the first kind,
one only needs to keep in mind that
$$\begin{align}
 k(q) &= \frac{\vartheta_2^2(q)}{\vartheta_3^2(q)}
& k'(q) &= \frac{\vartheta_4^2(q)}{\vartheta_3^2(q)}
& K\left(k(q)\right) &= \frac{\pi}{2}\vartheta_3^2(q)
\end{align}$$
From those identities we can deduce
$$\begin{align}
 k(-q) &= \pm\mathrm{i}\frac{k(q)}{k'(q)}
& k'(-q) &= \frac{1}{k'(q)}
\\ k(q) &= \pm\frac{2\sqrt{k(q^2)}}{1+k(q^2)}
& k'(q) &= \frac{1-k(q^2)}{1+k(q^2)}
\\\therefore\quad
 k(-q) &= \pm\mathrm{i}\frac{2\sqrt{k(q^2)}}{1-k(q^2)}
& k'(-q) &= \frac{1+k(q^2)}{1-k(q^2)}
\end{align}$$
and for the complete elliptic integral:
$$\begin{align}
 K\left(k(-q)\right) &=
 k'(q)\,K\left(k(q)\right)
\\ K\left(k(q)\right) &=
 \left(1+k(q^2)\right) K\left(k(q^2)\right)
\\\therefore\quad
 K\left(k(-q)\right) &=
 \left(1-k(q^2)\right) K\left(k(q^2)\right)
\end{align}$$
which is what you have asked for.
Comment: Thank you. Great answer. I managed to derive these relations using a slightly different approach. Now I know my calculations must be correct.
Comment: Do you know how changing $q$ into $q^3$ affect $k$ and $K$ by any chance? I could not find this transformation anywhere.
Comment: The following identity might help you getting started: $\vartheta_3(q)\vartheta_3(q^3) = \vartheta_2(q)\vartheta_2(q^3) + \vartheta_4(q)\vartheta_4(q^3)$ (Legendre).
Comment: Thanks. By the way, are there any books on the classical theory of elliptic functions that you would recommend? The only good ones I know of are Whittaker and Watson, Greenhill, Hancock, and Cayley. Lang's book is also good, but it focuses mostly on the algebraic aspects of elliptic functions.
Comment: I'd propose to first read Borwein & Borwein's *Pi and the AGM*, Wiley 1987. This will teach you how to "do" such things systematically. After that, you will recognize how the references you named build up the more general theory.
Comment: I actually have this book. Thanks.


Is it possible to undo a flattr?

Question: I just clicked the flattr button on a person's page on Flattr, but I wanted to flattr one of their "things" instead, which I did immediately afterwards. How can I remove/undo the first flattr?
Answer: Unfortunately not. You can see as some extra love being sent to that creator.
Comment: :(
Any plans for supporting that in the future? As you might imagine, this behavior is far from ideal!
Comment: If I have understand Flattr correctly, wouldn't it just be possible to give an extra Flattr to all other people you given Flattr to that month? That way, the ratio is the same as if you had given the first one just one Flattr.

Is it possible to undo a flattr?


How to Create DSN in 64 bit O.S for Access database

Question: How to create DSN in 64 bit OS for MS Access database for Windows OS?
Answer: Have you tried making one from Access? When you choose external data sources, odbc, you are given a chance to create the DSN from inside of Access. And you can at that point in time create a system DSN. (Access will launch the correct version of the ODBC manager for you).
Because Access is useally the 32 bit version, then the location of these system DSN's are thus in the standard location of:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\name of SYSTEM DSN
And, you MUST launch the 32 bit version of the ODBC manger, and the one in the control panel is going to be the 64 bit version.
So, it is REALLY MUCH easier to let Access launch this for you, since then you don't have to know or care if you are running the x64 or x32 bit version of Access (x64 versions only exist for Access 2010 and beyond – so if your using a previous version, then it will be x32 for all cases).
So, you need to launch the 32 bit version of the ODBC manager and it is found in this location:
C:\Windows\SysWOW64\odbcad32.exe
Then you should be fine (so do NOT use the one from the control panel).
If you thus create the system DSN using the 32 bit version (the one from sysWOW), then you should see it in Access when you launch the same odbc manager.


Voiced obstruents (and sonority in general)

Question: I (think that I) understand that sonorants are sonorous because airflow is continuous, non-turbulent, and so resonate at such a frequency that the vocal tract acoustic filter amplifies them. And I understand the voiceless obstruents are not sonorous, because the occlusion in the vocal tract impedes airflow/makes it turbulence, with noise being made by air pressure fluctuations rather than resonance.
What I don't understand is how voicing works with obstruents. They involve trilling action at the vocal folds, yes? But the occlusion in the vocal tract means they aren't sonorous. So would the waveform of a voiced obstruent be (quasi)periodic, or aperiodic? Do they have a frequency, and do they resonate? Where does the majority of the noise come from: the build up of air pressure, or the vibration of the vocal folds?
I'm probably wrong on much of the above, so if someone could set me straight on the whole thing, it would be much appreciated. Thanks!
Comment: In the SPE account, voiced obstruents do not "involve trilling action at the vocal folds".  Voiceless sounds are those with the vocal folds spread sufficiently to prevent spontaneous voicing, and sounds that are not voiceless are voiced.  This, for example, makes glottal stops voiced.  There is no vibration required for voicing (in that account).  See, the problem here is that you're thinking about acoustics, but SPE is almost totally about articulation.
Answer: There are three linguistic terms which have a common Latin origin, sonor: "sonorant", "sonority" and "sonorous". A sonorant is a sound produced with a vocal tract cavity configuration where spontaneous voicing is possible: see Chomsky & Halle 1968 The sound pattern of English p. 300-301 for discussion of the latter concept. Thus vowels, glides (including [h,ʔ], liquids and nasals are [+sonorant], anything else is [-sonorant]. "Sonority" is a less-well defined concept, but is approximately equal to the inverse of resistance to airflow – as such, it is not a binary property but sub-classifies sounds along a scale of at least 5 points (probably not a continuous scale). A [+sonorant] sound need not have vocal fold vibrations, because that is controlled by separate features governing the approximation of the vocal folds. Sounds that have high sonority likewise are not necessarily voiced, for the same reason. So, one can spread the vocal folds when producing a bilabial nasal, and [m̥] satisfies the criteria for being [+sonorant]. Without such active spreading, there would be vocal fold vibration.
Taking [z] as one example of a voiced obstruent, because of the lingual construction, spontaneous voicing is not possible, but voicing is (see SPE p. 300-1). There are a number of accommodations possible with a voiced fricative, such as lowering the larynx, raising the velum, slightly opening the velum, moving the constriction forward. This does become a zero sum game with stop, which can sustain voicing only for a short time until supraglottal pressure rises to the point that voicing stops.
What allows voicing is trans-glottal pressure drop; a trans-glottal pressure drop requires a sufficiently open vocal tract that oral air pressure does not become too high. Turbulence is kind of orthogonal, though it's hard to have turbulence with a really open vocal tract. Now: you use the term "sonorous", but unfortunately that is only marginally a term in linguistics. It might be used to refer to RMS amplitude, or it might be used to refer to "having higher sonority" but that requires a standard of comparison to be meaningful. Because sonority is inversely related to resistance to airflow, resistance to airflow is what leads to oral pressure buildup, oral pressure buildup reduces trans-glottal pressure drop, and a trans-glottal pressure drop is a requirement for voicing... there is some relationship between sonority and voicing.
There is quasi-periodic vocal fold vibration during production of voiced obstruents (though for some dialects in some positions in English, phonologically voiced stops are actually not produced with vocal fold vibration); you can verify this with an electroglottograph. Anything that vibrates quasi-periodically has a computable frequency, and it's not hard to compute in Praat, if you set the analysis parameters right.
W.r.t. "the noise", I assume you're speaking of the acoustic energy during the production of a voiced stop. Whether you mean "per msc." or "summed up", the laryngeal component contributes almost all of the acoustic energy. Unlike voiceless stops, there is very little pressure buildup during a voiced stop, so very little if any release burst.


Why is cosmological acceleration expressed in terms of an energy density?

Question: In the articles that I have (tried to) read, acceleration ends up being expressed as a dimensionless constant (omega-lambda) or else occasionally in terms of a "dark" energy density. Presumably one can multiply that density by the volume of the visible universe (46 Gl.y. radius) to get some kind of estimate of total dark energy. But if the universe has mass, and there is acceleration, doesn't that imply some kind of energy expenditure on a time basis? Is there way to calculate the work done per unit time to drive the acceleration? This is presuming the rate of acceleration (a-double dot) is itself constant, and I gather that that is not certain but at least plausible.
Comment: Related: http://physics.stackexchange.com/q/10309/2451
Answer: The density $\rho$ is a more logical quantity to describe the situation because according to the cosmological principle (which postulates the uniformity and isotropicity of the Universe at the long enough distance scales), the same physics (and expansion) applies to each cubic meter of space and we don't really need to know what the size of the Universe is (and even whether it is finite or not).
One could of course talk about the "density of work" needed to accelerate the matter etc. However, these discussions wouldn't be too useful because "work" is a useful concept if the energy is conserved. However, in cosmology, especially in an expanding Universe, the total energy isn't conserved. There isn't any nonzero definition of an energy that would be conserved while the Universe is expanding. See

http://motls.blogspot.com/2010/08/why-and-how-energy-is-not-conserved-in.html

for more details about this point.
Comment: Thanks Lubos. That does make sense (why density versus "total"), and I think I followed your argument in the blog link. Still though, if there is acceleration then at a minimum baryonic mass is moving faster, so something is being expended per unit time. Can that something be calculated by purely dimensional analysis (again per some large-enough unit of volume)? I can't seem to find in the acceleration articles an actual statement of the acceleration rate, in cm/sec2, of something. Is such a rate calculable based on change in Hubble "constant" versus distance? Thanks, Mark


What is the fundamental difference between human genome and other genomes that makes human a self-conscious living organism?

Question: DNA is considered to be the blueprint from which any organism can be created.
DNA carries the genetic information to construct a living body. DNA carries genes which represents the information that is used to produce proteins which operate and shape the body. So what exactly is the difference in human genome which sets it apart from other species
and makes it self-conscious ? Are there specific genes for self-consciousness that makes a particular animal conscious ?
Comment: I have edited your (naive) question, replacing your misuse of "genetic code". See the [Wikipedia entry](https://en.wikipedia.org/wiki/Genetic_code) to get the answer to what the genetic code is. The secret of conciousness, you won't find an answer to.
Answer:
DNA is considered to be the blueprint from which any organism can be
  created

It's the main blueprint, true, but in order for DNA to be functional it needs a complex composition of proteins, ions, membranes, sugars etc.. You know, all your cells have the same DNA, yet they all are different!
A friend of mine, a leading expert in stem cell manipulation, is even struggling to force a single differentiation of his stem-cells. So no, no one can create an organism solely from it's DNA.

So what exactly is the difference in human DNA which sets it apart
  from other species and makes it self-conscious ?

The building blocks of DNA, the 4 nucleotides, are the same for all living organisms.

Is there a specific gene for self-consciousness that makes a
  particular animal conscious ?

The interaction of genes is way to complex to point out a single most relevant gene responsible for consciousness. There is not a single gene that functions without the others. Anyways, the human brains function is heavily dependent on it's structure; the physical connection between cells. So if you want to search for genes that are involved in consciousness I would look at the group of structure/differentiation controlling genes. For example NOTCH2NL was found to be involved in control of the brain size. (The Notch protein family is involved in developmental differentiation and acts through cell-cell contact)
Comment: @chaitanyabudkule: You've misunderstood that paper — they replaced the genome of a strain of *E. coli* with a synthetic version.  This would not work without the "machinery" (proteins, RNAs, membranes, metabolites etc.) present in the "host" bacterial cell.
Comment: Biritsh Scientists have successfully created a new organism 'Syn61' from recoded genome. You can refer article published in Nature [https://www.nature.com/articles/s41586-019-1192-5.epdf]. So its possible to create an organism from its DNA.
Answer: While we likely do not know exactly what constitutes consciousness, we can likely surmise that other organisms are conscious (or at least show what we might call self-awareness), and we can probably agree that the brain (or at least a nervous system) is an organ critical to developing and maintaining consciousness in an organism. The Hox family of genes (and their associated DNA sequences) guide the orientation of embryonic cells and the subsequent development of the brain in most eukaryotes, including humans. Cites of relevance: 1) https://en.m.wikipedia.org/wiki/Hox_gene 2) https://www.ncbi.nlm.nih.gov/m/pubmed/20795329/ 3) https://en.m.wikipedia.org/wiki/Self-awareness#Animals
Comment: DNA may be the blueprint, but - like the blueprints used in construction - it does nothing without a whole bunch of complicated machinery, which we call a parent.
Comment: I don't know what your comment means, I'm sorry.
Comment: It means that if you have a string of DNA, it basically won't do anything unless it's imbedded in a cell.  And it has to be a cell of the proper sort.  Unless I've totally misunderstood biology, if you want to make a frog, you have to put the frog DNA in a frog egg cell.  If you put it in say a rat egg cell, I doubt if you'd get anything viable - though it might make an interesting experiment.  It'd be like handing the blueprints for an airplane to a housing construction crew :-)
Comment: I don't know what your comment means in the context of genomics or developmental biology, which is the crux of the question. If you have a better answer, please post it separately.
Answer: Nothing! If DNA is one way of doing life–which is not well defined–it has shown that in all its forms it has been creating organisms with some form of intelligence. If you can accept that there can be different levels of consciousness and intelligence, then it may almost be easier to ask which organisms have zero consciousness?
Here's a video showing that plants have intelligence in that they respond to current events and plan responses for the near future. Plants have their own kind of nervous system from Science Magazine.
Clearly, it must be like something to be a plant.
Answer:
Are there specific genes for self-consciousness that makes a particular animal conscious ?

The mechanism of self-consciousness in the brain (in the cortex) is separate from the formation of the brain which is separate from the genetic control of the brain development. You want an answer for the genetic control of the brain development (cell differentiation, embryonic development) that will explain the mechanism of self-consciousness at the same time.
So; the short answer is "No, there are not".
It is clear that consciousness is the product of a brain structure which is made of complex connections between a high number of neurons. These neurons are formed and construct an organ (with other cell types) in the process of embryonic and fetal development. Neuron formation, placement and connection is influenced/guided by some genes. But that does not mean that "a couple of genes carry the information to construct a brain". Genes control the cell, not the organ. Genes affect the cell structure and cell's operation; cell structure and cell's operation affects the organ development; organ's structure affects its functions and products.
Some reading on organ development can be helpful to understand this point (for example; Forces shaping the Drosophila wing).
But, if you refer the genes which guide the brain development as genes that create consciousness, then yes, there are consciousness genes. But, of course, this won't solve anything.
Answer: When you look in the mirror, you see yourself. That puts you in the company of animals like dolphins, elephants, chimpanzees, and magpies, all of whom have shown the ability to recognize their own reflections.
The mirror test is often used as a way of measuring whether animals possess self-awareness. Some fish have recently passed the test, which has left scientists confused about limits of "self consciousness".
https://en.m.wikipedia.org/wiki/Mirror_test
Other animals have far less of it, and it correlates with logical thinking and intelligence too. It's like a side effect or component of animal intelect and wit.
DNA codes intelligence hardware and number of neurons, just like number of teeth and pilosity. On the next hyperlink theres info about 22 genes for intelligence and "dna for brain volume"
Intelligence is the key to human survival since 500+ billion years:
Making spears, fire, tools, clothes, and avoiding death from other monkey tricks.
DNA of brain size and logical ability has incrementally been sharply selected and increased for humans.
https://www.google.com/search?ei=xP68XZfAEcLggweFsqTwAQ&q=intelligence+dna
Theres even articles on logic gates within DNA. Self-concious often signifies introverted emotion, so it's rarely used in biology journals. Self-aware is used in animal psychology tests, and is relative / not an exact science.


Copy message text in android 7

Question: In my past phone (Android 6) I could long tap a message and sow "Copy" context menu.
Now in Android 7 I see only some strange icons on taping a message.

Could somebody advice how I can copy message text?
Answer:
 This icon on the top means copy. Pressing this button
should copy the text to your clipboard.
 This icon means share. After pressing this icon, you shall be prompted with multiple apps on your device that allow you to share this message.
This icon means forward. When you press this icon, you'll be able to directly forward this message to somebody else.
This icon means info. Pressing this icon will show you more information about the message. (e.g. sender, server, etc..)
This icon stand for delete. By pressing this icon will the message be deleted.
Comment: But how do you copy only a specific portion of text from a message and not the entire msg?

Copy message text in android 7


Did Midoriya have some level of superhuman strenght before getting One for All?

Question: In the first season of the anime, after training with All Might, Midoriya was able to carry him in his back when All Might weights 255 kgs (562 lbs). This is insanely strong for a 14 years old. How is this possible? Did Midoriya have some level of superhuman strenght before getting One for All?
Comment: In the same line of thoughts, nobody is naturally born with green hair, so does that mean that Midoriya is part alien?
Answer: As far as we know, no. If anything, it's even the opposite. As is noted in the My Hero Academia: Ultra Archive: The Official Character Guide where Deku's strength is noted as 1/5(E)
All though this may be intentional, considering their world does not directly seem to conform to the rules as set in the real world. It could also be an oversight, as Deku was originally intended to be an adult, as mentioned in the trivia section of the fandom wiki. For whom the act of carrying 255kg (562 lbs) could be more realistic. Given that it would still be quite a feat to achieve.
Comment: It might be a plot hole indeed since in the quirk apprehension test his measured force for griping was 56 kgs.
Answer: He may not have Super-Human strength, but because of him original being Quirkless, he might have trained at the gyms harder than everyone else around him.


SMS failure in SFMC

Question: I have sent an outbound SMS to an audience of 1000 by data extension but in the overview tab in MobileConnect, it is showing me only 2500 messages are delivered. also status is shown as complete. where can I see what happened with other audiences? What error has occurred?
Answer: This can be related to many reasons.
Check if phone numbers are valid on all records on your audience data extension. Note that:

You can send only to data extensions that are marked as sendable and
  that contain one phone field and one locale field. Mobile numbers used
  in the data extension must be normalized during the imports process.

It also depends on the option that you have selected for the send (cf image below).
If you chosed the first option, then all contacts need to be subscribed to at least one keyword to receive the SMS.
If you chosed the second option, then you have two use cases:
Use case 1: If the contact has been attached to this keyword in AllContacts, then SFMC will respect the consent. The contact will only receive the SMS if he's opted in. In case he's Opted out from this keyword, he will not receive the SMS and will not be re-opted in.
Use case 2: If the contact has not been attached to this keyword on AllContacts, he will receive the SMS and will be Opted-in to the keyword.

You can query _UndeliverableSms data view and join it to your audience Data Extension to get the delivery status of your SMS.
The problem can also be related to other reasons like:

Messages fail to reach the device for a few reasons, such as:
mobile device is powered off user is out of range of cellular networks
  number is for a landline causes not related to Marketing Cloud

You can run this query on Query Studio to get information about undelivered SMS messages:
SELECT mobilenumber, Undeliverable, BounceCount, FirstBounceDate, HoldDate FROM _UndeliverableSms

References:

Data View: Undeliverable SMS
Review Undelivered Messages
Comment: thank you for your response! if i am sending sms for the first time to the audience will they get automatically added to all contacts
Comment: i did not any of the audience to all contacts then how came 2500 audience got the message? I checked also if they are present in all contacts and yes they are there
Comment: Update: contatcs will be added automatically to AllContacts - Mobile list if you chose to subscribe them to a keyword. That explains why the 2500 received your message even if you did not import them..

SMS failure in SFMC


Does a patient have a right to obtain a copy of documents verifying a physician's claims of his qualification?

Question: Some physicians offer online consultations to patients who reside abroad. In these cases do patients have an opportunity to verify the identity of the physician? Some information is not intended for disclosure. Do documents proving a physician's education or affiliation with an employing institution belong to this category?
Comment: I'm not aware of such a right. But try the state's registration and licensing board - the equivalent of the UK's GMC: https://www.gmc-uk.org/registration-and-licensing/the-medical-register. You should be able to find out when and where they qualified and whether they are currently licensed to practice.
Comment: @Lag shouldn't this extend to any licensing authority?  Any claim of a license to practice should include the information which shows licensing authority issued the license.
Comment: @Lag, thank you. But the records in the database you refer to cannot store a form of identification data, such as SSN. Is it not possible to use any name from this register and claim it's your own? I do not argue documents cannot be falsified, I just reflect on your suggestions.
Answer: In the US, you have the ability to determine basic licensing, certifications and background information here. You may also be able to obtain such information from the individual state licensing board, but the information provided is not necessarily the same (e.g. my test search for Washington did not include specialization credentials or education but did include birthday; searching in another state where the individual is licensed provided extensive information about past medical education).
To some extent, you have the right to access public records information, which might include an indication of medical education, but that information will vary by state. There is no right to demand proof of identification, for example if you go to a location purporting to be the office of Dr. X, you cannot (legally) demand that they provide you with a particular proof-of-identity or proof-of-licensure (unless in some state there is a requirement to prominently display a copy of the medical license). In the case of in-person medical interactions, the premise is that with due diligence, you can verify that the person standing before you is Dr. X who is a licensed physician – but that is not foolproof (indeed, no proof-of-identity requirement is foolproof). In the case of an online service, the possibilities for shenanigans are significantly increased. It really depends on the contract between you and the service provider, whether you can demand certain information or documents. It may be that you can verify an organization claiming to connect you with real doctors with American Telemedicine Association, but a former search page is now missing: online medicine is very much caveat emptor.
Comment: Thank you for participation. If it's not too much trouble, can you not explain how information provided by licensing boards can be useful to a patient? If all he has the right to know about a practitioner is his name, how can a patient identify a practitioner with an owner of a license owned by a person with an identical name?
Comment: fingerprints or retinal scan?
Comment: Well, my state doesn't do fingerprints or retinal scans, so there is always the possibility that he's an imposter.


Apple Push Notification Service Statistics(apns)

Question: Is it possible to find information about Apple Push Notification Service usage?
How many people are using, and how many people are declining them?
Or maybe, somebody already has this sort of information?
Answer: Apple does not provide a lot of information about how many users actually accept/decline push notifications but you can get a good idea of what's going on by comparing the number of total installs and the number of valid push notification tokens you have ( I'm assuming that since you are interested in analytics you already have a Push server set up ) Push notification tokens are only generated if a user accepts.
If you need more information about the actual push notifications, you'll need to get your hands dirty and actually add tracking code in the application. If you're looking for something free try Google Analytics for iOS with Custom Event Tracking: https://developers.google.com/analytics/devguides/collection/ios/v2/events
Urban Airship also provides a pretty good analytics service, but you have to be using their push notification server: http://urbanairship.com/products/push-messaging#analyze


How to test for a player in a certain radius?

Question: I am wondering how to test for a player in a certain radius.
I've tried <code>/testfor @a[r=22]</code>, that's all I know.
Can any one help me solve my problem? I'm on Version 1.13
Answer: You can specify multiple arguments by separating them with commas. Enter the following command into a command block:
/testfor @a[name=,r=], where  is a player's username and  is the circular distance around the block.
You could put this command block on an infinite redstone loop to make it run over and over, all the time.
Answer: And to just detect any player in the radius leave out the name and just have the radius. Example : /testfor @a[r=]


Can I upgrade a drupal 7 + civi site to drupal 8?

Question: There is maybe a simpler path but this worked for me. Documenting this here since I don't know where else to put it.
Answer: UPDATE: Note this is now slightly out of date but the gist is correct, so follow the spirit if not the exact details. In particular if I was doing it again now there is a non-roundearth way to also install D8+civi, e.g. https://civicrm.stackexchange.com/a/35608/181 (official docs are in the works), and that method will set different path settings in civicrm.settings.php for you than described below, e.g.
$civicrm_paths['civicrm.files']['url'] = 'http://example.com/sites/default/files/civicrm';
$civicrm_paths['civicrm.files']['path'] = '/full/filesystem/path/to/sites/default/files/civicrm';

Start creating a new D8+civi site by using the installer at https://gitlab.com/roundearth/drupal-civicrm-project.
When doing the D8 install part, just install a minimal site and don't further configure it - just what's needed to get D8 installed.
Follow the standard drupal instructions to upgrade. https://www.drupal.org/docs/8/upgrade/upgrading-from-drupal-6-or-7-to-drupal-8. The short version is enable the Migrate UI module on the new site and then go to /upgrade.
Do not enable civicrm yet.
From your old site, export the civicrm_xxx tables.
There is probably a better way to do this step but it worked for me to manually update any urls and paths in the export file (taking care with php-serialized strings) and then import the sql file into the new database. Note that any references to sites/all/modules/civicrm are now under vendor/civicrm/civicrm-core. URLs for sites/default/files/... can stay as is, but note that filepaths will now be web/sites/default/files. Also userFrameworkResourceURL is now libraries/civicrm.
Copy civicrm.settings.php to the new site under web/sites/default. Edit the file:
Change CIVICRM_UF from "Drupal" to "Drupal8".
Change the mysql connection strings.
Change paths and urls as above. Again note civicrm_root is now under vendor/civicrm/civicrm-core, and you need to put "web/" in front of filepaths to "sites/XXX".
Enable the civicrm module.
Clear caches at admin/config/development/performance and also the civicrm caches at civicrm/admin/setting/updateConfigBackend?reset=1. I also ran /civicrm/menu/rebuild?reset=1 but I'm not sure it's necessary here.
The UI will look all messed up because it was a minimal drupal install but you can change the theme and set things as you normally would.
You may also need to set these settings in civicrm.settings.php:
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = CIVICRM_UF_BASEURL . '/libraries/civicrm/';
$civicrm_paths['civicrm.root']['url'] = CIVICRM_UF_BASEURL . '/libraries/civicrm/';
$civicrm_setting['domain']['userFrameworkResourceURL'] = CIVICRM_UF_BASEURL . '/libraries/civicrm/';
$civicrm_paths['cms.root']['path'] = '/full/path/to/web'; // the "web" folder at the root of the install
Comment: Yes the urls should go to libraries/civicrm, but anything that previously pointed to the file path in the filesystem for sites/all/modules/civicrm now need to be vendor/civicrm/civicrm-core. I admit this isn't a detailed list of what settings to change. I'm thinking there must be a better way anyway since this would hopefully never be the official way to do it. Just this worked for me.
Comment: It sounds like in step 6 you've got URLs going to `vendor/civicrm/civicrm-core`, but that typically isn't web-accessible.  Maybe they should go to `libraries/civicrm` instead?
Comment: maybe creating this as a new entry in civicrm dev docs?:
https://github.com/civicrm/civicrm-dev-docs


Submitting prior art when patent application number is not known

Question: How can I submit prior art to the USPTO when I do not know the patent application number? There is a competitor that I know is trying to patent an invention that is partially based on my prior art. Do US only (unpublished) patents eventually become published at some point in the process? I do know that I can e-file 3rd party prior art, but one must know the application number or patent number.
Answer: If an applicant declares at the time of filing that they have decided to only file in the U.S., then they can check a box on the application form requesting non-publication. In that case the time window for the AIA third party submissions will never open.


A synonym for "surroundings"

Question: Is there a synonym for the word "surroundings" which describes the closest surroundings of a spaceship in space (to specify scales lets say distance between planet and ship when ship is on geostationary orbit) and synonym which describes somewhat greater surroundings with radius comparable to distances between planets?
Answer: Not specific for what you are asking, "environment" means "the conditions that surround someone or something"
You might say

"The environmental conditions outside the spaceship are incompatible with life as we know it."
"It's extremely difficult to live in such harsh environment."

"environment" -  The totality of the natural world, often excluding humans. TFD

Edit: "environment" is the perfect synonym for "surroundings".  It seems to me, however, that you are looking for something more like "space", as in "celestial space", "intercosmic space", "intergalactic space", or "interplanetary space".
Comment: Thanks for suggenstions, I was just thinking about ship scanning surrounding space. I think that word proximity as other answer suggest is exactly what I was looking for.
Answer: For the closest surroundings: vicinity and proximity

A synonym for "surroundings"


CMOS Adder circuits

Question: I have been studying VLSI Design and cannot seem to find the difference between the two adder circuits below. Both implement the functionality of a full adder with Generate, propagate and kill conditions. Can anyone point out the difference?
Answer: They are functionally identical. The only difference is in where the series-connected P-channel devices are connected at the top.
( Sorry, I'm on a touch screen device, and I can't mark up your figures.)
Note that on the upper left in the first diagram, the two series-connected devices for A and B are connected to the node with the parallel devices for A and B, which are then connected to Vdd.
In the second diagram, the same series string is connected directly to Vdd.
The same thing happens on the upper right with the series-connected string for A, B and Ci. In both cases, these connections are functionally identical (work out the truth table if you're not sure). It probably has something to do with optimizing the layout on the die.
Comment: Does it also have to do something with the fact that series pMOS transistors have a large resistance and cause more delay?
Comment: Possibly. But then why would the first variation exist at all?
Comment: Because it is a direct static CMOS implementation created using a PDN and a complementary PUN whereas the second one is a modified and more optimized version.

CMOS Adder circuits


Why are the Corded Ware and Kurgan theories incompatible?

Question: Why can't the Corded Ware Culture be a part of the Kurgan hypothesis of the PIE Urheimat? These two things overlap in time and place. Gambutas included the Corded Ware culture in her theory. I'm not sure if there is a "Kurgan Culture" or if the Corded Ware Culture built Kurgans.

...the Corded Ware culture was once presumed to be the Urheimat of the Proto-Indo-Europeans... Today this idea has lost currency, as the Kurgan hypothesis is currently the most widely accepted proposal to explain the origins and spread of the Indo-European languages. Corded Ware Culture- Wikipedia.com

Edit: I think that this "Kurgan Hypothesis" may be refering to the spread of later Tumulus Culture, with confusion arising from the interchanging of those words. This Middle Bronze Age expansion is my understanding of how IE languages spread outside the steppe.
Answer: The Corded Ware culture appears to have introduced Indo-European languages to a large part of Northern Europe. However, it doesn't appear to have been the origin of the IE languages, because there are no traces of it in Greece, India, or Iran, where IE languages have existed since about the same period when Corded Ware was active.
Therefore, the Corded Ware culture must be one of several successor cultures to the culture where IE languages originated. Other successors spread IE languages to regions that Corded Ware never occupied.
The Kurgan culture is the current most common choice for the origin of the IE languages, and Corded Ware is a plausible successor culture to Kurgan, from what we know about them.
Answer: The Indo European Urheimat is represented by the Yamna culture or the "Yamna Horizon". The Corded Ware was an offshoot of the Yamna culture that spread across Northern Europe. A Corded Ware Urheimat would theory have meant that the Indo European Language was from Europe, not the Caucuses or the Pontic Steppe region.
North European hypothesis (Nordicism)


Reinstalling Lubuntu

Question: I got a problem when I tried to reinstall Lubuntu. I tried UnetBootIn, Live USB, UUI, and PenDriveLinux, but they all failed. A friend told me that my USB needed to be reformatted to FAT32 by using Disk Utility. I can have W95 FAT32 and other types of FAT files systems. I used GParted and changed it to FAT32, but Disk Utility states that it's still W95 FAT32.
Comment: So when you try booting from the USB stick by selecting it as the boot device nothing happens?
Answer: HOW TO DELETE PARTITION/FORMAT USB:
sudo su
fdisk -l    to list and find drive, in this case /dev/sdb
probably delete partition, then n to create new partition which i gave number 1
now format the usb:
note that the last number is 1 from partition 1
 mkfs.vfat -F 32 /dev/sdb1
here is the article:
Open a new Terminal window. In most Linux systems there is a shortcut to do this in the Accessories folder of the main menu.
2
Type "sudo fdisk -l" (without the quotes) to see a list of the drives currently on the system. Plug the USB flash drive into the computer. If your system automatically mounts it, right-click the drive and select Eject.
3
Type "sudo fdisk -l" to see the device ID of the USB flash drive. Type "mkfs.vfat -F 32 /dev/sdb1" to format the USB flash drive with the FAT32 file system, or "mkfs.ext2 /dev/sdb1" to use ext2. In both cases replace "/dev/sdb1" with the ID of your drive listed by the fdisk command. Be sure to put the "F" parameter in upper case, because there is also an "f" parameter, and do not include the quotes in any of these command

Reinstalling Lubuntu