Variance of $\frac{1}{X+1}$ when $X$ has Poisson distribution

Question: I'm trying to find the variance of $\frac{1}{X+1}$  where $X \sim \mbox{Poisson}(\lambda)$.  I found the previous answers here on how to get the expected value of $\frac{1}{X+1}$, and they were helpful and easy to follow. (original: Expectation of $\frac{1}{x+1}$ of Poisson distribution Duplicate: Expected value $\frac{1}{x+1}$ of Poisson distribution )
However, I was unable to generalize this to finding the variance of the same random variable. I tried using the identity $Var(X) = E[X^2] - E[X]^2$ but was unable to derive a neat closed form of $E[\frac{1}{(1+X)^2}]$. While at times it felt like I was getting close, I think I may have hit a dead end. Any help is greatly appreciated.
Answer: Let the random variable (r.v.)  $X$ on a probability space $(\Omega,\mathcal F,\Bbb P)$ correspond to a Poisson r.v. with parameter $\lambda$, so $\Bbb P(X=n) =\exp(-\lambda)\lambda^n /n!$. Then:
$$
\begin{aligned}
\Bbb E\left[\frac 1{(X+1)^2}\right]
&=
e^{-\lambda}
\sum_{k\ge 0}\frac1{(k+1)^2}\cdot\frac{\lambda^k}{k!}
\\
&\qquad\text{ we use now $n=k+1$}
\\
&=
e^{-\lambda}
\cdot\frac1\lambda
\sum_{n\ge 1}\frac1{n}\cdot\frac{\lambda^n}{n!}
\\
&=
e^{-\lambda}
\cdot\frac1\lambda
\int_0^\lambda
\frac{e^s-1}s\; ds\ .
\end{aligned}
$$
and this is a complicated (hypergeometric) function (${}_2F_2(1,1;2,2;\lambda)$ ).

Computer check / answer:
<code>sage: var('a,k');
sage: sum( 1/(k+1)^2/factorial(k)*a^k, k, 0, oo )
hypergeometric((1, 1), (2, 2), a)
</code>
Comment: Wolfram seems to suggest an expression in terms of the incomplete Gamma function. https://www.wolframalpha.com/input/?i=HypergeometricPFQ%5B%7B1,1%7D,%7B2,2%7D,x%5D
Comment: Thank you! That's a huge help.
Answer: Thank you @dan_fulea.
It took me a while to parse your answer, so I wanted to expand on it to ensure I'm not mistaken and to clarify for any others who have this question.
As you said:
$$ E\left[\frac 1{(X+1)^2}\right] = \frac{e^{-\lambda}}{\lambda} \int_0^\lambda
\frac{e^s-1}{s} ds$$
After some trial and error I realized what you meant was
$$ {}_2F_2(1,1;2,2;\lambda) = \frac{1}{\lambda} \int_0^\lambda
\frac{e^s-1}{s} ds $$
So this means that
$$ Var\left(\frac{1}{1+X}\right) = {}_2F_2(1,1;2,2;\lambda)*e^{-\lambda} - E\left[\frac{1}{1+X}\right]^2 $$
Which combined with the answer to earlier user's question (linked in original question) gives us:
$$ Var\left(\frac{1}{1+X}\right) = {}_2F_2(1,1;2,2;\lambda)*e^{-\lambda} - \frac{(1-e^{-\lambda})^2}{\lambda^2} $$
Just to be safe, I confirmed this answer by simulating around 20,000 Poisson draws for a few different lambdas and in each case it closely matched the measured variance.
Thanks again!
For those interested here's link to associated Wolfram page with y being used as the $\lambda$ in this case https://www.wolframalpha.com/input/?i=HypergeometricPFQ%5B%7B1,1%7D,+%7B2,2%7D,+y%5D*e%5E-y+++-+(1-e%5E-y)%5E2%2F(y%5E2)


Do you have to have an account with Hamachi in order for it to work?

Question: Hi i wanted to play minecraft with my cousin and i downloaded Hamachi, but i don't know what to do and I wanted to know if you have to have an account with Hamachi in order for it to work?
Answer: You don't need an hamachi account for it to work, but signing up an account allows you to save the network.
For both of you to play together, simply get your cousin to join the network you created, either finding the network name or by the IP address.


Joomla Contact Component - can I change "Miscellaneous Information" to "Bio"?

Question: I don't want my board members bio's to be called miscellaneous information. To avoid that I'm putting bio's in the address field! This is not a good permanent solution. I would like to know if there is a way to change the label from "Miscellaneous Information" to "Bio". The feature is good for my application. The name, miscellaneous information, not so much.
Comment: Welcome to JSE.  Please take the [tour] and have a look at other questions while you wait for support.
Answer: You can create an language override: https://docs.joomla.org/J3.x:Language_Overrides_in_Joomla
Comment: This worked perfectly. I appreciate the help.
Comment: @Edfromzi please award the green tick to this answer so that the systems stops bumping it to the top of the questions pile.


Lubuntu make a contribution of funds?

Question: How do you contribute Funds to the Lubuntu project? I only want to make a small contribution to it. And I have is installed on a old computer.
Comment: I added an update to this as the Lubuntu Foundation is now the funding backing for Lubuntu - Canonical no longer provides direct financial support to the project.
Answer: Looks like we can't do it directly.
Answer from Lubuntu Dev (who doesn't have enough time for Lubuntu anymore):
https://lists.ubuntu.com/archives/lubuntu-users/2012-March/000826.html
But you can support LXDE: https://salt.bountysource.com/teams/lxle
Answer: Canonical the company that publishes Lubuntu isn't going out of business anytime soon. Much like Microsoft gives discounts to schools and students, Canonical makes software free for home users and small businesses who do a lot of the testing and feature requests. Then it charges support contracts to larger corporations to keep the lights on and staff paid.
Besides direct funding you could consider buying Canonical / Ubuntu T-shirts and hats. This will not only provide funds but "spread the word" to other Windows and Mac users:
Comment: This is no longer valid - Canonical does not provide direct funding anymore to the Lubuntu Project.  See my answer with details to donate to the Lubuntu Foundation which is the primary backing for the Lubuntu Project.
Answer: As of 2020, the Lubuntu project is funded by community donations to the Lubuntu Foundation.
These donation receipts (by source) and disbursements of payments are documented publicly.
Details on the various mechanisms for donating are listed on the Lubuntu Official Site's Donations Page.

Lubuntu make a contribution of funds?


Why such an emphasis on last-hitting in DOTA-like games?

Question: With respect to game design and mechanics, why is there such an emphasis on the last-hit mechanic in DOTA-like games? Why was last-hitting selected as one of the primary reward pathways? It seems kind of arbitrary that the last person to hit something should get disproportionately rewarded for the kill in this way.
Comment: Why is there such an emphasis on shooting in First Person Shooters? Why is there such a focus on stopping enemies from reaching a goal in tower defenses? It's just how the genre works!
Comment: This kind of mechanic is similar to most MMORPGs I've played which is also kinda annoying. Sometimes I tank on killing a creep then suddenly a mage/wizard will simply pass-by and take the last hit, taking away from me all the hardwork.
Comment: It's like that because it is designed that way. This is one of those "Ask the devs"-questions. We will not be able to help you with that.
Comment: This question might be a better fit for the game development SE site, if you're really interested in the alternatives and how to make a game work that doesn't use last hitting.
Answer: Last hitting is a way of rewarding a player for killing a mob, and we still need to give out that XP or wealth. So what are the alternatives?
I see two obvious, simple ones: per-hit rewards, and divvying up the rewards at death based on the share of the damage done.
Continuous per-hit rewards
You could give out a reward for every hit on a neutral mob. For XP rewards, this is quite realistic, but potentially unbalancing and likely not fun.
In a DOTA-like game, you want the neutral mobs to be hard to kill (so it doesn't just become a racing game), and you don't want the majority of them to be terribly dangerous, since the match winner shouldn't usually be decided by whom the neutral mobs kill.
Regeneration and healing powers for the mobs can help significantly there...but if each hit rewards XP, beating on a healing mob continuously (without ever killing them) might be the best strategy. It's also boring. And it doesn't feel very heroic, either.
For wealth rewards, all of that applies, plus it isn't very realistic: you'd expect one of the two teams to get the reward, and the other to be denied the reward when it's time to rifle through the mob's pockets for loose change.
Divvying up the spoils
Alternatively, you could divide up the spoils among all attackers when the mob dies...but that's difficult to do fairly.
Consider the situation where one player has been hitting on a mob for about five minutes, and the mob has been healing almost faster than they can do damage, so they've done damage equal to five times the monster's total health, but the monster is still at 90% health.
Then another player with higher DPS comes along and kills the monster.
Now answer the question: who deserves how much of the XP reward? The player who did 500% damage to it? Or the player who did only 90% damage to it, and actually killed it?
You could say "each HP healed should take away some of the reward from the person who damaged it", but if two players are both beating on the same mob, and then it heals, whose damage to the mob was healed?
Not only would it be hard to balance the reward formula, it would also be hard for players to understand the reward formula, and optimize their actions to maximize their (or their team's) reward.
Advantages of the last hit model
In contrast, last hitting gives the player an easy way to understand what's going on in the game: if I kill the mob, I get the reward, if they kill it, they get the reward.
It also keeps the tension on: beating up on a mob could become repetitive, and, if your reward is guaranteed based on how much damage you do to the mob, it's not a very tense situation, beating on the mob will give you some reward, regardless of whether someone else challenges you. Plus, as the mob gets closer to death, the tension drops, because there's less of the reward left for an opponent to steal.
The last hit model, on the other hand, raises the tension as the mob's HP drops, because you have to be sure you won't have the kill stolen by an opponent. Any repetitiveness in waling on the mob is forgotten, because you aren't actually looking at the mob very much, you're busy scouting to ensure you're going to get the last hit reward, and not just preparing a reward for some enemy crouching in the bushes.
Bottom line: last hitting is easier for players to understand, easier for coders to implement and balance, as well as more engaging for the player...so it's not a model that I see going away any time soon.
Answer: Its a legacy feature from how the first mobas appeared.
Most modern mobas are based on DOTA which was a warcraft 3 custom map. The last hit mechanic was part of the way warcraft 3 played. The modern mobas have just not had a chance to revise this game element (if they have they choose to keep it the same).
Answer: Taking league of legends for example...(Which is a DOTA-like game)
The point is to push lanes to ultimately destroy the nexus, right? This is done by killing enemy minions to push your own forward. Minions giving gold on last hit is a good incentive for players to last hit them. Otherwise the game would be a team deathmatch.
Also, last hitting exists so people don't push too hard. The mechanic forces us to do other stuff in lane until a creep is low enough to be last hit during the early game. This way, not everyone is pushed and open to ganks.
Regarding killing players, or non-AI..certain heroes/champions are meant to get more kills then others, as they can make better use of it. Therefore, teamwork can ensure that the correct person last hits.
Last hitting has been a part of the original DOTA so therefore it's pretty reasonable that it was kept in future MOBA games as it's a huge part of what MOBA is about.


New Wine and Old Wine

Question: I am curious about the connection Jesus makes between fasting and New Wine. Many people relate it to the idea of appropriateness. It just strikes me as an odd comparison.
Answer: To understand the link between fasting and the parables Jesus gave in answer in Mark 2:18-22 (ESV), we need to note that the Mosaic Law prescribed only one fast on the Day of Atonement (Leviticus 16:29, 31).  However, the legalistic Pharisees and the disciples of John the Baptist were following the traditions of men.

Now John's disciples and the Pharisees were fasting. And people came and said to him, "Why do John's disciples and the disciples of the Pharisees fast, but your disciples do not fast?"  And Jesus said to them, "Can the wedding guests fast while the bridegroom is with them? As long as they have the bridegroom with them, they cannot fast. The days will come when the bridegroom is taken away from them, and then they will fast in that day.  No one sews a piece of unshrunk cloth on an old garment. If he does, the patch tears away from it, the new from the old, and a worse tear is made.  And no one puts new wine into old wineskins. If he does, the wine will burst the skins—and the wine is destroyed, and so are the skins. But new wine is for fresh wineskins." (Mark 2:18-22 ESV)

The ESV Study Bible makes these comments:

Jesus refers to himself as the bridegroom, who in the O.T. was the Lord (cf. Isa. 62:5; Hos. 2:19-20).  While Jesus is present with his disciples, they are to rejoice; when he is taken away from them, then they will fast.
Just as new, ushrunk cloth cannot coexist with an old garment, the kingdom of God cannot be regarded merely as a patch over the regulations of the Mosaic law and extra-biblical traditions.  New wine vs. old wineskins illustrates the same truth – that Jesus brings a new era with new ways.

The reason it is inappropriate to put new wine into old wineskins is that the wine will burst the skins, destroying both the wine and the skins.
These two parables illustrate the fact that you can't mix old religious rituals with new faith in Jesus. Jesus' disciples were not fasting along with the Pharisees and John's disciples because they were now under the new covenant of grace and faith in Christ.
Comment: Acts 13:2 and 14:23 link fasting and prayer together and show how first century Christians would do both prior to making important decisions.  The purpose of fasting should be to take your eyes off the things of this world to focus completely on God, to gain a new perspective and a renewed reliance upon God.  However, the Pharisees had introduced man-made rituals and traditions about fasting in addition to what God had commanded.  Their motive was to appear holy and righteous in the eyes of men. That's what Jesus was exposing.
Comment: I hadn't thought of this, it makes you wonder how fasting became such a discipline if it is only prescribed the one time in the law
Answer: Mark 2:21-22 is where we find the words about wine and wine skins.

Nobody sews a patch of unshrunk cloth on an old outer garment. If he does, the new piece pulls away from the old, and the tear becomes worse.
Also, no one puts new wine into old wineskins. If he does, the wine will burst the skins, and the wine is lost as well as the skins. But new wine is put into new wineskins."

As always Jesus the master teacher uses illustrations that are readily understood by his audience.
They understood what happens when fermenting wine stretches a wine skin.
An old wineskin would have lost its flexibility so the fermentation process would cause them to burst open.
Having just been asked why his disciples did not practice fasting as did the Pharisees,Christ replied that, while he was with his followers, fasting as a sign of mourning was inappropriate. Then he said what is quoted above.
In this way Jesus helped them to appreciate that no one should expect his followers to conform to ritual fasting which was part of Judaism.
Christs powerful new teachings could not be contained in the system of Jewish religion.  If one tried to it would be like putting new wine into old wine skins.
Instead those hearing and following Jesus could rejoice in the vitality of his teachings and not try to compromise them with the Pharisaical ways of the Jewish leaders.

New Wine and Old Wine


Built in unit-testing in VS

Question: I'm looking for advice on the built-in unit testing feature provided in VS08. Can any body please tell me if they know of any reasons NOT to use this feature over any of the other packages available (I'm vaguely familiar with NUnit)?
I'm planning on applying unit testing to an older project just to learn the ropes of unit testing and some of the newer features in the .NET 3.5 framework. I like the look of the built in feature as from the quick demo I ran it seemed incredibly easy to use and I generally find Microsoft documentation very helpful.
I'd be very grateful if anyone who is familiar with this feature could alert me to any issues I should be aware of or any reasons to avoid this in favour of another package.
Note: I've tried raking through this (excellent) site for details specific to VS's built in unit testing feature. It has been mentioned a few times but I couldn't an exact match but please accept my apologies if this has been answered elsewhere.
Thank you, Eric
Answer: It looks like the discussion here can answer your question.
Answer: The syntax can be a little clumsy, but if you're only trying to get to grips with unit testing, then there will be no harm in using the built-in stuff

Built in unit-testing in VS


Dc dynamo / generator to dc motor

Question: Can a dc generator / dynamo be used as a dc motor? If so is this realistic without causing meltdown?
Comment: yeah, but you get a shunt wound motor, I guess that could be useful if you need variable speed.
Answer: Yes, possibly - it depends on the design - very early cars had a combined starter / dynamo called a dynostart... Issues can be poor speed characteristics, bearings not designed for the loads encountered when used as a motor etc
The efficiency is poor especially compared to starter motors that are used now and also the efficiency of alternators.
Answer: A DC generator should work fine as a motor. The torque and speed ratings should be similar, but not identical to the torque and speed ratings for generator operation. Changes in control configuration will be required. In order to implement the change, it is necessary to consider the exact details of the machine. The most important task is to determine the locked-rotor current that the machine will draw upon initial energization. The starting or control system must limit that current to an acceptable level.

Dc dynamo / generator to dc motor


How well does Unity 3d work for both Android and iPhone?

Question: I'm not sure if this is the best place to ask this question so if it isn't please let me know and I will move it. I am looking to create a game for both Android and iPhone platform. I know Unity is a great game engine and my question is how well does it work for creating one code base to build for both Android and iPhone platforms? Time is a constraint on this project so I am very interested in how smoothly the process usually is when trying to build both applications and how much custom code must be written for each specific application. Any insite that people have on this topic would be much appreciated thanks.
Comment: Maybe try gamedev.stackexchange.com, though your question seems a bit broad.
Answer: Unity, as implied by it's very name, is designed explicitly to facilitate such multi-platform development in little time. You can for example define for each platform what the max size of each texture is, and it will automatically resize them for you when you build for that target platform - the build process really simple too. Since both your platforms are touch devices, it should be easy to have just one code base working seamlessly for both platforms (and more if needed), with very few custom code for each platform.
Unity has a no-questions-asked 30 day trial of the Android and (I think) iOS versions - I encourage you to try them and see for yourself how little time it will take you to have a proof of concept build for both platforms.


Calling Dispose() vs when an object goes out scope/method finishes

Question: I have a method, which has a try/catch/finaly block inside. Within the try block, I declare SqlDataReader as follows:
SqlDataReader aReader = null;
aReader = aCommand.ExecuteReader();

In the finally block, the objects which are manually disposed of are those which are set at the class level. So objects in the method which implement IDisposable, such as SqlDataReader above, do they get automatically disposed of? Close() is called on aReader after a while loop executes to get the contents of the reader (which should be Dispose() as that calls Close()). If there is no call to Close(), would this object be closed/disposed of automatically when the method finishes or the object goes out of scope?
EDIT: I am aware of the using statement but there are scenarios which are confusing me.
Answer: No, objects are not automatically disposed when they go out of scope.
They're not even guaranteed to be disposed if/when they're garbage-collected, although many IDisposable objects implement a "fallback" finaliser to help ensure that they're eventually disposed.
You are resposible for ensuring that any IDisposable objects are disposed, preferably by wrapping them in a using block.
Answer: You should use a using {...} block to wrap your IDisposable objects in - the Dispose() method (which for SqlDataReader passes off to the Close() method) will be called when the using block ends. If you do not use using, the object will not be automatically disposed when it goes out of scope - it will be up to the object finalizer, if it has one, to get rid of resources when it is garbage collected
using (SqlDataReader aReader = aCommand.ExecuteReader())
{
    // ... do stuff
}   // aReader.Dispose() called here

Answer: I agree with all of the above. You should make sure you call Dispose() yourself, and the easiest way to to this is with the using statement (you can also do this yourself in the finally block - this is more verbose, but sometimes necessary). If you don't do this you can find your application leaking unmanaged resources such as handles, or even unmanaged memory, especially if somewhere underneath all of this some COM components are being used, or calls are being made into the Win32 API. This can obviously lead to performance and stability problems, as well as excessive resource usage.
Just because objects that implement IDisposable "should" implement a finaliser that calls their Dispose(bool disposing) method to free unmanaged resources, is no guarantee that this will happen, so you definitely should not rely on it. See, for example, http://msdn.microsoft.com/en-us/library/b1yfkh5e%28VS.71%29.aspx for more information on this point.
Also, something else to bear in mind, is that if your type has members that are disposable, your type should either implement IDisposable (unless the lifecycle of those members is managed by another type, which obviously might get messy), or, if you only use such members in one method, or to implement one particular piece of functionality, you should consider making them local variables/parameters in the methods that use them.
Answer: The Dispose pattern doesn't make any guarantees about which objects will call Dispose on which other objects; it may happen sometimes, but you shouldn't care. Instead, it's your responsibility to make sure Dispose() is called for all IDisposable objects. The best way to do that is with the using statement. For example:
using (SqlDataReader aReader = aCommand.ExecuteReader())
{
    // your code
}

Answer: I am puzzled by the statement "In the finally block, the objects which are manually disposed of are those which are set at the class level." By objects set at the class level, do you mean fields? You probably shouldn't be disposing of these within a ordinary method, because then the life-time of the fields is unpredictable, and depends on which methods you happened to have called. It would be better to implement IDisposable and dispose of fields in your Dispose method.
Answer: Might the Using statement help?


Can a meromorphic function be written as ratio of holomorphic function?

Question: Well, I want to know whether a meromorphic function can be written as ratio of two holomorphic function on $\mathbb{C}$ or on a Riemann surface.
Thank you for help.
Comment: Locally, yes, by definition. But not globally: every holomorphic function on, say, the Riemann sphere is constant, so you can't ever get any interesting meromorphic functions that way.
Comment: A meromorphic function can indeed be written as a ratio of two functions each holomorphic on $\Bbb C$. Relevant: http://math.stackexchange.com/questions/133306/is-a-meromorphic-function-always-a-ratio-of-two-holomorphic-functions
Comment: ok I understand, if it is non compact riemann surface then?
Comment: I believe that the top answer in anon's link answers Patience's question.
Answer: a) On a compact Riemann surface $X$  holomorphic functions are constant so that the the quotients of holomorphic functions are just the constants too.  In formulas:  $$\mathcal O(X)=\mathbb C \; ,\quad \text{Frac} (\mathcal O(X))=\mathbb C$$ However a deep theorem (Riemann's Existence Theorem) assures us that there exists a non-constant meromorphic function on $X$ and  that these  meromorphic functions form a finitely generated field of transcendence degree one over $\mathbb C$ ($\;trdeg_ \mathbb C\mathcal M(X)=1$), so that the answer to your question is negative for compact Riemann surfaces: $$\text{Frac} (\mathcal O(X))=\mathbb C \subsetneq \mathcal M(X)$$
b) On a non-compact Riemann surface $Y$ however another difficult theorem, first  proved only in 1948 by Behnke and Stein, says that indeed every meromorphic function is the quotient of two holomorphic functions . In formula: $$ \text{Frac} (\mathcal O(Y))= \mathcal M(Y)          $$
The modern point of view is that this is an easy consequence of the difficult result that $Y$ is a  Stein manifold, the analogue in complex-analytic geometry of an affine algebraic variety.
Bibliography As usual, Forster's Lectures on Riemann Surfaces is the best reference for these questions.


Holding with no radial specified

Question: During my instrument check ride a couple years ago I was given an unpublished hold by ATC at a fix in the approach. For the hold ATC said something to the effect of "... hold west of [fix name] ..." with no radial, course etc. to hold on specified (at least that's the way I remember it from the check ride...I could be misremembering). Ultimately the hold was cancelled before we got there so I was bailed out from my confusion. However, my question is: am I remembering the instructions right? Will ATC give a hold with no course specified? And if so, what is the expected course?
Answer: From FAA Order 7110.65AA:

4−6−4. HOLDING INSTRUCTIONS
When issuing holding instructions, specify:
a. Direction of holding from the fix/waypoint.
b. Holding fix or waypoint.
NOTE−
The holding fix may be omitted if included at the beginning of the transmission as the clearance limit.
c. Radial, course, bearing, track, azimuth, airway, or route on which the aircraft is to hold.
[...]

So this information is required.
It does say elsewhere that this can be omitted if it is a published hold. Even then, it instructs ATC to give full directions at pilot request. You can and should (and must, per 14 CFR § 91.123(a)) ask for clarification any time you are uncertain of an ATC clearance.
Comment: @Tom That or an ATC mistake, or the hold was published and you didn't realize it, I suppose.
Comment: Sadly, "published" doesn't always mean "published *on the chart I'm looking at right now*". A holding pattern published for a fix on a low chart might not always show up on a high chart or on an approach chart, or vice versa. Databases tend to help in that regard, but you're still left with needing to confirm what the database pulled up.
Comment: Thanks. I probably missed the course in his instructions then.
Answer: Unless it is a published holding pattern, ATC should issue, as you show in your question, a "radial," "course," etc. in addition to the direction from the holding fix.
If there is a published holding pattern at the fix, ATC could instruct you to, as an example: "HOLD EAST AS PUBLISHED." (Ref: AIM para. 5-3-8 b.)
The image below is from the  FAA JO 7110.65AA, paragraph 4-6-4 (the U.S. Air Traffic Control Handbook) regarding the issuance of holding instructions.  (emphasis is mine)
Comment: Most likely I missed the course in his instructions.

Holding with no radial specified


Why is there no current induced when the coil is vertical in an AC generator?

Question:
In this picture, the movement of the coil inside an AC generator is shown. My question is when the angle is zero or like in the beginning, the coil is vertical to the magnetic field yet no emf is generated. Why is this so? Isn't the coil perpendicular here to the magnetic field and should therefore induce a current? How can the coil when horizontal and parallel to the magnetic field induce an emf then?
Thanks alot!
Answer: The EMF generated is proportional to the rate of change of the magnetic flux, not the magnitude of the magnetic flux, as described by Faraday's Law of Induction. For a coil of N turns of wire, the induced electromotive force is:
$$ \epsilon= -N\frac{d\Phi_{B}}{dt}$$
Let the magnetic field B be uniform in the x-direction, and consider a loop of wire with one turn and area A, as pictured, which is initially perpendicular to the field.
The magnetic flux through this wire is then $\Phi = B \cdot A $.
Since B is not changing with time while the loop spins, electromotive force is:
$$\epsilon = -\frac{dB \cdot A(t) }{dt}$$
If the loop is spinning with some angular velocity $\omega$, then $\vec{B} = (B, 0)$ and $\vec{A} = (A \cos(\omega t), A \sin(\omega t))$ and we can write the electromotive force as
$$\epsilon = -\frac{d}{dt}\vec{B} \cdot\vec{A}(t) = -\frac{d}{dt}(BA\cos(\omega t))=AB\sin(\omega t)$$
Therefore when A is perpendicular to the field, the induced emf is 0, and when it is parallel to the field and the rate of change of the flux is greatest, the EMF is greatest.
It's not the most intuitive result, but the math bears it out.

Upon reflection it seems important to give a slightly more formal explanation for why the change in flux is related to the change in "area." In the post, I glossed over this distinction by hiding it in the step where I defined area as a function of time. But this is purely mathematical bookkeeping: the quantity which is changing is more properly the flux, and the reason it is changing is that the orientation of the loop changes with respect to the magnetic field.
Flux is more properly defined by the following integral. $$\Phi_{B} = \iint\limits_S \mathbf{\vec{B}} \cdot d\mathbf{\vec{A}}$$ where $\vec{B}$ is the vector magnetic field, $d\vec{A}$ is the unit normal vector for the surface at each infinitesimally small element of that surface. By taking the dot product of the magnetic field and the surface, we're essentially looking at the cross-section of each surface element as seen along the direction of the magnetic field at that point.
Thus the flux in our particular loop is $$\Phi_{B} = \|\mathbf{\vec{B}}\|\|\mathbf{\vec{A}}\|\cos(\theta(t)) = BA\cos(\omega t)$$
as in our notation above. $\theta$ here is simply the angle between the magnetic field vector and the surface normal vector, given by $\omega t$ as it changes in time.
Answer: For a more conceptual view of the current generated in a coil rotating in a magnetic field, consider the fact that there is approximately one free electron per atom in the coil that is rotating.  Thus, the wire is essentially a "container" for a LOT of electrons that are moving in that magnetic field.  Because constant speed electrons experience the maximum magnetic force on them when they are moving perpendicular to the magnetic field, that is where the emf is maximum, which corresponds to 90 degrees and 270 degrees in the posted drawing.  Also, because electrons experience zero magnetic force on them when they are moving parallel to a magnetic field, that is where the emf is zero, which corresponds to 0 degrees, 180 degrees, and 360 degrees in the posted drawing.
Answer: Indeed, you need to define the beginning position; in your picture is the vertical position. After that, you need to think if the flux is increasing or decreasing; the flux is decreasing in your figure and the Lenz law indicates that the induced current has to make up for this loss of magnetic field. According to previously mentioned, the current directions are wrong at 90° and 270° positions, your currents are in opposite directions.


How to confirm coaxial wall plate is connected correctly?

Question: I connected coaxial cable to a wall plate plug that connects a wire directly (does not use a terminator).

After doing that, I did some connectivity testing from the back to the front, and I found that there is no connectivity between the outside middle pin connection and the internal pin.  The braided sheath has conductivity to the ring on the wall plate connector
I figured there is some type of signal processing involved so it may not be conductive... there are also capacitors on the wall plate plug so it's probably taking all the power.
How do I test to make sure that I installed this correctly?
Answer: Your tester probably uses direct current (DC) which will be blocked by the capacitor.
The capacitor should pass the high frequency AC signal from the aerial.
Mind you, those are horrible cheap unscreened sockets. You'd be much better using the screened type with the metal cage which were shown in the rest of the video.


What's this hole on the ATR-72?

Question: There is a hole on the belly fairing circled in yellow. I guess is an air intake but I tried searching some info and couldn't find anything.

Source
Comment: By the way, this kind of hole isn't restricted to the ATR-72; the 737 also have a similar design feature, and it is for the same purpose as well.
Answer: It is the ram air intake for the air conditioning system. There are two of them, one on each side.
Here is an image from the ATR-72 FCOM:

ATR-72 Air conditioning System, image from 737ng.co.uk
Details from the same document:

The air conditioning system is supplied by air processed through two packs which regulate air flow and temperature. The two packs are installed in the main landing gear fairings and operate automatically and independently.
The left pack supplies the cabin and cockpit air conditioned; the right pack supplies only the cabin air conditioned.

Also, as @Jonathan Walters points out, the intake is a good example of NACA inlet (or NACA scoop) and are found in a number of aircraft, for example Boeing 737.
Comment: You might consider adding that it is an example of a ["NACA scoop"](http://www.flyingmag.com/scoop-naca-scoop)
Answer: A ram air inlet for reducing the heat of the Primary and Secondary Heat Exhangers caused by the bleed air coming from the PACK Valve (Primary XCGR) and from ACM Compressor part (Secondary XCGR). It is usually ventilated by 2 means:

RAM AIR if the speed is > 150kts or
Ground cooling turbofan (operated by bleed air coming from Pneumatic system) if the speed is < 150 kts.

This ram air is exhausted outboard via a ram air outlet near the Main Landing Gears

Note: The operation of the Ground cooling turbofan is electrically controlled by MFC and pneumatically operated by bleed air from pneumatic source (ENGINE).

Hope this helps..
B.E. Nolasco
ATR 72-500 Maintenance Instructor

What's this hole on the ATR-72?


I am unable to change brightness of my laptop

Question: i am new to ubuntu and using Ubuntu 14.04 and installed nvidia graphics driver in my sony vaio E-series VpCEH25en but I cant change the brightness.
Comment: ohhhhhh!!!!!! its nice app its working
Comment: this will not decrease brightness but will make your screen black
Answer: To I'm just tried out the following command (As mentioned above)

Ctrl+Alt+T: to open command prompt
sudo gedit /etc/default/grub
Find the line
GRUB_CMLINE_LINUX_DEFAULT="quiet splash"

Replaced this line with the following line
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"
sudo update-grub
reboot

It's definitely working on it.
Answer: Try this app ... it  is handy one with out any overhead...
https://apps.ubuntu.com/cat/applications/brightness-controlleer/
Brightness Controller is the only GUI application for Linux that allows you to control brightness of your primary and secondary display from the same place. It is a software based dimmer. Released under GPL-3, Brightness Controller's source code is available.
**EDIT:TRY THIS **
Changing the /etc/default/grub file may work
In terminal
sudo gedit /etc/default/grub

Find the line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and modify it to one of the following:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

or
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linuxacpi_backlight=vendor"
(try this if the first one doesn't work)

 Save and close gedit.

Then type
 sudo update-grub

 Reboot your pc.

As from Ubuntu 13.10, needed one extra step for the problem to be solved.
Create an xorg.conf file in /etc/X11/ with the following contents:
Section "Device"
   Identifier      "Configured Video Device"
   Driver          "intel"
   Option          "Backlight"       "intel_backlight"
EndSection
#
Section "Monitor"
   Identifier      "Configured Monitor"
EndSection
#
Section "Screen"
   Identifier      "Default Screen"
   Monitor         "Configured Monitor"
   Device          "Configured Video Device"
EndSection

WARNING!! Getting the file wrong or if this configuration is not compatible with your hardware, might end up with an unbootable system!
In that case, you'll have to delete (or rename) the file, but to do so requires either booting from a liveUSB or liveDVD (the simplest way) or booting in recovery mode, making the Ubuntu partition rewritable and then delete the offending xorg.conf file.
Comment: check this answer.. it may help ... http://askubuntu.com/questions/228816/i-cannot-change-the-screen-brightness#answer-228835
Comment: this software does not decreases brightness but make your screen more black
Comment: Edward is right, but he didn't put it that well: Brightness Controller doesn't change the brightness of the screen illumination. It does what an image editing software would do when you change the brightness of an image, thus reducing the available colour space and not reducing the brightness and energy consumption of the light source of the screen.
Comment: still all these techniquea are not working


Why would Allah destroy some cities ( like the people of Aad, or people of Thamud, etc.. ) because they didn't believe .Don't people have free will?

Question: I was educating myself on the different stories of the prophet and in many of these stories, after the people still didn't believe in the words of the prophets (despite many signs), Allah destroyed the city. I was wondering how would I respond to someone who asks:" why would Allah destroy these cities just because they decided to not believe? I thought that this was the reason why there was a day of judgment so that after death Allah will decide if you go to Jannah or not based on how you lived your life. It just seems that Allah is not so merciful if he decides to destroy cities because they don't believe. And why wouldn't Allah destroy the cities of today, since they are much more corrupt now than before?"
Answer: Asalamu Alaykum,
God can destroy his own creation when he wants to. He still destroys cities today. Allah has the worst punishments but he is also the most merciful. He says he will not destroy everyone who sins in this life because if he did there would be no one left.
Allah decided to destroy Aad and Thamud as a punishment, who are we to question him? and for the people who die or are killed but are innocent Quran 2:154-157 is for them. Everything that happens in this life is a test, nothing really matters except our deeds.
Comment: " He says he will not destroy everyone who sins in this life because if he did there would be no one left. " ==> Can you please give the reference for this line?
Also, what does this line mean? Does this mean that Allah wilfully leaves sinful people to live on this planet? If yes, then can you please tell for what reasons?


Can I ride a Trek Crockett (CX/gravel bike) in a road race if I have a road wheelset and tires on it?

Question: I'm looking to buy a Trek Crockett and I am wondering if I could use this bike year round, even as a race bike for road criterium.
Comment: Why not?  I doubt the race would exclude the bike.  If it has disc then they might not be allowed.
Comment: You can ride any bike anywhere, generally.  The restrictions might come from race rules, which could mandate certain physical measurement maximums/minimums, or a more-blanket "UCI compliant bikes only" type restriction.   I think a CX bike could be ideal for crit races, and any losses due to geometry or weight would be minor.
Comment: This bike (in its current edition, at least) has disc brakes, which would be the one thing that might rule it out. I'd check with the race organizers beforehand. It also has a 1x drivetrain, which might put you at a bit of a disadvantage—depending on how much money you're willing to throw at the problem, you might want to put a different cassette and/or chainring on it.
Comment: Thanks everyone! The bike actually has cantilever brakes that the current owner upgraded to and a Sram force 10-speed groupset in it.. the bike weighs just under 18lbs so I think the only real disadvantage would be the weight of the bike. Any other input any of you have would be appreciated!
Comment: If its a flat route, then weight won't matter that much.  If there were decent climbs then it might be more important.  Don't overthink the gear, just be comfortable with it.   Ride the race course beforehand if you possibly can, and that will hint what might need to change.
Answer: Yes definitely, I raced all of last years criterium season on my Ridley X-bow (rim brake) with slick tires.
The thing you may also want to consider is your gearing, if you have a 1x you may want to use a different cassette.
Also if you your bike is disc brake equipped you may not be able to use it in some races. If you are racing in the UK then your in luck as British Cycling have recently announced there allowing of disc brakes in 2018 for road racing and crit, if you are racing somewhere else you will have to check your local stance on disk brakes.
Comment: I am used to disc with a c


Electric field inside a diode

Question: When a voltage is applied to a diode (forward or reversed bias) the depletion zone is changed due to charges change in this region. My question is in both case (forward or reversed bias), how the electric field that is responsible of moving the charges in the P and N region is established ? Is it the same mechanism of electric field establishment inside a conductor i.e surface charges density making the electric field?
Answer: I don't think any of the current answers address your question as I understand it.
My understanding is that your question is effectively: What spatial distribution of charge gives rise to the electric field in a diode?
In the case of a uniform dielectric, the internal field is created by surface charges on the two surfaces,  such are usually very small in width. In a pn junction this is not the case.
https://ecee.colorado.edu/~bart/book/book/chapter4/gif/fig4_3_1.gif
 Figure a of the above image shows the charge density profile of a pn junction.  Notice that you have both nonzero charge density in a sizeable area,  the depletion region. In the case of two dielectrics, instead of a pn junction,  you would get charge accumulating only along the surface of the interface. This non uniform charge density also means that the electric field is not simply a constant in the material, but rather varies along the depletion region, something that ia very different than for a simple resistor.
This charge density comes the bare donors/acceptors that cannot move,  and are neutralized at the ends of the depletion region by the electrons and holes which accumulate in very small regions due to being free to move.
Answer: You are talking about a p-n junction which forms a diode. Now a diode junction is very small compared to the rest of semiconductor. The diode junction can in a first approximation be taken as an insulator since it does not have any mobile charges compared to the rest of the region. When a voltage is applied at the ends the region outside the junction can be viewed as a conductor and hence in a fist approximation has no potential drop or electric field. Therefore all the applied voltage shifts to the p-n junction and an electric field is added or subtracted from original electric field arising from the built-in voltage. In case of forward voltage the electric field due to the applied voltages oppose that due to the built in voltage and opposite is for reverse voltage. Remember the built-in voltage is always from n side to p side.
Answer: The electric field inside the diode will be opposite to that of the electric field of the source. Thus will cause a barrier potential of 0.3 or 0.7 volts opposite to the source when its forward biased. That is why the the diode start conducting when forward biased when source is at more than 0.3 or 0.7 volts. Less than 0.3 or 0.7 volts it will conduct very low current or no current. When reversed biased diode will again built polarity opposite to the source which would be equal to the potential difference of the battery. Thus there is no conduction in reverse biased diode.
Answer: The inner workings of a diode is a very complex topic, so I will start with some basic diode theory.
The current in a diode consists of two parts, diffusion current and drift current.
The diffusion current is due to differing electron or hole concentrations at a location in the diode. If electrons are concentrated at one location they will diffuse into the neighbouring area similar to how a drop of inc diffuses in a glass of water.
Then we have the drift current which is due to the electric field which exists the depletion region (I will come to the origin of this field later). If an electron diffuses into the depletion region it is swept by the field to the positive side. This is the drift current. Of course, it applies to both types of charge carriers, that is, both to electrons and holes. Electron-hole pairs formed in the depletion region (for example by thermal excitation or light absorption) will also be swept out of it and contribute to the drift current.
Let's consider a p-n junction. At the junction interface, we have   excess holes (holes in the conduction band) in the p-region, say to the left; and negatively charged electrons (electrons in the valence band) in the n-region, to the right. Consider the hypothetical situation when we suddenly bring a p-semiconductor together with an n-semiconductor. What will happen? Excess holes will now diffuse to the right because the hole concentration to the right is lower in the n-region than in the p-region. Similarly, excess electrons will diffuse to the left because of the lower electron concentration in the n-region. These holes and electrons occasionally collide and recombine which means that an electron "fall" into a hole and those charge carriers are "lost" because they are no longer in the conduction and valance bands respectively. At this point, they become immobile because charge can only be transported in the conduction band for holes and in the valence band for electrons. However, they have diffused from their original positions which were initially uncharged (they are built from atoms, which are neutral after all), but because they have left, the holes leave behind a negative charge while the electrons leave behind a positive charge and so the p-side becomes negatively charged and the n-side becomes positively charged. It is this charge that gives rise to the electric field inside the depletion region.
At equilibrium (0 V over the diode) the two currents, diffusion and drift, must cancel as no net current can pass through the diode. (If there would indeed be current at 0 V, we would be able to create energy from nothing from that diode, violating conservation of energy.) The question may now arise as to what happens when we short a p-n junction. We indeed have a field over the depletion region so we we might expect current to flow. However, what actually happens is that so called contact potentials arise at the semiconductor-metal interface cancelling the potential of the field in the depletion region precisely, so in the end, we do not get any current flow. (I'm not going to go into the details of exactly why these potentials arise.)
When we have zero bias, due to the electric field in the depletion region, charge carriers have a hard time passing through it, and only diffusing carriers that happen to have enough kinetic energy will go through (around 0.7 eV for silicon diodes), and hence there will be very little diffusion current.
Looking at an equation called the Shockley diode equation: (which is an approximation)
$I = I_S(e^{V/nV_t} - 1)$
The left term within the parentheses is due to diffusion current, while the right term is due to drift current. (Note that at 0 V, they cancel precisely.) Here, $I_S$ is called the scale current and is proportional to the junction interface area, which is constant for a given diode; $n$ is the grading coefficient, which is also constant and depends on the doping profile of the junction; and $V_t$ is the thermal voltage, which is constant for constant temperature. $I$ and $V$ are current through and voltage of the diode, respectively.
We see that increasing the voltage increases the diffusion current, but leave the drift current constant. This is somewhat unintuitive because normally drift current is proportional to voltage as in Ohm's law. However, because there are so few charge carriers in the depletion region, Ohm's law does not apply there and virtually every charge carrier ending up there is very quickly swept into one side of the junction by the field. The drift current is due to minority carriers (for example, electrons in the p-region) diffusing into the depletion region or electron-hole pairs forming in the depletion region. Because the amount of minority carriers in each side and electron-hole pair formation are quite independent of applied voltage, so is drift current.
So what happens when we forward bias the diode then? We are essentially counteracting the electric potential barrier created by the field in the depletion region, lowering the barrier and in turn lowering the required energy that a charge carrier needs to pass the barrier. Hence, current can pass in the forward direction in the diode. Because we have a lower effective field over the depletion region, less charge must be displaced and thus the depletion region must be smaller than for the equilibrium case.
When a diode is reverse-biased, the opposite happens; The electric potential barrier is essentially increased and even less diffusion current will go through. The drift current will remain constant, though, so we will see a small current (called leakage current) going in the reverse direction of the diode. For reverse bias, more charge is displaced and the depletion region is larger compared to the equilibrium case. For forward bias, drift current is usually considered negligible.
Even though this answer is lengthy, it is a major simplification of of the inner workign of a diode and many explanations have been left out on why certain things happens as they do. To get a better understanding of p-n junctions (and semiconductors in general) I can recommend the book "Solid State Electronic Devices" by Streetman and Banerjee.
Answer: In a diode, two processes are at play, first one is the "diffusion" and the second one is the "drift" , now even at room temperature electrons on the n-side try to go the p-side so as to stabilize themselves or to reduce their potential energy to a minimum, but when they do that they get stuck in the holes on the p-side, now those electrons were first in the conduction band that's why they were able to go haywire but now when they enter that hole ( a hole is essentially a vacancy in the valence band ) , they release their extra potential energy, and gets stabilized by entering in the valence band, now they are stuck and can't move due to the normal thermal energy that we get at the room temperature, due to this a "depletion region" is formed, we call it depletion because electrons are not able to go crazy in that region, same happens on the n- side, as electrons initially move from n-side to p-side, this exposes the +ve charge of the dopant atom and we call it a "hole" ( I don't like holes though ). Now this depletion layer has a voltage associated to it that tries to prevent more diffusion and tries to revert it back, so for example diffusion tries to kick electrons from n-side to p-side whereas drift tends to take them back to their initial configurations, when these two processes are balanced, we get stable equilibrium.
Now to distort that equilibrium, we can do two things.

Forward Bias : We know that "diffusion" and "drift" are fighting with each other, but under normal conditions no one wins, but what if we make one of them win! Aha! Thats what we do when we bias a diode. In forward bias we attach +ve pole of battery on the p side and -ve pole of battery on the  n-side, as we do that -ve side of battery pushes electrons in the n-side and slides them towards the p-side, due to this that depletion layer starts vanishing, and now is the fun part when it vanishes electrons are no longer prevented to diffuse over to the p-side  and diffusion current increases heavily.electrons were trying to go all the way to p side ever since we made a pn junction but they were not able to do so due to that depletion layer, what we did in forward bias is reduced that depletion layer and then diffusion did its work.
Reverse Bias : exactly opposite happens, in this case depletion layer increases and diffusion almost stops  but drift continues its work in the opposite direction, that's why we get a small current in the opposite direction.

Electric field inside a diode


How to another root categories product to default categories product in magento?

Question: Here As you can see in screen shot I have to auction categories Which is in default category and product add in another root category auction.how to show product of another root category to my own default root categories store on click auction in default navigation menu.
Answer: There is a default Magento feature available you can add one product to multiple categories.
the open product on categories tabs you can set multiple categories with root category. see below image
Comment: Hi Chirag Thanks for your response. Here my customer wants to sap rate product from default category. if I put my product in multiple categories then this product is also show during catalogue search in magento default store.  customer wants to put product in another root category only because they does not want to show product during catalogue search.  and they also not want to make another store for this root categories. trying to show another root category product in default category by using another root category product.


What is the evolutionary function of desire?

Question: I am not sure if this question is best suited for this stack exchange, but I couldn't think of a better one. Why do animals with brains desire things? What is the evolutionary function of desire? What is its biological purpose? I have been wondering this for some time.
Comment: Desire is the trigger to search for necessary ressources. Without finding necessary resources there is no survival.
Comment: Note that nowhere near every trait has "an evolutionary function." Traits often arise as side effects of evolutionary pressures. Thus it would be misguided to suppose that aging serves an evolutionary function. Instead, it is but the result of optimally allocating resources to traits that **are** evolutionarily driven—such as reproductive success—rather than invest in maintaining youthful vigor. Since organisms are likely to fall victim to such external hazards as predation, disease, or illness at some point, enhancing the sustaining of youthfulness ends up a poor investment.
Comment: Probably raising dopamine levels in the brain, facilitating beneficial activity.
Comment: Sex, essentially.
Comment: This is a personal assessment: a byproduct of all interactions is attraction/rejection (e.g. you buy a tasty apple at a good price, then you get attracted to the seller to repeat the interaction; molecules interacting in a gas tend to dispersion, that is, rejection, etc.). Desire is an expression of attraction, with the goal of sex/reproduction/survival. Getting attracted to someone finally increases the probabilities of species persistency.
Answer: Life has evolved to behave in a way that increases the chance of passing on genes. Generally, you are more likely to pass on your genes if you eat, mate, avoid predators and other risks, etc. Your body and brain have evolved to encourage you to do those things through chemical reward systems. When you eat, for example, that triggers the release of chemicals that give you a pleasant sensation, so that you are motivated to repeat the experience and avoid malnutrition. Presumably, similar processes encouraged our ancestors to find warm, safe caves to live in, to have ornaments that attracted mates and so on. Desire, therefore, is a mechanism that encourages the search for outcomes that are likely to increase your chance of survival and procreation. Today, some of those selection pressures that influenced our evolution do not apply to the same extent, but the associated mechanisms still remain.
Answer: The desire for food and procreation allow the animal to survive and replicate its genes. A lack of desire would be an evolutionary disadvantage. Excess of desire would cause risk taking and lower chance of survival. We humans have animal desires that may not be in our best interests as individuals, practically or ethically.
Answer: If you start with the premise that knowledge is not innate but desire is
Then that desire creates a curiosity to explore your environment from whence you are concieved and continue from birth.
This desire causes you the want to interact in our environment and learn that once you begin learning, you can acquire knowledge about your environment and alter your behaviour as a consequence of that knowledge and develop your conscious self.
Comment: @Community Why do I have support my answes with citation and reference when other members of the community do not. No offence but that sounds discriminatory to me. My answers are not inflammatory and do not contain content that can be deemed offensive can you explain why other members of the community are treated differently than I am. I'm not trying to be clever or smarter than anybody else and I have responded with humour to other members of the community posts. I understand that the references are important from a reputable source,I have no credentials Iam just an ordinary man.
Comment: Sorry @8Mad0Manc8 the bot did this to you, was my fault (this time). You are right, it doesn't make sense to send out such messages to new users if higher level moderators do nothing about older users violating the same standards. When I'm behind the wheel of the bot, I won't flag anyone else for this reason again (especially since this bot only targets new users). Very sorry about this.
Comment: @Hokon Thanks for the apology :-)
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Comment: @Community And if you must know that I  know about dopamine as I have to take reuptake inhibitor to control my illness and the dopamine is a reward for particular action.. But that really doesn't explain how desire actually exists in the world because it didn't vote from inanimate matter unless you can come up with another explanation!


How can I install a stair skirt to fit the stairs instead of running alongside?

Question: Can I place a stair skirt on the top of basement stairs instead of between the stairs and the wall? The gaps between the stairs to the wall are all different so instead of dropping the skirt between the wall and stairs I need to place the skirt on top of the stairs to cover the gaps. I hope this can be done and that someone has instructions on how to do it.
Comment: Hello, and welcome to Home Improvement. Would you add a picture of the area your asking about? And, you should probably [take our tour](//diy.stackexchange.com/tour) so you'll know how best to participate here.
Comment: How much difference is there between the wall and individual stairs? (1/8" from one to the next or 3/4"?) And are the gaps from one stair to the next are significantly inconsistent, or is it generally a different gap from the top to the bottom of the staircase? A corollary question is: Why are they so inconsistent? Is there an underlying problem that needs to be addressed? As mentioned, some pictures and "context" are pretty important here to get the answer you want/need.
Answer: I think this may work for you:
This article, "Scribing Skirt Boards" by NORM YEAGER, provides a pretty good explanation of a technique to install a stair skirt "on top" of an existing stairway. You might want to do a couple of "practice runs" before you do the actual skirt...depending on your skill level and the steadiness of your nerves, etc. It isn't difficult, but it is one of those things that gets easier with a bit of practice.
What they're detailing here is laying a 1x12 across the top of the stairs and scribing the outline of the steps onto the board, for cutting out the profile of the steps and then installing it above the steps instead of between the staircase and the wall.
Personally, I think that I'd use a pencil instead of a sharpened brad to mark the cut lines, but both methods should work.
If there is an existing skirt, you could install your new skirt over the top of it to effectively make the two skirts into one thick enough to cover the gaps.
If there isn't an existing skirt, making one out of 1x12 might be thick enough to cover the gaps, but you may want to use a 2x12 to make the skirt so that you'd have the additional thickness to cover the gaps.
Depending on the surrounding woodwork, etc. you could augment the existing molding to match and blend in the additional thickness of the skirt.
Answer: I've done basically this using mitered trim rather than a continuous skirt board. The trick is to trace the nosing against the trim and notch the nosing, so that the trim fits tightly against both the tread and the riser, sliding past the nosing. Something like this:
<code>|   /|
|  / |_____________________
| /                       /|
|/______________________ / |
 _______________________)  |
    ^-- tread      | |/    |
                   | |     |
                   | |     | <-- mitered trim
        riser -->  | |     |
</code>
A handsaw works well to notch the nosing. You could create a jig block 1/16" thinner than your trim, then press it to the wall and slide the saw along that.
You won't fit a jigsaw in there. You could maybe make an undercut saw work if you're in a hurry, but you'd have to set the depth for each cut. Maybe an angle grinder with a 4" circular saw blade.
The cut from the front is critical, as it mates to the trim, but the cut parallel with the tread gets buried.


Calculate number of photons of a light source given the lumen and the color spectrum

Question: Is there any program that given the lumen and the colour spectrum (relative intensity at any wavelength) of a light source and it outputs the total amount of photons per wavelength?
Comment: I'm voting to close this question as off-topic because it's not about electrical engineering design.
Comment: Lumen (and candela) are corrected for the response of the human eye. Inverting this function to give the luminous power in watts will be your main problem, because there are several conflicting (although similar) definitions. Other than that it seems straightforward and you can just calculate it yourself (or write the program if you want).
Comment: @OleksandrR. I was asking for a program, because although it's _straightforward_ it takes me a a lot of time. I've found spectra.1023world.net that is speeding up the process a lot. (If I could I'd write the program myself.)
Comment: This is homework without an attempt at a solution, and might be off topic for this site
Comment: Thank you for asking this perfectly fine electronics engineering related question. I was able to find the answer I was looking for.
Answer: The energy of a photon of light is given by
$$E = h * \nu$$  where \$h\$ is Planck's constant, and \$\nu\$ the frequency. So it's easy to derive this:
\$Photons/s = \dfrac{P\lambda}{hc} \$ where \$P\$ is the power in watts and \$c\$ is the speed of light.
For example, a laser pointer might emit 2 mW of light, at the wavelength 630 nm. The best way to solve these equations is with google, then you don't have to worry about the units.
Google "2 mw * 630 nm /( (planck's constant) * (speed of light))" and it'll say:

Photons are really small!
Now you need to figure out the power density in your frequency of interest. Of course, at a single frequency, the power is zero, so you're looking for the power in a range of frequencies.
Here is the spectrum of a lamp from wikipedia. Lets try to find the power density of the "green light"

This is in arbitrary units, but no matter, if you integrate it you get the total power of the lamp. My digit-oral-integrator says the total power under the curve is about 6000 nm.units. The integral of the "green light" between 510 and 550 nm is about 800 nm.units, or 13% of the power.
Now all that's left to do is find the total light power of the lamp in watts.
Unfortunately the lumen is not a unit of power; it is, sort-of, but it's weighted by the sensitivity of the eye. For a metal halide light as shown in the spectrum above, wikipedia again says

metal-halide lamps have high luminous efficacy of around 75 - 100 lumens per watt...

Putting it all together: say you have a 2000 lumen metal halide light with the spectrum above. The number of "green" photons emitted per second can be found by google:
"2000 lumens / (82 lumens/watt) * 800/6000 * 630 nm /planck's constant /speed of light"
which says 1019 "green" photons/second.
Comment: +1 for the great answer AND for the Google calculation trick.
Answer: There's probably a program somewhere that will do what you want, but it seems unlikely to be readily available. Doing it yourself will be tedious, but not impossible.
First, you need to apply the luminosity function http://en.wikipedia.org/wiki/Luminosity_functionhttp://en.wikipedia.org/wiki/Luminosity_function to your spectrum, and determine the radiant flux (in rough terms, optical power) which corresponds to your spectrum.
Knowing how much radiant flux you have at each wavelength, you can use tomnexus' answer to calculate the number of photons at each wavelength, then sum them to get the total.


TopSites.plist for Safari

Question: On my iBook G4, I used to have TopSites.plist installed, which gave me 6 of my most used website pages. To click on Google or Thesaurus was an easy matter. I recently had to reboot with my original Mac OS X install discs, and when I got back to my Mac, the TopSites feature was gone. I don't know how to get it back.
Answer: Try doing a software update (second choice in the Apple menu) and see if you have an update available for Safari.
TopSites was introduced in Safari version 4, and the version of Safari that you're using is probably 3.x, considering that you're using a G4 and it probably shipped with Tiger. ;)

TopSites.plist for Safari


Using Jython to Export to Formatted Excel File

Question: I'm doing some testing, and I want the results to be outputted to an Excel sheet.  It is very simple data - only whether it passed or failed:
test1   PASSED
test2   FAILED

I am able to export into a csv file like so:
f = open('TestResults.csv', 'a')
f.write(test + "," + status)
f.close()

This creates a 2 column table, the first column being the test name, and the second being whether it passed or failed (the status).  However, I would like to format the output so that a row with "PASSED" will turn green, and a row with "FAILED" will turn red.  I don't think .csv files can contain formatting like that, so it would probably need convert it in some way.
I tried saving the file with the format, but it is always removed the next time I open it.
If possible, I would prefer doing this without downloading an external module.
Thanks.
Answer: The CSV (comma separated values) file format does not support formatting.
You can use XLSXWriter to create a native Excell document that supports formatting. There is pretty good documentation on their website.
I know you prefer not to use any external modules, but this is the only solution I have.
Good luck!
Answer: Since the main purpose of this is to have a visual of the results, I decided to send it to an html file; with html, I was able to format everything in a way that was easy to read.
While this may not be the most efficient way of doing this, in order to add a new row each time, I created a string in my jython code that contained the html code required to create a new row - then I plugged in the information.  If anyone is curious, here's how the html string looks in the jython code:
    pageTemplate = "<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>" \
    "" \
    "" \
    "" \
    "<meta content='text/html; charset=ISO-8859-1'" \
    "http-equiv='content-type'>" \
    "<title>LogFile</title>" \
    "" \
    "" \
    "
%s%s%s
" \
    "" \
    ""

    #color codes the status
    if status == "PASSED":
        status_colored = "PASSED"
    else:
        status_colored = "FAILED"

    rest = self.delim + test + self.delim + comment + "\n"
    dir = os.path.join(self.path,stamp)

    #save new information to the logfile
    contents = pageTemplate % (dir, status, stamp, self.delim + status_colored, rest)
    logfile = open(self.csvpath, 'a')
    logfile.write(contents)
    logfile.close()

The missing information is declared elsewhere in the code.  Also, the headers were hardcoded into the html file itself, not through the Jython code.


How do i delete the wallet cache?

Question: In rare cases the wallet cache needs to be rebuilt. For example when the wallet cache isn't compatible with the current wallet version.
How do i delete the wallet cache and trigger a rebuild?
Answer: In your wallet folder* you have three wallet files.
<walletname>.keys
<walletname>.address.txt
<walletname>

The wallet cache is the file without an extension. If you delete or move that file to another folder the cache will be rebuilt when opening the wallet.
Note. It is advised to properly backup your wallet files before you perform this action. Also note that deleting the wallet cache results in losing some of the transaction history, namely recipient addresses and private tx keys. Thus, if you want to use an existing wallet with the GUI, it is advisable to backup your wallet cache in case you need transaction history info in the future.
*The wallet folders are as follows:
Windows: Documents\Monero
Linux: ~/Monero
Mac OS X: ~/Monero
Comment: This was exactly my problem.
Comment: Do you know if the size of the cache changes significantly over time? How much space should we allocate for it on restricted file systems?

How do i delete the wallet cache?


Removing all traces of a program on Mac OS X

Question: I'm using Snow Leopard and would like to delete all traces of a program on my computer. I tried using AppCleaner but that does not remove some traces of the program as when I try to reinstall it detects previous installs.
Comment: It would help if you gave us the program name..
Comment: Programs like AppCleaner and AppZapper typically search your ~/Library folder for related Preferences and Application Support files. If there are other files lingering around that are not in ~, those programs won't find them. I'm guessing that whatever program you're trying to install is detecting a receipt from a previous installation.
Answer: Depending on what you're installing it may have dependencies. AppZapper or similar programs will normally look for just files with the application title in the name.
Programs such as Adobe Photoshop and others will put files that are not named likely in various places. Some trial software puts licensing files in your home directory. Often these are hidden or not readily accessible.
If you installed from a package there should be an XML file with a list of everything that got installed laying around somewhere. If you already ran AppCleaner is may have been removed though.
Answer: If tools like AppZapper fail, you can try manual way using find from terminal
cd ~
find . -name "*PROGRAMNAME*" -print

and manually remove leftovers
Comment: Just typing `cd` on its own will take you to the home folder. No need for `~`.
Comment: You shouldn't have to do `cd ~` after opening Terminal. It starts in `~` automatically.
Comment: If you open terminal from tools like e.g. Pathfinder, you may end up in current directory of that tool. Of course you can always use 'find ~ -name "*NAME*" -print' which makes the cd unnecessary
Answer: Another piece of software that does a similar thing is AppTrap.  It detects when an application has been put into the trash and prompts the user to remove files associated with that application.  The automatic nature of it is a feature I appreciate.
Answer: Every app can do their own thing and write to unexpected locations, and there is no way to reliably predict or infer anything, so basically all app cleaning tools are based on common patterns and heuristics, which for some people might work in most cases most of the time.
The only reliable way to tell where an app is writing its stuff is to trace what it does during installation, startup, and during normal operation.
This involves sifting through a lot of 'dirty' low-level calls but can be done using OSX built-in tools.
For example to see what the TextEdit app does, type the following in the Terminal and then launch TextEdit:
sudo opensnoop -n TextEdit

See an app's file I/O activity:
sudo iosnoop -n TextEdit

See everything about an app:
sudo fs_usage `pgrep -i textedit`

The last command has to be started after you start your app, because fs_usage takes a process ID, which you can see in the ActivityMonitor, or using pgrep -i textedit, where textedit is your app. Without an argument fs_usage will show everything on the system.
Running any of the tools above with the --help switch will display more options.
Answer: If tools like AppCleaner doesn't uninstall correctly the best is to give us the program name or ask the editor.
You might also want to inspect the installation package to find post install script that are run to check previous installation.


How reliable is a refurbished Xbox Kinect

Question: Gamestop has a great deal on a refurbished xbox kinect:http://www.gamestop.com/xbox-360/consoles/xbox-360-kinect-sensor-with-ac-adapter-gamestop-refurbished/89295
I am looking to buy one for my friend and was wondering if this is reliable. Does anyone have any recommendations, or bad/good experiences with this product?
Answer: It's been refurbished by GameStop, not by xbox itself. That would usually be a red-flag, but gamestop is a reliable brand (IMO) so you should not be experiencing any problems with this product. I think it's worth buying it, but getting a warranty is a good idea to be safe.
Comment: Does gamestop have a feature for this? or would I just ask their customer service for one?
Comment: @LBMF_1 You can go ask gamestop directly for a warranty (in store) , they offer warranties for most products and you can buy it for a fair price.


TYPO3 URL processing order

Question: I have a problem with the order in which TYPO3(4.5.8) processes URLs. Note that I'm referring to the way TYPO3 resolves URL paths internally, not the Rewrite-Rules of the apache configuration.
My site requires that TYPO3 must observe the following:

URLs of non-existent page must be redirected to a special a 404 page with the correct
404 response header (so they are not indexes as proper content pages).
Non-canonical URL variants (upper/lower case, w/o trailing Slash ) must be
permanently redirected(301) to their the canonical counterpart so that Google doesn't interpret these as containing duplicate content.

I've actually managed to get TYPO3 to do both (URL variants actually gets processed correctly out of the box), but the problem is the order: Variants of non-existent pages also get redirected to their supposedly canonical counterparts, before being redirected to the 404 page. I'm afraid that this will disrupt proper indexing by Google, which is the whole point of the exercise to begin with.
So can anyone give me some pointer as to how one goes about correctly configuring TYPO3, so that it processes URL in the correct order, i.e. first determining the whether a page exists at all before doing anything else.
Comment: I don't think this is possible, because that would mean that TYPO3 needs to validate the canonical URL before doing the redirect. But this should not trouble Google, because Google is smart enough to see the 404 after a redirect. Anyway are you using the extension realurl or what are you using to create the URLs?
Comment: Yeah, I use realurl, as far as i can see it's set to auto-configure (whatever that means).
Answer: There is an extension doing this: forcerealurls2
I never used such an extension, because in a sane configuration no links do point to non canonical URLs in TYPO3.

TYPO3 URL processing order


Can we withdraw a manuscript after acceptance but before publication?

Question: I wonder whether we can withdraw a manuscript after its acceptance but before it has been published online.
Comment: I disagree with the downvotes.  The question is on-topic, and I believe the answer is the same across all disciplines: **Legally, yes, but at some professional risk.**
Comment: Long ago some journals had a clause that if you did withdraw after a certain point, you would have to pay the expenses the journal had incurred on your paper.
Comment: In case it wasn't clear, I also disagree with the **close** votes.
Comment: I agree with @JeffE.  Some people here seem to use downvotes to express "No, don't do that" instead of "This is a bad or poorly written question."
Comment: @FredDouglis: I concede that in this instance, but without an explanatory comment it's impossible to tell the difference between a downvote that means "Please provide more details" and one that means "Don't do that."  (And I note that it's not so badly written that you couldn't write a reasonable answer.)
Comment: @MarkMeckes:  But it is a badly written question, because it is so lacking in details.
Answer: As noted by @Joe_74, it is possible but very bad form.  If there is not a good reason for such withdrawal, the authors are subject to poor reputation at a minimum and sanctions (such as a ban) at a maximum.  You haven't said why you wish to withdraw.  As Joe said, if there is an error, it is unfortunate, but withdrawal is probably best.  If it's like another recent post, and it's because of simultaneous submission or some other less ethical behavior, you would deserve whatever comes your way.
Answer: It may depend on the tacit agreement between the journal and the author(s) that you agree upon when submitting the manuscript.
However, if you motivate soundly this choice (eg quoting errors in data or analyses), most journals will unwillingly accept the withdrawal.
However, this may largely undermine your credibility with the journal, its editors, the specific reviewers, and the publisher.
UPDATE
There is a related post here: Is it ethical to withdraw a paper after acceptance in order to resubmit to a better journal?
And for those submitting to Elsevier journals, this publisher has some specific guidelines on how to handle similar cases: https://www.elsevier.com/about/our-business/policies/article-withdrawal


Iptables rule-set so that a docker container can access a service on a host IP

Question: I have troubles accessing a host private interface (ip) from a docker container. I'm fairly certain that it's related to my Iptables rules (or perhaps routing). When I add the --net=host flag to docker run, everything works as expected. Similarly when I specify that the INPUT policy is following a liberal -P INPUT ACCEPT, things also work as I would expect. However these are undesirable and unsafe options i'd like to avoid.
Since it's not specific to my services (DNS) I've excluded that from the problem, since searching for that in combination with docker yields in a different (popular) problem area, adding noise to the search results.
Also linking of Docker containers is not a viable option, because certain containers need to be run with the --net=host option, preventing linking and I want to create a consistent situation where possible.
I have the following Iptables rules. A combination of CoreOS, Digital Ocean and Docker I assume.
-P INPUT DROP
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N DOCKER
-A INPUT -i lo -j ACCEPT
-A INPUT -i eth1 -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 3 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A FORWARD -o docker0 -j DOCKER
-A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i docker0 ! -o docker0 -j ACCEPT
-A FORWARD -i docker0 -o docker0 -j ACCEPT

My (relevant) host interfaces:
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    inet 10.129.112.210/16 brd 10.129.255.255 scope global eth1
       valid_lft forever preferred_lft forever
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    inet 172.17.42.1/16 scope global docker0
       valid_lft forever preferred_lft forever

And I run a docker container:
$ docker run --rm -it --dns=10.129.112.210 debian:jessie # Specifying the DNS is so that the public DNS servers aren't used.

At this point I want to be able to use a local service, bound on 10.129.112.210:53. So that the following should yield a reply:
$ ping google.com
^C
$ ping user.skydns.local
^C

When I run the same command from my host:
$ ping photo.skydns.localPING photo.skydns.local (10.129.112.206) 56(84) bytes of data.
64 bytes from 10.129.112.206: icmp_seq=1 ttl=64 time=0.790 ms
^C

My resolv.conf
$ cat /etc/resolv.conf
nameserver 10.129.112.210
nameserver 127.0.0.1
nameserver 188.8.131.52
nameserver 184.108.40.206

The point here is not to access public hosts, but rather internal ones, using the local DNS service available on the host (via another docker instance).
To illustrate it even further (My ascii art design skills surpass my iptables fu, so that should say enough at this point):
 ______________________________________________
|  __________________________           Host   |
| |   Docker DNS container   |                 |
|  ``````````````````````|```                  |
|                        |                     |
|     ,----------,---( private n. interface )  |
|     |          |                             |
|     |          |   ( public  n. interface )---
|     |          |                             |
|     |          |   ( loopbck n. interface )  |
|     |          |                             |
|     |          |                             |
|     |        __|_______________________      |
|     |       | Docker service container |     |
|     |        ``````````````````````````      |
|     |                                        |
|     |                                        |
| [ Local host service using DNS. ]            |
|                                              |
|______________________________________________|

  private (host) network interface: eth1 (10.129.0.0/16)
  Docker network interface: docker0 (172.17.0.0/16)

I've searched, read and applied different example Iptables configurations, but I know too little of the more "advanced" Iptables rules to understand whats going on and thus to get the desired result.
Output of iptables -t nat -nL:
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
DOCKER     all  --  0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
DOCKER     all  --  0.0.0.0/0           !127.0.0.0/8          ADDRTYPE match dst-type LOCAL

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  172.17.0.0/16        0.0.0.0/0

Chain DOCKER (2 references)
target     prot opt source               destination

Output of cat /proc/sys/net/ipv4/ip_forward:
1

Comment: I think packets from container come from docker0 interface, not eth1. try `-A INPUT -i docker0 -j ACCEPT`
Comment: Can you post the output of `iptables -t nat -nL`? Did you do any packet analysis, say do a ping from the source container and use tcpdump to capture the packets on the host.
Comment: Certainly, thanks for helping so far: http://pastebin.com/TAaT73nk (Didn't fit the comment..) --[edit]--> Updated the link to a pastebin that doesn't expire.
Comment: Maybe I didn't understand correctly your problem, but I don't see any rule to allow DNS queries on host. Also, is ip_forward enabled?
Comment: Hi @LaurentiuRoescu. `$ cat /proc/sys/net/ipv4/ip_forward -> 1` and `-A INPUT -i eth1 -j ACCEPT` accepts all connections on the _private_ interface. What rules are you missing?
Comment: I think you nailed it @LaurentiuRoescu. When I add your line it seems to work. I never figured it was something that trivial.. Could you please add it as an answer to my question? I'd like to reward your answer.
Answer: Container communicates with host using docker0 interface.
To allow traffic from container add:
-A INPUT -i docker0 -j ACCEPT

Comment: For people who use UFW, here is what I did to allow all communication from Docker containers to host: ufw allow in on docker0
Comment: Dynom, a lesson you might want to take away from this is that logging all your refusals is useful, with eg `iptables -A INPUT -j LOG`.  The stamp `IN=docker0` would have been very useful in working out what rule tweak was needed.  Not to take away from Laurentiu's work, which was excellent - +1 from me!
Comment: I had to use the following rule instead for docker compose to work: `-A INPUT ! -i eth0 -s 172.16.0.0/12 -j ACCEPT`
Comment: This is wrong. This is allowing packets back TO the docker interface, such as ACK packets and such. The conntrack rule would be better suited here.
Comment: @Otheus It is the INPUT chain, not OUTPUT.
Comment: @LaurentiuRoescu (3 months later). "To allow traffic _from_ the container" you said, but then you provided a rule which filters the _container's_ INPUT chain, not the host's.  Your rule would allow packets from one container to reach another container. But the OP was to reach a service running on the _host_. (or a specific IP on the host, afaik)
Comment: @otheus This rule is added on the host, not on the container, so it will not affect INPUT chain on container. It will allow packets arriving on host via docker0 interface (from containers).
Answer: I've encountered very similar situation but adding -A INPUT -i docker0 -j ACCEPT will open all accesses over my eth0 interface of docker host to containers which is absolutely not what I intended.
And since I noticed that my container just had limited access(say only port 22) to host interface instead of totally shut down from host network, I reviewed my iptables rules and found a rule in chain IN_public_allow which should be responsible for this. The rule is -A IN_public_allow -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW -j ACCEPT. So I added similar rules to allow my container to access other host ports desired, which I think could be a bit more precise way to open host network access to containers.
Comment: `-i docker0` should ensure that this will not affect traffic which does not arrive via the docker0 network.  Your grammar is unclear though.  Perhaps you were saying that outgoing access from docker hosts via eth0 was enabled, which might be true.  I agree that more targeted rules are possible opening only as much as you need.
Comment: @mc0e "-i docker0 should ensure that this will not affect traffic which does not arrive via the docker0 network" sounds incorrect, especially the word _via_. Instead, _at the docker0 network_ is more precise.


Proper way to hang valance over kitchen window between cabinets

Question:
What's the proper was to hang a valance at the top of this window in the kitchen between cabinets? Will have horizontal blinds it covers. Tile backsplash runs up to the top of the cabinets. Window width is 35" including the 1/4 round that acts as the trim. About 4.5" on either side to the cabinets. Should the valance span to the cabinets or is that too far outside the edge of the window?  Keep it about 2" outside the window trim? I'm having a difficult time finding the "proper" way to set that up given my seemingly abnormal setup.
Answer: Valances usually sit on a couple of beefy L-brackets that are double screwed into the wall (preferably at wall studs or window header). Once the L-brackets are solid you literally just slide the valance with installed curtain or drape assembly onto them to then install a single screw through the top of the 'L'... so the valance can't slide off.
As far as width of the valance goes, it's up to you. I prefer the curtains/drapes to dictate the width and have them withdraw into their own pockets to pull back to the trim (maybe 2-inches in your case, depending upon hardware stacking). So, you don't have to fight them for tilt-in glass cleaning.


What determines a robots euler rotation order?

Question: I know Fanuc robots use the XYZ rotation order, ABB uses ZYX and some robots use the ZYZ rotation order.  What actually determines this order?  is it the way the frames are setup on the DH table? Or is it just the order they chose to solve the IK, and any order could be used?  Can anyone help me understand this?  TY.
Answer: Any euler angles triplet can be used to represent the orientation of a rigid body (and so of the link a robot). I cannot answer for the particular robots you mentioned, but usually one choose a representation for ease of visualization or to simplify some computation (e.g. if a link rotate around a revolute joint, it simplify the equation of motion to have one the rotation axis aligned with the joint axis).


bond interface answering for another one

Question: I have a ubuntu 18 server with 4 active NICs. The setup is:
1. one public (not relevant for this case)
2. one single eno1 with ip 10.123.10.21
3. one bond0 (LACP bond consisting of eno3 and eno4), ip 10.123.10.30
2/eno1 & 3/bond0 are in the same network/vlan as bond0 is supposed to handle application traffic and eno1 is for mgmt and supporting services..
When enabling firewall (ufw) for some services on eno1 nothing seemed to work and after extensive digging and tcpdumping I figured out that bond0 is answering to arp requests for eno1 and all traffic goes to bond0 instead. And as long as the fw rules are not IP specific, things work but when you say allow to IP on IF nothing gets trough as this IP is actually being served by another IF.
I don't have ip forwarding on or any bridging
# cat /proc/sys/net/ipv4/ip_forward
0

On the switch side this VLAN is access only/untagged for internal traffic only, one LACP group for the bond0, the rest are standard. It is also ufw/iptables independent as I turned the service off and it stays the same (I thought it could be some pre-routing chain).
So I'm quite confused as to what's going on. I don't know what I could post to be useful. ip addr + routes seem ok:
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 94:18:82:7b:9a:6c brd ff:ff:ff:ff:ff:ff
    inet 10.123.10.21/24 brd 10.123.10.255 scope global eno1
       valid_lft forever preferred_lft forever
4: eno3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9000 qdisc mq master bond0 state UP group default qlen 1000
    link/ether 2a:08:3c:37:0d:3a brd ff:ff:ff:ff:ff:ff
5: eno4: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9000 qdisc mq master bond0 state UP group default qlen 1000
    link/ether 2a:08:3c:37:0d:3a brd ff:ff:ff:ff:ff:ff
8: bond0: <BROADCAST,MASTER,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP group default qlen 1000
    link/ether 2a:08:3c:37:0d:3a brd ff:ff:ff:ff:ff:ff
    inet 10.123.10.30/24 brd 10.123.10.255 scope global bond0
       valid_lft forever preferred_lft forever
    inet6 fe80::2808:3cff:fe37:d3a/64 scope link
       valid_lft forever preferred_lft forever

# ip r
default via ... dev eno50 proto static
10.123.10.0/24 dev bond0 proto kernel scope link src 10.123.10.30
10.123.10.0/24 dev eno1 proto kernel scope link src 10.123.10.21
.../28 dev eno50 proto kernel scope link src ....

If anyone has any ideas on where to move on from here I'd be grateful..
SOLUTION
As it turns out this is the default/preferred behavior of linux tcp stack. From a very helpful comment by @Zoredache and fiddling with various parameters it turns out if you want to restrict traffic on each NIC in the same subnet to that NIC's IP, you need to set up policy based routing as well.
Some helpful links from here on:
https://pontus.ullgren.com/view/Multiple_interfaces_on_the_same_subnet
and the very in-depth Lin ux Advanced Routing
https://lartc.org/lartc.html
I think I'll just accept the world as it is and modify my ufw filters to match this philosophy.
Jure
Answer: Not certain, but I you need to do something with arp_filter, and/or  maybe some of the other arp flags as well.
https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt

arp_filter - BOOLEAN
...
0 - (default) The kernel can respond to arp requests with addresses from other interfaces. This may seem wrong but it usually makes sense, because it increases the chance of successful communication. IP addresses are owned by the complete host on Linux, not by particular interfaces. Only for more complex setups like load-balancing, does this behaviour cause problems.
Comment: Hmm, good pointer. Don't seem to have that parameter in /proc/net/ipv4 and sysctl doesn't seem to accept setting it, but I'll look at the rest, perhaps something will do the trick. I didn't know about the host-owns-IPs concept, NICs seem a more proper place but there must be a reason. If nothing else, it helps with on NIC dying I guess..
Comment: Ok, this settings are present but in /proc/net/conf/*/ as they can be set per interface. For starters, for IF not to answer an arp request arp_ignore=1 seems to make an IF stop answering to other IPs.  Actually it seems you need to enable policy based routing as well..


Can ArcMap display the individual dimensions of a polygon?

Question: I'm working with parcel data to get the dimensions of each lot to correspond with known dimensions.  Is there a way to display the individual lengths of each line comprising the perimeter of a polygon?  In other words, is there a way to display the distance between each vertex of a polygon in the map while editing?
Answer: I think you will want to create a parcel fabric
Answer: check out the 'feature to line' tool within the Data Management Tools-->Features toolbox. This should help you. You'll need to convert your polygons to lines and then you can label based on the length field.
Comment: It looks like that will get me most of the way there.  I realize I'm probably asking too much when I say I'd like it to update as I edit the polygons.  This is a nice solution though, and a big help, thanks.
Comment: There may be another solution but a polygon measures the distance/area of the entire feature whereas the line just measures the segment. You might be able to incorporate it all into a model/script if you are feeling frisky, but being able to see segment changes on the fly without converting will probably be difficult.
Answer: I'm sure someone, somewhere, has done this before using ArcObjects. However my search attempts turned up nothing, the most promising thing I found was this, but it's for 9.3 only so I can't test it: Drafting tools for ArcGIS 9.3
If you don't mind clicking a bit, you could use the measure tool (it can snap to vertices for better accuracy).
Edit: Here's some VBA code that might work: http://forums.esri.com/Thread.asp?c=93&f=993&t=101658
Answer: I would create a new field for the length of each line segment. Using calculate field with Python, you can run this:
!shape.length@feet!
This will calculate feet from the shape.length of each line segment. Then you can label the line like any other geodatabase object.
If need be, you could create an annotation feature class to display the labels at different sizes for different map scales.
That would be the easiest method, I think.
Comment: I don't think you can calculate the length between vertices. A polygon has rings, not individual lines also.