What was the ante-Nicene Fathers' view on image veneration?

Question: What was the ante-Nicene Fathers' view on image veneration and its use inside churches?
Comment: The real problem with this particular question is that the Early Church was under persecution during the first four centuries and churches rarely existed in the sense that we know them now.  Early Christians often met in homes or Catacombs.
Comment: Are you looking for a response from a Catholic, or from anyone familiar with the writings of the Ante-Nicene Fathers?
Comment: @HoldToTheRod I am currently researching these subjects, and I am willing to accept any Good answer.
Answer: What was the ante-Nicene Fathers' view on the veneration of images and its use inside churches?
The real problem with this particular question is that the Early Church was under persecution during the first four centuries and churches rarely existed in the sense that we know them now. Early Christians often met in homes (house churches) or Catacombs. Persecuted the Early Church writers are silent on this issue. But the Early Christian art exists from the catacombs. Their art has been preserved!
The earliest surviving Christian art comes from the second to early fourth centuries on the walls of Christian tombs in the catacombs of Rome.
Early Christian art is generally divided into two periods by scholars: before and after either the Edict of Milan of 313, bringing the so-called Triumph of the Church under Constantine, or the First Council of Nicea in 325. The earlier period being called the Pre-Constantinian or Ante-Nicene Period.
Early Christian art and produced by Christians from the earliest period of Christianity to, depending on the definition used, sometime between 260 and 525. In practice, identifiably Christian art only survives from the 2nd century onwards.
It is hard to know when distinctly Christian art began. Prior to 100, Christians Were constrained by their position as a persecuted group from producing durable works of art. Since Christianity was largely a religion not well endeared in the Roman world, the lack of surviving writings is more than understandable. Some of these catacombs are over 10 miles (16 kilometres) long!

The veneration of images
Distinct from the admission of images is the question of the way they are treated. What signs of reverence, if any, did the first Christians give to the images in their catacombs and churches? For the first period we have no information. There are so few references to images at all in the earliest Christian literature that we should hardly have suspected their ubiquitous presence were they not actually there in the catacombs as the most convincing argument. But these catacomb paintings tell us nothing about how they were treated. We may take it for granted, on the one hand, that the first Christians understood quite well that paintings may not have any share in the adoration due to God alone.
Christian images before the eighth century
Two questions that obviously must be kept apart are those of the use of sacred images and of the reverence paid to them. That Christians from the very beginning adorned their catacombs with paintings of Christ, of the saints, of scenes from the Bible and allegorical groups is too obvious and too well known for it to be necessary to insist upon the fact. The catacombs are the cradle of all Christian art. Since their discovery in the sixteenth century — on 31 May, 1578, an accident revealed part of the catacomb in the Via Salaria — and the investigation of their contents that has gone on steadily ever since, we are able to reconstruct an exact idea of the paintings that adorned them. That the first Christians had any sort of prejudice against images, pictures, or statues is a myth that has been abundantly dispelled by all students of Christian archaeology. The idea that they must have feared the danger of idolatry among their new converts is disproved in the simplest way by the pictures even statues, that remain from the first centuries.
The idea that the Church of the first centuries was in any way prejudiced against pictures and statues is the most impossible fiction. After Constantine (306-37) there was of course an enormous development of every kind. Instead of burrowing catacombs Christians began to build splendid basilicas. They adorned them with costly mosaics, carving, and statues. But there was no new principle. The mosaics represented more artistically and richly the motives that had been painted on the walls of the old caves, the larger statues continue the tradition begun by carved sarcophagi and little lead and glass ornaments.

The Dura-Europos church is known as the earliest identified Christian house church.
The church was uncovered by a team of archaeologists during two excavation campaigns in the city from 1931 to 1932. The frescos were removed after their discovery and are now preserved at Yale University Art Gallery.

The Dura-Europos church (or Dura-Europos house church) was the earliest-identified Christian house church. It was located in Dura-Europos, Syria, and was one of the earliest-known Christian churches, and seems to have occupied an ordinary house that was converted for worship some time between 233 and 256.
Conversion to a church
During the conversion of the private house into a church, a wall between two small rooms was demolished to make space for the large assembly room. This signified the shift to "church houses", which were more permanently adapted for religious use. As noted in The Oxford History of Christian Worship; "one of the larger rooms served as a baptistery, another for the celebration of the Eucharist, and a third possibly for the instruction of catechumens".
Paintings
The surviving frescoes are probably the oldest-known Christian paintings. The "Good Shepherd", the "Healing of the paralytic" and "Christ and Peter walking on the water" are considered the earliest depictions of Jesus. A much larger fresco depicts three women approaching a large sarcophagus; this most likely depicts the three Marys visiting Christ's tomb or the Parable of the Ten Virgins. There were also frescoes of Adam and Eve, and David and Goliath. The frescoes clearly followed the Hellenistic Jewish iconographic tradition but they are more crudely done than the paintings of the nearby Dura-Europos synagogue.
Answer: Artwork
There is artwork in one form or another in Christianity as far back as the archeological record can take us (As already noted by Ken Graham, precious little has survived from the very earliest years of the Christian era, when it was an overwhelmingly persecuted minority religion, so we have little data until a few generations later). At the very least, we can conclude that artwork is present in Christianity from very early on (further reading here). Perhaps more relevant to the question, however, is what was its purpose?
--
Saints
Historian William Manchester summarized:

Neither Jesus nor his disciples had mentioned sainthood. The designation of saints emerged during the second and third centuries after Christ, with the Roman persecution of Christians. The survivors of the catacombs believed those who had been martyred had been received directly into heaven...They revered them as saints, but they never venerated idols of them. All the early Christians had despised idolatry, reserving special scorn for sculptures representing pagan gods. (as quoted in Callister The Inevitable Apostasy p.257)

--
Honoring/praying to images
Origen of Alexandria had much to say about prayer, and how he believed it was misused (by some) in his day:

Another reason also why we abstain from doing honour to images, is that we may give no support to the notion that the images are gods. It is on this ground that we condemn Celsus, and all others who, while admitting that they are not gods, yet, with the reputation of being wise men, render to them what passes for homage. (Contra Celsum 7.66)

We believe, therefore, that things under the bondage of corruption, and subject to vanity, which remain in this condition in hope of a better state, ought not in our worship to hold the place of God, the all-sufficient, and of His Son, the First-born of all creation. Let this suffice, in addition to what we have already said of the Persians, who abhor altars and images, but who serve the creature instead of the Creator. As to the passage quoted by Celsus from Heraclitus, the purport of which he represents as being, that it is childish folly for one to offer prayers to images, while he knows not who the gods and heroes are, we may reply that it is easy to know that God and the Only-begotten Son of God, and those whom God has honoured with the title of God, and who partake of His divine nature, are very different from all the gods of the nations which are demons; but it is not possible at the same time to know God and to address prayers to images. (Contra Celsum 7.65)

Celsus forgets that he is addressing Christians, who pray to God alone through Jesus. (Contra Celsum 8.37)

the Gospel requires them not to busy themselves about statues and images, or even about any of the created works of God but to ascend on high, and present the soul to the Creator. (Contra Celsum 5.35)

this knowledge [of angels], making known to us their nature, and the offices to which they are severally appointed, will not permit us to pray with confidence to any other than the Supreme God, who is sufficient for all things, and that through our Savior the Son of God. (Contra Celsum 5.5)

Cyprian was sharp in his counsel:

that to pray otherwise than He [Jesus] taught is not ignorance alone, but also sin; since He Himself has established, and said, You reject the commandments of God, that you may keep your own traditions. Let us therefore, brethren beloved, pray as God our Teacher has taught us. (Treatise 4 - On the Lord's Prayer: 2-3)

--
Conclusion
The early fathers explicitly taught that prayers should be addressed to God; they did not unilaterally condemn artwork, but were sharp in their critiques of reverencing or praying to man-made images.
Comment: This actually addresses nothing to the Christian concept of  the veneration of images from a Christian artistic perspective. Origen of Alexandria Is addressing pagans not Christian art of the catacombs or in house churches.
Comment: @KenGraham I'm not sure I follow your comment. When Origen refers to "we" or "us" he's talking about what Christians do (to correct misrepresentation by Celsus & others). He's saying Christians don't pray or do honor to images. I agree though that he is not speaking against the use of art; he's criticizing the worship of art.
Comment: In any case, he is not disallowing the usage, but simply that homage (adoration) should not be given them. Celsus was a pagan philosopher and controversialist who had written a scathing attack on Christianity in his treatise *The True Word*.


Outdoor LED lights runnng dim/flickering

Question: These lights are Kichler hardscape step lights and mounted and installed professionally through a stone wall.  They are wired to a 300 watt multitap transformer and the other two lines work fine.  The first in the series won't light up (even when a new working fixture is installed), the other five run dim and flicker.  Tried replacing the first light.  No go, wired it directly to the feed and it worked great and bright.  Wired it into the second light station and it ran dim and flickered.  Kichler customer support had no advice.  Any takers?
Comment: Seems pretty clear that the supply wire is damaged.  Can you do any electrical tests on the wire - voltage, resistance?  Can you inspect the wire at all or is it all hidden?
Answer: This sounds like a poor connection, that is also crossing over into "arc fault".
It should be readily apparent; when you touch it, it'll be warm or hot.


Contribution from personal checking account to Solo 401k as Single-Member LLC

Question: I have Single-Member LLC (file as a sole proprietor). Should I make contributions (Employee deferrals, Employee after-tax contributions, Employer contributions) to a solo 401k from my business checking LLC account, or can I also make them from my personal checking account, assuming I have transferred funds from my business account to the personal one this year?
Answer: Your LLC is a disregarded entity from tax perspective, so it doesn't matter at all. For liability protection it is generally advised to completely separate business funds from personal, but that's not legally a strict requirement.


Does there exist some $C$ independent of $n$ and $f$ such that $ \|f''\|_p \geq Cn^2 \| f \|_p$, where $1 \leq p\leq \infty$?

Question: Let $f$ be a trigonometric polynomial on the circle $\mathbb{T}$ with $\hat{f}(j) = 0$ for all $j \in \mathbb{Z}$ with $\lvert j \rvert < n$. Does there exist some $C$ independent of $n$ and $f$ such that
$$
\|f''\|_p \geq Cn^2 \| f \|_p,
$$
where $1 \leq p\leq \infty$?
Comment: The more general inequality $\| f' \|_p \geq Cn \| f \|_p$ should in fact hold. This is problem 1.8 in the first volume of _Classical and Multilinear Harmonic Analysis_ by C. Muscalu and W. Schlag. I have a [thread](http://math.stackexchange.com/questions/1655967/lp-norm-of-certain-trigonometric-polynomials-bounded-by-lp-norm-of-second) about this on Math StackExchange which I will update accordingly.
Comment: Can C depend on p?
Comment: @ChristianRemling If if helps with justification of the edit, I would be eager to see the extension of your argument to the more general inequality. I have encountered an obstacle in the extension of my argument, as the sequence $a_{n,j}$ is no longer even.
Comment: @EricThoma: Actually, I've now discovered a problem with my answer and I've deleted (wasted too much time on this already). I'm not finding an easy argument why approximations of $\sum e^{ikx}/k$ should have an $L^1$ error not worse asymptotically than approximations of characteristic functions (though "philosophically" it's clear this has to be right).
Answer: I wish to add another proof based on the following result.
If $(a_n)_{n \in \mathbb{Z}}$ is an even sequence of nonnegative numbers with
$$
a_{n+1} + a_{n-1} - 2a_n \geq 0 \quad \forall n > 0,
$$
then there exists $g \in L^1(\mathbb{T})$ with $g \geq 0$ and $\hat{g}(n) = a_n$. This is lemma 1.12 in Classical and Multilinear Harmonic Analysis Vol 1 by C. Muscalu and W. Schlag. The desired function is
$$
g = \sum_{n=1}^\infty n (a_{n+1} + a_{n-1} - 2a_n) K_n
$$
where $K_n$ is the Fejér kernel.
Define the sequences $(a_{n,j})_{j=0}^\infty$ by
$$
a_{n,j} =
\begin{cases}
    \frac{1}{n^2} + \frac{2(n-j)}{n^3},& \text{if } j < n\\
    \frac{1}{j^2},              & \text{if } j \geq n
\end{cases}
$$
for each $n \in \mathbb{N}$. Then (extending to $j \in \mathbb{Z}$ by $a_{n,(-j)} = a_{n,j}$) we can use the lemma to find $g_n \in L^1(\mathbb{T})$ with $g_n \geq 0$ and $\hat{g}_n(j) = a_{n,j}$.
By the monotone convergence theorem, we have
$$
\|g_n \|_1 = \sum_{j=1}^\infty j(a_{n,(j+1)} + a_{n,(j-1)} - 2 a_{n,j}).
$$
A computation will show that $\| g_n \|_1$ is dominated by $n^{-2}$. Furthermore, for any trigonometric polynomial $f$ with $\hat{f}(j) = 0$ for all $| j | < n$, we have
$$
f = g_n \ast f''
$$
so that Young's inequality finishes the proof.
Comment: [deleted comment, I didn't see your comment to the main question]
Answer: Here is more pedestrian argument. If $T_{n}$ is a trigonometric polynomial of degree at most $n$ with total mass $\frac{1}{2\pi}\int_{-\pi}^{\pi}T_{n}=1$ then $f*T_{n}=0$, and in particular,
$$
f(x) =\frac{1}{2\pi}\int_{-\pi}^{\pi}(f(x)-f(x-s))T_{n}(s)ds.
$$
Therefore, by the triangle inequality
$$
\|f\|_{p} \leq \frac{1}{2\pi}\int_{-\pi}^{\pi}\|f(x)-f(x-s)\|_{L^{p}(dx)}|T_{n}(t)|dt \leq \|f'\|_{p}\frac{1}{2\pi}\int_{-\pi}^{\pi}|s||T_{n}(s)|ds,
$$
where the inequality $\|f(x)-f(x-s)\|_{L^{p}(dx)} \leq |s| \|f'\|_{p}$ follows, for instance from Schur test applied to the operator $(Af')(x)=\int f'(t) 1_{[x-s,x]}(t)dt$.
Now how can we make $\frac{1}{2\pi}\int_{-\pi}^{\pi}|s||T_{n}(s)|ds$ of order $\frac{1}{n}$? Let us be not too demanding and seek for $T_{n}$ among even nonnegative  trigonometric polynomials to reduce the matters to $\int_{0}^{\pi}sT_{n}(s)ds$.
One immediate choice is Fejer kernel
$$
k_{n}(s) = \frac{1}{n}\left(\frac{\sin(\frac{ns}{2})}{\sin(\frac{s}{2})}\right)^{2}.
$$
Now $k_{n}(s) \asymp  n$ on $[0,\frac{1}{n}]$, and $k_{n}(s)<C \frac{1}{n}\frac{1}{s^{2}}$ on $[\frac{1}{n}, \pi]$, therefore $\int_{0}^{\pi}sk_{n}(s)ds \leq C' \frac{\log(n)}{n}$. Well, not too bad but not exactly what was requested.
What else can we do? Let us look at $k_{n}^{2}(s)$. It is even nonnegative trigonometric polynomial of degree $2n$. A small jump in degree is okay (we can just start from $f$ of degree $\geq 2n$). Since $k_{n}^{2}(s) \asymp  n^{2}$ on $[0, \frac{1}{n}]$ its total mass is at least $\geq n$. Then
$$
\frac{k_{n}^{2}}{n} \asymp n \quad \text{on}\quad [0, \frac{1}{n}], \quad \text{and} \quad \frac{k_{n}^{2}}{n} \leq C\frac{1}{n^{3}} \frac{1}{s^{4}} \quad \text{on} \quad [\frac{1}{n}, \pi]
$$
therefore $\int_{0}^{\pi} s \frac{k^{2}_{n}}{n}\leq C' \frac{1}{n}$ voila!


Electromagnetic field

Question: If I apply the electric and magnetic field separately in two perpendicular directions on a conductor then is it behaves like conductor placed in the electromagnetic field?
Is" electromagnetic field "and (electric & magnetic) field acting in the perpendicular directions is the same?
Comment: Electric field is being acted by the stationary charges, and magnetic field is being formed by the moving charges. While there is magnetic field and electric field perpendicular there is no more logic for talk on electromagnetic field. If there is  varying magnetic field you can induce current, while there is no more logic for talk on.
Answer: 'Electromagnetic field' is a term that describes both the electric and magnetic fields together and also separately. This means that even if you only apply an electric field, or only apply a magnetic field, your conductor is still in an electromagnetic field. And yes, if you apply them both, you would still have an electromagnetic field. This means that, of course, Maxwell's equations would be satisfied, but otherwise, you can do whatever you want with the fields, it is an electromagnetic field in the end.
Also if you are interested in the specific system you have in mind, you might find Hall effect interesting.

Electromagnetic field


Can touch spells (with attack rolls) auto crit on Paralyzed/Helpless targets?

Question: Suppose a player character has vampiric touch or scorching ray and is about to attack a paralyzed goblin. Will the vampiric touch or scorching ray auto crit against it?
Comment: When making a coup de grace or just a (normal) attack?
Comment: When you say "auto-crit", do you mean a Coup de Grace? There's a number of effects that automatically confirm crits or similar, but those don't seem to be what you intend.
Answer: Spell attacks cannot deliver a coup de grace
The rules say that a paralyzed creature is helpless, and the helpless condition says:

Melee attacks against a helpless target get a +4 bonus (equivalent to attacking a prone target).

As a full-round action, an enemy can use a melee weapon to deliver a coup de grace to a helpless foe. An enemy can also use a bow or crossbow, provided he is adjacent to the target. The attacker automatically hits and scores a critical hit.

So to deal critical damage, you need to coup de grace. You can only do so with a melee weapon, a bow or a crossbow. Your spell attacks are neither of those, so they can not be used to auto-crit.
You would however enjoy the +4 bonus to hit the paralyzed creature with vampiric touch, at the spell instructs you to make a melee touch attack, and any melee attack gets that bonus.
Addendum: The way your question is worded makes me think that you just want to understand if spells that make an attack roll, when cast on a paralyzed target, would deal critical damage. (In particular, you give both a ranged and a melee spell attack example without difference). This is what I am answering.
As others point out, there are ways you could deliver a melee spell attack like shocking grasp in a coup de grace through a weapon and thus have the attack deal critical damage, e.g. through holding charge and using a natural weapon instead of a touch attack. This would however need more set-up than what I believe you had in mind with your question.
Comment: It is worth mentioning that attacking with a natural weapon while holding a charge WILL deliver the spell on a hit, and cause the spell to crit during a coup de grace. Your fist counts for this. So, you most certainly CAN deliver a coup de grace with a spell.
Comment: Your fist doesn't count. It's not a "melee weapon, bow, or crossbow". Natural attacks count as melee weapons, so they work. Yet even with Improved Unarmed Strike, you just count as armed - your fists don't count as weapons.
Comment: @Gloweye Unarmed strike shows up in the weapons table on both pfsrd and aonprd, and its description states "An unarmed strike is always considered a light weapon." before continuing on to say that that means Weapon Finesse - which only works with weapons - works with it, etc.  It does specify that it's not the same thing as a natural weapon - so Erudaki is slightly off with their wording - but you can certainly perform a coup de grace with your bare hands, even if you weren't wielding a dangerous spell.
Comment: Ah, you're right. My apologies.
Answer: Yes but...
In order to do so, you need to be 'holding the charge'. This means you have to cast the spell one round prior to attempting a coup de grace. Afterwards, the spell will discharge if you make an attack with your unarmed strike or natural weapon. This will take longer than a typical Coup de Grace, but will cause critical spell damage, as the associated melee hit is going to be a crit as well.

Holding the Charge: If you don't discharge the spell in the round when you cast the spell, you can hold the charge indefinitely. You can continue to make touch attacks round after round. If you touch anything or anyone while holding a charge, even unintentionally, the spell discharges. If you cast another spell, the touch spell dissipates. You can touch one friend as a standard action or up to six friends as a full-round action. Alternatively, you may make a normal unarmed attack (or an attack with a natural weapon) while holding a charge. In this case, you aren't considered armed and you provoke attacks of opportunity as normal for the attack. If your unarmed attack or natural weapon attack normally doesn't provoke attacks of opportunity, neither does this attack. If the attack hits, you deal normal damage for your unarmed attack or natural weapon and the spell discharges. If the attack misses, you are still holding the charge.
Answer: No
Pathfinder doesn't have "auto-crit" as part of the ruleset.
You're probably thinking about Coup de Grace, which is technically not an attack.

As a full-round action, you can [...] deliver a coup de grace (pronounced "coo day grahs") to a helpless opponent.

You can do so with a melee weapon, bow, or crossbow. While holding the charge of a touch spell counts as being armed, it doesn't count as any kind of weapon. Neither does Scorched Ray or other spells with attack rolls.
Answer: You could auto crit a Vampiric Touch on a helpless creature with the following prerequisites :

Your character has to coup de grace

Coup de Grace

As a full-round action, you can use a melee weapon to deliver a coup
de grace (pronounced "coo day grahs") to a helpless opponent. You can
also use a bow or crossbow, provided you are adjacent to the target.
You automatically hit and score a critical hit. If the defender
survives the damage, he must make a Fortitude save DC 10 + damage
dealt) or die. A rogue also gets her extra sneak attack damage against
a helpless opponent when delivering a coup de grace.
Delivering a coup de grace provokes attacks of opportunity from
threatening opponents.
You can't deliver a coup de grace against a creature that is immune to
critical hits. You can deliver a coup de grace against a creature with
total concealment, but doing this requires two consecutive full-round
actions (one to "find" the creature once you've determined what square
it's in, and one to deliver the coup de grace).

Your character has at least 7 level of magus, in order to have access to the spell Vampiric Touch (Magus 3) and for access to the magus Spellstrike special ability.

Spellstrike (Su)

At 2nd level, whenever a magus casts a spell with a range of "touch"
from the magus spell list, he can deliver the spell through any weapon
he is wielding as part of a melee attack. Instead of the free melee
touch attack normally allowed to deliver the spell, a magus can make
one free melee attack with his weapon (at his highest base attack
bonus) as part of casting this spell. If successful, this melee attack
deals its normal damage as well as the effects of the spell. If the
magus makes this attack in concert with spell combat, this melee
attack takes all the penalties accrued by spell combat melee attacks.
This attack uses the weapon's critical range (20, 19–20, or 18–20 and
modified by the keen weapon property or similar effects), but the
spell effect only deals ×2 damage on a successful critical hit, while
the weapon damage uses its own critical modifier.

Your character uses a weapon to deliver its coup de grace as a melee attack, with the Vampiric touch.
Comment: Spellstrike won't work, since it works "whenever you cast a spell" and "as part of a melee attack", while Coup de Grace isn't an attack nor a spell.
Comment: Im not sure that is the case. It is however a full round action to coup de grace, and depending on your GM/DM you may need to be already holding the charge from a previous round. They wouldnt be able to coup de grace in the same round they cast the spell, but they can deliver the spell through their weapon in a later round along with the hit that is part of the full round of the coup de grace.
Answer: No... unless you use Coup De Grace. Then Vampiric Touch YES, Scorching Ray NO
Coup de grace is a full round action.
You would have to hold the spell from the previous round as Coup de grace is a full round action.
Unarmed strikes are considered light weapon attacks.
Any spell which requires an attack roll can cause a critical hit. (See "Spells and Critical Hits" under the Critical Hits combat section.)
Vampiric Touch requires an attack roll to affect the target, therefore it can critical hit.
Scorching Ray does not require an attack roll to affect the target(s), therefore it cannot do a critical hit.
Doing this process will follow the rules of both holding a spell and using a touch spell in combat.
Coup de grace makes the attack roll moot*.
(* Option: the Player could still choose the type of attack here. Either "Touch" or "Unarmed Strike" as "If you touch anything or anyone while holding a charge, even unintentionally, the spell discharges." implies the Unarmed strike would satisfy the "Touch" requirement of the spell.)
Option "Touch" would result in 4d6 Vampiric Touch damage (assuming a minimum caster level).
Option "Unarmed Strike" would result in (1d3+str)x2 Unarmed strike damage AND 4d6 Vampiric Touch damage (assuming a minimum caster level).
Hit 'em hard, suck 'em dry!


What was the purpose of the Apple /// interlace mode?

Question: I know that a video interlace mode was available on the Apple /// prototype and eventually on the Apple ///+, but I haven't seen anything that says what it was for. Did it provide a higher resolution mode or was it simply to fill in the horizontal raster gaps?
Comment: Any different from the interlace modes on other systems, retro and latter-day?
Comment: Use a TV as a monitor?
Answer: According to the Apple III Plus Owner's Guide, the interlace mode is called "text interlace":

text interlace a Feature of the Apple III console that, when activated, increases the resolution of text characters on the display screen.

Page 39 provides a little more detail:

So "text interlace" is simply a mode designed to enhance the appearance of text characters on the screen, without using any additional video memory, or even character ROM! It achieves this by switching from a progressive (non-interlaced) resolution of 560×192 pixels to an interlaced resolution of 560×384 pixels and doubling each row of pixels to stretch each 7×8 character into a 7×16 matrix. But note:

Text interlace works best with green-phosphor and other long-persistence video displays. If you have a black-and-white or color display, text interlace may make the picture flicker.
Comment: I wonder why it doesn't sound as though any consideration was given to enlarging the font ROM, tying one extra address bit to the interlace enable/disable control, and the other to the even/odd frame selector?  Doing that would have made it possible to greatly improve the readability of text displays on long-persistence CRTs.


How to sign in to iCloud without verification code sent to other device?

Question: I just formatted my Macbook Pro and reinstalled MacOS. When I try to sign in to iCloud, I am getting this message: "Enter the verification code sent to your other devices.". I don't however have any other Apple devices, which makes it impossible for me to sign in. Is there an alternative way to sign in (e.g. getting verification code by SMS)?
Answer: I found a workaround using SMS. In a web browser, sign in to the Apple Store and when it asks for a verification code, click the "I didn't receive a verification code" link. Select to receive the code by SMS. Now, instead of using the code you receive by SMS to sign in on the Apple Store, you can use it to sign in on your Macbook.
Comment: This does work (yes even in 2020), but why in sweet baby Jesus's name does this work, isn't the whole point of 2FA authentication the CORRELATION between the *request* and the code?


Erroneous Mouse Coordinates Returned from Low Level Mouse Hook C#

Question: I'm building a WPF application with some hackery involved to embed Form elements on the same render layer.  Essentially what I do is I render the form off-screen and have a mock-up of the form in a WPF image.  I also have a low level mouse hook which steals events from the WPF application if they are destined for the Form mock-up and instead use PostMessage(...) to send the events off to the hidden form element.
If I return a non-zero value from my hook procedure indicating to eat the event (even if I still call all the mouse hooks in the queue), the cursor gets stuck in one position.  I'm assuming this is because the cursor position gets handled in some sort of WPF application layer that the event isn't reaching.
I figured that it was fine to prevent the WPF application from knowing about the event at all because I could just set the cursor position myself-- there are coordinates attached to a mouse event after all.  Unfortunately, it seems that these mouse coordinates are horribly incorrect.  In fact, no matter where my cursor is located, I always receive the same coordinates.
Here is my code:
<code>if (nCode >= 0){
    MOUSEHOOKSTRUCT_LL mousehookstruct_ll1 =
                    ((MOUSEHOOKSTRUCT_LL)Marshal.PtrToStructure(((IntPtr)lParam), typeof(MOUSEHOOKSTRUCT_LL)));
    if (mousehookstruct_ll1 != null) {
        if ((user != null) && user.SystemMouseHookProc(nCode, wParam, lParam, new Point(mousehookstruct_ll1.pt_x, mousehookstruct_ll1.pt_y), mousehookstruct_ll1.dwExtraInfo)) {
            return new IntPtr(1);// CallNextHookEx(this.MessageHookHandle, 1, wParam, lParam);// It doesn't matter that I don't call CallNextHook here.
         }
     }
 }
 GC.KeepAlive(this);
 return CallNextHookEx(this.MessageHookHandle, nCode, wParam, lParam);
</code>
}
Then in user.SystemMouseHookProc(...) I print out the correct cursor position followed by the coordinates pulled by the mouse hook, and the output is always something like the following:
Cursor: 523,578
{X=1985777551,Y=1985777602} //This coordinate never changes
That output is clearly wrong.  What can I do to get the correct mouse coordinates from a mouse hook?
Thank you.
P.S.  This solution is derived from a popular one online.  Unfortunately, that solution didn't meet my needs so I've had to alter it to this form.
Answer: Any reason the static property System.Windows.Forms.Control.MousePosition won't work?
Comment: It seems I was marshalling things to the wrong struct.  Apparently MOUSEHOOKSTRUCT_LL is incorrect, but the following is correct...

            [StructLayout(LayoutKind.Sequential)]
            private struct MSLLHOOKSTRUCT
            {
                public POINT pt;
                public uint mouseData;
                public uint flags;
                public uint time;
                public IntPtr dwExtraInfo;
            }
Comment: Yeah, System.Windows.Forms.Control.MousePosition won't work because I'm at such a low level that I was intercepting and eating the mouse move event before the cursor was allowed to move.  Though it won't let me answer my own question yet, it turns out I was just using a similarly named, but incorrect struct to retrieve data.
Comment: Just as a sidenote, you have to add a reference to System.Windows.Forms since this is a WPF application.
Comment: Got ya, no problem! I just try to go for the simple built-in solutions first, before hitting other frameworks or raw win32.


Strange lines appearing on mouse hover

Question: In profile page, under answer section, whenever I hover on the link it shows two lines under the link. It is a bug. I checked some users profile too, showing the same.
Answer: I have put in a fix for it on dev. It will be on live site(both main and meta) after the next production build.
Comment: Cheers, how come you don't have a diamond here??
Comment: @ShadowWizard I'm a Stack Exchange employee, not a moderator on this site.
Comment: I know, Jin, but SE employees usually get a diamond where they need e.g. to add moderator only tags. I see you can add those tags, but it's confusing to unaware user.
Comment: @ShadowWizard I see. I believe at some point we removed the diamond from employees and give them limited mod privileges. It was actually confusing for new users to see a person with a diamond that's not a moderator on the site.
Comment: Fair enough, not my place to argue about those decisions but in my opinion it's equally confusing to see what appears to be ordinary user doing moderator only actions like adding red tags. I've even [reported this once](http://meta.stackexchange.com/q/154882/152859), lol! :)

Strange lines appearing on mouse hover


iOS 5 Multi Storyboard Rotation

Question: I have an iPad app that has 2 views each with its own View Controller. Apple states they suggest iPad apps be able to rotate in all directions. I used this technique to position the elements in my storyboard on rotation changes:
<code>- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
    //[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];

    if (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight || toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft)
    {
        studentNumberButton.frame = CGRectMake(30, 1, 158, 155);
        studentNumberLabel.frame = CGRectMake(173, 57, 347, 43);
        studentLabel.frame = CGRectMake(528, 56, 67, 43);

        // Other code goes below...
</code>
I did this for each view and it works fine for all rotations. However the issue comes up when I say, have the the iPad on View Controller 1 in landscape and press a button to show View Controller 2, View Controller 2 comes up just fine but is in Portrait mode. Same happens if I am in landscape mode for View Controller 2 and go to View Controller 1. If I am in portrait mode, everything is fine for both views.
How can i make it so when I switch views, the view knows what orientation the device is in and rotates accordingly?
Thanks!
Answer: You need to add a viewWillAppear method as follows:
<code>- (void)viewWillAppear:(BOOL)animated {
if (([self interfaceOrientation] == UIDeviceOrientationLandscapeLeft)|| ([self interfaceOrientation] == UIDeviceOrientationLandscapeRight)) {

    studentNumberButton.frame = CGRectMake(30, 1, 158, 155);
    studentNumberLabel.frame = CGRectMake(173, 57, 347, 43);
    studentLabel.frame = CGRectMake(528, 56, 67, 43);
    ...

} else {
    ...
}
</code>
}

iOS 5 Multi Storyboard Rotation


Three different numbers with x³=x mod p

Question: p is a prime greater than 2 and $a \in \mathbb{Z}_p$. Why are there exactly three solutions for a³ = a mod p?
Obviously 0 and 1 are both in $\mathbb{Z}$ and valid solutions, but that still means, there is one element (and only one) missing. I can't figure out which one and neither do I understand why there could not be more valid solutions. Any tips?
Answer: Unless otherwise stated, $a$ is any integer representative of an eponymous element of $\mathbb{Z}_p$.
$$\begin{align}
a^3\equiv a\pmod p
&\Longleftrightarrow a^3-a\equiv0\pmod p\\
&\Longleftrightarrow a\cdot(a^2-1)\equiv0\pmod p\\
&\Longleftrightarrow a\cdot(a-1)\cdot(a+1)\equiv0\pmod p\\
&\Longleftrightarrow\begin{cases}
a\equiv0\pmod p&\text{ or}\\
a-1\equiv0\pmod p&\text{ or}\\
a+1\equiv0\pmod p
\end{cases}\end{align}$$
The last step uses that since $p$ is prime, if it divides the product of some integers [here: $a$, $a-1$, and $a+1$ ], then it must divide at least one of these integers. The reverse trivially holds without the hypothesis that $p$ is prime.
Since $p$ is greater than $2$, the three solutions $a\equiv0\pmod p$, $a\equiv1\pmod p$, $a\equiv p-1\pmod p$ are distinct elements of $\mathbb{Z}_p$.
Without the hypothesis that $p$ is prime, there can be additional solutions to $a^3\equiv a\pmod p$; for example, $a^3\equiv a\pmod{15}$ holds for nine out of fiteen elements $a$ of $\mathbb{Z}_{15}$.
Keep in mind that $x\equiv0\pmod p$ means exactly the same as: $p$ divides $x$.
Thanks to CGFoX for having corrected the $a\cdot(a^2-1)$ expression.
Comment: One more thing: Not every third degree polynomial has three solutions in groups or finite fields. For example, $a^3-1 = 0$ has only then three solutions, if $\phi(p)$ is a multiple of $3$, because otherwise the function $f(x)=x^3$ mod $p$ is a bijection and $1$ has only one root. In the given equation it doesn't depend on $p$, because the solution $a=0$ is a given and $1$ has always two square roots (and $\phi(p)$ is always a multiple of $2$)
Answer: The missing solution is $p-1$. This is a polynomial of degree 3, so (assuming $p$ is prime) it can have at most 3 roots. This polynomial in particular has exactly 3 roots (again, assuming $p$ is prime): you can factorize it to $a(a^2-1)=0 \pmod p$, so the roots are $a=0$ and the two roots of $a^2-1$, which are 1 and $-1 \bmod p=p-1$.
Comment: This shows there are _at least_ three solutions, not _exactly_ three solutions. In an arbitrary [ring](http://mathworld.wolfram.com/Ring.html), it does _not_ hold that any polynomial of degree $n$ has at most $n$ roots. You need to invoke the hypothesis on $p$ somehow.
Comment: The above comment was for [rev1](http://crypto.stackexchange.com/revisions/16572/1). $\;$ Call me picky but "_This_" in the second sentence can only refer to $p−1$, which is not a polynomial of degree 3 [ $a^3-a$ is the polynomial "_This_" is intended to designate]. $\;$The improved [rev2](http://crypto.stackexchange.com/revisions/16572/2) still does not tell how "$p$ _is prime_" implies that a polynomial of degree 3 has _at most_ 3 roots;$\;$ nor why there are _exactly_ 3 roots, which BTW does not hold for quite all primes $p$ as stated [we need to invoke "_greater than 2_" in the statement].

Three different numbers with x³=x mod p


Why doesn't this Google Translate ad use the word "Translation" instead of "Translate"?

Question:
To my knowledge, "Translate" is a verb and not a noun. So why does the above advertisement by Google uses a verb? I mean why not "Translation Community"?
Comment: @TRomano As the names of products, "Translate" and "Excel" are proper nouns rather than verbs.
Comment: **translate** is what the app does. **Translation** is what the app produces as output.  They've decided to name the app after what it does not after what it produces.  And there they're using the name adjectivally.  Just as Microsoft could say "Join the Excel community".  **excel** is a verb too.
Comment: If it were a regular English word (rather than a proper noun), then I'd say it should actually be *translator* rather than either *translate* or *translation*. But it's a name, so it's not a verb and it's not used syntactically as a verb.
Comment: Yet another problem that could be solved by not putting words in ALL CAPS. But of course, Google's UI design always has been, is, and will continue to be terrible.
Comment: @NobodyNada: You've mistaken the point I was making.  They are verbs used as names. Just as Apple chose to call its app *Apple Pay* not *Apple Payments*.
Answer: "Translate" here refers to the name of the product: Google Translate. This makes it a noun-adjunct, I believe. You can see them use the full name elsewhere, when they have more room (emphasis added):

Help improve Google Translate
You can help make our translations better, and even add new languages, as part of the Google Translate Community.
Answer: Although Laurel's answer has been accepted, I'd like to take a different angle.
The banner on Google's site reads:

JOIN THE TRANSLATE COMMUNITY

Because the banner is on Google's own site it would stand to reason they're talking about their own product. Thus, you can drop the "Google" in Google translate as a way of contraction. You'd still be able to recognize the "Translate" as a product name because it's a proper noun, capitalizing the first letter. The confusion stems from the sentence being all uppercase.
If the sentence wasn't all capitals, the intent would be much clearer:

Join the Translate community
Answer: Its a product name so doesn't have to follow grammatical rules.
Like Donuts is a stylised spelling of doughnuts - thanks to Dunkin' Donuts, even Facebook, which began as The Facebook Without "the" it seems cleaner and simpler. The same would be true with Google Translation without the "tion" seems cleaner, more snappy.
You can name a product anything you like; it can feature unusual uses, bozo collocations, unorthodox orthography, nonce words, nonsense words; it can even take something else's name, if it's in a different class of goods or services
In short there are no rules for products, just the creativity of branding to make an impact.


Python CherryPy Web Programming Structure

Question: I usually programmed web application in PHP. For now I am learning using CherryPy framework of Python to do web program. What I am trying to do is to accept a http Get request from user, then using the variables in the query string to do some function, finally I will return the result. But now I think I am being stuck in the programming convention of CherryPY.
I tried to use the  index function to accept the variables post by GET method and then do function as follows:
<code>import cherrypy
from sqlalchemy import *

from function import function

class WelcomePage:

def index(self,number):

    if not number:
        return "failure";
    else:
        number1=number;
        return ;

now = datetime.datetime.utcnow();
code = generateCode();
finalResult();

def finalResult():
    return code;
</code>
The above code does not work, it will just end at the return statement of index(self,number) and I cannot continue the other function. I guess I am breaking the object oriented structure of Python style (different from PHP).
So is the following is only the proper way to handle the GET input and return after calculation
<code> @cherrypy.exposed
 def index(self,number):

  if not number:
    return "failure";
  else:
    cal = Calculation();
    other =OtherFunction();
    code=cal.doSomething(number1);
    final =other.doAnotherThing(code);
    return final;
</code>
That is I need to call all other function within index function and then return the result within the index function. Is that the only way to have something to do about the http GET variable (or post). Can I have alternative way to write the code that does not need to call all the function inside the index funcion ( that seems will make the index function so lengthy). Is that a more clean and clear way to finished the processing of the GET variable with different function and then finally return the calculated result? I have tried to google for many days but still can't figure out a good way.
Comment: if you don't want to return, don't `return`...   What's it doing there at all?
Comment: If don't return , code will be in error
Answer: First, coming from PHP you should understand syntax (e.g. you don't need semi-colons unless it  is a multi-statement line) and semantics (e.g. Python OO capabilities to arrange your code, your "programming structure") of Python. Second, workflow difference between CherryPy application and common PHP deployment (you can read PHP is meant to die for instance). CherryPy to your code is threaded application-server. Your active code is always in memory and can run in background. You have as the more power as the more responsibility.
Once you know the basics you can arrange your code the way you like. Compose or decompose, put in functions or classes or separate modules or any other imaginable way that Python can handle. CherryPy here is no limit. In its simplest it could be something as follows.
<code>#!/usr/bin/env python

import cherrypy

config = {
  'global' : {
    'server.socket_host' : '127.0.0.1',
    'server.socket_port' : 8080,
    'server.thread_pool' : 4
  }
}

class App:

  def _foo(self, value):
    return self._bar(value)[::-1]

  def _bar(self, value):
    return value * 2

  @cherrypy.expose
  def index(self, value = None):
    if not value:
      # when you visit /
      raise cherrypy.HTTPError(500)
    else:
      # when you visit e.g. /?value=abc
      return self._foo(value)

if __name__ == '__main__':
  cherrypy.quickstart(App(), config = config)
</code>


How close to accurate is a HR sensor for calorie burn?

Question: I have a basic Polar HR sensor. Am in very good shape and do lots of cardio a week. In a 60 minute cardio session I can hardly break 400 calorie burn while my friends boast over 600 burn with a Fitbit and I am in WAY better shape physically than they are. My HR stays within the predetermined range and is average about 153 for about 45 minutes. I have checked and rechecked the data input info for my monitor.  I really just wanted the most simple device I can get for HR, calorie burn etc.  Is it because I do not have a lot of fat to burn and that my heart is in good shape and that I have a fast recovery?  BTW my heart rate drops very fast during a minute rest.  My doctor say my EKG is EXCELLENT!
Should I consider a different device?
Answer: You should consider using your device for just what it is meant to measure: Your heart rate (HR) and nothing else.
Such devices are usually very accurate. If you do not thrust your device then you can easily test it by wearing two devices and comparing measurements or by manually counting heartbeats for one minute. Modern devices using green LEDs for sensing colour changes of your skin are considered very reliable.
Even it might have a read out of energy expenditure it is still just measurements of your heart rate converted into another number using some mathematical formulas. Such kind of calculations are subject to many significant errors: They are based on assumptions like energy consumption is related to oxygen transport, and oxygen transport is known from your HR. They will not work if your max HR deviates from the formula 220 minus your age or you are doing anaerobic exercises.
Answer: For instance, 1000 steps may equal anything from 40 - 80 kilocalories to lost, based on an individual's weight and height alone.The products don't reveal the calculations (which i think it is continually updated) utilized to figure out calories burned, it really is extremely difficult to find out the precise value.
And also if the calorie counts are not 100% correct, they're comparatively consistent meaning that in case you need to do the actual same task for 2 days consecutively, your calorie burn ought to read as the identical. That is certainly important to enable you to observe how every day's actions impact your calorie burn and evaluate how well you're progressing.
To answer your question whether you should consider a different device, the closest device that you can think about is Wahoo Tickr X (assuming that you used Polar H10), i mean Wahoo is the great rival for Polar, so you can utilize that for any comparison. You can read here for any comparison or review for both device.


A problem related to Center of Mass?

Question: A Man is standing on the ground( Mass m) next to a rope-ladder(length l) attached to a hot air balloon ( Mass 3m). If he starts climbing the ladder and covers half of the rope, find the distance that the balloon will move in the downward direction.
 A teacher solved this problem by using the fact that the COM's position will remain constant, but my doubt is since there's an external force acting on the system ( mg and 3mg) why will the position of com remain constant?
Answer: The teacher is wrong.
[Edit: I added a slightly easier/better argument at the bottom]
A hot air balloon can fly due to its buoyancy (i.e. hot air is lighter than cold air), also called the Archimedes force. If the balloon is floating in mid-air, and thus not ascending or descending, this means that the gravity on the balloon is exactly matched by the the Archimedes force on it in the opposite direction: $F_A = F_g$.
When the man starts climbing the ladder of the balloon, the force due to gravity on the balloon-man system will become $mg + 3mg = \frac{4}{3}F_g$. Now the man's contribution to the Archimedes force $F_A$ is less easy to calculate (see https://en.wikipedia.org/wiki/Buoyancy#Forces_and_equilibrium). But since the man is not floating in the air, his buoyancy is considerably less, meaning that $F_{A,man} < F_{g,man} = mg$.
So we had $F_{A,balloon} = F_{g,balloon} = 3mg$. And for the man $F_{A,man} < F_{g,man} = mg$.
This means that:
$F_{A,balloon+man} = F_{A,man} + F_{A,balloon} < F_{g,man} + F_{g,balloon} = 4mg = F_{g,man+balloon}$.
Or in words: the balloon-man system will accelerate slowly down to the ground, since its buoyancy is less that the gravity on it.
The reason why in reality it might work that you climb on the ladder of a balloon without the balloon descending, is because in that case the pilot of the hot-air balloon will light the fire in it, heating the air in the balloon, which will increase its buoyancy and thus compensate for your extra weight and lack of buoyancy.
Edit:
You can also see it like this: As long as the man is standing on the ground, the man-balloon system is in equilibrium, meaning no resulting external nett force, and thus indeed the COM should not move.
The force of gravity on the man is balanced by the normal force (i.e. the upward force exerted by the ground supporting him) and the man's Archimedes force (although this is actually negligible for a person in air). The gravity on the balloon is counteracted by the Archimedes force on it. So
$F_{n,man} + F_{A,man} = F_{g,man}$
and
$F_{A,balloon} = F_{g,balloon}$
Thus the total net force on the man-balloon system is 0:
$F_{net} = F_{n,man} + F_{A,man} - F_{g,man} + F_{A,balloon} - F_{g,balloon} = 0$
But as soon as the man starts climbing the ladder of the balloon, the man is no longer supported by the ground, and thus the normal force $F_{n,man}$ drops out. You can see that the total external nett force on the man-balloon system will no longer be zero, and thus the COM does not have to remain at the same place.
Comment: I understand all of that, but finally how do we solve the question? What's the final answer?
Comment: Well, since we've established that there will be a resulting downward force on the man-balloon system, they will keep accelerating until there is a force balancing it again. So when they hit the ground, they'll stop. So when the man is hanging below the balloon halfway the rope ladder, they will go down until the man hits the ground again, i.e. 1/2*l. Here we're neglecting the weight of the rope, of course. Probably not the answer your teacher is looking for, but the point is the COM doesn't have to stay in rest because there is a nett force, so you can't use your teacher's method!
Comment: I was thinking that if we could figure out the acceleration of COM, we could then use calculus to figure out the displacement of the COM using Accelaration= vdv/ds or d^2x/dx^2 right?
Comment: Well not really. Your second equation should be _a = d²x/dt²_. This shows you could integrate _a_ twice to get _x_. Getting _a_ is easy enough, you'll find _a = 1/4*g_. But you need to integrate over a certain time period, so over which period would you integrate?
Do you understand that as long as there is a nett force, the COM will keep accelerating?

As long as there is no ground to stop them, they will keep accelerating infinitely and the displacement will go to infinity.

A problem related to Center of Mass?


Need to capture a value in cookie in lightning component salesforce

Question: I have a lightning component that renders on a VF Page using lightning out.
Within lightning component, I have a dropdown list that contains 3 values : A, B, C.
Question is: When user selects any values from dropdown say 'B', I need to set this value in cookie. Now next time when this VF Page is loaded i need to read this cookie to check which dropdown was selected previously and the same needs to be set on the lightning component.
How can we achieve this?
Comment: I assume cookies are protected somewhat in lightning, why not use a lightweight custom object to track the values? Has the added advantage of being cross-browser & cross-platform.
Answer: I recommend that you use Storage instead. I've written an example of a Value Provider that does this that you can use as a drop-in replacement. This API lets you store several megabytes of data, persists as long as a session does, and works more or less automatically.
Here's the relevant code from the other answer.
myComponentController.js
<code>({
    init: function(component, event, helper) {
        component.addValueProvider(
            'storage',
            {
                get: function(key, comp) {
                    return sessionStorage.getItem(key);
                },
                set: function(key, value, comp) {
                    sessionStorage.setItem(key, value);
                }
            }
        );
    }
})
</code>
myComponent.cmp
<code><aura:component >
    <aura:handler name="init" value="{!this}" action="{!c.init}" />
    <ui:inputText value="{!storage.value}" />
</aura:component>
</code>
Here, we define a Value Provider called "storage". Anything you bind to will automatically store and retrieve data from sessionStorage, even if the page is reloaded, or navigated away from and returned to later.
Comment: Thank you for your quick response.. Basically my VF Page has lightning component in it. And this VF Page opens in service console in a primary tab. So when I close the tab and re-invoke this VF Page does this session storage retains its saved value?
Comment: @Shrey Yes, it should work. I haven't played with Lightning out, but it should work just the same.
Comment: I tried session storage approach as you suggested, however when I close the VF Page and re-invoke it, it does not retain the value. So I tried of local storage (instead of session storage) and the value is retained. Can you please help me out here if it is ok to use local storage here? Also does the value gets cleared out when session is re-established?
Comment: @Shrey It might be a side effect of Lightning Out. But yes, localStorage should also work for your purposes.


Post commit hook error in VisualSVN Server

Question: When I commit the latest code in the TortoiseSVN Client machine, it triggers the post commit hook which has been configured in my VisualSVN Server machine.
Now the issue is: Commit is successful but i am getting an error post-commit hook failed (exit code - 255) with no output.
Answer: The hook script somehow fails to process the commit. You (or your sysadmin) have to analyze what you hook script does and why it fails. There can be numerous issues. Start your troubleshooting with checking hook script's code and access permissions on the server-side.
Administrator can troubleshoot this by capturing the hook script's output for clues:

Rename your current post-commit.bat file to post-commit-run.bat,
Create the following file as your post-commit.bat file:
call "%~dp0post-commit-run.bat" %* > %1/hooks/post-commit.log 2>&1

Commit to the repository and check the generated post-commit.log file in the hooks directory of your repo on server-side. The output wil give you clues about the root cause.


sp_BlitzWho saving to a table

Question: How to save result of sp_BlitzWho to a table? An option to save to table is not there compared to other procs like sp_Blitz.
Answer: You can declare table variable with fields fully equal to SP output and save results to it. E.g.:
    DECLARE @who_results TABLE
    ([run_date] DATETIME,
     ...
    )
    INSERT INTO @who_results EXEC sp_blitzwho

After that, you can do everything you want with data in table variable.
Answer: It's not a feature we have in sp_BlitzWho right now, but if you add a request for it in the Github repo, I'd rubber-stamp it with a yes, and you could implement it if you like. It's fairly easy to copy/paste the code from the other procs.
Check out the Contributing.md file in the Github repo for more information on how to contribute to the project.
In the meantime, you can use the OPENROWSET trick to create a temp table without knowing the result set definitions ahead of time.
Answer: On any relatively recent version of SQL Server, i.e. 2012+, you can use sys.dm_exec_describe_first_result_set to programmatically create a CREATE TABLE statement containing a correctly-defined table for the results.
You can then use the INSERT INTO ... EXEC ... syntax mentioned by @Marvin in his answer to save the results into the table.
This should do the trick:
DECLARE @tsql nvarchar(max);
DECLARE @params nvarchar(max);
DECLARE @browse_information_mode tinyint;
SET @tsql = N'EXEC dbo.sp_BlitzWho;'
SET @params = NULL;
SET @browse_information_mode = NULL;
DECLARE @cmd nvarchar(max);
SET @cmd = '';
SELECT @cmd = CASE WHEN @cmd <> N'' THEN @cmd + N'
    , ' ELSE N'' END + frs.name + N' ' + frs.system_type_name
      + CASE WHEN frs.is_nullable = 1 THEN N' NULL' ELSE N' NOT NULL' END
FROM sys.dm_exec_describe_first_result_set(@tsql, @params, @browse_information_mode) frs;

SET @cmd = N'CREATE TABLE #BlitzOutput (
    ' + @cmd + N'
);
INSERT INTO #BlitzOutput
' + @tsql;
PRINT @cmd;

sp_BlitzWho saving to a table


Looking for a statistics formula to show deviations from zero

Question: I'm looking for a formula to show deviations from zero. I have a data set with values that that is normalized to positive real numbers where zero is perfect and higher is worse. I need a statistical formula that gives me a number over the whole set. I'm now using standard deviation, and it is showing me some interesting results, but as I understand standard deviation normalizes on the average of the set. I need it to use zero as the basis.
Comment: If your positive numbers are $x_1, \dots, x_n$ then you can use something like $\sqrt{\frac{1}{n}\sum x_i^2}$?
Comment: My math abilities are nowhere close enough to be able to understand this. Can you give me a WikiPedia page or a layman's explanation of this formula, maybe as an answer :).
Comment: That formula _is_ the standard deviation, but around zero, not around the average ...
Comment: Thanks. I've applied it (someone helped :) ) and it looks just fine. If you make it an answer, I can accept it.
Answer: If you want to measure deviations from zero, you can just use the standard deviation around zero, and not around the average. The formula will be:
$$
       \sqrt{\frac{1}{n}\sum_{i=1}^n x_i^2}
$$


Query site for given ip from AD sites and services

Question: Windows Active Directory maintains a list of subnet to sites assignments (in "Active Directory - Sites and Services" -> Sites -> Subnets).  The subnet-to-site associationas ar used, obviously, by workstations in order to select a suitable DC to authenticate with.
But how can this information be used programmatically for other purposes? For example: Given an IP, I would like to obtain things like the Site name as found in the properties in the best matching subnet. With what  have found so far, I could list all subnets and do the subnet matching with all of them myself - but as this task is in one way or other performed with every workstation reboot, I am sure that there is some direct method for this ...
Answer: nltest /server:servername /dsgetsite will give you the site name by querying AD.
You could wrap it in Powershell to use it programmatically more easily:
function Get-SystemSite($SystemName)
{
    $site = nltest /server:$SystemName /dsgetsite 2>$null
    if($LASTEXITCODE -eq 0) { $site[0] }
}

Comment: Thanks. This was not precisely what I was looking for (or my question was not clear enough), but with this as a starting point I now found `nltest /DSADDRESSTOSITE:` *ipaddress* and [DsAddressToSiteNames()](http://msdn.microsoft.com/en-us/library/ms675916%28v=vs.85%29.aspx)
Comment: @HagenvonEitzen Sorry bout that, for some reason I had hostname on the brain rather than IP.
Answer: I wrote this function to simplify my use of nltest as phoebus suggested.
Function Get-AdSiteAndSubnetFromIP {
<#
.Synopsis
Get the matching AD Site and Subnet for a given IP Address
.DESCRIPTION
Get the matching AD Site and Subnet for a given IP Address.  The results will be returned as a Hash.
.EXAMPLE
Get-AdSiteAndSubnetFromIP -ip 172.28.68.53

ADSite        ADSubnet
------        --------
SiteA         10.1.0.0/16
.EXAMPLE

(Get-AdSiteAndSubnetFromIP -ip 172.28.68.53).ADSite

SiteA
#>
    param([string]$ip
        )
    $site = nltest /DSADDRESSTOSITE:$ip /dsgetsite 2>$null
    if ($LASTEXITCODE -eq 0) {
        $split = $site[3] -split "\s+"
        # validate result is for an IPv4 address before continuing
        if ($split[1] -match [regex]"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$") {
            "" | select @{l="ADSite";e={$split[2]}}, @{l="ADSubnet";e={$split[3]}}
        }
    }
}


What do I do when I've locked my self out of a newly created Active Directory server?

Question: I've just setup a Windows 2003 server as the DNS/AD for a replace of an old server.  However, it appears that I don't know the password for the Administrator account.  I entered the Restore Mode password and I setup the role through the wizard.  However when I cannot logon to the newly created domain.  It prompts for the administrator password, which I have not expressly set yet, and therefore cannot logon.  I can logon to the machine through booting into Direct Recovery Services Repair and logging in to the local admin account.  What can I do to regain access to my server?
Comment: here come the spambots!
Answer: There isn't really a "supported" method of recovering passwords in Windows Server 2003. If there's no critical data on the machine or in the newly-created domain it would be easiest just to level the box and start over.
Edit:
I don't mean to sound trite, but if you just setup the machine leveling it and starting over isn't going to be too hard. Why go through all the hassle of these other procedures when you can just start over fresh and know you've got a machine that isn't starting its life with a checkered past.
Edit 2:
Just for kicks I spun up a W2K3 SP2 VM, promoted it to being a lone DC in a new AD forest, and started trying to "crack" the Administrator using the procedures described in the article that @zevlag linked to.
The "screensaver method" the article describes won't work in Windows Server 2003 or newer versions because the Winlogon screensaver runs as LOCAL_SERVICE, which has restricted permissions. Unlike the author of that article, I think this change is a good idea and I'm glad Microsoft did it. A buggy screen saver on logon won't expose the machine to a NT_AUTHORITY\SYSTEM-level vulnerability.
To be fair, that article states that the "screensaver method" described therein won't work on Windows Server 2003. The article sends you elsewhere for additional instructions on that platform.
This W2K3-specific article uses a method with the srvany Resource Kit tool to create a service running as NT_AUTHORITY\System. The fact that the author of this W2K3-specific article doesn't know that the built-in "SC" command can install a service (instead using instsrv to accomplish the installation) but, later, uses "SC" to delete a service doesn't inspire confidence. Nonetheless, I pressed on.
To my surprise, the cmd.exe instance service running as NT_AUTHORITY\SYSTEM was able to reset the domain Administrator account's password! I'll sheepishly admit that I didn't know that NT_AUTHORITY\SYSTEM on DCs had any rights in AD. Zow.
If I were going to do a password reset in this manner I would do it thusly:

Boot in DS Restore Mode and logon as "Adminsitrator"
Execute the command sc create resetpw binPath= "net user administrator p@ssw0rd" start= auto
Reboot into normal mode. You will receive the "At least one service or driver failed during system startup." pop-up on top of the logon dialog.

At this point the domain Administrator password would be reset to p@ssw0rd (as per the net user command above). You could then logon and execute the sc delete resetpw command to delete the "service" that you installed to reset the password. The use of instsvr and srvany aren't necessary to make this work (srvany alleviates the service failure error pop-up but that message has no effect on the results of the net user command).
Although I don't like the idea of machines starting their operational lives with a "checkered past" I would concede that this procedure isn't tremendously invasive (since it doesn't install any third party software, make any "hacks" to the registry, leave filesystem permissions in an inconsistent state, etc). It's probably a safe thing to do and could be faster than leveling and rebuilding the machine.
Answer: It sounds like this box is also a Domain Controller, correct? And not just a member server?
This utility will allow you reset the local administrator account, which it sounds like you already know, so this tool alone won't help you.
http://pogostick.net/~pnh/ntpasswd/
The directions here: http://www.jms1.net/nt-unlock.shtml walk you through the process of recovering the Active Directory Administrator password. But remember:
If you are trying to fix a server, please READ THE ENTIRE PAGE and MAKE SURE YOU UNDERSTAND IT before touching the server.
Comment: Following the instructions found there suceedes in pulling up AD as a "screensaver" however I cannot make any changes to accounts because it does not have the permissions... any ideas?
Answer: As this is a newly created Active Directory and no users/information is necessary to recover you can delete the active directory following Microsoft's own steps:

Boot into Directory Service Recovery Mode and logon using the server's local admin account (ntpassword can be used to recover/reset password if it's not known)
Open regedit and navigate to this entry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions
Change value to ServerNT
Restart the Computer
Boot normally and log back on to the Server using the same credentials while entering Directory Service Recovery Mode
Open regedit and navigate to this entry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters
delete "Src Root Domain Srv" if present
To finally completely remove all files associated, you will have to re-install Active Directory service and the immediately un-install.

This will remove Active Directory role from the server, and allow you to start back over.
This will get you to a point where you can start back over.
Answer: I've used ntpasswd on workstations when I was consulting but it's a last resort.  It says that it supports Windows Server 2003 but I would only use this if nothing else works as you can brick the computer using it.


Role of maxPropagationDelay in link agent of UnetStack

Question: In the link agent, I came across attributes like maxPropagationDelay and reservationGuardTime. What is the role of these attributes? Where I can find more information about these attributes.
Answer: You can access more information about any parameters of any of the Agents in UnetStack using the help command. For the Link Agent, you'll see this in UnetStack 1.4.
> help link
link - access to link agent

Examples:
 link                           // access parameters
 link.maxRetries = 5            // set maximum retries for reliable delivery
 link << new DatagramReq(to: 2, data: [1,2,3], reliability: true)
                                // send reliable datagram

Parameters:
  MTU - maximum data transfer size
  maxRetries - maximum retries for reliable delivery
  reservationGuardTime - guard period (s)
  maxPropagationDelay - maximum propagation delay (s)
  dataChannel - channel to use for data frames (0 = control, 1 = data)

reservationGuardTime is the additional guard time that can be added to the frame duration when reserving a channel (using MAC) to ensure channel reservations have some delay in between for the nodes to be able react.
maxPropagationDelay is used to estimate the maximum time that an acknowledge to a request (or a series of requests if fragmentation is needed) might take and used to set timeouts for transmissions, or to make channel reservations (if using a MAC). Depending on your simulation/setup, you can change this number to be longest time (one-way) between two nodes which can communicate.
Answer: These are parameters of specific LINK protocols.

maxPropagationDelay is used to determine timeouts based on expected round-trip-times in the network. It should be set to a value that depends on the geographical size of your network if the network is small enough for a single hop connection between any pair of nodes. Otherwise it should be set to a value based on the maximum communication range of your modem.
reservationGuardTime is a small extra time that a channel is reserved for, to allow for practical timing jitter of modems. Usually the default value for this provided by the agent will be good enough for most purposes.

The Underwater networks handbook to be released with the upcoming version of UnetStack3 will provide a lot more guidance on many of these parameters, and on how to set up various types of networks using Unetstack.


How can I unscrew this old bathtub faucet stem?

Question: I'm trying to fix a leaking bathtub faucet, but I can't unscrew these old stem at all...it's stuck. Do i need to open the back side of the wall?
Answer: That part should move, try tapping it lightly with a small hammer, and maybe use a bigger wrench.
Also try tuning it the other direction the stem appears to have a left-hand thread so the valve body may also.
Comment: Tapping lighter not hard blows is the key. The idea is to increase the force applied to the part you attempting to take apart with a small impact force and also with a impact force less than hard enough to over stress all the pieces. Taps, not blows, no follow through
Answer: Use WD-40 on the threads, let it penetrate for a few minutes, and try again.  Also, use the hammer tapping method suggested by "Jasen", tapping the wench as you turn.
Try a fire-lighter to heat the stem a little,  Not too hot, you don't won't to damage the rubber ring, but that might not be a concern, since that what you would be replacing.


Are headphones with EMF measurement of 10,000 milligauss harmful to me?

Question: I used a EMF detector app on my phone and measured the EMF output on my wired headphones. It measured around 10,000 milligauss on one part of both ear cups. Since wearing these headphones on my head for long periods of time, will this cause injury to my head or immune system?
Comment: No need to be hostile over such trivial stuff. Yes, trivial. 10,000 milligauss is equal to 10 gauss. The Earths magnetic field is 500 milligauss, or 0.5 gauss. 10,000 gauss equals 1 Tesla, a fairly strong magnetic field. The LHC collider in France/Switzerland has a field strength of 8 Teslas, enough to bend steel beams. 10,000 milligauss maybe legit, but it is pathetically weak overall.
Comment: @Sparky256 Source?
Comment: @Sparky256 I meant the source for 10,000 milligauss being "pathetically" weak.
Comment: That was a comment on the relatively vast difference between local magnetic fields, including Earths, and specialised high intensity fields, including MRI machines. None of which cause harm to humans or animals. USF had a mouse 'floating' in an intense magnetic field only to prove it could cancel out gravity if strong enough. My comment was not meant to be an insult or snide remark.
Answer: The ability to measure something, with your phone app for instance, makes it far easier to worry about it.
Consider the mass experiment that is being done now, has been ongoing for the past few decades, of people all over the world (billions?) wearing headphones. They will have similar exposure to low value DC magnetic fields. There is another population, running into millions, of people who've had exposure to fields 1000s times more powerful, inside MRI scanners.
With all that exposure, you might expect that any harmful effects would have shown up by now, and they haven't. Which sits fairly nicely with there being no known way that magnetic fields can harm you. Interestingly, there are known ways that ionising radiation like X-rays can harm you, and precautions are taken to minimise exposure to both to patients and staff  in medical facilities. Contrast the two approaches taken to magnetism and X-rays.
Unfortunately, me knowing that magnetic fields are harmless doesn't make it any easier for you to feel comfortable wearing headphones, now that you can put a number on the leakage field from the ear cups. It depends whether you're into conspiracy theories whether you'll ever accept reassurances from any source.
Full disclosure, I once worked on MRI machines, and was often bunged into the machine when we needed a test image. When the ladies in the lab were running the test, a man was sent it, and vice versa, and the image was always of the genital region. Oh how we laughed! For all that strong magnetic fields are difficult to work with (wipe credit cards, zap pacemakers, get fork-lift trucks stuck to the magnet (yup, done that), bend CRT traces off the screen, send steel wrenches flying through the air), damaging human tissue through direct action is not one of the problems.
Comment: What about 12 hours a day exposure to the magnetic field? That's far more exposure than what you described in your answer.


Intercept Android's http/https traffic with shell access

Question: Assuming you have a shell access on a rooted Android device. Let's say the shell was given upon an exploitation, eg. Android Webview vulnerability. The question is what is the best way to intercept HTTP/HTTPS traffic with shell access on a rooted Android device.
Comment: Just to speculate based on how certain things like the 'tether without root' app and Adblock work, you could set up an on-device proxy to route all traffic through, and create your own trusted key on your device.  This isn't a simple shell command, though.
Answer: Simply use SandroProxy (on-device) or mitmproxy (off-device), these will help you perform a MITM attack by generating valid certificates on the fly.
Then use your root permissions to install the CA certificate for your MITM proxy to the system key store (which is located somewhere like /data/misc/keystore from memory) which will avoid the usual warning you get when you install additional certificates.
You should be able to create iptables rules to route traffic via your proxy, or modify the connection settings.
If you're just using it for debugging purposes and you don't mind if the user sees a warning then you don't actually need root, you can just add the CA certificate to the user store.


Causes of a sovereign debt crisis?

Question: What are the causes of a sovereign debt crisis? How can countries get out of a sovereign debt crisis?
Answer: There are different causes. A sovereign default means that a government cannot pay a debt it owes.

It could be that the government is facing reduced income, e.g. through a local or global depression. So the cause could be a banking crisis on some other part of the globe.
It could be that the government is facing increasing mandatory (non-discretionary) spending, e.g. through a rise in interest rates or through higher-than-expected retirement payments. Again the reasons for this could be global or local.
It could be that the government refused to do the maths.

Some government debt is a good thing for the financial market, and there are some situations where deficit spending is appropriate. Too much of it is a bad thing. Exactly where the border is only becomes clear in hindsight.
Many observers believe that German debt/spending measures during the 2008 banking crisis were a good thing, cushioning the impact of the crisis, and that German austerity measures since 2010 were also a good thing, to restore the financial "breathing space" against future need.

Causes of a sovereign debt crisis?


How many signatures maximum on a multi signature contract

Question: What would be the maximum number of signatures where it would cost about near block gas limit to verify and execute a transaction. What would be a reasonable number to limit and add other logic to a contract instead of high cost?
Answer: In all the multisig contracts I've seen, it's not that a bunch of signatures are validated at once. Rather, each participant makes a separate transaction to confirm a proposal, and once the proposal is confirmed by enough participants, it's executed. So there's one transaction per participant, and the block gas limit doesn't apply (since the transactions don't need to all be in the same block).


using the Atmega328P

Question: if I take the micro controller (ATmega328P) from the Arduino board and simply place it on to a breadboard, do I still need to upload the boot loader ?
Comment: if the boot loader was on the microcontroller before you unsoldered it, it's still going to be there.
Comment: (but it's a rather uncommon thing to do. Make sure all the components that the microcontroller needs to function are still there on the breadboard – power supply decoupling caps, external oscillator, …)
Answer: No, you don't need to upload the Bootloader, it's already in the chip.
BUT, when you unplug the ATMega328 you no longer have the serial connection support over USB.
If you upload a sketch while the ATMega328 is on the Arduino board and then put it in a breadboard, it will work providing you don't need serial/USB and you have the correct oscillator (16Mhz) on your breadboard.
There are a couple of approaches to create your own breadboard projects:

Keep your Arduino intact and buy some ATMega328 chips. You can use the Arduino as an ISP to program the chips without needing a serial/USB connection.
Use an Arduino Nano. This plugs directly into your breadboard and has everything you need onboard.

Start reading here, this has all been done before.
Comment: Yes you do not need to load the bootloader again unless you plan to use a FT232 breakout or somthing similar for uploading sketches

I always feel it is better to use something like the USBasp to upload hex code to the MCU if it is not within the Arduino Board
Answer: No, the bootloader is already installed.  You will need a 16 MHz crystal, two 22pF caps, a 10K resistor (reset pullup), and four 0.1uF caps - one for Vcc, one for Avcc, one for Aref, and one for DTR if you plan to add a 6-pin header to plug an FTDI Basic (or equivalent clone) for downloading code via the Arduino IDE, or use the serial port for debugging your code with the serial monitor - basically the same as a Promini less the 5V regulator.
Do not connect Aref to 5V - just the cap to Gnd.
Answer: If you want to program it using the Arduino tools you need the boot-loader. (which boot-loader will be present if you removed the ATMega328 from an Arduino board)
If it is already progammed you don't need the boot loader
If you intend to use a SPI programmer (eg: AVRASP) then you do not need the boot loader.

using the Atmega328P


Peel n Stick Tiles For Backsplash

Question: Looking to make a mosaic tile backsplash between my range and vent hood.  I am looking at the various tile options out there and am considering the peel and stick.  Do these really adhere as well as they state?  I am concerned with the adhesion level since I would be using them behind a range and the area is exposed to a decent amount of heat.
Comment: Never used them, but my first time wouldn't be in an area that frequently gets high heat and a steam bath in a very noticeable area.
Answer: Never seen a peel and stick mosaic.
I use peel and stick vinyl for closet flooring in various places - cheap, easy to clean, and the expense of using a better quality flooring there does not seem to be worth it. The last batch I got was a tolerably well-done "wood-look" and had the added advantage of not stinking like the old ones (10 years or more ago) I had last used.
I would not put them in a hot/steamy/wet area - that would be best served by a more traditional mortar tile attachment, or (what my house growing up had) a sheet of stainless steel (it was easy to clean, fireproof, and somewhat predated the popularity of an "industrial look." It's not for everyone.)
Upon searching for "peel and stick mosaic" I see that the probable maker claims they are suited to the use, but I'd still take that claim with a heathy dose of salt, personally. As a confirmed pessimist I'd also take a scrap piece and try to set fire to it. Ceramic or glass is "fireproof" not merely "heat resistant." Likewise, consider the less-glowing reviews as well as the glowing ones.
Comment: My fault for not specifying but what I was considering were not the vinyl, they are ceramic with a peel and stick backer.  Basically the same but no thin set is needed - supposedly

http://www.homedepot.com/b/Smart-Tiles/N-5yc1vZ3wr
Comment: "*Smart Tiles is made of an adhesive substrate topped with a gel component called Gel-O (which gives it its 3-dimensional effect).*" Sure does not sound like "ceramic" to me. And one revewer comments that it's "about as thick as a magnet" (presumably of the sheet type.)

Peel n Stick Tiles For Backsplash


Can you be arraigned for felony charges that you have not been arrested for?

Question: The question I have relates to the fact that a warrant was issued for my arrest. When I received notice if this, I then notified the court that I have received such notice. At this point the court appointed clerk scheduled me on the docket to be arraigned. After being arraigned on felony charges, I had attended two separate continuances. Then the judge had noticed that I have never been arrested for the crime that I had just pled not guilty to at the arraignment. Upon noticing this the judge orders me for a book and release. Is it normal to be arraigned on charges when you have never been arrested for the crime?
Answer: An arrest is not a legal prerequisite for an arraignment.
It may be, as a matter of policy, expected that someone charged with a felony be booked in order to obtain personal identifying information about a defendant (such as fingerprints and a mug shot) to facilitate the arrest of that person if they fail to appear in the future, but this is generally a matter of policy and not a legal requirement.


Torch not showing an emission node

Question: I have recently been working on a Minecraft animation. I wanted to use a torch to light up the inside of my house, but there is no emission node in the node editor. It works on blocks such as glowstone, but not on torches.
I have tried creating an emission node but it messes it up. I am following a tutorial from Black Plasma Studios on YouTube (12:30 seconds into the third episode). Please help. Tell me if you need more info.
Answer: This isnt the best way for this but it should work for what you need.
The problem with the set up below is the brown stick part is also illuminated not just the fire part. The best way to do that is to have 2 different materials one for the stick and one for the fire (with just the emission on the fire.) Or you could use a vertical falloff ramp but that may be overkill for what you are looking for. Hope the below set up helps you.
Or you can skip this whole step and just put a point light where your torch is.
Answer: Here is a way to set up the nodes so as to make the handle not glow. This is specifically for ZeFluffyNuhpkin.
Comment: This is what i get when i set up those nodes.[![enter image description here](https://i.stack.imgur.com/ltls7.png)](https://i.stack.imgur.com/ltls7.png)
Answer:
Just try this on one torch and see if it works.
Comment: Please avoid that much text in the image. Firstly it is not searchable and secondly those letters filling all the space distract from the image itself
Answer: This will be a fairly lengthy reply. (BTW someone named David turned my reply into a comment. This is helpful to the question David. I think.)
1.) My "something random" says "inn" because that is the name of the scene I am working in. The animation I will hopefully create is set in an inn/bar.
2.) When I created my scene in Minecraft I had placed down torches in game and brought them into blender using Arbiter 617's tutorial instead of appending the torches manual. I appended a torch along with "Torch point" and "Torch flame" as shown here.
As soon as i did this and rendered it out i got a glowing torch (I don't think that "Torch Flame" is needed.)

The "Torch point" must have been a point light that you can append with the torch to make it glow like the chest and chest bones. I probably need to delete all of the torches that are already on the walls and replace them with there appended lookalikes with the "Torch point" attached to each one, like the chests. (do you happen to know a shortcut to replace all torches with there lookalikes instead of going to each one, but its fine if you don't.)
Comment: There is no built in way to do that, you would have to write a script.

Torch not showing an emission node


Dealing with Expression Blend's lack of support for C++/CLI projects

Question: I have a WPF C# project that references a C++/CLI mixed mode project.  I'm having trouble using the WPF project in Expression Blend 3.  I'm new to Blend so perhaps this is obvious, but it won't display the xaml designer properly until it builds the project.  In my case it complains that my custom commands are not "recognized or accessible" and the solution is to build the project in Blend.  But I can't build the project because it references a C++/CLI mixed mode project which Blend won't load.  The WPF project is pure C# it just happens to reference a C++/CLI mixed mode project but I'm not asking Blend to do anything with the mixed-mode assembly.  How can I work around this problem?
Edit:
I was able to get it to build by removing the reference to the C++/CLI mixed mode project and replacing it with a reference to the actual assembly.  However this is not ideal because in my past experience Visual Studio will not always be able to resolve the reference when switching between release and debug configurations.
Comment: This work around seems to no longer work for Blend 4 :(
Answer: I would consider setting up a second solution file. One to open in Blend and the other to open in Visual Studio. They would be nearly identical except that the blend version would reference the stated files in their built state. The VS version would reference the project as you prefer to VS.


How should a person facing urinary incontinence pray?

Question: I am just a 14 year old boy right now and I have had discovered urinary incontinence since i started offering prayers regularly (10/11 year old), I had these issues before but ignored them as I didn't perform prayers and it didn't affect me. Now what are the rulings for me. Will this break my wudu? How should I cover it, etc. Although I am trying to cure this by doing prescribed exercises but until then what to do
Comment: A specialist doctor may be able to inject filler to prevent urinary incontinence.
Comment: It is said that imam Malik had this problem and therefore stopped going to the mosque due to his respect for the Prophet pbuh, at least this is one explanation why he stopped going to the mosque and following funerals etc. he himself only said that he had a good excuse. But this shouldn't hinder you to go to a mosque, I'm not 100% sure about the ruling details, but you should nevertheless perform wudu' for each prayer and pray as nothing happened.
Comment: seems duplicate of https://islam.stackexchange.com/questions/2955/does-dripping-urine-break-wudu
Answer: If your urinary incontinence is constant, when prayer comes, cover your private area and pray as if it is not coming out. If you are too worried about the urine, then Allah knows that you are not praying with your full mind and heart.
If it only comes out at certain moments, such as every half hour or quarter hour, then pray during those breaks in time even if you miss congregation
Answer: Incontinence is analogous to persistent vaginal bleeding, and hence the same method of dealing with it applies to it. A person must perform wudu once for each prayer and their wudu will not be considered to be broken by the incontinence during this time. The madhabs differ on whether it should be once for each prayer time or once for each performance of an obligatory prayer.

جاءت فاطمة ابنة أبي حبيش إلى النبي صلى الله عليه وسلم فقالت يا رسول الله إني امرأة أستحاض فلا أطهر، أفأدع الصلاة فقال رسول الله صلى الله عليه وسلم " لا، إنما ذلك عرق، وليس بحيض، فإذا أقبلت حيضتك فدعي الصلاة، وإذا أدبرت فاغسلي عنك الدم ثم صلي ". قال وقال أبي " ثم توضئي لكل صلاة، حتى يجيء ذلك الوقت "
Fatima bint Abi Hubaish came to the Prophet (ﷺ) and said, "O Allah's Messenger (ﷺ) I get persistent bleeding from the uterus and do not become clean. Shall I give up my prayers?" Allah's Messenger (ﷺ) replied, "No, because it is from a blood vessel and not the menses. So when your real menses begins give up your prayers and when it has finished wash off the blood (take a bath) and offer your prayers." Hisham (the sub narrator) narrated that his father had also said, (the Prophet (ﷺ) told her): "Perform ablution for every prayer till the time of the next period comes."
— Bukhari

For details you can see: Al Fiqh ala Al-Madhahib Al-Arbaah page 124-128
Answer: The rules around namaz allow for medical conditions. If it's not possible to attend the mosque due to your condition then it is permitted to do the obligatory prayers at home.
And Allah knows best.
Answer: As per Islamic teachings namaz will be prayed in all circumstances and there is no excuse in it. As for as your disease is concerned Islamic scholars suggest a solution for this issue. You can even go in mosque by  changing your trouser for particular namaz and  fresh wadu.  In this case it is necessary that you should have a new trouser for each namaz if urine drops are continuing. ..
Comment: Evidences supporting your claims would make this answer more helpful. See [answer].


Check if a point is inside an ellipse which is inscribed in a rectangle

Question: I have a rectangle with points $A, B, C, D$ which doesn't have to be axis-aligned. This rectangle contains an ellipse, whose vertices and co-vertices are touching the rectangle.
Given a point $P$, how can I check whether this points is inside or outside of the ellipse?
Comment: What have you tried?  Where did you come to your difficulties?
Comment: Do you know the coordinates of $A,B,C,D?$  If you can get the equation of the ellipse, this is easy.
Comment: yes, i want to find out if the point is inside of the ellipse with given points $A, B, C, D$ and $P$
Comment: Could you do it if the rectangle were centered at the origin, with sides parallel to the axes?
Answer: You can easily find the foci of your ellips because you have the major and the minor axes of the ellipss.
All you have to do is to find the total distances from your point to the foci and compare with the major axis.
If the total is less than the major axis the point is inside the ellips otherwise it is not.
Answer: The first thing to do is to translate the picture so that the rectangle is centered at the origin.  Compute the center $(x_0,y_0)$ of the rectangle, and subtract $(x_0,y_0)$ from each of $A,B,C,D,P.$ (I'll still call the new points $A,B,C,D,P.$) We know that an ellipse centered at the origin has an equation of the form$$ax^2+bxy+cy^2=1\tag{1}$$ and since we know four points on the ellipse, we can substitute three of them into $(1)$ and get three linear equation for the three unknowns $a,b,c$.
At this point, it's done.  Substitute the coordinates of $P$ in the left-hand side of $(1)$.  $P$ is inside, on, or outside the ellipse, according as the value obtained is less than, equal to, or greater than $1$.
Answer: Let $\Delta_{ABP}$, $\Delta_{BCP}$, $\Delta_{CDP}$, $\Delta_{DAP}$ be the signed area of the corresponding triangles (you can compute them using shoelace-formula). Their sum
$$\square = \Delta_{ABP} + \Delta_{BCP} + \Delta_{CDP} + \Delta_{DAC}$$
will be the signed area of rectangle ABCD. Define
$$u = \frac{2}{\square}(\Delta_{ABP} - \Delta_{CDP})
\quad\text{ and }\quad
v = \frac{2}{\square}(\Delta_{BCP} - \Delta_{DAP})
$$
The condition that $P$ falls on/inside/outside the ellipse is $u^2 + v^2 = 1$, $< 1$ and $> 1$ respectively.

The basic idea behind this is we use a linear transform to map the rectangle/ellipse into a square/circle centered at origin.
In this new coordinate system (let's call it $(u,v)$), the equation
of the ellipse becomes $u^2 + v^2 = 1$. We then express $(u,v)$ in terms of the area of the triangles. Since the ratio of area of different shapes in invariant under linear transform, we can use the same ratio in any coordinate system to compute the coordinates $(u,v)$.
By the way, above formula also works when $ABCD$ is a parallelogram.
Answer: Here the characterisation of the ellipse $\quad\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}\le 1\quad$ should work nicely.
First calculate the center $O=\frac{A+B+C+D}{4}$
Then unit vectors are $\vec{e_x}=\dfrac{\overrightarrow{AB}}{AB}$ and $\vec{e_y}=\dfrac{\overrightarrow{CB}}{CB}$
Expressing all needed quantities : $\quad a=\frac 12 AB\qquad b=\frac 12 CB\qquad x=\overrightarrow{OP}\cdot\vec{e_x}\qquad y=\overrightarrow{OP}\cdot\vec{e_y}$
In summary:
$$\dfrac{(\overrightarrow{OP}\cdot\overrightarrow{AB})^2}{AB^{\ 4}}+\dfrac{(\overrightarrow{OP}\cdot\overrightarrow{CB})^2}{CB^{\ 4}}\le \dfrac 14$$


Add new user with permissions same as existing user

Question: How to create a new user with permission exactly same as an existing user in linux.
Comment: Do you want a different user with permissions such as granted by the groups the existing user has. Or do you want the new user to be able to access everything as the existing user but have a different login name? Maybe a bit more information on what you try to achieve and why you think 'creating a new user with permissions exactly as an existing user' is a solution makes things more clear.
Comment: `Exactly the same` is ambiguous
Comment: @Anthon, I want the new user to be able to access everything as the existing user but have a different login name.
Answer: You should create a new user as Hauke is right in indicating that creating two with the same UID is going to be confusing ( you could do that with useradd -u EXISTINGUID ... )
You probably just want to make a new user and make sure they are in the same group and that the group permissions are so that they can work with the data in the same group in the same way. Most installations now seem to make a group per user, so if your existing user is named exus you have a groupname exus in /etc/group as well, note the gid (group id) and all the other groups that exus is a member of (vboxuser, dialout etc -> `gid2, gid3).
Create the new user with:
useradd -N -g gid -G gid2,gid3 -m

(You could have them use the same home directory by replacing -m with --home ~exus, not sure if that is what you want)
Make sure that all of the group permissions of the new files created by both users are based on a umask of 002 or 007 and that permissions on existing files owned by the exus have the group permissions the same as the user permissions:
find / -user exus -print0 | xargs -0 chmod g=u

Answer: You can (probably not with the tools, though) create a new user with the same UID like an existing user. One of the problems is that only one user will see the correct (his own) user name for file system objects, processes and so on.
Another approach is to keep the system free of references to the username (which will probably not work within $HOME) and instead create a group with just the two users as members and manage all access rights with group rights only.


Can I execute Azure Automation Runbook on PowerShell?

Question: Actually I want to run these runbooks by myself, not relying on Automation Part. In this case, I can choose when to deploy them, and also it is flexible for me to choose variables.
It would be better to have some simple tutorials for me. Any Help would be grateful.
Thank You
Answer: Azure Automation runbooks are just PowerShell Workflows, which can be run in the PowerShell ISE on your local machine as well. The only thing special about runbooks compared to PowerShell Workflows is in runbooks you can use the "Automation activities" (Get-AutomationVariable, Get-AutomationPSCredential, etc).
We don't have a blog post about this out for Azure Automation yet, but we do for Service Management Automation (the onpremise version of Azure Automation), which is very similar: http://blogs.technet.com/b/orchestrator/archive/2014/03/27/authoring-sma-runbooks-in-the-powershell-ise.aspx