Intuitive reason why mean energy is fixed in canonical ensemble

Question: I know that the canonical ensemble can be derived by maximizing the entropy under the constraint that the mean of the energy is fixed. But is there an intuitive reason for that?
Comment: Does this answer your question? [Why do we only use energy in the micro canonical ensemble?](https://physics.stackexchange.com/q/548329/) (Not the same ensemble, but the same reason)
Comment: I don't understand. By definition, this is what the canonical ensemble means.
Comment: Canonical ensemble is (also?/usually?) defined by means of a heat reservoir, which is free to exchange energy with the system of interest. The two are at the same temperature and energy is exchanged. OP seems to be asking how this can be seen as equivalent to maximizing the entropy subject to constraints.
Comment: (Sorry, I should have mentioned, the above comment was directed at @TobiasFünke)
Comment: @hft I think Jaynes addresses this in his "Information theory and statistical mechanics I". My first comment was addressing the title, btw.
Answer: If there isn't a limit to mean energy, even states with absurdly high energy could be as probable as states with low energy. In absence of other similar limit, maximizing entropy would lead to uniform distribution over all states (all states equally probable). That would also imply infinite temperature, which is not appropriate for real systems in thermodynamic equilibrium at some finite temperature.
A limit to mean energy implies that the maximizing distribution is such that the higher the energy of microstate is, the less probable that state is. This is more appropriate for real systems at finite temperature.
This only means one has to limit mean energy, not fix it. But it is easier to find the maximizing probability distribution for the condition of fixed mean energy, rather than for the condition of energy being limited from above by some maximum limit.
Comment: You can maximize the entropy subject to only the constraint $\sum_i p_i = 1$ and this results in a probability distribution appropriate for the microcanonical ensemble, not canonical.
Comment: @hft You're right, so I've tried to fix my answer.
Answer:
I know that the canonical ensemble can be derived by maximizing the entropy under the constraint that the mean of the energy is fixed. But is there an intuitive reason for that?

A few definitions/preliminaries to start:

In the canonical (or "Gibbs") ensemble, we consider the temperature to be fixed. This is often described as considering the system of interest to be in contact with a "large" "heat bath/reservoir," with which the system of interest can exchange energy.
In the microcanonical ensemble, we consider the energy (and other integrals of the motion, which we ignore here) to be fixed. This is often described as considering the system of interest to be completely isolated.

In the microcanonical ensemble, the distribution function is
$$
\rho_{micro}(E) = A\delta(E-E_0)\;,
$$
where $E_0$ is the fixed energy of the isolated system. Any microstate that satisfies the condition is equally probable.
The above microcanonical ensemble can be compared with the result of minimizing the entropy subject to only the condition of conservation of probability. Both result in a constant probability for every (accessible) microstate.
The canonical ensemble can be derived by considering the microcanonical ensemble of a system (1) in contact with a heat bath (2). The total distribution is:
$$
A\delta(E_1 + E_2 - E_0)d\Gamma_1 d\Gamma_2
$$
The probability of a microstate of system (1) being in state $n$ is:
$$
p_n = A\int\delta(E_n + E_2 - E_0)d\Gamma_2\;,
$$
which can be shown to equal:
$$
w_n = \tilde A e^{-E_n/T}\;,
$$
where $T$ is the temperature.
The above probability expression also results from maximizing the entropy subject to two constraints: (1) $\sum_i p_i = 1$; and (2) $\sum_i p_i E_i = U$, where $U$ is some constant, which we will identify as the thermodynamic energy of the macrostate.
So, in the canonical ensemble, we see that states with arbitrary energies can be excited, but their probability is low if the energies are very high. This is because the system is free to exchange energy with the heat bath.
Similarly, when we maximize the entropy subject to the constraint $\sum_i p_i E_i = U$, we are saying that the microstates of any energy are possible, but nevertheless if we are going to characterize a system in equilibrium we know that the macrostate will be characterizable in terms of some thermodynamic energy $U$, which is why we need the constraint.
This is the best intuitive explanation I can give, and I note it is not really "intuitive," but rather just an explanation of how various ways of looking at ensembles are related. Not sure if there is a better "intuitive" explanation, but if so I look forward to reading about it.


Hindi traditional or inscript keyboard layout not available

Question: I do not want to use Hindi(bolnagri) or Hindi(Wx) phonatic layouts. Is Hindi inscript or traditional layout available for ubuntu?
Comment: possible duplicate of [How do I enable writing in Indian languages?](http://askubuntu.com/questions/165637/how-do-i-enable-writing-in-indian-languages)
Answer: I believe that you can use a keyboard layout called "Indian".  I am new to Hindi (started a self-study of it last month), but from looking at images on the net for InScript and comparing it to what I see for "Indian" they look the same.
To get the "Indian" keyboard layout, I went to "System Settings" then chose "Text Entry" then selected the "+" to add an "input source" and selected "Indian" from the list.
I checked that "Indian" board a bit. All the keys seem right except for the 5, 6, 7, and 8 keys are not mapped as shown in the images I found. So I do not know how you would access the characters normally accessible there.
Comment: ये काम करता है। (It works!)
Answer: With Indian group and Default layout variant you can type 4 different gliphs by 1 phisycal button plus 2 key modifiers right Alt and any Shift. So top-leftmost button near Esc (~) example:
just press: ॊ
with Shift:ऒ
with R-Alt:`
with R-Alt+Shift:~

This Indian - Default layout mostly the same as InScript but with some differences. For example the button just left from backspace let you type this 4 gliphs:  ृऋ ॄॠ; no more + and =. Use R-Alt and Shift key modifiers to find out all differences by your own.
I don't know the real name of this InScript clone layout.
OS: Kubuntu 18.04
Answer: श + ् + र = श्र
क + ् + ष = क्ष
त + ् + र = त्र
ज + ् + ञ = ज्ञ

You can combine existing words to form these. It is a bit lengthy but works..


Would an adhesive surface have more air resistance?

Question: Imagine spreading double-sticky tape all over the surface of a car or a plane. Would there more significantly more aerodynamic drag as a result of the adhesive 'sticking' to air molecules and slowing down? This would certainly cause more resistance in solid mediums but would this cause more resistance in air or water? If an adhesive surface can drastically increase friction with solid surfaces, could one also increase friction with the air?
Answer: It seems the question assumes that because the tape is sticky, it will somehow strike or capture air molecules which will increase drag. This is incorrect since air molecules have very weak intermolecular forces (you might get a layer of gas molecules to form on the tape) and are moving too quickly to begin with to stick. Also, even though it's a sticky surface, it's still fairly flat/smooth.
Aerodynamic drag does depend on the roughness of a surface$^1$, and
even though objects with a rough surface will have more drag, it's hard to imagine that a sticky taped surface that is more or less smooth (though sticky), has an appreciable skin friction coefficient (see below).
And as pointed out by Niels, objects moving through a gas have a boundary layer adjacent to the surface which is more or less stationary relative to the surface. For surfaces with skin roughness (see links below) enough to noticeably affect the boundary layer profile, you would expect the surface to be a lot more rough than sticky tape. So sticky tape would not have the effect you ask of, in air.
You're right that the same cannot said about solids, but solids that have sticky tape will experience cohesive/adhesive forces when in contact.

$^1$ This is referred to as skin friction where in the equation for drag force,
skin friction is included in the drag coefficient $c_D$ in the first above linked equation, where the total skin friction drag force can be computed by $$ F=\iint \limits _{S}c_{f}{\frac {\rho v^{2}}{2}}dA$$ where $c_f$ is the skin friction coefficient.
Answer: for the case of a sticky body moving through air:
Making the surface of the object sticky will have no influence on the thickness of the boundary layer or on the drag force exerted upon the moving body by the air that surrounds it.
This is because there always exists a boundary layer of air right next to the moving object which is already "stuck" to its surface, at zero velocity. As you move away from the object, the airstream velocity increases from zero to its full value some distance away from the object.
Answer: Both answers sensibly focus on the low-Knudsen number flow regime typically experienced by the cars and planes mentioned in the question. If your interest extends to vehicles like low-altitude satellites and ICBMs you will have to consider another regime that occurs when the mean free path of the molecules in the fluid is >10x the characteristic length of the object moving through that fluid. In "free molecular flow" there is no boundary layer; molecules of the incoming gas ballistically impact the object and are either elastically reflected, or re-emitted after gas-surface interactions (GSI). The drag on a body due to the fraction of particles that are adsorbed and re-emitted does depend on the 'stickyness' of the surface, but how so is not straightforward and depends on a wide range of parameters:

The scattering behaviours observed are not constant as they tend to change substantially with
the system considered and, in particular, with the ratio between the mass of the gas particles and
the surface atoms, the range of interaction, the energy/temperature of the incident beam with
regards to the surface temperature, the molecular or atomic species involved in the experiment,
the presence of adsorbents on the target surface, the morphology of the surface considered despite
the level of roughness and the relative position and orientation of the gas particles and surface
atoms [97].

Experiments investigating these phenomena typically fire a beam of gas at a metallic target and measure the location and energy of the scattered beam.
I'm posting this answer mainly as a curiosity, but there is extensive literature if you're interested. Here's the review the above quote is from.


directed unweighted graphs C

Question: I'm planning to write a program in C that builds the adjacency list, performs the
depth first search, performs the breadth first search, and performs the
topological sort.
Where can I get some info about this subject in C?
Any help is appreciated
Comment: your lecturer or previous years students? :-)
Answer: If you don't have a good algorithms textbook, I'd recommend getting a copy of Robert Sedgewick's Algorithms in C, Part 5:  Graph Algorithms.
I own the C++ and Java versions of the book, and both are very good.  I do not own the C version of the book, so it might be atrocious (I doubt it; it's probably very good too).
The Parts 1-4 book is a good algorithms reference book as well; the material is presented very clearly.
Answer: Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein is a classic. However, it does not have a specific language approach.
Data Structures In C by Noel Kalicharan if you want a C approach.

directed unweighted graphs C


Derivative of the $f(x,y)=\min(x,y)$

Question:
I just encountered this function $f(x,y)=\min(x,y)$. I wonder what  the partial derivatives of it look like.
Comment: A general rule of thumb is that to find the partial derivatives of functions defined by rules such as the one above (i.e., not in terms of "standard functions"), you need to directly apply the definition of "partial derivative".
Answer: $$
f(x, y) = \min(x,y) = \begin{cases}
x & \text{if } x \le y \\
y & \text{if } x \gt y
\end{cases}
$$
The function isn't differentiable along $y = x$, but the partial derivatives are straightforward otherwise.
$$
\frac{\partial f(x, y)}{\partial x} = \begin{cases}
1 & \text{if } x \lt y \\
0 & \text{if } x \gt y
\end{cases}
$$
$$
\frac{\partial f(x, y)}{\partial y} = \begin{cases}
0 & \text{if } x \lt y \\
1 & \text{if } x \gt y
\end{cases}
$$
Here is a plot of the function to help you see the derivatives and why it's not differentiable along $y = x$:
Comment: @garej If you allow $min(x,y)=x=y$ for the condition $x=y$, then the derivative is 1 for both axes.
Comment: I bet you used Mathematica to produce this image.
Comment: @Dostre Indeed I did!
Comment: @AymanHourieh, the function is not differentiable along the line $x = y$, but is there a directional derivative along this line, i.e. along vector (1,1)?
Comment: Is there any scientific paper or book that I could cite for using this partial differentiation?
Answer: If $(a,b)$ is below the line $x=y$, then the function has value $y$ on a neighborhood of $(a,b)$, so the partial derivatives are
$$\begin{align*}
\left.\frac{\partial f}{\partial x}\right|_{(x,y)=(a,b)}&=0\\
\left.\frac{\partial f}{\partial y}\right|_{(x,y)=(a,b)} &= 1.
\end{align*}$$
Symmetrically, if $(a,b)$ is "above" the line $x=y$, then the function has value $x$ on a neighborhood of $(a,b)$, so the partial derivatives are:
$$\begin{align*}
\left.\frac{\partial f}{\partial x}\right|_{(x,y)=(a,b)}&=1\\
\left.\frac{\partial f}{\partial y}\right|_{(x,y)=(a,b)} &= 0.
\end{align*}$$
If $(a,b)$ is on the line $x=y$, then the function has value $y$ as we approach along a constant $y$ direction from the right, and value $x$ if we approach along a constant $y$ direction on the left. So the partial with respect to $x$ is $1$ from the left and $0$ from the right, hence does not exist at $(a,b)$. Similarly for $y$.
So the function is differentiable away from the line $x=y$, with values as given above.
Answer: It refers to the partial derivatives of functions of two variables or more/simply multiple variables,with their notation $f\{x,y,z,.....\}$, depending on how many variables are given.this method can be done by differentiating with respect to individual variable (with respect to $x$,you fix $y$ and $z$ and treat them as constants, with respect to $y$, you fix $x$ and $z$ and treat them as constants and the same goes for $z$ $zd_n$ other given variables. We can also use the formula.
Comment: How does this answer the question?

Derivative of the $f(x,y)=\min(x,y)$


A Function whose Domain is [-8,6]?

Question: In an exercise they display the question "A Function whose Domain is [-8,6] is graphed below" effectively showing a graph of the points x = -8 and x = 6. Isn't a graph whose Domain [-8,6] usually [x,y] as in x = -8 and y = 6?
Comment: Huh? I have no idea what you're trying to ask.
Comment: I've made some changes to the question, I hope it's better now.
Answer: You must familiarize yourself with some common notation.
In the context of functions, $[a, b]$ is a closed interval containing all real numbers between $a$ and $b$, inclusive. This can be written as a compound inequality as $a \leq x \leq b$. Similarly $(a, b)$ is the open interval containing all real numbers $x$ strictly between $a$ and $b$. As an inequality, this is $a < x < b$.
The exercise in question speaks of a function whose domain is the interval $[-8, 6]$, that is, all $x$ for which $-8 \leq x \leq 6$. This is not a point.
When we speak of points, it will usually be clear in context. Domain talks about $x$-values (or whatever letter is used for the independent variable).
Comment: You might mention that in addition "$(x,y)$" can denote a point, but "$[x,y]$" does not denote something point-like.
Comment: nb a closed interval includes its endpoints _inclusive_, not _exclusive_ (as in exclude). I've thus edited that part.
Comment: I can't believe I missed that. Thank you, @AlexR
Answer: $[-8,6]$ is the set of all real numbers between $-8$ and $6$, inclusive.
$(-8,6)$ is the same set, only without $-8$ or $6$.  It can also denote the point $x=-8, y=6$.  OP is correct in that this is two different uses of notation.
An answer to this question would be $\sqrt{(x+8)(6-x)}$.  If $x$ is outside the interval $[-8,6]$, then the term $(x+8)(6-x)$ will be negative, so outside the domain for the square root.
Comment: @SilvioMayolo You're probably right on what you think the teacher might say, but I think that would be a terrible answer that should be eradicated, as it terribly confuses students, making them think that functions, and their domains are based on their "recipes".
Comment: +1. Just a remark: there's no need to be so contrived with the example: you could just take $\mathrm{id}: [-8,6]\to [-8, 6]$ to get a function like that.
Comment: @YoTengoUnLCD While that's true mathematically, this sounds like a precal homework question, and I think a precal teacher would count "id on the appropriate domain" as a wrong answer.

A Function whose Domain is [-8,6]?


Turning around an enemy when hitting a wall or after x time

Question: I have an enemy that is supposed to go in one direction and after hitting the wall or if a certain amount of time passes, it should turn around and go back. After hitting another wall, it should turn around again and keep doing this in a loop.
Comment: Want to show us your code so we can help you build on it?
Comment: We don't even know if you're working in 2D or 3D, using Rigidbodies or navmesh or transform.position, so we need a lot more specifics to be able to help you with this.
Comment: @D.Kallan that looks like about the best advice we can offer this user, given the dearth of information they've given us to work with. Want to post it as an answer below?
Comment: i dont have any code at all i tried a few things but they didnt do much so i just asked if theres code that can do that cuz i was tired of doing google searches i was using transform.position that was the only one that moved the object and this is a 2D game
Comment: 2D and transform
Comment: Although I agree with DMGregory's comments, I'd look at what exactly you need then do  it step by step." An enemy has to move in a direction until conditions are met, then turn around". So you can start by looking up how to move an object, either by transform.position or by physics with rigidbodies. You can add a boolean somewhere, if it is changed, the direction it walks in inverts. Then have checks to change that bool. `certain amount of time`: make a timer and when it elapses, change the bool. Then for `hitting a wall`, search for object colision with walls (maybe a trigger on the enemy)?
Answer: As mentioned in my comment, I would look at what exactly you need and make steps that you can work on.
"An enemy has to move in a direction until conditions are met, then turn around."
So you can start by looking up how to move an object (either by transform.position or by physics with rigidbodies, etc.). Instead of going to position x or y, you can let it move indefinitly.
You can add a boolean somewhere in that movement, if it is changed, the direction it moves in inverts. When your conditions are met again, the boolean flips back to it's initial state, turning the character back around to the original direction, etc.
Then have checks to change that bool. Certain amount of time: make a timer and when it elapses, change the bool. For hitting a wall: search for object collision with walls (maybe a trigger on the enemy and collider on the wall, so when the wall enters the trigger, the bool is flipped)?
These are just some pointers to go on, there are multiple ways to approach it, but this should get you something workable and steps to lookup / learn.
Answer: Build a Finite State Machine
Finite State Machines (FSM) are a simple but effective programming pattern which is very useful for implementing the behavior of AI enemies.
FSM's in a nutshell:

An enemy can be in different states
Its current behavior depends on what state they are currently in
Certain conditions might cause them to switch to a different state, thus changing their behavior

In this case, the state machine which describes the behavior of your enemy has only two states:

MOVE_LEFT state:

Move to the left.
When a certain amount of time passed, reset that timer and change to the MOVE_RIGHT state.
When there is a wall to the left, reset the timer and transit to the MOVE_RIGHT state.

MOVE_RIGHT state:

Move to the right
When a certain amount of time passed, reset that timer and change to the MOVE_LEFT state
When there is a wall to the right, reset the timer and transit to the MOVE_LEFT state.

So how would a basic implementation of this pattern look in Unity?
First you need to define the states and a variable to store the current state. You only have two states right now, so a bool currentState variable could do the job. But you might want to add more than those two states later, so I would recommend to use an enum instead:
private enum States {
    MOVE_RIGHT,
    MOVE_LEFT
}
private State currentState;

Then your Update() method could use a switch(currentState) to execute different code depending on the current state: Moving left it's in the MOVE_LEFT state and move right when it's in the MOVE_RIGHT state. That code should also include the code to check if the condition for switching the state is met, and when that's the case change currentState to the respective other state.
How would a more advanced implementation look?
When you have an enemy with a lot of states and when those states get pretty complex regarding their behavior and transition logic, then it can be useful to not just create an enumeration and a large switch statement, but to create a separate C# class for every possible state. All these classes which represent states for the same type of entity should implement the same interface (or alternatively: extend the same abstract base-class). When I implement the FSM state pattern this way, then my IState interface usually has these methods

Enter which gets called when transitioning to this state.
Update which gets called each frame while the FSM is in this state.
Leave which gets called when transitioning out of this state.

The actual MonoBehaviour which implements the FSM itself then looks something like this:
public class GoombaAI : MonoBehaviour {

    public IState<GoombaAI> moveLeftState;
    public IState<GoombaAI> moveRightState;

    Start() {
        moveLeftState = new GoombaMoveLeftState(this);
        moveRightState = new GoombaMoveRightState(this);
        currentState = moveLeftState;
    }

    Update() {
        currentState.Update();
    }

    public void SwitchState(IState<GoombaAI> newState) {
        currentState.Leave();
        newState.Enter();
        currentState = newState;
    }
}


I have an instance of RDS of MySQL 5.7.10

Question: I do not understand why memory bar seems to exceed to the red zone with 24.5 MB while RDS server should be with 1Gib
Comment: That looks like 24.5 MB **free** memory (so, approximately 999.5 MB of 1024 MB is not free).  Check the monitoring graphs?  Click Instance Monitoring, Single Metric, and check that?
Answer: If you have the performance_schema enabled, then this will consume roughly 500Mb of RAM, then in addition to that you need to take into account your buffer pool size settings (RDS defaults these to 3/4 of the RAM).
Adding these two together can push the allocated ram size over 1Gb quite quickly - note that you have 182Mb of swap used too.
The 24.5Mb of free RAM is probably the OS file cache, which can be discarded by the OS should other RAM demands become too much.
Try turning off the performance_schema in the RDS parameter group and see if that makes any difference.


How to set wired interface on Monitor Mode?

Question: I could set my Wireless connection on Monitor Mode. And i could capture packets using wireshark. But how do i set my wired connection on monitor mode so that i can capture wired traffic too on wireshark? Please help!
Answer:
But how do i set my wired connection on monitor mode

You don't.  Monitor mode is a Wi-Fi concept that doesn't apply to wired networks.

so that i can capture wired traffic too on wireshark?

On a wired network, if you want to capture traffic that's not being sent to or from your machine, you need to put the adapter into promiscuous mode; Wireshark (and tcpdump) default to doing so, so you'd have to do something special not to put the adapter into promiscuous mode.
However, most Ethernet networks are switched, and, on a switched Ethernet,  it's not sufficient to turn on promiscuous mode; you also have to arrange that the switch send you other hosts' traffic.
Answer: Very tough  , untill u do something with ur ehernet cable and router to listen to the air packets broadcasted by access point/another router in range , the conept of monitor mode seems to be compatible with the case where your nic is capable of listening to all broadcasting of destination Mac address ND its associated packet. Basically ,  ur router seems to be handling a private network of URS.. if you want to listen to the packets broadcasted for a Mac addresses under ur own private network via Ethernet cable , then , it would only be possible , if ur own machine nic could be set to monitoring mode ...so when ur router broadcast data to ur local private network , ur machine could consume that , but hold on  ... The packet will be consumed already ND forward ing of braodcast could be stopped ,if another machine before you  is an expected reliever of that packet as it's mac match with packet Mac ,  on wifi side , the router throws the packet in the air , ND devices that come into the range of that packet could recieve it considering the device nic should be developed with intention of listening to monitor mode of each packet broadcasted and for connected wires , router does not need to throw packets in the air , as recieve is connected to router via Ethernet cable ...so router sends that data in wired direction devices
Comment: How does this answer differ from the previous up voted answer?


File not found in an asp hosting

Question: I recently uploaded an asp web site on aspspider , I uploaded to the webroot two files
UniversityRDF.rdf
UniversityRDFS.rdf

But for unknown reason to me , I can't reach them when I browse to
www.aspspider.ws/#####/UniversityRDFS.rdf
or
www.aspspider.ws/#####/UniversityRDF.rdf

how can I fix it ?
Answer: IIS might not be configured to allow rdf files to pass through.  If you put a simple html file, can you see that?

File not found in an asp hosting


How to properly configure SSL connection to remote azure database for running queries within a WordPress environment

Question: We have a BlueHost WordPress install that we would like to enable a secure remote connection to our secondary database in Azure. We do not want to replace our existing db, just run queries through SSL connection against that db from our WordPress.
We have configured everything appropriately in Azure to accept the requests, but cannot find any good documentation for WordPress end to properly enable/make that connection.
We thought there might be a method to extend wpdb and/or modify the WP-config.php, but following WP docs on "SSL connection to remote database WordPress" (or variations of this) only returns guidance on setting up a primary database FOR WordPress using remote db.
We found a possible plugin (WP data access plugin), but when we try to use, our admin bugs out (could be a BlueHost issue). We would prefer, however, not to use a plugin but actually understand and manage this feature ourselves.
We assume since we have a web server we can attempt to manage this connection outside of the WordPress instance itself, but that feels hacky.
Answer:
We do not want to replace our existing db, just run queries through SSL connection against that db from our WordPress.

You can create new WPDB objects to connect directly to new MySQL/MariaDB instances, but there is no support for tunnels, it is a direct connection only. For anything else you'd need to proxy it somehow and connect to the proxy, but this would be a non-WordPress non-PHP application that you would need to research and setup yourselves.
Likewise there is no support for non-MariaDB/MySQL databases, unless Azure DB can handle MySQL flavoured SQL as is without modification then WPDB is useless to you. WPDB uses mysqli internally.
The most you could expect WPDB to deviate from MariaDB/MySQL norms is SQLite, for which there are plugins that try to add support for.
Additionally, you should expect a heavy performance penalty for connecting to a remote database, regardless of the vendor or type of software at the other end. Remote requests and connections are one of the most expensive and slowest things you can do. Sites are normally colocated with their database for a reason, either on the same machine, or in the same data centre cluster for lower latency and turn around time. Your page will never load faster than the time it takes to do a request to your remote database, you will want a lot of caching and to make things as async as possible.
Instead you should stop searching WordPress resources, and instead try to find generic PHP resources, it's extremely unlikely you will find anything WordPress specific.

We found a possible plugin (WP data access plugin)

This plugin has little or nothing to do with what you want.

We assume since we have a web server we can attempt to manage this connection outside of the WordPress instance itself, but that feels hacky.

You'll need to treat this as a PHP application task that just happens to be inside WordPress. Look at generic PHP libraries, and their examples, and fit that into your WordPress code, or, have some other application that sits in-between WP and your Azure DB that can handle requests.


How can I make a copy of an installed Report?

Question: I have a working installation of SQL Server Reporting Services (2008) in which I've setup a DEV directory and successfully upload a number of report templates. I have now created a TEST directory. How can I copy the report templates from DEV to TEST?
Answer: I just just downloaded RSScripter for a similar situation and it worked fine. Be sure to read the read me file as it's operation is not readily apparent.


Nginx proxy_pass config

Question: Nginx proxy_pass config
I'm setting up an Angular app on one domain that needs to access an API on another.  This seems to be working fine.
In my services.js I have a service.factory that contains:
return $resource('/api/user/:email/:password',....

Typically this "$resource" is just another location on the same server/domain. However, with the limitations of JavaScript to cross-domain...one way to accomplish such a feat is to have the web server do the fetching.
From my reading of the Nginx resources this can be accomplished in the server config file. I believe that the list of "location" directives should go from complex to simple.  I think I've tried all permutations on the following code (with and without trailing slashes in the "upstream" and the "location", various different "proxy_set_..." configurations, etc).
I just can't quite get it to work. In my error.log the web server is looking for the file and can't find it. Which is correct, as the path is actually on another (the API) server:
"2014/03/23 13:38:11 [error] 24529#0: *1 open() "/firstname.lastname@example.com/asoetus" failed (2: No such file or directory), client:..."

I'm hoping that when Nginx sees a call to the URI dev.mydomain.com/api/user/:email/:password (that it actually goes and fetches api.saasdomain.com/api/user/:email/:password
which does work and returns a JSON response. Actually it should get anything within that /api  directory whether it's /user/ or /book/ or /whatever/).
There's no real error in the nginx error log, so I'm guessing that nginx isn't even listening for the proxy_pass call. ??? (There is a bind() error, but I have a number of other servers that nginx is serving just find, so I'm dismissing this bind() error for this discussion.) Ok, I just added debug to the end of the error_log directive. Here's the output to the debug nginx error.log http://freetexthost.com/30yxfss4r4
Any thoughts?
in the /etc/nginx/conf.d/virtual.conf file:
[snip]

upstream api_alias {
   server api.saasdomain.com;
}

server {
 listen 80;
 server_name dev.mydomain.com;
 access_log /var/www/dev.mydomain.com/logs/access.log;
 error_log /var/www/dev.mydomain.com/logs/error.log;

 location /api/ {
    resolver 220.127.116.11;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-NginX-Proxy true;
    proxy_pass http://api_alias/;
    proxy_ssl_session_reuse off;
    proxy_set_header Host $host;
    proxy_redirect off;
    proxy_buffering off;
 }

 location / {
    root /var/www/dev.mydomain.com/htdocs/;
    index index.html;
 }

 [/snip]

Answer: On line 61 or your debug log you see that the request is actually being made to the remote server as GET /email@example.com/aoeu HTTP/1.0, you are missing the /api/. Try setting the proxy_pass directive like this:
proxy_pass http://api_alias/api/;

Nginx proxy_pass config


How do I pull the oid organization id value out of the hidden field and populate it later using JavaScript

Question: How do I pull the oid organization id value out of the hidden field and populate it later using JavaScript. I need an example if possible, that I can implement on my Web-to-Lead form..please!
Comment: Welcome to SF.SE Sharee. Have you examined your generated web-to-lead form to even look for it? Please take the time to visit [Help] and take our [Tour] to better understand how this forum works, including [How do I ask a good question](http://salesforce.stackexchange.com/help/how-to-ask). We want your experience here to be a positive one where you'll be able to receive the answers you need and contribute to the community if you choose to.
Answer: If your oid is already in the wild (e.g. you've posted a form and someone's already started spamming you), changing the form now will have no effect. They'll keep spamming you. The easiest way to stop this spam is to implement a hidden field value and write a validation rule that requires the field value to be present when the lead source is a certain value (e.g. Lead Source is web, Anti-Spam is Yes). It doesn't have to be complicated, any type of validation will do.
If you haven't exposed your oid yet, don't. Instead, have the web to lead form post back to your server, and have your server submit the data (along with the oid) to salesforce, or even better, consider using the API, which doesn't have the 500 leads per day limit (assuming, of course, you're on EE or have API enabled).


Is epoxy resin plastic?

Question: Is epoxy resin a plastic ? For clarity when I say plastic I mean of the same ilk as all the single use plastics we (should) be trying to reduce the use of.
Comment: questions seems of that same ilk as polotical agitation.
Answer: Yes. The IUPAC definition of a plastic (page 384 of document, page 18 of pdf file) is

plastic - Generic term used in the case of polymeric material that may contain other substances to improve performance and/or reduce costs.

Note 1 - The use of this term instead of polymer is a source of confusion and thus is not recommended.
Note 2 -  This term is used in polymer engineering for materials often compounded that can be processed by flow.

Before the epoxy sets it will flow, so it is a plastic.
Answer: As far as I am aware, the term plastic was in use long before the materials it is now associated with.
It was one of the terms used to describe material states/properties: elastic, plastic and fracture.
elastic = non permanent deformation, stretches and returns to original dimensions.
plastic = permanent deformation, stretches beyond the elastic stage.
fracture = the point at which the limit of plastic deformation ends by breaking.
So it may depend on how you're using the term, but I would probably use both plastic or resin for either since they both start as resins and they "can" both have a plastic deformation stage when set/cured.
Thermoplastics set, thermoset resins/plastics cure.
Anyone suggesting that epoxies should not be called plastic because they're generally incompatible with thermoplastic, is false since different formulations of thermoplastics are also generally incompatible with each other.

Is epoxy resin plastic?


SVG use x, y attributes or translate

Question: Why there is a translation possibility for use when i can move shapes around with x y attributes and vice versa? Is it just redundant or are there special situations where one is preferred over the other method?
Answer: It is a inheritance issue. When programmers model nodes they lump similar functions together, and everything that has certain properties inherit all the other properties. Things evolve and get added, most of the time not removed.
You dont actually ever need x and y for anything if translate is available, however modeling architecture designers (mostly programmers) can also not remove things because somebody may be already be using the feature. Besides x and y conceptually simpler and the backend needs to be implemented anyway so why not include it. In any case  x and y is not the same thing as translate.
Translate describes a matrix while x and y describe 2 scalars or a 2D vector. So translate has 8 degrees of freedom while x and y each have one for a total of 2. Translate can scale skew and rotate the image in addition to translate.
PS: SVG is arguably not a very good format, but design by committee has that effect. Mainly because SVG relies on bits and pieces that are not xml for many things so you end up needing to understand 3 separate modeling paradigms to accomplish things that could be done with one.
Answer: Good question. I can think of two reasons why translate is necessary:

Some elements (like a path and line) don't have x and y attributes.
When applying a translation to a group (<g>) of multiple objects, how would this be done using only x and y? SVG elements inside of the group like a <line> could have x1 and y1 attributes, some could be paths, etc. A translate fixes those issues.

In general translates could be removed and converted into other properties. It's just more of a hassle to do that.

SVG use x, y attributes or translate


Vector dimension of a set of functions

Question: Let $F$ be a field and $S$ an infinite set. Set $V=\{f:S \rightarrow F\}$ endowed with the vector space structure that results from the pointwise operations of $F$.
It is easy to prove that $|S| \leq \dim V$, since the functions $\delta_s$ defined by $\delta_s(s)=1$ and $\delta_s(t)=0$ for all $t \neq s$ are linearly independent.
Is it true that $|S| < \dim V$? If so how could it be proved? I tried some kind of Cantor-like diagonal argument, but nothing worked so far.
Answer: Case 1 when $|F|\leq\aleph_0$: Let $W$ be the set of functions $S\to F$ with finite support. Then $W$ is clearly a vector space with $\dim W=|S|$. We also have $|W|=|S|$, because there are $|F|\times|S|=|S|$ scalar multiples of base vectors and the number of finite sums of such vectors is $\sum_{i<\omega}|S|^i = \sum_{i<\omega}|S| = \aleph_0\times|S|=|S|$. On the other hand $V$ contains at least $2^{|S|}$ elements. Since $W$ and $V$ have different cardinality, they cannot be isomorphic. In particular, $V$ must have dimension $>|S|$.
Case 2 for arbitrary $F$: Let $K$ be the smallest subfield of $F$, that is, $\mathbb{Q}$ if $F$ has characteristic $0$ and $\mathbb{F}_p$ for characteristic $p > 0$. In either case, $K$ is small enough to match the condition in case 1.
Let $\mathfrak{B}$ be a basis for $\{f:S\to K\}$. By case 1, $|\mathfrak{B}|>|S|$. But each member of $\mathfrak{B}$ is also a member of $V$, and $\mathfrak{B}$ is still linearly independent over $F$. Namely, suppose that $f_1\mathbf{b}_1+\cdots+f_n\mathbf{b}_n$ is an $F$-linear relation among vectors $\mathbf{b}\in\mathfrak{B}$. Then the $f_i$'s are a solution to a homogenous system of $|S|$ linear equations with coefficients in $K$, and this system has only the trivial solution in $K^n$. Then $n$ of the equations must be linearly independent over $K$, which means that their determinant is nonzero whether evaluated in $K$ or in $F$. Therefore the $f_i$'s must all be zero, too.
So the dimension of $V$ is at least $|\mathfrak{B}|>|S|$.
(Adapted from an old Wikipedia refdesk answer of mine.)
Answer: Here's my two cents. The space $F^{\oplus S}$ of the set of all functions $S\to F$ with finite support in $S$ is a vector space of dimension $\#(S)$. So, if $F^S$ had dimension $\#(S)$ then it would be in bijective correspondence with $F^S$. In most tame cases this is impossible. For example, if $F$ is countable then $F^{\oplus S}$ is equipotent with $S$ while $F^S$ is certainly larger, cardinal wise, $S$ since $2^S$ naturally (set wise) embeds into $F^S$ (note $F$ must have at least two elements) and so Cantor's theorem applies.
EDIT: Of course, for the general case you could just reduce to the prime subfield.
EDIT EDIT:I see Henning just said this.
EDIT EDIT EDIT: Of course, this is is how one generally proves that for infinitey dimensional spaces the dual space is strictly larger, in dimension, than the original space! Indeed, if $F[S]$ is some infinite dimensional vector space, then $\text{Hom}_F(F[S],F)\cong F^S$ whereas $F[S]\cong F^{\oplus S}$.
Comment: Indeed, the dimension of the dual space was the original context for the text I reused in my answer.
Answer: Indeed, the vector space $\mathbf R^\mathbf N$ has no countable Hamel basis. Fix any countable set of sequences $\{ a_i \}$ where $a_i \in \mathbf R^\mathbf N$. Our goal is to produce an element of sequence $b$ not in the span of this set, using a Cantor-style diagonalisation argument.
Let $\mathcal U$ be the set of finite subsets of $\mathbf N$. Since $\mathcal U$ is countable, we enumerate the members of $\mathcal U$ as $\{ U_1, U_2, \ldots, U_n, \ldots \}$. For each $U_n$, let $I_n$ be a set of $|U_n|+1$ "private" coordinates (so that all $I_n$'s are disjoint). Now, for each $i \in U_n$, the vector $(a_{i,j})_{j \in I_n}$ is of length $|U_n|+1$. Since $|U_n|$ vectors cannot span the whole of $\mathbf R^{|U_n|+1}$, there exists a vector $x_n$ in $\mathbf R^{|U_n|+1}$ that is not in the span of the vectors
$$
\left\{ (a_{i,j})_{j \in I_n} \ : \  i \in U_n \right\}.
$$
Finally define $b$ so that $b|_{I_n}$ is equal $x_n$ above.
Now to complete the argument, just note that the construction ensures that for each finite $U \subseteq \mathbf N$, $b$ is not in the span of the vectors $\{ a_i \}_{i \in U}$. That is, $b$ is not in the span of $\{ a_i \}$.
Comment: I do not address the question in full generality; moreover, Henning's answer seems to subsume this. But I will just leave the answer as it is just in case any one is interested. :-)
Answer: If $\kappa=|S|$ is a regular cardinal, $\dim V>\kappa$.
For $A\subseteq S$ let $$f_A:S\to F:s\mapsto\begin{cases}1,&\text{if }s\in A\\0,&\text{if }s\notin A\;.\end{cases}$$
Suppose that $\mathscr{A}$ be a collection of subsets of $S$, each of cardinality $\kappa$, such that $|A_0\cap A_1|<\kappa$ whenever $A_0,A_1\in\mathscr{A}$ and $A_0\ne A_1$; I'll call such a family almost disjoint. I claim that $\{f_A:A\in\mathscr{A}\,\}$ is linearly independent.
Suppose that $A_0,\dots,A_n$ are distinct members of $\mathscr{A}$ and that $c_0f_{A_0}+\cdots+c_nf_{A_n}=0$, where $c_0,\dots,c_n\in F$ are not all $0$. Without loss of generality assume that $c_0\ne 0$. Since $|A_0|=\kappa$, but $|A_0\cap A_k|<\kappa$ for $k=1,\dots,n$, $|A_0\setminus (A_1\cup\dots\cup A_n)|=\kappa$. In particular, $A_0\setminus (A_1\cup\dots\cup A_n)\ne\varnothing$, so we can choose $s\in A_0\setminus (A_1\cup\dots\cup A_n)$. Then $$c_0f_{A_0}(s)+c_1f_{A_1}(s)+\cdots+c_nf_{A_n}(s)=c_0\ne 0\;;$$ this gives us the desired contradiction, showing that $\{f_A:A\in\mathscr{A}\,\}$ is indeed linearly independent.
Thus, to show that $\dim V>\kappa$, it suffices to show that the almost disjoint family $\mathscr{A}$ can be chosen so that $|\mathscr{A}\,|>\kappa$. Clearly $\mathscr{A}$ can be chosen to have cardinality at least $\kappa$, since $S$ can be partitioned into $\kappa$ subsets of cardinality $\kappa$. Let $\mathscr{A}_0$ be such a family. Suppose that $\alpha<\kappa$, and for every $\beta<\alpha$ we've constructed an almost disjoint family $\mathscr{A}_\beta$ in such a way that $\mathscr{A}_\beta\subseteq\mathscr{A}_\gamma$ whenever $\beta<\gamma<\alpha$. Let $\mathscr{A}_\alpha^*=\bigcup_{\beta<\alpha}\mathscr{A}_\beta$; clearly $|\mathscr{A}_\alpha^*|=\kappa$, so let $\mathscr{A}_\alpha^*=\{A_\xi:\xi<\kappa\}$. Suppose that $\eta<\kappa$. For each $\xi<\eta$ we have $|A_\eta\cap A_\xi|<\kappa$, and $\kappa$ is regular, so $$\left|\bigcup_{\xi<\eta}(A_\eta\cap A_\xi)\right|<\kappa\;,$$ and we can choose $$s_\eta\in A_\eta\setminus\bigcup_{\xi<\eta}A_\xi\;.$$ Now let $A=\{s_\eta:\eta<\kappa\}$; clearly $|A_\eta|=\kappa$. Moreover, $A\cap A_\eta\subseteq\{s_\xi:\xi\le\eta\}$ for each $\eta<\kappa$, so $|A\cap A_\eta|<\kappa$ for each $\eta<\kappa$, and $\mathscr{A}_\alpha^*\cup\{A\}$ is almost disjoint. Thus, we may set $\mathscr{A}_\alpha=\mathscr{A}_\alpha^*\cup\{A\}$, and the construction goes through to $\kappa^+$. Finally, let $$\mathscr{A}=\bigcup_{\alpha<\kappa^+}\mathscr{A}_\alpha\;;$$ clearly $|\mathscr{A}|=\kappa^+>\kappa$, and $\mathscr{A}$ is almost disjoint since any two members of it already belong to one of the almost disjoint families $\mathscr{A}_\alpha$ with $\alpha<\kappa^+$.

Vector dimension of a set of functions


How fast should my base runs be?

Question: I am trying to reach my goal of a 4:10 for the 1500m this track season. To anyone who has previously trained in mid-distance, roughly how fast should my base runs be? I can currently run 5 or 6 miles miles comfortably at a pace slightly under 7min/mile, should I be pushing myself harder on non-workout days?
Comment: @RomainSpeciel - It would help if you included your weekly mileage, what you do on your "non base" days, running history and your PR to date. Your base runs may not be a problem that needs solving.
Comment: I've read that you should be able to do an 8 minute mile as a standard for each mile you do. Admittedly I don't have a lot of experience or knowledge in that area though.
Comment: How, if at all, do your 5- to 6-mile runs relate to your target event (1500m)?
Comment: @ChristianConti-Vock Training for mid-distance is much more than simply running the distance of my event. I do base runs (over 5 miles) around 3 times a week to develop a stamina base, and am therefore asking how the speed at which I do these base runs correlates to my race performance
Comment: Yes, longer, "base" runs can help you build stamina for your 1500m races; however, you're essentially asking (if I understand correctly), "How should I train in order to run 1500m in 4:10?"  If that's your question, then: How does training your _stamina_ train your _speed_, if at all?
Answer: In short, no, you should not be pushing yourself hard (at all) on your non-workout days. You should ideally strive for an 80/20 balance, in that 80% of your miles are easy, and 20% are hard (i.e. sessions).
Your easy runs should be done at just that, an easy pace. A pace that you can talk to a running buddy, in full sentences, or recite poems or songs.
The idea is that by taking the easy days really easy, you can then push the sessions hard and maximise them. It's a common issue with runners that they run too fast/hard on their easy days, and so do not go into the sessions in optimal condition.
However, without knowing what your training is like, in terms of key/example sessions with paces and overall mileage, it's hard to say how fast you should be running your base mileage. If you happen to train by heart rate, and know your maximum (which is not 220-age...) - then occupying 70-75% HRMax is a good guide for easy running.
Please feel free to add some of your training, and hopefully we can help to inform you a bit better!

How fast should my base runs be?


Can quaternions be converted into positional data

Question: I have begun a basic incursion into understanding quaternions. I have read the following: https://en.wikipedia.org/wiki/Quaternion and https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation. I understand that quaternions are used to identify the rotation of an object in 3-dimensional space. I have seen quaternions be converted into 3D space via turning the Quaternion into Euler rotations but from my understanding, these are not positional coordinates rather another representation of rotation. I am wondering if it is possible to use quaternions to plot an objects path or if I would need something separate. I am asking in the context of IMU data with 9df (Accelerometer, Magnetometer, Gyroscope). I have applied the Madgwick filter to this data and received quaternion output. However, I do not believe I can use this alone to plot a path. As I do not have a Mathematics background I was hoping to hear opinions from people with greater expertise.
Comment: A quaternion is a scalar plus a 3D vector. When you conjugate a vector by a unit quaternion (versor), the effect is rotation of that vector around the versor's axis by twice its phase angle. You model positions in 3D space with 3D vectors.
Comment: Alas, only those who know what "IMU data with 9df" and "the Madgwick filter" are - likely a very small percentage of respondents here - can truly appreciate your problem. Without an understanding of what the quaternions this filter produces represent, the question of how to correctly convert them to positional data cannot be answered. runway44's comment is accurate, but may not be directly applicable to your case.
Comment: Is there a better stack exchange form for a question like this @PaulSinclair
Comment: I can't say. I only know a few of the forums. If this data and filter are all parts of some technical product, then you need a forum associated with that product, if one exists. Or you could explain the jargon here. Or if you know where the support information is on-line, you can link to it to provide a resouce we could you to find out the necessary information to be helpful.
Answer: You need to use Madgwicks filter and the algorithm described in detail here. Using Rivals theorem, this algorithm lets you calculate the acceleration of any point of the body (typically used for center of mass). Just integrate it twice to get the position (preferably, use Cauchy's formula for repeated integration to reduce the error of numerical integration).  Don't forget to calibrate you IMU!


How to debug time dependent issue

Question: I think one of my cronjobs failed when it ran at 00:00:00 2018-01-01. How can I debug that? Changing the system clock is clearly the wrong way to go, since it would disrupt the whole system and also depend on timing in order to reproduce the error...
Comment: It would help showing the offending cronjob line and/or script.
Answer: Start by,

Log entry and exit from shell script, so that you can ascertain
that the script was started. (You might establish that it was
started late in the minute 00:00:59 and effectively ran twice for
00:01:00 ?)
If your script gets the time to influence flow, then instead of getting the actual time, re-write it so that it takes the time (or date) as a parameter. This way you can test your script at various simulated times by passing them as a parameter.

How to debug time dependent issue


Image to plane not working for me

Question: This feature was working then i tried rendering it and planes were blank. I tried adding another different image as plane and it doesn't show at all just a black plane. The video i am trying to add is in documents>blender projects>folder>videos, no idea whats happening or what I've done.
Comment: It could be an issue with the codec of the specific video you're using. Try saving the video to a JPG or PNG image sequence and use that instead. You can use the free program Handbrake to save out the images or use a different codec.
Comment: Thanks, i tried  a jpeg and it works but all 3 videos mp4s and avi's all didn't work in cycles but works fine in blender render. My project is made in cycles though, weird problem as it's worked before.
Comment: Looking closer at the node setup, you have a noodle going from the alpha output of the image node to the fac on the mix node. mp4 and avi codecs do not support alpha. Try connecting the diffuse node directly to the material output and see if it renders.
Comment: Actually disregard that last comment, I tested that in 2.79 and even without an alpha channel in the video, it doesn't affect it. Although, I'm having no problems
Comment: thanks for trying, i'm trying it on an old laptop and it works fine but need it to work on my new laptop
Answer: First change image source from Movie to Single Image or Image Sequence.

In Texture viewport shading mode, image texture for displaying must be active at Node Editor.
Just click on it and it should be appeared.
Comment: thanks, Not sure how to do this, i'm a bit lost again, still learning. I'm trying to add a video to a plane, i should have made it clear. I have plane selected and am in texture mode and i think plane is active, still same result.
Answer: Solution 1:
You want to be in Material Preview mode:

Not in Solid mode:

Solution 2:
If you want to stay in viewport shading > solid mode you can select the image in object mode, then you select Viewport shading > Color > Texture:

Image to plane not working for me


Accidentally applied polyurethane instead of wood pre-conditioner. Now what?

Question: I am working on staining some new, unfinished maple shelves. Unfortunately, I got careless and applied a layer of oil-based polyurethane instead of the pre-stain wood conditioner. Is there something I can do to salvage this project? Thanks.
Comment: First off know that what's sold variously as wood conditioner, pre-stain conditioner and blotch controller is usually nothing more than some kind of clear finish thinned more heavily.... so the "conditioner" you were planning on using could basically be polyurethane, albeit more dilute. What were you planning on staining the maple with (exact product) and what colour?
Comment: We were going to use Varathane dark oak.
Comment: Apologies Bill but I said *exact product*. Varathane is a brand name, and they make a wide range of wood-colouring products under that banner, including Premium Wood Stain, Premium Fast Dry Wood Stain, Premium Gel Stain, One Step Stain & Polyurethane Water-Based... these are all quite different from each other so it makes a big difference which one you chose.
Answer: If you have the ability to spray on a finish you could use something like PolyShades. I have not had any luck brushing it on, but I am extremely picky. I sprayed it on a maple cabinet that was primed with clear poly, it has held up will over 15 years.


Do Sugar's powers nullify other devil fruits?

Question: It's been awhile since I read the Dressrossa Arc, so it might be in there (but I skimmed it and didn't see this specifically mentioned), but I was wondering: does Sugar turning someone into a toy make that person unable to use their devil fruit? Not to, like, hurt someone (since she basically uses the 3 Laws of Robotics) but in general/for day-to-day things?
Comment: I'm not sure but I think they do. She turned Robin into a toy by touching one of arms that was created with her devil fruit power and afterwards Sugar was free and all arms created by Robin are gone.
Answer: It's hard to say. Hypothetically, a toy could still hold a devil fruit power since Dr. Vegapunk made it possible to give items devil fruit powers. However, the only Devil Fruit holder turned into a toy was Robin. Robin is seen very little as a toy: just right after she becomes one and the following episode (episodes are manga, but she is seen just as much in the anime). If Robin could use her power, her arms would likely be weak toy arms, so she never even tries to use it. This ultimately means we can't yet know the answer for certain and as far as I know, nobody has asked Oda. Both answers are equally likely.
Answer: I may be wrong on this but I don't think we have ever seen her powers used on someone with a devil fruit and as a result we never see any manifestation of devil fruit power nullification. Because of this I would have to say her powers do not nullify devil fruits as there are no mentions of it in the anime manga or wiki.
The link below is to the One Piece wiki where you can read about her abilities.
http://onepiece.wikia.com/wiki/Sugar
Comment: She converted Robin to a toy.
Comment: Oh yeah you're right. I knew there was something I was missing. I forgot.
Answer: As per the series and most of the cases, people can't undo the effects of devil fruits no matter how small or great they are, unless they overcome it using Haki, as seen in Law and Blackbeard's battle when Doc Q turns Law into a woman using some disease with his Sick Sick Fruit.
There's still more to Sugar's power though, such that she can make contracts with people who she turns to toys which also limits the toy's abilities.
There are more users in anime whose devil fruit abilities can affect living creatures, such as

Wapol's Munch Munch fruit, which allows him to combine something he eats with his body or entirely something new as a part of his body, like cannons and guns, as shown in anime, even living creatures to fuse them.
Tsuru (one of the Navy's legendary trio) has Wash Wash fruit, which transforms even living creatures into washed laundry.
Inazuma's (Revolutionary) Snip Snip fruit allows him to transform anything he touches into a paper-like to snip through it easily, its effect is still not shown on living creatures, but it's highly likely that it can affect them as well.
Answer: Being turned into a toy prevents a Devil Fruit user from using their powers. This can be seen in the case of Robin. Sugar is able to transform someone into a toy by touching them. In episode 673, she turns Robin into a toy by touching one of Robin's sprouted arms. These arms still count as part of Robin's body, so Robin turns into a toy, and all of her arms holding back Sugar instantly disappear. This indicates Robin's power was negated by being turned into a toy.
In episode 674, after Robin is turned into a toy, she says,

I've been turned into a toy. [...] There's nothing I can do anymore.

If Robin could still use her power in some capacity, she would still be able to help. What Robin says indicates that she cannot use her power.
In lieu of any evidence to the contrary, we can generalize Robin's predicament to all Devil Fruit users.
We can speculate on why that is the case. A Devil Fruit typically transforms a person into something (a rubber man, a spring man, fire, sand). Sugar's power also transforms a person into something: a toy. If she is able to touch someone, then she has the upper hand, and she is able to subjugate them to her power. But what would happen if a Logia type, for instance, was still able to use their power? They could transform into their element and would no longer be a toy. It doesn't make a lot of sense to allow this from a narrative perspective.


Can an aircraft continue flying and land safely following an engine failure?

Question: Is it possible that an aircraft could continue to fly and then land safely on a single engine if another stopped working?
Answer: The answer to your question strongly depends on what kind of airplane you're talking about (in particular, what set of rules it was certificated under), as well as the phase of flight you are in (takeoff vs. cruise vs. approach/landing) and whether you are in a jet or a (turbine or piston) propeller aircraft.  (I'm going to exclude single-engine airplanes from this discussion, as well.)
Cruise Flight
In general, an engine failure in cruise flight is a manageable emergency unless you are in extremely high terrain in a light twin or some other corner case.  The general procedure is to "drift down" in a slow-ish descent to your single-engine cruise altitude -- if you don't already have a driftdown airspeed worked out, you can use Vyse as a substitute to get a slow driftdown -- and then divert to a nearby suitable airport to get the busted engine looked at, as you'll be flying lower and less fuel-efficiently as a result.
Takeoff
Takeoff is the most troublesome time for an engine failure to happen, bar none: you are at high gross weight and don't have altitude under you to turn into airspeed and landing options.  What you want to do is get to the pattern altitude, fly a pattern, and land in a reasonably quick, but orderly fashion -- you don't need to ultra-hurry things even if you have an engine on fire, but you do want to get back on the ground in a reasonable timeframe to get things looked at.
Light Twins (cabin class, commuter, pre-FAR 25 airliners)
These aircraft, unfortunately, struggle in single-engine situations on the best of days, as the certification requirements for single-engine performance in FAR 23 are minimal at best.  The common adage you will hear about light twins, even, is "the second engine will carry you to the scene of the crash" -- it is possible for a light twin to be type certificated with nil or negative worst case single-engine climb performance in the case of an engine failure at or shortly after takeoff.
Business Jets (certificated under FAR 23)
Corporate or business-type light jet aircraft (Citations, Gulfstreams, LearJets, Beechjets, etal) and their turboprop counterparts (such as KingAirs), while often certificated under Part 23, will generally have superior single-engine performance to light twins, although this is by no means guaranteed.  You'll likely get up into the pattern and be able to make a reasonably normal single-engine landing, barring any aggravating factors at least; this is because even the smallest turbine engines are large enough that the aircraft will have some degree of excess thrust as a twin, leaving it with a thrust reserve in a single engine situation.  These aircraft are also flown by pilots with type ratings and a CPL or ATPL, which means they will be more familiar with the performance of that specific aircraft and any aircraft-specific engine-out procedures needed to eke out maximum single-engine climb rates.
Twin-Engine Airliners (transport class twin turboprops and twin jets certified under FAR 25)
The FAR 25 requirements for engine-out takeoff performance are much more stringent than FAR 23, and practically guarantee that the aircraft is capable of positive climb in a V1 cut (engine failure right after decision speed) at maximum takeoff weight.  In addition, V1 cuts are a classic airline training scenario that every airline flight crew on the planet runs in the sim on a regular basis (I wouldn't be surprised if a V1 cut came up every few sim sessions or so, if not every sim session).
In a practical sense, this means that unless the aircraft is overloaded or is suffering from something beyond a simple engine failure (I'll talk about that later), an airline flight crew will handle engine failure on takeoff in an airliner as a routine event.
3 and 4 engine airliners
A single engine failure on a three or four engine aircraft is by no means critical, especially on three- and four-engined jet transports.  This doesn't mean that 747 crews don't practice V1 cuts any longer, though!
Props vs Jets
Engine failure in a jet, whether it be a T-37 or an A380, is simple: you put appropriate rudder in, ID which engine died (between your instruments and "dead foot, dead engine", you should have enough data to go on), add power as needed on the working engine (say, if you are doing an assumed/FLEX temp takeoff), and kill the dead engine, then run the rest of the checklist at a leisurely pace now that safe flight is more-or-less assured.
Propeller aircraft are a bit more complicated though in that you need to feather the dead engine's propeller to keep it from dragging the airplane down -- older constant-speed prop designs such as those on warbirds and piston-engine airliners had FEATHER buttons for this job, one per engine; newer aircraft with constant-speed props have a gate on either the power or the condition levers that serves in place of the feathering button.  You also have more levers to manipulate when adding power to the working engine(s) and killing the dead engine, and may have more difficulty figuring out which engine died without positive flight control responses (I can only imagine how baffling a center engine failure on a Trislander would be!).
As a result of the critical nature of the feathering process, modern (and even some not-so-modern) transport-class (and some other) propeller aircraft have an autofeather or NTS (Negative Torque Sensing) system that will automatically drive the blades of a propeller towards (or even all the way to) the feathered position if it is armed and senses that the propeller is trying to drive the engine.  However, feathering the propeller on an engine that isn't shut down is also a bad idea as it causes the propeller and engine to overspeed due to the airloads the engine was driving going away.
Of course, if you are in a light twin with fixed-pitch propellers, none of this feathering talk applies.  Be prepared for the unexpected emission of foul language during engine-out procedures, though!
Approach/Landing
An engine failure during the early phases of approach is generally unproblematic -- it's similar to a failure at cruise, just minus the driftdown.  However, an engine failure on short final can be troublesome due to the high workload of an approach, combined with the thrust asymmetry induced during a full-power, single-engine go-around.  Prompt rudder inputs are essential in order to maintain aircraft track and control during such a maneuver, and engine failure checklists are best deferred until stable flight.
Engine failures during the landing roll are rare, by the way, and typically a non-event.
Worse than Engine Failure
There are engine damage scenarios that represent a greater hazard to the aircraft than a simple engine failure, or even a fire in an airliner engine.  These fall into three categories: uncontained turbine engine failures, engine detachments, and propeller failures.
Uncontained Turbine Engine Failure
Turbine engine failures are divided into two types: "contained" failures where the busted parts fly out the tailpipe, and "uncontained" failures where a turbine or compressor disk basically explodes radially, sending parts flying in a 360° radius around the engine; at this point, further damage is a game of aerial roulette, and can range from a few holes in the cowl to near-catastrophic levels of damage that pose a threat to the entire aircraft.
Engine Detachment
Engines, even when pod-mounted, rarely fall off airplanes, and much of the time when they do, they depart quietly, a yanked-back thrust lever and nil engine readings the only signs of their absence visible to the flight crew.  However, a detached engine is somewhat unpredictable in its behavior, and can strike another engine on the same wing or another part of the aircraft, leading to further damage that can compromise aircraft systems or impair the operation of that neighboring engine to the point where the thrust asymmetry becomes uncontrollable.  Nacelle-mounted engines are actually worse in this regard -- a nacelle-mounted engine departing its nacelle leaves behind a big, draggy air scoop that will severely hamper single-engine flying, and on a light twin, this is simply insult atop injury as you have gone from "barely making it to your site of choice" to "we need to pick the nearest open spot NOW because we're trying to fall out of the sky in a hurry"
Propeller failure
Propellers do not fail nearly as often as engines do, but when a propeller fails in flight, the results can be catastrophic; an overspeeding prop can fly apart violently or rip its mated engine apart while producing asymmetric forces that have the potential to overwhelm all flight control, while the inability to feather a failed engine's propeller turns it into a drag brake on that side of the aircraft, crippling any attempt to obtain reasonable single-engine climb performance.
Comment: Do you have an example occurrence where the engine detached without further incidents?
Comment: Regarding propellor failures, [this](https://www.youtube.com/watch?v=zl5TIR1_ciQ&t=349) video of a propellor departing the engine during a flat spin at an air display is very impressive. It shows that exceeding the lateral stresses on driveshafts can have catastrophic consequences, but that even in a single-engine aircraft at an unusual attitude with low airspeed and altitude, a (very) skilled pilot can recover from an engine failure.
Comment: There have been several, but [JAL Cargo flight 46E](http://www.ntsb.gov/investigations/AccidentReports/Reports/AAR9306.pdf) is the most-investigated of them.
Answer: Yes. All two-engine (and three- and four-engine) aircraft are certified to safely land if one engine fails at any point on the route, including even the most critical parts of take-off.
However, lower engine performance will force a reduced service ceiling. Basically, the plane will have to fly lower, and less efficiently, so often it wouldn't be able to get to its intended destination and instead would have to abort to a nearby airport.
Comment: Not all, only transport category, which means 12 or more passengers (FAR25 in FAA regulations; there is corresponding regulation in other parts of the world).
Comment: This is a bit rosier than it should be -- light twins have an abysmal record WRT engine failures, unfortunately.
Comment: @UnrecognizedFallingObject sorry, I haven't seen those figures.
Answer: Short answer is yes, and the immediate challenge is correcting for the unbalanced thrust from the remaining engine. It is certainly a disconcerting feeling flying on one engine when you are used to 2. Kind of like a high wire act without a net.
Sharing a bit of humor here. I flew the A7E a single seat, single engine, light attack jet for the US Navy. We never liked declaring emergencies, and would often use euphemistic language in our communications over such small affairs as engine troubles. I heard this story a while back and thought it apropos to the question.

A military pilot called for a priority landing because his single-engine jet fighter was running "a bit peaked." Air Traffic Control told the fighter pilot that he was number two, behind a B-52 that had one engine shut down. "Ah," the fighter pilot remarked, "The dreaded seven-engine approach."


Breeze.js: error when assigning compound foreign key with GUID and integer values

Question: I'm encountering an error with Breeze.js version 1.4.12. I have an entity, OrderLine, that has a compound primary key consisting of one GUID field (OrderId) and one integer field (LineNumber). This entity has a self-referencing foreign key, consisting of two fields: DependsOnOrderId and DependsOnLineNumber.
When creating a new instance of the OrderLine entity, and passing an object of initial values, I can assign values to the foreign key fields and everything works as expected. However, my issues lies when trying to assign values after entity creation. Assigning a value to the DependsOnOrderId property works correctly. When I assign a value to the DependsOnLineNumber property, I receive an error message: Type Error: undefined is not a function. This error occurs at line breeze.debug.js:4275 and a debugging session shows that it is trying to run a toLowerCase() method on the integer field value of the compound key.
The two lines that appear to be causing the issue are referenced below:
if (kp.dataType === DataType.Guid) {
    keyValues[i] && keyValues[i].toLowerCase();

I was able to resolve this issue satisfactorily by adjusting the lines to read:
if (kp.dataType === DataType.Guid) {
    keyValues[i] = keyValues[i] && ( ( keyValues[i].toLowerCase && keyValues[i].toLowerCase() ) || keyValues[i] );

This was only put together as a proof of concept to resolve the issue and has not been tested in all cases, but it ensures that when comparing a non-GUID value that is part of a GUID/non-GUID composite key, a toLowerCase() call is not attempted against a value that does not have that method.
Has anyone else encountered this error or have suggestions for fixing? I was thinking of putting together a pull request on GitHub, but wanted to check to see if there were other instances of this issue, or possible side effects with my suggested fix.
Thanks!
Answer: Your fix looks good, and I've added it to email@example.com
Thanks for your help on this.  And sorry it took so long.


Where does the budget surplus of a conference go?

Question: When a conference gathers more money (e.g., from sponsorships, registration fees, or public subsidies) than what was spent for organizing the conference, where does the conference budget surplus go?
Comment: In a regional chapter of a well known technical society, any surplus goes to our scholarship fund and is used for that purpose.
Comment: Depending on who runs the conference, it could go into lining the organisers' pockets...
Answer: Here are some models I am aware of; combinations of these also exist:

There is a sponsor (e.g. government, local university or some academic organization) that covers part of the expenses but their rules for sponsoring are such that you cannot make surplus. You will need to return some of the sponsor money back to them so that the bottom line is non-positive.
There is a contingency fund for the conference series. Surplus from one year is used to cover deficit in another year, or to support other conference-related activities in the future years (say, sponsoring student travel).
There is a scientific organization (e.g. ACM) that runs the conference series and takes any surplus (and promises to help if something goes wrong).
The local university that organizes the event will keep any surplus (and they will also be responsible for helping if something goes wrong).
The local organizers will figure out some way to avoid surplus. More free coffee, additional student travel grants, last-minute conference fee discounts, additional awards, free city tour, honorariums for keynote speakers.
Some part of the income can be flexible. For example, the registration fee for local participants may be fixed only after the conference, once all other income and expenses are known, so that the bottom line will be close to zero if possible.
Comment: Indeed, distributing additional student (/young colleague) travel reimbursements is, in my experience, a very common use of small surplusses.
Comment: A variant on the contingency fund: sometimes the surplus is simply given to the organizers of the next year.
Comment: I can confirm the tours, or actually a a few places on a boat excursion with short demonstrations of sponsor's instruments.
Answer: In many (most?) fields, conferences have sponsors. In my field (CS) a typical sponsor might be the ACM (Association for Computing Machinery) or one of its parts. Any surplus would go back to the sponsor.
But the sponsor is also responsible for any shortfalls that occur.
I've never been a conference chair (only lower level positions) and never the Finance Chair, but I suspect that most conferences are expected to at least break even and maybe return a bit to the sponsoring organization. I don't have examples of "cash cow" academic conferences, but suspect that they exist. There have been some monster conferences, though they are more like expositions.
My recollection of ACM conferences is that the conference committee always has a member who represents the organization directly, looking out for lots of things and giving advice to the chair(s) if they aren't already experienced.
I'll also note that the committee is (ACM, again) composed of volunteers, though some support clerical staff might be paid. In any case, it isn't the committee that benefits financially.
Comment: In my experience, when they "sponsor" a conference, the ACM insists on a budget with a large planned surplus, supposedly to reduce the risk of a deficit, but really because taking money from conferences in exchange for the ACM logo is part of their business model.
Comment: @MarcGlisse Displaying a logo that symbolizes paywalls doesn't make sense to me. Paying for it seems even more absurd.
Comment: @MarcGlisse, you seem to be suggesting that ACM is, in some way, predatory.
Comment: In order to finance their more charitable activities, they need money. Some ways to get money are charging for publications, taking a "tax" on conferences, and membership fees (which they increase by forcing conferences to be way more expensive for non-members, so most participants become members). The money does not go to shareholders, but it isn't surprising if their behavior may look kind of predatory in some contexts. (the main conference in my community left the ACM a few years ago)


how to remove a character in pdf using pdflib

Question: I want to remove a hidden space in PDF using PDF lib.
When I extract a word "Gregor" in PDF it comes out as "Gre gor", but I really want it like "Gregor".
What could be reasons for this? Or, how can I avoid those "hidden spaces"?
Comment: Cool to hear. By the way, do you also have a question?
Comment: @phresnel - That's not even funny.  You can't interpret from the title and content that the question is, "how"?  The question doesn't have much content granted, but it's damned obvious what it is.  It's easy to dismiss but English might not be this guy's first language and to be honest I think there's enough to at least probe for further info here.
Comment: The title perfectly and succinctly sums up what the question is.  The content then goes on to expand that it's a space character at an exact position using x/y coordinates.  Taking the piss without giving anything constructive and belittling someone for asking a valid question is just stupid.
Comment: @Kieren Johnstone: What I wanted to say with that: The title is ought to be a tiny summary, and not to be part of the content. Imagine you are watching a movie without knowing its title, and then fail to understand the movie because of the missing title. In some other forums, I occasionally fail to understand what's going on, before realising that participaters are misusing post-titles for content-placement.
Comment: Anyways, @kalai: We need some more info. Is there anything you have tried already so that we don't make the same mistake? Other hints? What is your operational target? Because we might also suggest less pebbly roads. (As for asking good questions: [How to ask questions the smart way](http://www.catb.org/~esr/faqs/smart-questions.html). The text is a bit harsh here and there, but if you read and understand, you'll ask better questions in the future, and sometimes omit a question completely because you've found out yourself suddenly.
Comment: @Kieren Johnstone: Belittling? I think some stylistic advices, even if not wrapped up in flowers, will improve his/her asking of questions in the future. Comments on SO are, apart from other things, also for stylistic criticism, not? @kalai: Nothing personal, I'll edit your post a bit.
Comment: @kalai: Could you post some code?
Answer: Many years ago, I worked at Adobe on Acrobat, version 1.0 and later.  At the time, I wrote the tools to do searching, highlighting, and copy paste.  I'll try to explain why you're probably seeing what you're seeing and why you're probably also SOL (unless you want to hack PDF lib).
In PDF, page contents are represented by a program in an RPN language that is similar to PostScript.  It differs in that it is not Turing complete.  It lacks loops, reasonable function definition, recursion, etc - thus sidestepping that pesky halting problem. A typical page content program looks something like this:
255 0 0 sc 72 72 m 144 72 l 144 144 l 72 144 l f

which means, set the color to red (255 0 0), move to (72, 72), connect a line to (144, 72), etc and finally fill the path.  This creates a red square, one inch on a side with the lower left corner located at 1 inch up and to the right of the bottom of the page.
Now, when you are working with text, it's a little more complicated.  There are four operators to draw text, Tj, ', " and TJ.  They mostly differ in how they affect placement of text either before or after the operator is applied.  Nonetheless, in a sane world, you would expect your document to have something like this in the content stream:
BT 72 288 Td (Gregor) Tj ET

which means begin text, move the text position to (72, 288), place the text "Gregor", and end text.
Likely, this is not the case.  Instead, your document probably looks more like this:
BT 72 288 Td (Gre) Tj --stuff-- 88 288 Td (gor) Tj ET

where --stuff-- is zero or more other PDF operators.  PDF is a page description language, not a text file format.  Therefore, PDF doesn't dictate how you should lay out the content stream for creating a page.  In fact, there are an infinite number of ways to generate equivalent/identical pages.
So, the author of any chunk of code that purports to extract text from a PDF document, should take some time to very clearly answer the question, "what is a word?"  If that isn't answered well first, then you're never going to have any kind of reasonable text extraction.  While I don't know specifically, I highly suspect that pdflib's definition of a word is "any white space delimited substring from a text placement operator."  This definition will get you maybe 80% of the way there.  Maybe more, but not much.  It is a nearly trivial definition to implement, but it will fail if words are not laid down with single text placement operators.  Heck, there are even PDF pages where the text isn't laid down anywhere close to reading order.  For example, troff (at least used to) lay out all the plain text first, then the italic text, then the bold text.
Then you have to think about the problem in a different way.  What if you define a word to be an ordered sequence of glyphs that are close to each other in physical space and similar in size?  Then you find that definition would completely encompass the previous definition's success cases and also correctly include a huge number of the previous failures that are inherent in the previous "what is a word" definition.  You also find that the actual implementation of that definition in code is significantly more difficult.  While the first definition can be done in about an hour's time, this definition is more like weeks or months of time to really get right, because you have to answer the questions "what is close?" and "what is similar in size?"  And while you're at it, you need to consider other things like text encoding, ligatures, discretionary hyphens, text laid along a curve (I can't tell you how happy I was when Acrobat was capable of finding words in maps).
So the conclusion you should draw from this is that extracting text from PDF is non-trivial and you should expect a great number of failures from trivially written code.
Comment: All my +1s belong to you, sir! Very interesting.
Answer: Read pdf line by line and replace "Gre gor" with "Gregor".
Answer: I highly recommend you look at PdfTextStream.  They have done the hard work described in plinth's post.
http://www.snowtide.com/
They aim to have the most natural (what a human reader would expect a word to be) definition of a word.


Is there a way to link mex file against code compiled without -fPIC

Question: I am trying to wrap some C code to access it with Matlab/Octave. The problem is that the code has not been compiled with -fPIC, which seems to be necessary to wrap it with mex files. I don't have access to all of the source code so recompiling with -fPIC is no option. Is there any way around this problem?
Answer: The -fPIC switch generates  position-independent code suitable for use in a shared library. If you have code generated without -fPIC, it isn't position-independent, and can't be used in a shared library. Since MEX-files are shared libraries, you won't be able to use non-PIC code in them.
Answer: Unfortunately I don't think there is. You may have to build a standalone executable and use the "system" command to run that.


Are quotient varieties local complete intersections?

Question: Let $G$ be a reductive group acting on the smooth affine variety $X$ such that the stabilizers are finite. Is it true that the quotient $X/G$ is a local complete intersection (LCI)? In particular, is the quotient of a smooth affine variety to the algebraic action of a finite group LCI? If no, is there any condition on the action that guarantees such a property?
Comment: Did you consider $\mathbb{C}^m$ modulo $\pm 1$? My recollection (might be wrong) is that this is not lci for $m = 3,4...$.
Comment: The quotient described by Geordie Williamson is the determinantal variety $S_1$ of symmetric $m\times m$ matrices of rank $\leq 1$, with the quotient  map given by $x\mapsto xx^{\rm T}$.
Comment: In other words, it is the (affine) cone over $\Bbb{P}^{m-1}$ embedded by the Veronese map. For $m\geq 3$ it is not Gorenstein, even less lci.
Comment: I think that $\mathbb{C}^m$ mod $\pm 1$ is Gorenstein when $m$ is even; more generally, the quotient of $\mathbb{C}^m$ by a subgroup of $SL(m,\mathbb{C})$ is Gorenstein, see Thm. 1 here: https://ir.library.osaka-u.ac.jp/repo/ouka/all/12434/ojm11_01_01.pdf . But I agree that for all $m\geq 3$ it is not a complete intersection; see Theorem A here https://www.ams.org/journals/bull/1982-06-02/S0273-0979-1982-14989-8/S0273-0979-1982-14989-8.pdf .
Answer: As discussed in the comments, $X/G$ need not in general even be Gorenstein, let alone a local complete intersection.
Actually, if the ground field has positive characteristic, $X/G$ may not even be Cohen-Macaulay (let alone Gorenstein, let alone LCI). For example, if $X = \mathbb{A}_k^4$, where $k = \overline{\mathbb{F}}_2$, and $G$ is $\mathbb{Z}/4$, with the action given by cyclically permuting the coordinate axes, then $X/G$ is not Cohen-Macaulay.
If the stabilizers all have order prime to the characteristic, then $X/G$ is Cohen-Macaulay, though, by the Hochster-Eagon theorem (Proposition 13 here). Without this condition, even Cohen-Macaulayness is a very delicate question, so from this point on I will assume this condition (orders of all stabilizers are coprime to the ground field characteristic) is met. For example, perhaps you are working over a characteristic zero field.
In this situation, an overly strong sufficient condition is that the stabilizers are generated by elements acting as pseudoreflections (i.e. elements $g$ in a stabilizer $G_x$, $x\in X$ whose fixed-point sets have codimension $1$ in the neighborhood of $x$). By the Chevalley-Shephard-Todd theorem, this forces $X/G$ to be smooth.
I am not aware of a more precise sufficient condition. However, it seems to me a necessary condition is that the stabilizers be generated by bireflections, i.e. elements $g$ in a stabilizer $G_x$, $x\in X$ whose fixed point sets have codimension $2$ in a neighborhood of $x$. See this paper by Kac and Watanabe, which proves this in the situation of a linear action by a finite group on affine space, but it seems to me the argument works in general.
(Stabilizers-generated-by-bireflections is not sufficient. For examples of finite linear groups generated by bireflections whose action on affine 3-space over $\mathbb{C}$ has a quotient that is not a complete intersection, see here.)


What is the correct connections for a Murray MP215AFC breaker for a Split A/C unit

Question: I seem to be running into a never to be found answer on the wiring for this 240 2 pole combination AFC breaker.
I have a Split unit wired L1 & L2 with a ground back to the sub panel not a neutral.  The breaker requires a Neutral panel connection for the coiled up white wire. It also requires the L1 & L2 to be hooked up to the breaker. I'm all good with this but, it wants the neutral LOAD from the A/C unit back into the breaker's Load Neutral which i don't have.
I am not using a neutral but i am using a ground return that is tight to the ground bus bar of the panel.  I can not see plugging in the ground return to the Load Neutral connection of the breaker. That makes no sense to me.
Murray's information seem to point to leaving the Load neutral connection empty and keep the A/C ground on the panel ground. No one has been able to clarify this. I know the AFCI rules may not apply to 240 V circuits but I want to protect this anyway. I found a similar GE breaker which has NO neutral load return on the breaker but i just want to hear it from an expert.
Answer: Use whatever terminals you need.  For instance if you were using this breaker on a 120V circuit, hook up neutral and one hot*, and leave the other hot empty. If using on a 240V only circuit, yes - simply hook up the hots and leave neutral empty.  0 current will flow, and the device will correctly compute differential currents (for its GFCI functionality).
There's one asterisk. The AFCI needs neutral to power itself.  So you need to hook up the neutral pigtail.  We figured this out when helping a Philippine resident set up GFCI protection for some bathroom circuits; they use North American style equipment but with neutral omitted. In that case we had to add a small transformer to synthesize a 120V center-point (quasi-neutral) to power the AFCIs.  We couldn't use ground because neutral is not ground.
It is good that you realize not to misuse ground to fill the empty terminal in the breaker.  If you had connected ground to both the ground bar and LOAD neutral, it would have tripped. If you had connected ground to ONLY the breaker, fault current would be misrouted through the AFCI causing too high an impedance for prompt breaker trip, and the GFCI section of this AFCI would see that fault current as normal current, breaking GFCI. So I'm glad you had the horse sense not to do that.
For reference, neutral is not ground, they have completely different jobs, and entangling/confusing them breaks their safety jobs. The confusion often arises because people see the neutral-ground equipotential bond in the main panel, and this bond is often done informally e.g. with grounds and neutrals going to the same bar. You'll never see that in a panel I do; I prefer bonds I can put a clamp meter around.

* wait what?  What?  Use this breaker on a 120V circuit!??  Yes, you can use a 240V breaker to power one or two independent 120V circuits.  In fact, when people have a need for a 30A/120V circuit, I recommend they use a 30A/2-pole breaker, because those have many other applications, and a 30A/1-pole has almost no practical use.
Answer: You are correct
For Siemens/Murray (as well as Square D and Eaton) AFCIs, you wire them the same way you would a GFCI breaker, as internally they have significant GFCI heritage, and in fact can and will trip on a gross ground fault.
So, for a 240V-only load like your A/C, wire the neutral pigtail to the neutral bar, the hots to the hot lugs, the ground to the ground bar, and leave the load neutral lug unconnected.


Getting rid of icloud on old iphone

Question: Bought an iphone 6.  Set my old phone iphone 5 back to factory settings and gave to a young friend.  She keeps saying icloud is stopping her from using it. Took it back and did another factory reset via iTunes.  She went into mobile shop with it but she now says I need to give her my apple or icloud password or, go to 'find my phone' select 'all devices' to open list of devices linked to my account on the old phone. Not mobile savvy, too old to learn new tricks.
Answer:
Go to Settings on iCloud.com, then look at the My Devices section.
In the list of devices, click the one you want to remove.
Click the Delete button (x) next to the device. If you don't see the Delete button, click Remove Device (below the device serial number or IMEI number).

For full instructions please see here:
https://help.apple.com/icloud/#mm25565a6496
Comment: You are very welcome. If this answer took care of your issue can you mark it answered?
Comment: I told you I was old - how to I mark it answered?
Comment: To mark an answer as accepted, click on the check mark beside the answer to toggle it from greyed out to filled in.

http://apple.stackexchange.com/help/someone-answers

Getting rid of icloud on old iphone


Add value to known mean and Standard deviation

Question: I have a distribution that will continuously have numbers added to it as they are measured.
I want to keep only knowledge of the mean, the standard deviation, and the number of values so far in the distribution.
How would I go about adding a new value to the distribution and correctly recalculating the standard deviation? (I can do the mean).
Thanks!
Answer: Let's write the mean when we have $N$ values as $\bar x_N$. Then:
$$
\bar x_{N+1}=\frac{1}{N+1}\sum_{i=1}^{N+1}x_i=\frac{N}{N+1}\frac{1}{N}\sum_{i=1}^{N}x_i+\frac{1}{N+1}x_{N+1}=
$$
$$
=\frac{N}{N+1}\bar x_N+\frac{1}{N+1}x_{N+1}
$$
You already had it, but I didn't remember it and it is necessary for the next one. Notating the standard deviation when we have $N$ values as $\sigma_N$:
$$
\sigma^2_{N+1}=\frac{1}{N+1}\sum_{i=1}^{N+1}(x_i-\bar x_{N+1})^2=\frac{1}{N+1}\sum_{i=1}^{N+1}(x_i^2-\bar x_{N+1}^2)
$$
$$
=\frac{N}{N+1}\frac{1}{N}\sum_{i=1}^{N}(x_i^2-\bar x_{N}^2)+\frac{1}{N+1}\sum_{i=1}^{N}(\bar x_{N}^2-\bar x_{N+1}^2)+\frac{1}{N+1}(x^2_{N+1}-\bar x^2_{N+1})
$$
$$
=\frac{N}{N+1}\sigma^2_N+\frac{N}{N+1}(\bar x_{N}^2-\bar x_{N+1}^2)+\frac{1}{N+1}(x^2_{N+1}-\bar x^2_{N+1})
$$
I think that it should be enought.


Is there a phonetic difference between the final vowel sounds of "butter" and "action" in Australian English?

Question: The Macquarie Dictionary lists the following pronunciations: butter /ˈbʌtə/, apart /əˈpaːt/ & action /ˈækʃən/. Wiktionary lists them as butter /ˈbʌ.tə/ (RP), apart /əˈpɑː(ɹ)t/ (RP) & action /ˈæk.ʃən/. However, to me they sound like butter /ˈbʌtʌ/, apart /ʌˈpaːt/ or /əˈpaːt/ & action /ˈækʃən/. If I try to pronounce "butter" as /ˈbʌtə/ it sounds weird to me although "action" sounds fine either way. To me the /ə/ sound in "action" is the true schwa sound but "butter" has the same vowel sound twice. Also, the difference between the two vowels in "apart" just sound like a difference in length to me: /ʌˈpʌːt/. (I just noticed that http://en.wikipedia.org/wiki/International_Phonetic_Alphabet_chart_for_English_dialects lists [äː] for "palm" and "father" and [ä] for "strut", "run", "won" and "flood" for AuE, so using that my "apart" would become either /äˈpäːt/ or /əˈpäːt/.) Are there any studies showing a split in what is normally considered a single phoneme, or am I just weird :-) ?
Answer: I'm majoring in linguistics and last semester I took a class on the English sound system. What we learned is that unstressed vowels reduce to a schwa in English. We mostly focused on General American since my school is in the USA. The rule may be different in your particular dialect. There were some phonetic transcriptions in that class that I had to disagree with since my dialect (Western NY State) was a little different. One example is that every textbook and professor I've known transcribes the "-ing" ending with a short "i" like the one in "it" in many dialects. Every time I say a gerund or present participle all I hear is a long "i" like in Bastille. So, the general rule states that the unstressed vowels in "butter" and "action" will be schwas. Your individual way of speaking might be an exception.
     Remember also that as you carefully pronounce a word to yourself you will eliminate schwa sounds because you are trying to hear each vowel carefully. Try to record yourself in natural conversation saying these words. That might reveal to you that you actually do say /ˈbʌtə/.
Comment: I know what you mean about the transcriptions for *-ing* words seeming odd. The final [ŋ] nasal changes the vowel that comes before it a bit, so that the vowel in *sing* is not exactly like the one in *sit* — nor in *seat* for that matter.  There are no words in English that seem to have a close/high vowel like [iː] or [uː] and then the [ŋ] at the end; nothing like *beeng* or *boong*, for example. So it kinda seems like more of a spelling convention.  And yet if you compare *being* with *bing* and *big*, you can start to see why they use [ɪŋ] not [iːŋ].


Chain length when upgrading chain ring

Question: I currently run a 1x11 with a 30t chain ring. I'm upgrading to a 32t chain ring and a new chain. The cassette will be the same. Would I be correct in assuming I need to be +2 links on my new chain?
Comment: Roughly.  The "proper" way to answer this is to size a new chain to the combo.
Answer: No, you need +1 link on your new chain because the chain only contacts about half the chain ring so you go from 15 links around it to 16.  You need to add links 2 at a time because you need one inner and one outer.  You can either use the same length chain you have, which will bring the derailleur forward to give up 1 link or add 2 links and ask the derailleur to move aft to take up 1 link.  It depends which end of the derailleur travel you are closer to the end of.  If you care, the 2 links weigh about 4 grams.  See this answer also.
Comment: Most folks seem to prefer the use of a quick link to join their chains which require the chain to be cut resulting in inner links on each end of the trimmed chain. Even 11s Shimano chains are provided with their version of a quick link although it is common to find 8-10s Shimano chains joined by a 3rd party's quick link as opposed to the Shimano preferred reinforced connecting pin.  Use of a connecting pin requires the chain cut to result in one inner and one outer link.   Since a new chain is going on, it may be best and less speculative to size it by the big-big wrap +2 links method.

Chain length when upgrading chain ring