Why are period integrals naïve periods?

Question: Apologies for the long question.
I recall the definition of a (naïve) period according to Kontsevitch and Zagier [KS]:

A (naïve) period is a complex number whose real and imaginary parts are absolutely convergent integrals of rational functions with rational coefficients on domains of $\mathbb R^d$ bounded by polynomial inequalities with rational coefficients.

For example,
$$\pi = \iint_{x^2+y^2 \leq 1} dx dy$$
is a period, whereas $e$ is conjecturally not a period. As [KS] point out, the following definition is equivalent:

A period is a complex number which is an absolutely convergent integral of an algebraic function defined over $\mathbb Q$, on a domains of $\mathbb R^d$ bounded by polynomial inequalities with real algebraic coefficients.

To illustrate, remark that for $\lambda>1 \in \mathbb Q$,
$$2\int_0^1 \frac{dx}{\sqrt{x(x-1)(x-\lambda)}}$$
is a period according to the second definition, but not obviously to the first one. But it can be rewritten as
$$\iint_{0 \leq x \leq 1, y^2 \leq x(x-1)(x-\lambda)} dx dy,$$
and so it is a period also according to the first definition.
Kontsevitch and Zagier point out that the periods of algebraic varieties in the classical sense are naïve periods. Let $X/\mathbb Q$ be a smooth projective variety over $\mathbb Q$ of dimension $d$, and $\omega \in H^0(X, \Omega^d_{X/\mathbb Q})$ a global algebraic differential form of top degree on $X$. Being of top degree, the form $\omega$ is automatically closed, and gives rise to a de Rham cohomology class $[\omega] \in H^d_{dR}(X/\mathbb C)$ in the middle cohomology of the variety $X(\mathbb C)$, which has real dimension $2d$. Now let $D$ be a divisor on $X$ with normal crossings, and let $[\sigma] \in H_d(X(\mathbb C), D(\mathbb C), \mathbb Q)$ be a homology class relative to $D$, represented by a $d$-chain whose boundary lies on $D$. Then the integral
$$\int_\sigma \omega|_{\sigma}$$
depends only on the relative homology class of $\sigma$ and on the cohomology class of $\omega$.

Claim: the integral $\int_\sigma \omega|_{\sigma}$ is a period.

Kontsevitch and Zagier seem to treat this as an obvious fact. It seems to me like a fairly difficult theorem. Am I overlooking a simple proof?
To illustrate, let $X$ is the elliptic curve $y^2z=x(x-z)(x-\lambda z)$,  $\omega = dx/y$ is the invariant differential on $X$, and $D$ is the empty divisor,  then the periods of $\omega$ in this sense are precisely the linear combinations of the classical period integrals
$$2\int_0^1 \frac{dx}{\sqrt{x(x-1)(x-\lambda)}}, 2\int_\lambda^\infty \frac{dx}{\sqrt{x(x-1)(x-\lambda)}},$$
which shows that the statement is true as both of these integrals are naïve periods. In order to get these integral formulas, we treat $X$ as a degree $2$ ramified covering of $\mathbb P^1$ via $(x,y) \mapsto x$; then $y$ becomes a multi-valued function on $\mathbb A^1$ with branch points at $\lambda = 0,1,\lambda, \infty$. The first homology of $X(\mathbb C)$ is generated by two cycles whose image in $\mathbb P^1(\mathbb C)$ circle the branch cuts $[0,1]$ and $[\lambda, \infty] \subseteq \mathbb P^1(\mathbb R)$ clockwise.  Thus it suffices to see that the integrals of $\omega$ along these cycles are periods. Consider a $1$-cycle $\sigma$ which circles the branch cut $[0,1]$ clockwise on the branch of $y$ which is positive for real $x$ large enough. This cycle is homologous to the cycle which goes from $0$ to $1$ along the positive branch of $y$, then goes back to $1$ along the negative branch. Thus
$$\int_\sigma \omega = \int_0^1 \frac{dx}{\sqrt{x(x-1)(x-\lambda)}} - \int_0^1 \frac{dx}{-\sqrt{x(x-1)(x-\lambda)}} = 2 \int_0^1 \frac{dx}{\sqrt{x(x-1)(x-\lambda)}}.$$
Very good. But what about a variety of dimension $d>1$? I am happy with supposing that the divisor $D$ is empty, so that $[\sigma]$ is the homology class of a $d$-cycle. Here is how I thought one might prove that the integral $\int_\sigma \omega$ is a period. Let $U$ be an affine open subvariety of $X$ such that $U(\mathbb C)$ contains the image of the $d$-cycle $\sigma$. By the Noether normalization lemma, there is a finite map $U \to \mathbb A^d$, and an open $V\subseteq \mathbb A^d$ such that the restriction $U' \to V$ is finite étale of some degree $n$. Let us suppose still that $U'(\mathbb C)$ contains the image of $\sigma$.  Locally in the complex topology of $V(\mathbb C)$, the morphism $U' \to V$ has $n$ sections along which we can pull back the differential $\omega$, to get a multivalued differential $\omega$ on $V$. Let  $\sigma'$ denote the $d$-cycle on $V(\mathbb C)$ obtained by composing $\sigma$ with $U'(\mathbb C) \to V(\mathbb C)$; the integral
$$\int_{\sigma'}\omega$$
has $n$ possible values, depending on the branch of $\omega$ which is chosen (and then analytically continued along $\sigma'$).
It should therefore be proven that the integrals $\int_{\sigma'} \omega$ are periods. The problem is that the cycle $\sigma$ is only differentiable. For instance, in the example above, if we re-parametrize the integral
$$\int_0^1 \frac{dx}{\sqrt{x(x-1)(x-\lambda)}}$$
by a diffeomorphism $t \mapsto x(t)$ of the interval, preserving the boundary, then we get
$$\int_0^1 \frac{x'(t) dt }{\sqrt{x(t)(x(t)-1)(x(t)-\lambda)}}$$
which is not recognizable as a period anymore. Hence, it appears crucial that the homology class of a path $\sigma$ circling the branch cut $[0,1]$ can be represented also by a path which is piecewise-linear, namely the path which goes from $0$ to $1$ in constant time on the top sheet and goes back to $0$ in constant time on the bottom sheet.
It appears to me that the statement that $\int_{\sigma'} \omega$ is a period depends on the fact that any $d$-cycle $\sigma$ on $V(\mathbb C) \subseteq \mathbb A^d(\mathbb C)$ is homologous to one which is piecewise-linear, or even piecewise-polynomial, with algebraic coefficients. It seems to me that this is true, although it is probably a fairly difficult theorem of algebraic topology.
Is my way of approaching this problem correct, or am I overlooking something much simpler?
Thank you for reading, and for your ideas.
Answer: I confess I never looked into the details, but the equivalence between naïve periods and periods seen as integrals in algebraic varieties is supposed to be worked out by Benjamin Friedrich in his thesis (http://arxiv.org/abs/math/0506113).
There is also a very nice book being written by Huber and Müller-Stach where you can find this and much more stuff about periods (http://home.mathematik.uni-freiburg.de/arithgeom/preprints/buch/buch-v1.pdf).
Comment: While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.  Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/580877)
Comment: You are right. I can't give a description since I never worked out the details myself, as I told above. I tried to post this "answer" simply as a comment but I don't have enough reputation.

Why are period integrals naïve periods?


Preventing duplicate organisations being created

Question: I wonder if anyone can help me with what I'm missing re duplicate contacts.
We have a profile form which also creates a wordpress account - it asks only for first & last name, email, username and password.
Once registered and logged in, we have a separate profile form that asks users for more information, including their current employer. We ask only the employer name, and for no other information about that organisation.
If two separate users enter exactly the same current employer name, two organisation records are created.
Looking at the profile settings I'm actually surprised this is happening, because the de-dupe option that we have set is:

The unsupervised dedupe rule for organisations is:

We also have the extension 'The the' installed as it's common in our sector for people to register their company with and without a 'the' at the start.
I'm guessing the profile settings don't influence any related contacts that may be created, which is why people are being able to create duplicate employer/organisation records... But any thoughts on why the unsupervised de-dupe rule is not working in the way I would expect?
Especially when, if we run the de-dupe manually, the unsupervised rule DOES spot the duplicates!

I'm sure this is something basic that I'm getting wrong, but I just can't fathom it. Thanks!
Answer: You need to set as Organisation name instead sort name.
Comment: Hi,, that's how we started out (we changed it to Sort Name after installing The The) but I'll give it another go and report back :)
Answer: You may want to check out https://civicrm.org/extensions/public-autocomplete-of-organisation-names but of course this means the list of Orgs that you allow to show become 'public' in a sense, and hence may have security concerns
Comment: Thanks Pete - I should've said we also already have that extension installed. It's great, but there are still some duplicates slipping through


My "Ficus religiosa" sapling stopped growing. How to make it grow again?

Question: I received this sapling more than 14 months back (April 2019). I had been growing this indoors in the same pot I received it until recently when I switched to a bigger pot in the picture below.

I was able to see the sapling turn new leaves every week until it stopped recently. I was keeping this by the side of the window and I noticed that the tip turned brown (likely due to the recent increase in temperature in the recent days) after which it stopped turning new leaves. Any suggestions on how to make it grow? I am moving this to a new location with less direct sunlight. Does cutting the the top/tip help it to grow?
Comment: Good question and illustrations; if could include overall height, current watering amount & frequency, current nutrient amount & frequency, average recent day temperature, average recent night temperature, size of container, and if some coarse gravel in the bottom and a hole in the bottom for good aereation & drainage, could also be helpful. We encourage you to take the [Tour], and to browse through the [Help], to learn more about how the site works! Thank you! Welcome to the site!
Answer: The plant probably needs time to adjust to its new larger container, before it will thrive and grow new leaves again. Maybe the roots were damaged during the transplantation, or it is cooping with the heat. Try to keep it in the same conditions as the past (successful) 14 months, when it was doing well. Same watering regime and light intensity.
These (and related) Figs form new leaves in the pointy tip, and when the new leaves come and unfold the tip gets brown and dry and falls off. I am not sure if this is the case with your brown tip, now. I would leave the tip as it is, and wait for the plant to decide when it want to grow again. If the tip is damaged and will not form new leaves, the plant will get rid of it by itself and will find a new place to grow (between leaf and stem).
I have a rubber fig myself, which has very much the same tip and growth strategy. I have noticed that the intervals between new leaf growth may vary.
Comment: Thanks for the suggestion, benn. I was happy to see the plant growing after i transplanted to the new container and new location near the window (not that far from it previously location). Since it stopped suddenly, it made me think that it was due to excessive heat. Hopefully, this is just a phase in the process and it will start growing again.


What name is used in the literature for an interpreter or compiler which compiles and executes all function calls which have constant literal inputs?

Question: In the following discussion, we use the term old programming language to refer to programming languages which had their first release prior to the year 1990.
In old programming languages, there was a strong distinction between:

run-time functions.
compile-time macros.

In a running example, suppose that a computer programmer wrote code to emulate a Word Processor such as Libre Office Impress.
Before a computer programme was compiled, a computer programmer typed-in code for compile-time macros.
After at run-time, a non-computer programmer might write their resume for a job as a fork-lift operator inside of a word process such as Libre Office Impress.
Clearly, run-time code depends on what the prospective fork-lift operator would type into their resume.

In an older programming language, the compile-time macro MACRO_CONCATENATE("Insert", "Picture") might be replaced by "Insert Picture" at compile-time.

The runtime function concatenate(x, y) would execute at run-time.

What name has been previously established in the computer science literature for a compiler which ignores the traditional distinction between run-time functions and compile-time macros?
What do you call a compiler that does the following?

At compile-time, the compiler executes functions calls if the function call had constant literal inputs at compile-time

The compiler executes functions which have run-time dependent inputs at run-time?

As another example, consider the following...
big_letters = "".join(chr(x) for x in range(ord("A"), ord("Z")))

That code could be simplified, as follows:
big_letters = 'ABCDEFGHIJKLMNOPQRSTUVWXY'

Some compilers execute all function-calls in a given programme if both of the following conditions are met:

The inputs to the function-call are constant literals such as "A"

The tree of callees (descendants) of the function-call contain no calls to runtime-only functions. Runtime-only function read from file, write to file, use stdout, stdin, cin, fprinf, print, etc...

Some compilers build trees of nodes such that:

Each node $p$ in the tree represents a function-call $f$ or a constant literal such as 3.9020
Suppose that function-call $f$ calls the function defined in the defintion for function $F$.
A child of node $p$ is node $k$ such that node $k$ represents a function-call $g$.
function-call $g$ is associated with the definition of a function $G$. function-call $g$ is a function-call present inside of definition of function  $F$.

For example, if a function named MakeDinner() calls MakeSpinachSauce() and MakeFlatBread(), then MakeSpinachSauce() and MakeFlatBread() are children of foo.

So, if the inputs are known at run-time, the work gets done at run-time.
If the inputs to a function are not known until an unemployed warehouse worker types their resume for a Fork-Lift operator job, then the work for those functions is done at run-time.
Leaf-nodes of the tree are:

constant literals, such as 12.8302 or "hello world".
calls to run-time only functions which have no callees

The compiler identifies constant literal leaf nodes.
We compute the parents of constant literal leaf nodes.
After the parent of some constant literal leaf nodes is calculated, we delete the constant literal leaves.
Computing the parents of leaf nodes continues in a recursive manner until all nodes have one or more children which are run-time only functions.
What is the name of this type of programming language?
Functions are executed at run-time if the functions call a function which calls a function which calls a run-time only function.
Functions are executed at compile-time if the function only calls functions which call functions which call functions which process constant literal integers, strings, floats, etc...
Answer: This is known as partial evaluation.
See also constant propagation and compile-time function evaluation.
Comment: Another related concept is [Just-in-time compilation](https://en.wikipedia.org/wiki/Just-in-time_compilation) (kind of the opposite thing -- delaying compilation as long as possible).


Need help scaling creating views of a diagram

Question: I'm working on a model of a steam locomotive and I don't know how to scale the diagram to be the correct size as well as create front and back views of the locomotive. the length of the locomotive from end to end is 48ft 6 7/8in long, I tried making the drawing larger and measuring it until it said something around 48.785' but it didn't seem to work to well. also is there a way to lock the diagrams so when I am creating the model I don't shift them? if anybody could help that would be great. Thanks
Answer: If you are saying that the diagram ur drawing doesn't become larger then you can duplicate one coach by pressing (Ctrl+D) and put it in the back of coaches and do this till you get the size you want..
And if u want to add words on the engine it can be done by UV unwrapping..
Hope it will help.
I'm also new to Blender btw!Thank you.


Computing every boolean function with a polynomial over $\mathbb{F}_3$?

Question: The following paper briefly mentions the power of $MOD_6$ gates (page 3), and relies on the unstated fact that every boolean function can be computed with an arithmetic circuit of depth 2 over $\mathbb{F}_3$. I'm not sure how this is done.
Comment: Asking about a claimed fact in a research paper is definitely grad-student level, which I think is fine for this site.
Comment: @Suresh: That is a very broad statement.
Comment: @Suresh: Honestly, I do not know why you posted that obviously incorrect claim.  In addition, I do not know what those four users who voted your comment up are thinking.  If you wanted to provoke me for some reason, you won.
Comment: @TsuyoshiIto: Somehow I knew you'd object to it :)
Answer: Every function $\mathbb{F}_p^n \longrightarrow \mathbb{F}_p$ (where $p$ is prime) can be written as a polynomial. For the proof, consider all $p^n$ monomials, and show that they are linearly independent.


Flash game doesn't work after obfuscation with SecureSWF 4.5

Question: I used SecureSWF 4.5 to obfuscate a Flash game. After the obfuscation process, this error came up:
<code>>     Warning: The following identifiers' names existed in the protected file(s) while they should have been all renamed. Since you enabled
> Post Build Check, secureSWF is now going to exclude any identifier
> with a similar name to any of the following:
>       MainTimeline__Content__
>       MainTimeline__LoadingAnimation__
>       MainTimeline__Preloader__
>       _mygame_fla
>       __rslPreloader
</code>
The game is no longer working, it doesn't even start/load anymore. (only the default Flash Player blank screen appears)
Does anybody know how to fix this or can give me an idea what that error means?
(I'm using Flash CS6 and published the game for the Flash Player 11.1)
Answer: I would advise you to not to obfuscate at all. Since ActionScript is a compiled language. Anyway, I google searched something for you...
Maybe you could try another obfuscator.
http://www.ambiera.com/irrfuscator/
http://www.as3gamegears.com/category/obfuscation/
Hope it helps.


What was the first alien species on Earth in Doctor Who?

Question: My question is relatively simple. I would like to know what the first alien species to make its way to Earth is in the recorded and unrecorded history of Doctor Who.
Comment: In-universe, or first aired episode?
Comment: To expand on amflare's comment, do you mean the first aliens to appear in the show, or the first to appear chronologically?
Comment: To clarify, what would you consider to be *alien?* Do they have to be non-earth native sentient beings, or can they just be non-human sentient beings?
Comment: I meant in-universe. And I have eliminated then anti-Racnoss sentiment. And I also meant non-earth native sentient beings, i.e. the Silurians.
Answer: The first aliens to appear on the show were the Gallifreyans, the Doctor and his granddaughter Susan, in the first episode.
Assuming, however, that you mean the earliest in Earth's history, that would probably be Scaroth, the last of the Jagaroth, from "City of Death."  The explosion of Scaroth's (cool-looking spherical) ship led to the creation of the first life on Earth.
EDIT:  And since the question no longer excludes the Racnoss (as it did originally), then the answer is (of course) the Racnoss, since the whole planet coalesced around them originally.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/68454/discussion-on-answer-by-buzz-what-was-the-first-alien-species-on-earth-in-doctor).
Answer: Daleks, on 1964/11/21: The Dalek Invasion of Earth
Though Time Lord or Gallifreyan would be technically correct.
Comment: OP didn't specify "other than the doctor", which makes this answer incorrect in regards to broadcast date. And the Daleks definitely weren't the first in-universe, so the answer is incorrect in regards to that as well.
Comment: This answer is categorically incorrect.
Comment: You have a better answer for the same interpretation of the question? Earliest broadcast of a Doctor Who episode in which an alien species other than the Doctor's visits Earth?
Answer: I suggest that the answer is the Racnoss. They arrived as the solar system was forming and their ship became the nucleus about which the Earth formed. And in spite of that, the Empress survived until she met the Doctor and Donna.
In the 2006 Christmas Special The Runaway Bride, the Doctor takes Donna back to the time when the earth was forming, and showed her that it was a Racnoss spaceship that formed the core around which the Earth formed.

DOCTOR: We've gone back four point six billion years. There's no solar system, not yet. Only dust and rocks and gas. That's the Sun, over there. Brand new. Just beginning to burn.
DONNA: Where's the Earth?
DOCTOR: All around us in the dust.
(Snip)
(A large rock drifts past.)
DONNA: I think that's the Isle of Wight.
DOCTOR: Eventually, gravity takes hold. Say, one big rock, heavier than the others, starts to pull other rocks towards it. All the dust and gas and elements get pulled in. Everything, piling in until you get
DONNA: The Earth.
DOCTOR: But the question is, what was that first rock?
  (A seven pointed star spaceship comes out of the dust cloud.)
DONNA: Look.
DOCTOR: The Racnoss.
Comment: @user14111 While you have a point, I can't help but feel this is actually the right answer, in spite of the OP's preferences. It would have been different if the OP would have explained _WHY_ they don't like the Racnoss.
Comment: @user14111: I disagree on the shrug. If the OP is excluding certain answers, it's relevant to know the **criteria** for the exclusion. The Racnoss must be excluded for a logical reason; and this may also apply for other viable answers; hence the importance of knowing the criteria. If the OP is **only** excluding the Racnoss (for no logical reason, it just is what it is), then it's still relevant to mention that **any other answer will be considered correct**, even if they arrived under similar circumstances as the Racnoss.
Comment: As written, it would appear because "make its way to Earth" is different from "make its way to a proto-planetary disk where Earth then forms". If you go further back, possibly the pilot of Terminus - since the fuel explosion triggered the Big Bang, arguably it had made it's way to the earliest existence of every point in the universe.
Comment: @user14111: Then the question should ask about the **second** species on Earth, not the **first**. The only valid explanation for OP's exclusion of the Racnoss (that I can think of) is that OP is interested in aliens that _visited Earth and the life on Earth_, rather than visited the location that would become the habitable Earth in the future. But that would then also exclude many others (like Scaroth, who died before Earth had life on it, even though one caused the other)
Comment: Racnoss are in Earth not on it. When they came there was no Earth.

Also the questioner can ask what ever they want, with restrictions on what they are expecting as points of order. They set the scope.
No one is forcing anyone to answer
Answer: If you take the term "alien" with more of a cultural than literal definition, the Silurans were probably the first non-human sentient life to live on Earth.

They were around far far before humans, hiding underground in hibernation to avoid the near cataclysmic event that ended up being the capturing of our moon.
In a literal sense, the Silurians are not aliens, because they appear to be native to earth. But they would seem alien to any human who encountered them. After all, they are green.
Comment: You know that any Earth creature doesn't count, because the visit of the Jagaroth predates _ALL_ life on Earth. Also, the name Silurians is technically not correct. They did not live in the Silurian age, but in the Eocene, which makes them much younger than they sound; they're only a few dozen million years old. I'm sure you can find Earth creatures from longer ago.
Comment: @MrLister sure, the Jagaroth predate life on earth (except the Racnoss), but my answer is still useful for a couple reasons: 1. Jagaroth are only from the original series which some people may be less interested in. 2. Earth was basically just a rock when the Jagaroth visited, so like the Racnoss, those first visits didn't have much to do with earth *after* it became earth in any meaningful sense, even though they were formative in Earth's development.


How would the atmospheric circulation look like on a planet with high axial tilt?

Question: Assume an Earth-Clone, that has an axial tilt of 90°. How would the circulation of the atmosphere look like? Would there still be three convection cells?
Comment: Earth clone also in the orbital period?
Comment: @L.Dutch Earth clone in everything but axial tilt.
Answer: So the axial tilt doesn't actually influence the number of convection cells very much, afaik. It does, however, affect their position. You might also want to note that a world with a 90° axial tilt would essentially present on side to its star half the year and the other half the rest of the year. That means a long day which is summer and a long night which is winter. This leads to some EXTREME weather patterns that until recently were though impossible to overcome (well, at the very least it was thought to be the case for tidally locked planets, but recent simulations show a fast enough spin can compensate that effect).
In the case of a 90° planet, the spin will have no effect on spreading the extra heat from the day side though, because the axis faces towards or against the sun for roughly half of the year (and it faces perpendicular the other half). This means that half of the year, you'd have heat trapped in the day cycle either on one side or the other depending if you take the winter or summer quarter. This could be mitigated if you have a short enough year but then you'd run into problems of star size with instability that features coronal ejections and lethal rays so… maybe not a good idea (red dwarves are extremely unstable).
What would affect the number of cells is the rotation speed.
Comment: *"A world with a 90° axial tilt would essentially present on side to its star half the year and the other half the rest of the year":* how so? *All* the area between 45° latitude south and 45° latitude north (that's 70% of the total area) will get at least *some* sunlight for 50% of the year. (And all the area between 30° latitude south and 30° latitude north will get some sunlight for two thirds of the year.)
Comment: @AlexP I'm not sure what you're saying here. A world with a 90° axial tilt is like Uranus. Basically, its pole is facing the sun. Then, as the planet moves around its orbit, the axial tilt remains in place facing (for example) towards the centre of the galaxy, while the sun is on the left, if you were looking at the centre of the galaxy. This is the autumn equivalent where all the planet would get some sunlight. Then the other pole would get all the sun and that'd be winter. Etc.


Problem with PID tuning

Question:
This is the step response of the power stage of a buck converter. I tried tuning it
when i added a proportional term, the rise time and settling time improved.So kept on increasing Kp and the response never started to oscillate.
I added ki and the steady state error vanished for ki=1 but the rise time and settling time worsened (from microsecond range it became in seconds)
Please any suggestions
Comment: Perhaps Kd is too high?
Comment: Is this the open loop step response or closed loop with a specific set of P, I, and D terms?  You want to start with the former, but from the ringing is looks like you have the latter.
Comment: It is a open loop step response.
Comment: http://www.flickr.com/photos/93878172@N03/8932833729/              This is the response to using only Kp and Ki and the rise time and settling time keep on decreasing but the response never oscillates
Answer: Please note the following:
As you know, the PI controller is responsible in modifying the steady state response. That is improving the steady state values and settling time. You are simply adding a pole at the origin.
On the other hand, the PD controller will help you in improving the transient response. That is overshoot, rise time and peak time.
Now it is important to remember that adding a PI controller will 'usually' increase the order of the system which will cause a change in the previous steady state value.
Similarly, adding PD controllers will change the transfer function of your original system due to exposing the system to a zero. This means that the root locus 'if plotted' will be different.
Therefore; there will always be a compromise -trade off-. The best you can do is add margins of errors or inequality ranges for accepted values for both steady state and transient parameters.
Long story short, adding any controller to the system to improve the steady state will effect the transient and vice verse.

Problem with PID tuning


Engine oil sludge

Question: My question is, have ever heard of it making engine oil gel, or turn sludgy if you can call that a word? I haven't, but 05 Chevy Equinox I'm servicing had this happen. Not sure if it started before or after the use of sealer.
Answer: Usually sludge and gelling is caused by infrequent oil changes or no changes at all.
I have done a few motor jobs that had oil gelling and assumed it was the original oil that came in the engine.
I call most Oil additives "mechanic in a can", and most do more harm than good.
Regular oil changes prevent sludging and gelling.
Comment: I AGREE WITH YOU ABOUT ADDITVES,AND LACK OF OIL CHANGES.BEEN USING BLUE DEVIL FOR YEARS,LOVE IT THIS WAS A CASE WHERE THE OWNER DIDNT HAVE ANY KNOWLEDGE OF MAINTENANCE OR LACK OF.
Answer: One common cause of engine sludge is failure of, or lack of a PCV heater. Shown in the picture is the PCV crankcase breather hose. The hose attached to valve cover. Notice the small black tube below the breather hose, blue arrow, in a U shape. Notice also that it is attached to the breahter tube. This tube carries engine coolant. It purpose is to heat the incoming air before it gets into the crankcase.
Heating the incoming air is needed because it helps to evaporate water in the crankcase. Water that remains in the crankcase forms acids that then react with oil to form thick gel like deposits. These acids are the cause of sludging that is caused by excessively long oil change intervals.
Engines used for short trips are particularly prone to sludging because of the engine does not get hot enough to evaporate the water in the crankcase.

Engine oil sludge


Create a custom db roles that uses a lookup table

Question: Can you create a custom DB_role like truncate, select, insert, delete permission to tables that are stored in another table(like lookup) rather than altering each table? just wondering I'm not a DBA sorry, the reason why is the old database has only one schema.
the only thing I can think of is creating an SP and do a loop on that table.
Thanks
Answer: Roles need to be explicitly defined. You can't tell the engine to just look up the role membership and/or rights in a table.
You'll need to manually create the roles/permissions with dynamic SQL from the table, and come up with some kind of plan to keep them in sync whenever the data in the table changes (you can use a trigger or, if a delay is possible, a scheduled job).
You mention schemas, and I'm not sure how relevant that is, but obviously an easier way to manage this would be to put all of the relevant users in a role, put all the relevant objects in a schema, and GRANT permissions on the schema to the role. If you have exceptions you can implement DENY.


Magento 2: In header searching search products collection matching with products name only

Question: I want to search product collection matching only with products name not from another like description, sku, attributes etc in Magento 2 header searching.
Answer: First you need make every attribute's property  Use in Search to NO.
from admin.
Navigate to Admin ->Store > Product> Attribute.
Fine all attributes which has the value Yes  for Use in Search.
Make this field value to yes only for the attribute "Product Name" .
Then do an indexing from Index management and then see your result.
Comment: Thanks for your reply. I need to filter product collection matching product name with enter text like "Test Shirt" . It should search the full string search. Like get those products collection contains the full string "Test Shirt" no collection  with "Test" or "Shirt".


Creating extensions for custom tables

Question: we have some custom tables and in the menu, Support -> Developer -> Api Explorer v4, currently those custom tables are not available. Since we are new to this, in order for those custom tables to appear, we need to create our own extensions, install it then we can use it thru the APi Explorer v4, is it correct? Please give your suggestions. Thanks
Answer: It sounds like what you are asking about are Custom Field Groups.
A Custom Field Group is generally not accessible from the API as an entity. Instead, you access the Custom Fields within the Custom Field Group on the relevant entity (e.g. if you have a Custom Field Group for Contacts called mygroup and a Custom Field within it called myfield, you can access mygroup.myfield on the Contact entity).
The only exception to this is Custom Field Groups that allow multiple values, which is only possible for Contacts. For these, the Group is accessible as an API Entity.
Comment: @Learn CiviCRM this is the correct answer.  I'll leave my answer up for future readers who are looking for the answer to the question of custom SQL tables.
Answer: If you have database tables you created outside of CiviCRM, they can't be exposed to API4.  API4 relies on metadata stored in the DAO file for the entity, which you don't have.  To rectify this, you should use civix to generate an extension, to create an XML representation of your data, and to generate the DAO boilerplate.
You should instead then export table, remove it, and install the extension. This will install the newly-defined table.  If it doesn't exactly match the old table, uninstall and try again until it does.  Then you can reimport the table to restore your data (if there was no data in the table this is unncecessary).
Then, finally, you can place a file in your extension at Civi/Api4/Yourentity.php that reads:
<?php

namespace Civi\Api4;

/**
 * Yourentitiy
 *
 * @searchable secondary
 * @since 5.65
 * @package Civi\Api4
 */
class Yourentity extends Generic\DAOEntity {

}

Clear cache, and it should be in API4.
Comment: Thanks for your quick response, those custom tables are created within CiviCRM, is it the same procedure and do we have a quicker way to do that? THANKS
Comment: are your custom fields set as Searchable - that is the only thing which often causes them to not be available in other contexts, eg Search, Import. So may be same with API Explorer
Comment: Thanks for your help. All the custom fields I can see those in the APIv4, is some of the custom field that has multiple values currently CiviCRM put them in tables where the table name as civicrm_value_XXXX which is not showing up under Entity in APIv4. Thanks and help.
Comment: Sorry - are these *Custom Field Groups* created through the CiviCRM UI, with SQL tables that start with `civicrm_value_`?  Or are these *completely* custom tables you created directly in the SQL database?
Comment: They are all created thru CiviCRM UI, Thanks a lot

Creating extensions for custom tables


Contravariant metric tensor with off-diagonal terms

Question: I have to compute the contravariant metric tensor with off-diagonal terms, such as $g_{0i}\neq 0$. I started with the condition $$g_{\mu\nu}g^{\nu\lambda}=\delta^\lambda_\mu$$
but I don't know how to proceed. I can write
$$
\left\{
\begin{array}{ll}
g_{00}g^{00}+g_{0i}g^{i0}=1\\
g_{i0}g^{0j}+g_{ik}g^{kj}=\delta^j_i\\
\end{array}
\right.$$
but I have 3 unknowns with 2 equations. How can I find the contravariant components?
Comment: Is this really that much different from calculating the inverse of a matrix in linear algebra? It's quite a standard procedure.
Comment: What do you mean when you say you want to find them? What information do you already have, and what is your goal to achieve with that?
Comment: I have this metric and I need to find the inverse, but since it is not diagonal I can't invert the term on the diagonal, the paper I'm reading suggests to use the condition i wrote.
Comment: But I don't know how to do it since the metric is expanded up to second order and the expression is not so easy
Comment: I'm not sure I understand the issue. Can you not use Cramer's rule or Gaussian elimination to find the inverse? Of course things can get quite messy for $4 \times 4$ matrices (or worse), but it's simply a matter of volume of calculations, no?
Comment: Now I try with Cramer's rule, but I was hoping to find a better way!
Comment: Cramer's rule is incredibly expensive! People are telling you that you should already know how to invert matrices that are not diagonal. Even the basic algorithm for this is vastly easier than Cramer. You should practice with 2x2 and 3x3 matrices before trying the 4x4. And just write down the full metric and invert.
Answer: First of all, your counting of unknowns and equations is incorrect. There are $10$ unknowns (inverse metric components) and $10$ equations. The second equation in your question can be split into $6$ independent equations ($3 \times 2$, for $i$ and $j$). The first equation is only the $00$ part, and you forgot to write the $0i$ part of $g_{\mu \nu}g^{\nu 0}=\delta^0_\mu$ by putting $\mu = i$, to give $g_{i \nu}g^{\nu 0}=\delta^0_i = 0$. This ($0 \mu$) equation are in total 4 independent equations. So you have $10$ equations and $10$ unknowns.
Anyway, you don't really need to worry about all these several equations. And it doesn't matter how complicated your metric is. These days you can use a Mathematica package and just invert the metric. I believe xAct (xCoba, in particular is what you would need) should have this feature.
Answer: I solved doing the following calculations up to second order (which is what I needed to do, actually). I started with
\begin{equation*}
(\bar{g}_{\mu\nu}+\delta g_{\mu\nu}+\frac{1}{2}\delta^2g_{\mu\nu})(\bar{g}^{\nu\lambda}+A_1^{\nu\lambda}+B_1^{\nu\lambda})=\delta^\lambda_\mu,
\end{equation*}
where $\bar{g}_{\mu\nu}$ is diagonal. Up to second order I got an equation for $A_1^{\lambda\rho}$ and one for $B_1^{\lambda\rho}$, namely I have
\begin{equation}
A_1^{\lambda\rho}=-\delta g_{\mu\nu}\bar{g}^{\lambda\nu}\bar{g}^{\rho\mu}
\end{equation}
and
\begin{equation}
B_2^{\lambda\rho}=-\bar{g}^{\rho\mu}\delta g_{\mu\nu} A_1^{\nu\lambda}-\frac{1}{2}\bar{g}^{\rho\mu}\bar{g}^{\nu\lambda}\delta^2 g_{\mu\nu}.
\end{equation}
In this way I easily solved my problem and found the correct expression for the contravariant metric up to second order.


Ordering of triggered ability and ETB effect

Question: Suppose I have a Rhonas's Monument and a 1/1 creature token on the field and I play an Ornery Kudu, putting the -1/-1 counter on the token and giving it +2/+2 via the Monument trigger. Does the token die immediately, or can I choose to apply the monument first so that the token lasts until end of turn (as a 2/2)?
Answer: You have no choice: you must apply the monument ability first (and so the token will survive). This is because the monument ability triggers when you cast Ornery Kudu, and will resolve before Kudu can actually enter the battlefield at all to trigger its own ability.
If you do have two triggered abilities that trigger at the same time however, you do get to choose the order they'll resolve.
Answer: To add to Benjamin's answer, if multiple abilities would trigger at the same time but they are controlled by different players, the triggers are put on the stack in AP/NAP order (CR 603.3.). That is, the active player puts his triggers on the stack in any order, then the next player in turn order does so, etc. Thus the last player's triggers will resolve first, and the active player's triggers will be last.


What is the WGA compensation when multiple writers work on the same episode?

Question: I understand that if you want to hire a writer to write an episode there are certain minimums set, like $15k for a 20min sitcom story plus teleplay. But, what if there are multiple writers writing a single episode, what happens then? Do both writers get $15k?
Answer: If multiple writers have written a script they are "considered a unit" and get paid as if they were one person.

If more than one writer shares the story or teleplay
  credit, then all of the writers sharing each credit shall be considered
  a unit and shall participate equally and receive in the aggregate the
  theatrical exhibition payment applicable thereto, except that in the
  case of a comedy-variety program, the Guild shall determine the
  proportions in which such participating writers will share the
  theatrical exhibition payment, will notify the Company thereof and
  Company will make payments accordingly.  ~ Writers Guild of America 2014 Theatrical and Television Basic Agreement


Compute $\sum \frac{1}{k^2}$ using Euler-Maclaurin formula

Question: I read that Euler used the summation formula to calculate the value of the series $\sum_{k =1}^{\infty} \frac{1}{k^2}$ to high precision without too much hassle. The article Dances between continuous and discrete: Euler's summation formula goes into the calculation, however without too much justification of why it works (especially since the series used to calculate the limit does not converge and one has to truncate it at a certain point). I would be glad if someone could elaborate from a more modern viewpoint on how and why it works.
Comment: That's the interesting thing about *asymptotic* series like the one that turns up in Euler-Maclaurin. They diverge, but if you cut them off at the right term, that partial sum is a good approximation...
Comment: See [this question](http://math.stackexchange.com/q/8337/8173).
Answer: First, it can be shown, in many ways, that
$$
\sum_{k=1}^\infty\frac1{k^2}=\frac{\pi^2}{6}\tag{1}
$$
However, the Euler-Maclaurin Summation Formula can be used to numerically sum this series to high precision. Before we attempt to do this, let's discuss a bit about asymptotic series.
In general, asymptotic series, like those arising from the Euler-Maclaurin Summation Formula (EMSF), are divergent. This means that if you tried to sum all the terms arising from the formula, the sum would not converge. For example, the EMSF gives the following asymptotic expansion:
$$
\sum_{k=1}^n\frac1k\sim\gamma+\log(n)+\frac1{2n}-\frac1{12n^2}+\frac1{120n^4}-\frac1{252n^6}+\frac1{240n^8}-\frac1{132n^{10}}+\dots\tag{2}
$$
where $\gamma=0.5772156649015328606065121$ is the Euler-Mascheroni constant.
This expansion looks well behaved, and it is, up to a point. However, the coefficients grow on the order of $\frac{n!}{(2\pi)^n}$; by the time that we get to the term for $n^{50}$, we have
$$
\frac{19802288209643185928499101}{132n^{50}}\tag{3}
$$
Due to the growth rate of the coefficients, no matter how large $n$ is, this series cannot converge.
However, if we only use a finite number of terms, the series is a very good approximation for large $n$. As mentioned earlier, the expansion behaves well, up to a point. What this means is that for a given $n$, the terms get smaller, and then, at some point, start blowing up. The point at which the term start blowing up is further along the larger $n$ is. The good part is that if we terminate the sum while the terms are still getting smaller, the approximation is usually as good as the next term.
For example, let's approximate
$$
\sum_{k=1}^{1000}\frac1k=7.4854708605503449126565182\tag{4}
$$
using the first $4$ terms of $(2)$:
$$
\gamma+\log(1000)+\frac1{2000}-\frac1{12000000}=7.4854708605503365793271531\tag{5}
$$
The result in $(5)$ is $8.333329365\times10^{-15}$ smaller than the actual value in $(4)$. The next term is
$$
\frac1{120000000000000}=8.333333333\times10^{-15}\tag{6}
$$

Now let's see how the EMSF can be used to approximate $(1)$
The EMSF applied to $\dfrac1{k^2}$ yields
$$
\sum_{k=1}^n\frac1{k^2}\sim C-\frac1n+\frac1{2n^2}-\frac1{6n^3}+\frac1{30n^5}-\frac1{42n^7}+\frac1{30n^9}-\frac5{66n^{11}}\tag{7}
$$
Note that the EMSF always has a constant that needs to be determined in some other manner. In $(2)$ it was $\gamma$, the Euler-Mascheroni constant. Here, $C$ is the sum of the series; that is, as $n\to\infty$, the left side of $(7)$ tends to the sum, and everything on the right side of $(7)$, except $C$, tends to $0$.
To compute $C$, we will use $n=100$ and truncate the series at the $n^9$ term. The error we get should be less than $\dfrac5{66n^{11}}$, which would give us almost $23$ decimals places.
For $n=100$, the sum on the left of $(7)$ is
$$
\sum_{k=1}^{100}\frac1{k^2}=1.6349839001848928650771695\tag{8}
$$
For $n=100$, the sum of the terms on the right of $(7)$ other than $C$ is
$$
-\frac1n+\frac1{2n^2}-\frac1{6n^3}+\frac1{30n^5}-\frac1{42n^7}+\frac1{30n^9}
=-0.0099501666633335713952381\tag{9}
$$
Subtracting $(9)$ from $(8)$ gives
$$
C\stackrel{.}{=}1.6449340668482264364724076\tag{10}
$$
whereas
$$
\frac{\pi^2}{6}=1.6449340668482264364724152\tag{11}
$$
The value of $(10)$ is $7.6\times10^{-24}$ short of $(11)$ and $\dfrac5{66n^{11}}=7.6\times10^{-24}$.
Using a larger $n$, and possibly more terms of the series, would give more precision.
Comment: @Jim: Where did you get the idea that $C$ depends on $n$? Perhaps I used $\stackrel{.}{=}$ where I should have used $\sim$. I have adjusted the answer. The whole point of using these asymptotic expansions is that $C$ doesn't depend on $n$. They would be far less useful if they did.
Comment: Thanks for your answer. Something is still bothering me. Let's call $C = C^{(n)}$ since it depends on $n$. How did you justify that the error should be less than 5/(66 n^11)?
In particular, eq. (7) holds no matter what term you add on the right hand side (as long as it vanishes for $n \to \infty$), since you can choose $C^{(n)}$ appropriately. What property of EMSF makes this whole thing work?
Answer: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
Numerically, we must sum up a 'few' terms before we use Euler-Maclaurin ( in the second term ).
For example:
\begin{align}
\sum_{n = 1}^{\infty}{1 \over n^{2}}
&=\sum_{n = 1}^{N}{1 \over n^{2}} + \sum_{n = 1}^{\infty}{1 \over \pars{n + N}^{2}}
\approx\sum_{n = 1}^{N}{1 \over n^{2}}
+\int_{0}^{\infty}{\dd x \over \pars{x + N}^{2}}
=\sum_{n = 1}^{N}{1 \over n^{2}}
+ {1 \over N}
\end{align}

This '$\ds{\tt\mbox{extremely simple formula}}$', for example, yields a relative error of
  $\ds{1.14\ \%}$ with $\ds{N = 5}$.

Historically; it seems Euler was convinced, by means of the Euler-Maclaurin formula, that the correct value was $\ds{\pi^{2} \over 6}$ before he tried to demonstrate it.


Why is a child not a mere extension of their "parent(s)"?

Question: If "reproduction" were an organism replicating and making a copy of itself, how is a child/offspring not a mere extension of the "parent(s)"? In humans, the human child/offspring inherits 50% of their DNA from each "parent". Why wouldn't that mean that the child/offspring is a mere mixture of both "parents"? That the child/offspring is the "parents" continuing on in the body of the child/offspring? Of course this conclusion would have disastrous and catastrophic outcomes. It'd mean that the "parents" could do anything to the child/offspring and it wouldn't be "abuse". It would, at worst, be "self-harm" as the "parents" would be "harming" a part of themselves. Not someone else. My question is to understand why the child/offspring is not the "parent(s)"? What makes the child/offspring different from the "parent(s)" when the DNA of the child/offspring, what makes the child/offspring what they are, comes from the "parent(s)"?
Comment: Why would you expect a separate piece to be "a mere extension" of the parent piece in general? If you have a pile of gravel, use it to fill a wheelbarrow and dump a new pile thirty feet away, you don't think the new pile of gravel is "a mere extension" of the original pile. If you did, you couldn't identify individuals without knowing their entire history.
Comment: What does it mean "extension" in this context?
Comment: Maybe we have to reflect on the difference between the two following expressions: "my hand" vs "my son".
Answer: Reproduction is not considered to be "an organism making a copy of itself" for any organism but very primitive species who can reproduce by fission like bacteria or worms. Whether a worm cut in half becomes two individual worms or the original worm plus its extension is left for anyone to decide.
Sexual reproduction yields an individual with its own DNA, albeit it comes from mixing the DNA of both of its parents the new set of combination is entirely original.
Also you seem to reduce identity to DNA, a position even the most radical of physicalists would not hold: think about homozygote twins, they share the exact same DNA and yet they can grow up to be very differently minded individual, and nobody in their right mind would consider them to be emanations of the same individual or extensions of one another.
The reason is that, along with DNA, what defines us is our memory (whether conscious or subconscious), who informs all of our moods, decisions and judgements. Wether this memory is physical or immaterial is irrelevant. Consider people with the same DNA but raised appart in different countries, classes, religious group. Although they share some likeness and predispositions, they won't grow up to be the same person and might very well hate each other's guts (for example if onw twin was to be raised by protestants and the other by catholics in XVI century Europe).
Aside from that we all grow up with a sense of self that very soon differentiate us from our parents: we don't feel what they feel, they can be harmed without us being harmed, and vice versa, they die and we continue living. I don't think you would approve of your parents now deciding to terminate your life because it would just be "self harming" on their part. You perfectly understand how it would harm you, because you are your own individual. We all share this conception, and that's why it is not considered acceptable for parents to decide of their children's fate in most places (and even in places where it is, it's more because children are considered property of their caregivers, not extensions).
Comment: What's the difference between "you're my extension" and "you're my property"? People can do whatever they want to their property so "parents" could very well take the life of the child/offspring and claim "it's my property and I can do whatever I want to it" if the child/offspring were a property
Comment: @ActualCry I bet your car is your property. Is it your extension, like a part of your body? How does this objection make sense? Of course not. People can't do whatever they want with their property, depending on what it is it might be regulated. You have to ask to build a home on your land, or you can be prosecuted for cruelty to your pet in some countries. What is more, children are considered "property" of their parents only in very backward cultures, in most of the world mistreating your own children won't fly.


Triple boot Windows 10 Ubuntu 16 and Kali

Question: I have been running Win and Ubuntu just fine, and then I have installed Kali and now I am facing the following issue. Just after installation of Kali I have rebooted and were able to access Kali boot loader, but then I have shut down the pc and used windows, and now when i try to access the kali boot loader it only offers me the Ubuntu while Kali is not listed, however when I enter the Ubuntu I can clearly see that Kali is still installed on its partition. It is just that I can't access it through the grub loader. I do not know what the issue could be. Help please?
Answer: I have installed Windows 8.1, Ubuntu 17.10, and Kali on my pc. Kali ran well after my first installation but I installed it again. Then I have faced a issue on grub rescue . Then I tried following commands on ubuntu and now it is working.
sudo update-grub

After this enter your password. Then try,
sudo grub-install /dev/sda

Now those three os are working correctly.


How can I order the vertex index?

Question: I'm new around here. I wanted to ask if there is any way to order the vertex index in this way?
Comment: see https://blender.stackexchange.com/questions/36577/how-are-vertex-indices-determined
Answer: Bmesh version

Here is a bmesh version of @3fingeredfrog's answer using method suggested here https://blender.stackexchange.com/a/36619/15543
Orders based on distance from scene cursor.
import bpy
import bmesh

context = bpy.context
scene = context.scene
ob = context.edit_object
mw = ob.matrix_world
cloc = mw.inverted() @ scene.cursor.location
me = ob.data

bm = bmesh.from_edit_mesh(me)
#bm.verts.ensure_lookup_table()
verts = sorted(bm.verts, key=lambda v: (v.co - cloc).length)

for i, v in enumerate(verts):
    v.index = i
bm.verts.sort()
bmesh.update_edit_mesh(me)

Could maually select all vertices in order (one by one) and retrieve from the select history
verts = [e for e in bm.select_history if isinstance(e, bmesh.types.BMVert)]

The order in question appears to be that next is furthest of all the connected verts if not visited.
Answer: In this particular case, yes, by ordering the index number of each vertex relative to its distance from the 3D cursor.
1: From the Viewport Overlays menu > Developer > enable the Indices option. The index number of each selected vertex will now be displayed in blue.

2: Position the 3D Cursor so that it is closest to "v1" and "v2" is the next closest ..........
3: In Edit mode and with the vertices selected: open the Mesh menu > Sort Elements > choose the Cursor Distance option.
now v1=0 v2=1 v3=2 v4=3 etc
Comment: Good answer, but the questions tag says *scripting*. Do you have any input on a scripting approach? E.g. how to position the 3D Cursor and call that operation with python?
Comment: oppps, I missed that @Dark -Z was looking for a scripting solution and have no idea how to do that with python.
Comment: thanks for the information, I work by doing it manually but do not know of the existence of any python script that does this job?
Comment: I need a script because there are many mesh that I need to order the index

How can I order the vertex index?


In Uno, if I play a Wild Card and pick a color, can I also play a card in that color?

Question: If I put down a Wild Card and choose a color, can I then also straight away play a card in that color?
Answer: No, you can only play one card per turn.
Let's Play

On your turn...
  Example: If the card on the Discard pile is a red 7, the player must put down a red card OR any color 7. Alternatively, the player can put down a Wild Card...

Functions of Action Cards

Wild Card – When you play this card, you get to choose the color that continues
  play (any color including the color in play before the Wild card was laid down)...

Here's a great place to read the rules for yourself:
From mattel.com: UNO Rules 2018
Answer: No. After you play a card, the next player takes the next turn.
From the rules:

Wild – This card represents all four colors, and can be placed on any card. The player has to state which color it will represent for the next player.

(emphasis added)
Comment: A source would be appreciated, like the answer of Ola Ström.


Changing cranksets

Question: Ive done hardly any cycling and know virtually nothing about road bikes, but Ive bought a second hand Avanti Vervace with the intention of doing the around Lake Taupo ride (160km). Apparently the crankset is worn and Ive seen a new Shimano Taigra crankset for sale on trademe. Can i simply swap the cranksets over? Any advice would be hugely appreciated. Working on a limited budget here. Cheers
Comment: Why not just change the chainrings?
Comment: Can you pop into the [chat] room to discuss further?
Comment: Many thanks for the advice. I obviously need to spend a little time on the internet learning about my bike and the various components and then I can ask questions with a bit more knowledge of what Im talking about. Cheers for the help. Thankfully the wheels turn but I may need to spend some money on it according to a local bike shop.
Answer: A Crankset is both crank arms, a spider, the chain ring or rings, and the bolts holding the chainrings to the spider.
If the BCD (Bolt Circle Diameter) is the same, then you can simply swap the chainrings over.
Swapping the crankset means you need more specialised tools, and the bottom bracket standards may have changed over time meaning they're possibly incompatible.
Either way you might need to adjust your Front Derailleur, and depending on what the donor bike was, you might find the new chainrings are narrower (10 and 11 speed maybe) whereas your bike looks like a 2004-2009 brand and might be 8 or 9 speed, therefore a slightly wider chain.

Changing cranksets


How do white neon lights work?

Question: I was under the impression that neon lights work by fluorescence and therefore work by emitting a certain wavelength of light. neon produces an orange color, hydrogen a red color. Supposedly, they use carbon dioxide for white neon lights. But isn't white light a mixture of multiple wavelengths. What am I missing here?
Answer: I believe the "neon" lamps that you are referring to (tubes that light up in different colors but look transparent when they are off) are actually low -pressure gas discharge tubes.  Electricity is applied across the gas, causing the gas to emit a discrete discharge spectrum with wavelengths which are characteristic of the gas.
Only specific wavelengths are emitted, but several wavelengths may be present depending on the electronic structure of the gas molecule involved.  Neon, for example, has many wavelengths in the red range, hydrogen has 3 strong lines and a few more weak visible-range lines that combined produce a purplish glow. Helium has a set of widely-spaced visible lines that combine to give a salmon-pink glow. Carbon dioxide has a combination of lines which our eyes and brains detect as "white."
Fluorescence is a different process in which a high energy photon (usually in the violet or ultraviolet range) is absorbed by a solid or liquid which consequently emits a lower energy photon. For fluorescent bulbs, the coating on the inside of the tube determines whether the bulb is called "cool white" or "daylight" or "warm." The gas is something (often mercury vapor) which emits a strong UV line via the discharge process.

How do white neon lights work?


Passphrase overwrite a potential security flaw in using eCryptfs

Question: I have been testing out eCryptfs on Ubuntu 18.04.
I was happy with it until I discovered that after I unmounted an encrypted volume, a user with root access can mount it again with a newly generated passpharse which then generates a new key which unencrypts the encrypted folder and files with.
It would seem to eCryptfs security is linked to Ubuntu's user access level security, in this case root access which overides the passphrase security level.
Am I wrong? And what could I do to make eCryptfs more secure and prevent passphrase overwrite. Thank you.
Comment: "a user with root access can mount it again with a newly generated passpharse which then generates a new key which unencrypts the encrypted folder and files" – Does it though? I have a hard time believing this could actually work. Sure you can just use whatever key to decrypt, but that won't result in the original data.
Answer: @Daniel B,
Thanks very much for your reply. I have done further testing and am now satisfied with the security of eCryptfs. It is all good as far as security goes. One should just be absolutely certain they are entering the correct paraphrase in order not to end up being confused. As strangely it will let you mount an previously encrypted folder with a new passphrase and generates a new signature key which it appends to the sig-cache.txt file. However the data is still encrypted and inaccessible. A user who is not sure about their passphrase is given false hope when they find that they are able to mount the encrypted folder with wrong paraphrase.  I am going to keep on using eCryptfs. Thank you again.
Comment: As it's currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


Reasons for not allowing interfaith marriage

Question: What are the reasons or justifications provided in the holy book of the Quran for not having interfaith marriage? If two humans from different religions (one Muslim and one non-Muslim) like/love each other and want to get married, then why Islam prohibits this given that both are the creations of the same superior almighty Allah?
Answer: Allah does not need to provide a reason or justification for His commands. The primary purpose of commandments is to test compliance, and it is not necessary to give any reason or benefit behind it.

إنما كان قول المؤمنين إذا دعوا إلى الله ورسوله ليحكم بينهم أن يقولوا سمعنا وأطعنا وأولئك هم المفلحون
The only statement of the [true] believers when they are called to Allah and His Messenger to judge between them is that they say, "We hear and we obey." And those are the successful.
— Quran 24:51 also see 4:65

However, many scholars have held that a reason for not allowing interfaith marriage is stated within the Quran:

ولا تنكحوا المشركات حتى يؤمن ولأمة مؤمنة خير من مشركة ولو أعجبتكم ولا تنكحوا المشركين حتى يؤمنوا ولعبد مؤمن خير من مشرك ولو أعجبكم أولئك يدعون إلى النار والله يدعو إلى الجنة والمغفرة بإذنه ويبين آياته للناس لعلهم يتذكرون
And do not marry polytheistic women until they believe. And a believing slave woman is better than a polytheist, even though she might please you. And do not marry polytheistic men [to your women] until they believe. And a believing slave is better than a polytheist, even though he might please you. Those invite [you] to the Fire, but Allah invites to Paradise and to forgiveness, by His permission. And He makes clear His verses to the people that perhaps they may remember.
— Quran 2:221

Meaning that the non-muslim will influence the Muslim spouse and their children towards the false religion and towards other sins which are considered lawful in their religion - which if successful would lead the Muslim spouse and the children to Hellfire in the Hereafter. Whatever can lead to Haram must be avoided.
Especially parents are the ones who educate their children, and children are inclined to imitate their parents and to share their beliefs. Hence a Muslim must choose a spouse who is going to be better their own Iman and for the Iman of their children. A non-muslim is not a good choice.
Further, Islam generally teaches disapproval towards non-Muslims because of their Kufr:

لا تجد قوما يؤمنون بالله واليوم الآخر يوادون من حاد الله ورسوله ولو كانوا آباءهم أو أبناءهم أو إخوانهم أو عشيرتهم
You will not find a people who believe in Allah and the Last Day having affection for those who oppose Allah and His Messenger, even if they were their fathers or their sons or their brothers or their kindred.
— Quran 58:22

قد كانت لكم أسوة حسنة في إبراهيم والذين معه إذ قالوا لقومهم إنا برآء منكم ومما تعبدون من دون الله كفرنا بكم وبدا بيننا وبينكم العداوة والبغضاء أبدا حتى تؤمنوا بالله وحده
There has already been for you an excellent pattern in Abraham and those with him, when they said to their people, "Indeed, we are disassociated from you and from whatever you worship other than Allah. We have denied you, and there has appeared between us and you animosity and hatred forever until you believe in Allah alone"
— Quran 60:4

Whereas marriage is a method of forming new bonds of kinship and can lead to affection and love for the disbelievers. A Muslim is meant to be fervently loyal to Islam and does not love those who have negative opinions about Allah and the Prophet ﷺ and those on whom Allah is angry. Also see Love towards non believers
Comment: @YoMango I don't need to answer something which is not asked in the question. But I might mention it if I feel like it. Further it is not some but most scholars who view it as makruh, some sources even claim agreement. And your claim of Ijma' also has nuances e.g. Ibn Umar considered it haram, and some differentiated between a Harbi and a Dhimmi (such as the Hanafis and Ibn Abbas), and some (such as the Shafi'is) differentiated between the Israelites and those who converted to Judeo-Christanity from a different religion, and some differentiated between the free and the slaves.
Comment: Quran 5:5, which is also one of the last ayahs to be revealed, allows interfaith marriage for Muslim men and women from the people of the book, Christians and Jews. This is unanimously agreed upon.
Comment: @YoMango That is an exception not the rule, the question is not asking about that exception, rather it is about interfaith marriage in general. If a question asks "why can't you eat pork?" I am not going to answer that a starving person can eat pork during famine. Please read the question carfully: What are the reasons or justifications provided in the holy book of the Quran for not having interfaith marriage?
Comment: Also keep in mind that while marriage to Jews and Christians is permissible, it it is also widely held that it is makruh.
Comment: Some scholars view it as makruh, but there is no ijma regarding this. It is 100% agreed upon, so ijma, that interfaith marriage between Muslim male and People of the book females is allowed.

While it is a exception to the rule, it's also a modification, an update to it. This is not a 1 time thing for a certain time period or historically localized, it applies all time.

Your answer is misleading, you didn't mention this crucial point that matters significantly, based off your answer alone, one would think that Muslims can only marry Muslims. You need to update your answer.
Answer: Quick Answer: Interfaith marriage is only allowed between Muslim men and women from the People of the Book, meaning Christians and Jews.
There are particularly two ayahs in the Quran, 2:221 and 60:10, that explicitly mention that a Muslim cannot marry a non-believer.

Do not marry polytheistic women until they believe; for a believing slave-woman is better than a free polytheist, even though she may look pleasant to you. And do not marry your women to polytheistic men until they believe, for a believing slave-man is better than a free polytheist, even though he may look pleasant to you. They invite ˹you˺ to the Fire while Allah invites ˹you˺ to Paradise and forgiveness by His grace. He makes His revelations clear to the people so perhaps they will be mindful.
Quran 2:221

O believers! When the believing women come to you as emigrants, test their intentions—their faith is best known to Allah—and if you find them to be believers, then do not send them back to the disbelievers. These ˹women˺ are not lawful ˹wives˺ for the disbelievers, nor are the disbelievers lawful ˹husbands˺ for them. ˹But˺ repay the disbelievers whatever ˹dowries˺ they had paid. And there is no blame on you if you marry these ˹women˺ as long as you pay them their dowries. And do not hold on to marriage with polytheistic women. ˹But˺ demand ˹repayment of˺ whatever ˹dowries˺ you had paid, and let the disbelievers do the same. That is the judgment of Allah—He judges between you. And Allah is All-Knowing, All-Wise.
Quran 60:10

But Quran 5:5, one of the last ayahs to be revealed for the Quran, has made an exception for Muslim males allowing them to marry women from the People of the Book meaning Christians and Jews. Ibn Kathir has made this claim as well.

Today all good, pure foods have been made lawful for you. Similarly, the food of the People of the Book is permissible for you and yours is permissible for them. And ˹permissible for you in marriage˺ are chaste believing women as well as chaste women of those given the Scripture before you—as long as you pay them their dowries in wedlock, neither fornicating nor taking them as mistresses. And whoever rejects the faith, all their good deeds will be void ˹in this life˺ and in the Hereafter they will be among the losers.
Quran 5:5
((Lawful to you in marriage) are chaste women from those who were given the Scripture before your time) Therefore, they made this Ayah an exception to the Ayah in Surat Al-Baqarah,
Tafsir Ibn Kathir, Quran 5:5

Ibn Kathir also mentions that the Sahaba, companions of the Prophet, have married Christian women and saw nothing wrong with it.

((Lawful to you in marriage) are chaste women from the believers and chaste women from those who were given the Scripture before your time) they married women from the People of the Book. " Some of the Companions married Christian women and did not see any problem in this, relying on the honorable Ayah,
Tafsir Ibn Kathir, Quran 5:5

Reasoning behind the Ruling
The primary objective of limiting interfaith marriages is to preserve Islamic values and religious practices within the family unit, including the husband, wife, and children.
For perspective, the Christian and Jewish faiths prohibit interfaith marriage entirely for this same purpose of preserving their religion:

You shall not intermarry with them, giving your daughters to their sons or taking their daughters for your sons, for they would turn away your sons from following me, to serve other gods. Then the anger of the Lord would be kindled against you, and he would destroy you quickly.
Deuteronomy 7:3-4, ESV

I'd also like to make clear that the reasons why interfaith marriage is limited for Muslim men and not allowed for Muslim women are not because of anything rooted in hatred or misogyny.
Islamic scholars have provided several reasonings for why a Muslim woman cannot marry a non-Muslim man. One of the primary reasons is to protect the Muslim wife's right to practice her religion, as there is no guarantee that a non-Muslim husband would respect or facilitate her religious observances. In addition, it is often argued that the father is traditionally seen as the head of the household, and as such, may have significant influence that could be contrary to Islamic values. By prohibiting Muslim women from marrying non-Muslim men, this rule aims to safeguard their religious beliefs and practices, as well as maintain the integrity of the family unit according to Islamic principles.
Read more here:

Why a Muslim Woman Is Not Allowed to Marry a Non-Muslim Man

Why Can't a Muslim Woman Marry a Non-Muslim Man?
Comment: Thanks for this well-explained answer.
Comment: I just want to understand more about why marriages with People of the Book allowed. Can you please help me understand this?
Comment: This exception was made because Islam and People of the Book share a common heritage (Abraham) and beliefs. Islam is a successor to these religions. There are multiple reasons speculated.

Some Muslim men, throughout history and today, live in non-Muslim majority countries so their options could be or are limited.
Especially in the early days of Islam where Islam was new and was spreading across the world and unsurprisingly many Muslim male converts who were already married to a POB woman didn't have to divorce and could maintain their marriages. And also influence their families to Islam.
Comment: Some other reasons argued is that this was allowed to encourage good relations and promote peaceful coexistence between Muslims and POB, that this exception was made to prevent Muslim men from engaging in illicit relationships with POB women (especially if there aren't many Muslims in their environment), and/or that the exception was made due to the similarities between Islam, Judaism, and Christianity, which share a common belief in one God, albeit differently, and have similar values and ethics.
Comment: Abdullah Ibn Umar used to say it is not allowed to marry christians either. I think he believed the verse permitting that was abrogated
Comment: I respect his opinion if that is his opinion, which is also very minority opinion, but what is his reasoning regarding this ayah then? Abrogation cannot be a reason because the fact is that this was one of the last ayahs in the Quran to ever be revealed, so which Quran ayah coming later would've abrogated it????  please send me the evidence where he thinks it is abrogated because that's hard to believe. Ibn Kathir, and All tafsirs basically, recognize the validity of this ayah. IK mentions the Sahaba, companions, married POB and saw nothing wrong with it. So even the Sahaba were okay with it.
Comment: @YoMango : Do People of the Book means people who follow Abrahamic religions or someone who does not practice idolatry? If yes then will this include all other Abrahamic religions like Baha'i Faith, Yezidi, Druze, Samaritan and Rastafari because all of these too share a common heritage?
Comment: People of the book refers to Jews, Christians, and Sabians. It means those that have received previous scriptures from God, the Jews receiving the Torah and the Christians receiving the Gospel (Injeel). There are some opinions within Islamic scholarship that'd include Zoroastrians but it's not agreed upon. These other religions you mentioned came after Islam and their scriptures aren't from God. For example, Bahai Faith's holy book was written by the founder of the religion in 1873. Also, Yezidism was created in the 12th century and doesn't even have a holy book as they transmit info orally.
Answer: It causes a prioritization of worldly states over hereafterly states. Everyone in the Paradise will love each other, because they all shared something common: Monotheism.
No two people in hell will love each other, because they distracted each other from remembrance of Allah and deluded each other.
In the Noble Qur'an, we learn that on the day of judgment people will be running from each other. This is because, when the topic of worldly benefit is ended, there's absolutely nothing left between Muslims and Non-Muslims.
The worldly requirement for us is like that in the hereafter, that we love all those and only those who we will love eternally. Otherwise it's a delusion that will be ended by death, so we prepare for that day in advance.

Secondly the love for each other not for Allah's sake is fuelled by the carnal soul. I can think of two consequences:

It causes reliance on pretending. Few will ever tell his partner that (s)he loves him/her for his/her money. Or maybe for another silly reason. Maybe he just loves one for green eyes? These are things that partners hide during marriage because their marriage is based on flawed assumptions.
It is unlikely to form a stable family. A family involves well-raised children, but if one relies on his carnal soul for love, the future is bleak, at any point (s)he can find someone more superior than him/her in anything, then the family is over. Moreover, a love marriage is the opposite of marriage of compatibility, so before marriage, everything will be fine, but after marriage, they will find out that they disagree on too many things.
It normalizes working for the carnal soul. Islam teaches us to be rational in everything. We don't eat to fill the stomach. We don't get married to satisfy our lusts.

Thirdly, everything one has around him has an effect on his heart. So if a heart opens itself to someone who disagrees with him at a low level, he's opening himself to all kinds of influences, and this is prioritization of the world over religion and if he reminded himself that it was Allah who moved everyone's hearts however He wills, he wouldn't have acted for his carnal soul.
Comment: I think your response to my question, answers marriage in general in and not interfaith marriage in specific.

1. It causes a prioritization of worldly states over hereafterly states. ==> This can happen in any type of marriage.

2. Secondly the love for each other not for Allah's sake is fuelled by the carnal soul. ==> Again this carnal desire can be there in any type of marriage whether it's between Muslim-Muslim, Muslim-Christian/Jews and Muslim-Non-Muslim.


Why does the order of 人口 change?

Question: One of the first questions in my book is 你家有几口人? But the book highlights the word "人口" as people. Why does it change? Is it because 口 is the measure word for 人? Could you say 三口人口? When do you use each form?
Answer: You're right that 口 is one of the measure words for 人, but 人 (people/person) and 人口 (population) are two different words. The word 人口 is mostly used for the population of a city or a country instead of a household.
You can say 几口人 (how many 'units' of people), 三口人 (three 'units' of people), but not 三口人口 (three 'units' of population).
Comment: Sometimes,  +  forms a word that describes a group of that object. Apart from 人口, 车辆, 马匹 also fit this pattern.
Answer: 你家有几口人? means "How many members in you family".Here "口" is a counting unit.Why use "口"? I guess because Chinese think hunger breeds discontentment.(民以食为天). And "几口人" is oral word, mostly.
人口 means the numbers of perple which include the unit "个".Mostly, it's written word or official word, such as "人口普查" or "人口调查".
So, you cann't say 三口人口 or 几口人口 because there are two counting units.
Answer: There are 3 words:

人, for both people (plural), person (single).

For example,  屋里有一个人,院子里有五个人。Use 个 measure word in colloquial.

口 is the measure word for 人 (和猪)。

For example,  我爷爷家有六口人,养了两口猪,一匹马,三头牛。

人口, for population report。

For example,  人口统计。Also,城市人口,家庭人口。

Why does the order of 人口 change?


Lubuntu root size

Question: I am going to install Lubuntu 12.04 as dual boot on a 80 GB HDD (after Win 7 installation 35 GB remained for Lubuntu). I guess it does make sense to create a swap and root partition in addition to a big home partition (But I am not very experienced with Linux). Since the space is limited until I'm able to completely remove Windows, I want to assign a reasonable small root partition. For Ubuntu I read 8-10GB. What size would you recommend for Lubuntu? With 1GB Ram I will create a Swap of 1GB and the rest as Home.
Answer: Yes. If you don't install many apps, 8 GB is enough for Lubuntu. Conseidering that settings and apps user data are stored under home partition, Lubuntu File System takes 2-3 GB at the beginning; you add extra 5 GB for apps and a room for breathing. (Once I myself installed Lubuntu on a 80 GB harddisk, made a 10-GB partition for File System.)
In the case of 1 GB RAM you won't need much than 1 GB SWAP – Lubuntu itself takes less than 100 MB on startup.
Answer: Do not bother creating any sub-partions, they just consume space. During install create only a single root partion and install everything there without swap. You can add swap files as needed later if you really need them (normally you do not).
Comment: The separation has some very significant functions. For example, if a programm writes too much to the disk, it's nice to only half of the partitions running full, not all.

Lubuntu root size


When indexing set is empty, how come the union of an indexed family of subsets of S is an empty set?

Question: And how is intersection of an indexed family of subsets if the set itself?
I am reading the Bert Mendelson's Introduction to Topology, and I can't figure how this works. When the indexing set is an empty set, doesn't that mean we can't find any subset of the form $A_\alpha$? Therefore, there is no element in the set $S$ such that $x \in A_\alpha$? I could accept the idea that $\cup_{\alpha \in I}A_\alpha = \emptyset$, but can't understand why $\cap_{\alpha \in I}A_\alpha = S$. To my understanding, I think $\cap_{\alpha \in I}A_\alpha = \emptyset$ as well.
Answer: You have not specified what $S$ is. Anyway, if $S$ is assumed to be a set, then $\bigcap_\alpha A_\alpha\neq S$ since $ \bigcap_\alpha A_\alpha$ is not a set, but it is a class which is merely a meta-language in ZFC. Let $x$ be a set. Suppose $x\notin \bigcap_\alpha A_\alpha$. Then, there exists $\alpha\in I$ such that $x\notin A_\alpha$, which is false since $I$ is nonempty. Hence $\bigcap_\alpha A_\alpha$ contains all sets, so it is not a set.
However, it is customary to write $\bigcap_\alpha A_\alpha$ be mean the whole space depending on context. For example, when $X$ is a topological space and $A_\alpha\subset X$, we define $\bigcap_\alpha A_\alpha$ to be $X$.
Answer: Here is a model you might find useful. It's not a formal argument, but an analogy important when thinking about writing computer programs that may help your intuition.
To find the sum S of a list L of numbers you write this code:
S = 0
while there are numbers left in L
   let n be the next number in L
   let S become S+n
   remove n from L

It's easy to see that this will work in the expected case, when the list isn't empty. Good computer programs work even for boundary cases on their inputs. This one makes 0 the sum of an empty list, which makes intuitive sense.
If you wanted the product of the numbers in the list you would modify the code:
P = 1
while there are numbers left in L
   let n be the next number in L
   let P become P*n
   remove n from L

For this to work you must set P to 1 before you start. Then it's clear but perhaps a little less intuitive that the product of an empty list should be 1.
When doing boolean algebra, unions are like sums and intersections are like products. To find the union of a list L of subsets of a given set X
U = empty
while there are subsets left in L
   let A be the next subset in L
   let U become U union A
   remove A from L

For an empty list, the union is empty, as expected.
For the intersection of a list of subsets
I = X
while there are subsets left in L
   let A be the next subset in L
   let I become I intersect A
   remove A from L

In the edge case when the list is empty the intersection is all of X. The whole set is the (multiplicative) identity for intersection just as the empty set is for union.
There are computer languages in which you can write all four of these algorithms as instances of the same pattern of computation.
Answer: I disagree with Hermes.
$x \in \bigcup_{i\in I} A_i$ iff $\exists i \in I$ s.t. $x\in A_i$.
When $I = \emptyset$ there never exists such an $i$, then the RHS is false independent of what $x$ is, hence $x$ should not be in the empty union.
Similarly $x\in \bigcap_{i\in I} A_i$ iff $\forall i \in I[x\in A_i]$. When $I$ is empty, the RHS is vacuously true, and so everything is in the empty intersection.


Can we automate migrating to SDL Tridion?

Question: We are done migrating a website from old CMS to SDL Tridion. We have thousands of clients out of which fewer than five are migrated. Now let's say we need to automate migrating the rest of the thousands clients, obviously we can not use manual effort. Is there a way to develop automated solution against SDL using any APIs it may provide? If yes where can we find documentation for APIs? Any Books or online tutorials for the same?
Comment: Consider supporting the Area 51 proposal for Tridion; this is a great question, however it's unfortunately slightly off topic on StackExchange.
Answer: all very technical answers. Whatever route you choose you need to weigh up the option of not doing a technical migration (and trying to get that right) versus employing a load of students to copy and paste.
Comment: I think you wanted to say "the option of doing a technical migration" instead of "the option of NOT doing a technical migration".
Answer: Tridion has extensive APIs and these are thoroughly documented. Your starting point for SDL Tridion 2011 is https://www.sdltridionworld.com/downloads/documentation/SDLTridion2011SP1/index.aspx
Automated migrations are perfectly possible, however API support is not the limiting factor here. Understanding your data in your source and target scenarios is much more important.
Comment: Automated migrations are good for when you can map your dataset 1:1 with Tridion, for example, when migrating a DB to Tridion.  However, for normal web pages, and especially pages with handwritten HTML, it is best to include a manual migration for these items.  Also - if you can give your content a haircut and not migrate 100% of it - that would be the best.
Comment: I wouldn't agree that you necessarily need to map everything 1:1. Obviously, for automation to be reasonably manageable, you need *some* structure in the source data, so sure, handwritten HTML isn't very helpful, but you can still do a meaningful automatic migration of most of a site, and leave the rest for manual work.
Answer: Regardless of the CMS, the complexity of a migration can be measured based on how organized is your content in the system you want to migrate from.
I categorize the migration into 3 types related to the Origin and Destination:

1--> CMS to CMS
2--> Database to CMS
3--> WebSite to CMS

If the original source is a database or another CMS typically the complexity is reduced, as the content is already structured.
You have to extract that and map the existing content with the structure that will have in the new system
If the goal is migrate an existing website into a CMS the complexity increases as the content is more disorganized that
having that in the CMS.
Again, if the content in the site is properly structured is still possible to automate that, but most of the cases are old sites
maintained manually.
There are commercial tools that crawl the content from the sites and apply patterns to identify common elements, common content, common metadata, structure
and are able to massage the original content and apply logic based on rules that allows to structure the content, however even the best tool has a hard
work to do when the source is disorganized.
Also I have seen migrations that cut the final html in pieces and put that in the CMS. That is an easy approach but of course a wrong one, as
you are not taking any advantage of the CMS
And 3 Types related the source type we migrate from and the source type we want to obtain

1--> Content to Content
2--> (HTML + Content All together) into (HTML) + (Content) separated
3--> (HTML + Content + Code All together) into  (HTML)    + (Content) +
(Code) separated

Content to Content Migration is less complex
Second option is of course more complex, as you have to Separate Content and HTML that will become templates
Third option is even more complex, as if you are extracting the html of the page (using an http client for instance as most of the commercial tools do),
you are not capturing the logic of the page. For this case you need to work at the file level
Try to do a very depth analysis before you enter in a migration, as things can turn complex.
Only if you have a very good knowledge of the original system and solid patterns to apply you can think in an automation
Answer: I would consider contacting Kapow or Vamosa who both specialize in crawling sites and then importing them to a CMS. They both have connectors for SDL Tridion.  This may save your clients both time and money.
Answer: Every migration is different, unless you are migrating "thousands of" sites (assuming a client is a site) from same source type to same destination (SDL Tridion in this case) with extremely close data models. Several SDL Tridion partners are already solving this problem and built/building assisted migration automation tools. Get in touch with us if you need more information.
Comment: The offer may be helpful but this doesn't answer the question on API and resources.


WooCommerce Plugin - Displaying Price other than Minimum on Products

Question: I have an eCommerce site that has fabric for sale. When setting up product variations, I know the default is to show the minimum price in the string. I don't want to display the minimum price, instead, I need the price to be picked up from the fourth line/price in my variation string. For example, if I have a product that is $20 per yard, I want the product post to read "Price per Yard: $20" rather than "From: $5" as customers can purchase products in increments of 1/4 yard, 1/2 yard, 3/4 yard, 1 yard, etc. I also want to change the text from "from" to "price per yard" for my variations. Please point me in the right direction to make this change in WooCommerce. Thanks.
Answer: look at woocommerce.css and find the section for the price.
you can right click the item in chrome and inspect element to determine where the price comes from, post that section of code here and I'll help you out.


How to select "in between values" with Math nodes

Question: I like to take age values of particles between 20 and 40 and change color of an object in between these values. How can I do it?
Thanks
Comment: By the way, because you give no information on which render engine you want to use and nobody mentions it: the _Particle Info_ node that gives you the particle age only works in _Cycles_, not in _Eevee_.
Answer: Presumably, you want their age-- their lifetime is their total lifetime, determined at birth, not the current time since emission.
To map color to some particular range of ages, first map your age range to a 0,1 range, then use a color ramp:

All particles younger than 20 frames are green.  All particles older than 40 frames are red.  Between, we gradate (by linear RGB, as set by the color ramp.)
Answer: First off, this solution only works in Cycles not in Eevee because the Particle Info node which is needed for the particle age doesn't work in Eevee.
Sorry for repeating parts of your answers, but since the question is open for different approaches or what exactly the outcome should look like, I thought I'd sum up and combine everything so that one can pick what suits them best. This is just an addition if you also want to indicate with another color if the particles are out of the 20 to 40 age range.
In this case, a Compare node comes in handy. To test if the age is between 20 and 40, you take the average (20+40)/2 = 30 and half the distance (40-20)/2 = 10. Plug the age in the first Value input of the Compare node, enter 30 as the second Value and 10 for Epsilon. Now this node compares if the age is 30 +/- 10 (i.e. 20 to 40). The result will be 1 if it is in this range, otherwise 0. This you can use as factor for a Mix RGB node. The first color shows when the age is out of range, in the second color you plug the Color Ramp.
The result looks like this: Particles will change from blue at age 20 to green at age 40. If they are younger or older, they are black.

But also Marty's answer with the Greater Than and Less Than can be of use, if you also want to indicate by different colors if the particles are under age 20 or over age 40. In this case you check for an age less than 20 as factor in a Mix RGB node and mix in the Color Ramp as first color for 0 (no, the age is not less than 20) and some color for 1 (red in my example).
This result goes into the first input of another Mix RGB where the factor is determined by a Greater Than node checking if the age is greater than 40. On 0 (age not greater 40), the result of the first mix node will pass through, on 1 (age greater 40) the second color (in my example black) will indicate older particles.
It looks like this, on the left there are red particles which shows they are under age 20, then comes the color range from blue to green. The particles on the right side are black which shows they are over age 40.
Answer: If you want to change the color in a specific range, you want to use two compare functions because you want to know if the particle's age is greater than 20 and also less than 40.  So you need two math nodes, one for each compare:

But how do you use those results? The compare node returns a 0 if the compare fails and a 1 if the compare succeeds.  Since there is no math node for logic functions, you need a way of faking the and function.  Turns out multiplying the two results gives you the correct values:

If either compare returns 0, multiplying it by the other gives 0.  If both return 1, then the multiplication returns 1.  We can feed this into a mixRGB node:

Since the mixRGB node gives the top color when its factor is 0 and the bottom color when its factor is 1, that tree will give the bluish color if the age is out of the range and the reddish color if the age is in the range.
Comment: Sorry if I came off rude.  I only meant to expand on your comment, which I agree with.  I also forgot to thank you for the compliment.  Your extra info was useful.
Comment: Great answer! Just one little note: since these nodes don't include the minimum and maximum values, if the output was intended to be red *on* 20 and 40 instead of just *between* those frames, you'd need to set the inputs to 19 and 41 (of course that won't matter most of the time).
Comment: English is ambiguous for this usage.  "between 20 and 40" can mean either inclusive or exclusive of the end points.  I took the inclusive path.  In math, we use the parenthesis versus the square bracket to indicate whether a range is inclusive or exclusive, by convention, of course.
Comment: I just added the comment to add extra info. Sometimes newbs get frustrated when something doesn't work *exactly* as they expect it to, so I hoped adding the comment would help such a person out should they run into that problem. Didn't mean for it to sound like you did it wrong or something.


fail2ban configured but want to make server more secure

Question: noticed some ssh attempts to login to my server, did some research and configured fail2ban for my server which is working great, also set up mail notification as soon as user is blocked. i have noticed quite a few notification for users blocked, each with different IP. i am sure these are all automated and not like a physical user sitting there trying to brute force my server, my question is how can i make the server more secure? i have disabled the root account and there is only 1 named account on the server i am using with root privileges to maintain the server. i configured ssh keys previously but disabled this again because i am scared i will lock myself out of my server as i am the only one managing it. any suggestions would be appreciated.
Comment: This can be controversial, but you could move ssh to a different port.  I did that, and it cut the automated attacks down to basically zero.  You set this up by configuring your router to forward the port you choose to port 22 on your server.
Comment: that sure did the trick, i didn't have any attempts on my server since ports changed. thank you!
Answer: I believe Lynis is probably the answer you are looking for.
It is easy to install and run. It will audit your system and provide a score out of 100 along with specific suggestions on how to better secure your operating system:
https://cisofy.com/lynis/