Skewed target variable in a linear regression problem

Question: Could you please answer how should we approach this situation in linear regression problem: The target variable is distributed in a skewed fashion(50% of the values lie in the range 0-300 and 40% in 300-500 and 10% in remaining 500-1000. Will this cause a problem to my regression model and how will you approach to tackle with such problem?
Answer: As far as I know, you should look at whether or not your residuals are normal or not. If they are not normal, then you many consider transformation. For this, I would say you need to apply a log transformation, given it is fairly right skewed data. Applying a log transformation would help center the data into a more Gaussian distribution, where the data is more centrally located.
Comment: Could there be other potential alternative approaches if transformation is not preferrable?
Comment: You can also try a generalized linear model if there is an appropriate link function that supports it.


I can hear my computer, Why is that

Question: My computer is wired to my audiomixer and then to my headphones. If i turn the volume off my mixer up i can literately hear my computer(if my computer is'nt playing audio ofcourse). I can hear  it when i maximize or minimize a window. I can hear my mouse hovering over a link in a browser,..
I have multiple soundcards, and only the one on my mainbord gives me this "interference"
How can it be that i can hear software? Is there anyone here that can give me an explanation.
Comment: What do you mean you hear "software".  The actions you describe as generating sounds isn't all that strange.
Comment: No it are not sounds, but its noise.
Comment: What sort of connection does your headphones use exactly?  It seems you don't actually want a solution which means this question will simply lead to extended discussion about the possible causes.
Answer: I work part time in a recording studio, and this is very common on computers with no external sound card, audio processor or recording interface.
Electrical interference can occur in or around the motherboard, tower, cables, fans and pretty much anything electrical in or connected to your computer. This interference can manifest itself in scratching or buzzing in audio equipment when speakers or headphones are connected.
If you want to solve the problem, I would see if your mixer, speaker or headphones cables are near any other electrical cable or device. If they aren't I would suggest getting a better external sound card, like a USB one, which should eliminate the interference.
Some sound cards or audio interfaces advertise their cables as being "noise-shielded". While sometimes this is just "hype" language, investing in good quality equipment and cables should reduce or eliminate the noise.
Answer: My computer do this also. I suppose you plug your headphones in the front panel. Then this is because of the lack of the proper insulation of the cable which go to the front audio panel, so it is got some interference from other electricity components.
You could prevent it by set the cable a position when nothing touch it. Other solution is buying a better computer case with better built-in audio panel.
Comment: Interference is the explanation :)
Comment: I don't want a solution to this(i can just plug in in another audio card):-) I'm just hoping for an explanation. Btw, its not plugged in in the frontpanel.

I can hear my computer, Why is that


Why do jet engines have a maximum speed?

Question: What's the scientific background behind a jet engine's top speed? Jet engines increase efficiency at higher airflow rates, so why does the efficiency stop increasing at some point?
Comment: Remember that every technical design is a compromise between different parameters. Any specific design will have a possible speed range depending on a number of design parameters. For extremely high speed, say Mach number above 4, the engine will look very different from a typical jet engine and will most probably not generate any thrust a speeds below 1 Mach.
Comment: "Jet engines increase efficiency at higher airflow rates, so why does the efficiency stop increasing at some point?" It doesn't - your premise is completely flawed as the answers demonstrate.
Comment: Do you have a specific example?
Comment: Recommended reading [here](https://www.sciencedirect.com/topics/physics-and-astronomy/exhaust-velocity).  It seems converting turbine energy into better "mass movers" creates much more specific impulse than simply ejecting it out the rear of the jet.  (Rockets must do this as there is no air to move in space).
Comment: Do you mean a maximum airspeed (forward velocity), or a maximum RPM of the blades?
Comment: How do you compare that to how fast you yourself can run, please?
Comment: Because friction (_aka_ parasitic drag).
Comment: Why might jet engines not have a maximum speed? How are jet engines different from other physical or mechanical objects with limitations?
Answer: Temperature and stability limits.
Thrust is created by accelerating a working mass in opposite direction. Net thrust is the difference between the impulse of the air flowing towards the engine and the combined impulse of burnt fuel and the air exiting the engine, derived according to time.
Impulse is mass times speed, so the exit speed of an engine needs to be larger than the entry speed to create positive thrust (assuming that the mass of the fuel in the exit stream is insignificant). Entry speed is flight speed, so the exit speed must be higher than flight speed.
The air in a jet is accelerated by heating it, so the gas expands and picks up speed in an isobaric process. The heat is provided by adding fuel, and since the fuel-air mixture in a jet is very lean, burning more fuel will produce higher exit speeds. The jet will still produce positive thrust at faster speeds.
However, adding more heat will also increase the thermal load on the turbine. By using better materials, the maximum heat in jet engines could be increased by several hundred degrees C in the past decades, but is still limited so the mixture ratio in the combustion process also must be limited. Add to that the better efficiency of higher compression, and you will have a high air temperature at the start of the combustion process already from compression, so less combustion heat can be added. That (and higher intake precompression) is the reason why modern civilian engines for subsonic flight use compression ratios of up to 50:1 while supersonic engines rarely exceed 30:1.
To get around that limitation, afterburners are used, but even here you cannot add unlimited amounts of fuel. With too much fuel the combustion process will become unstable (afterburner rumble or screech). The J-58 engine of the Mach 3.2 SR-71 even piped compressed air around the combustion chamber directly into the afterburner, so cooler air could be used to burn more fuel there. Follow the last link for more information on how the initial J-58 had to be modified to make Mach 3+ flight possible.
Ramjets run into the same temperature limit from intake compression alone: Above Mach 4 to 5 the temperature of the compressed air is so high that adding fuel will not heat the air much but will lead to dissociation as temperature increases further, using up the chemical energy to split molecular bonds instead of adding heat. Therefore, flight at Mach 5 and above requires scramjets where the air in the combustion area is still supersonic.
Comment: I believe that the questioner wants to know why we can't keep on increasing the TAS to obtain ever increasing efficiency **at a constant engine fuel flow** (because the efficiency does increase *initially* as speed increases). However, your first two sentences do answer that so +1 from me.
Comment: Maybe you could add also the contribution due to the different pressure between inlet and outlet
Comment: Or alternatively you use smart air dam design to reduce the airspeed as it enters the turbine. That's how Concorde could supercruise without afterburners at the same speed as the then-fastest jet interceptor with afterburners.
Comment: @Graham: what's a smart air dam?
Comment: @sophit How they designed the air intakes. https://www.heritageconcorde.com/air-in-take-system
Comment: @Graham: ah, the intake ramp! But that has nothing to do with the fact that the Concorde could supercruise. It had to use the afterburners at takeoff because it didn't have any high-lift system and it had simply to go fast to be able to takeoff. And it was aerodynamically optimised to produce as less drag as possible at cruise speed, so no afterburners there.
Comment: Ate you sure Concord was faster than an F104? @Graham
Answer: If a jet engine is operating at 1000 KTAS and its exhaust gases are also exiting the engine at 1000 KTAS, it is producing no thrust for the fuel it is burning - its propulsive efficiency is 0%. (If it operates at a speed higher than 1000 KTAS, it will produce drag instead of thrust - this engine is not capable of accelerating the exhaust gases to speeds any higher than 1000 KTAS, and so this speed is its "speed limit"). Turbofans achieve this limit at lower speeds, turboprops at even lower speeds.
The following equation explains why the propulsive efficiency initially increases with TAS:
$Power = work/time$
$Power = force × distance/time$
$Power = force × speed$
The force is thrust, and the speed is TAS.
Clearly, increasing the speed will increase power (while the fuel consumption remains the same). However, as mentioned earlier, thrust reduces as speed increases. This means that there will be one particular combination of speed and thrust at which their product (power) will be maximum. The speed at which this occurs is the speed for maximum propulsive efficiency, and going any faster (or slower) will reduce efficiency.
When it is said that "jet engines obtain their peak propulsive efficiency at higher speeds", it is being compared to other engines; increasing the speed doesn't necessarily mean increasing the efficiency - the efficiency initially increases, reaches it's peak, and then decreases. This is true for all air breathing engines, just that different engines attain their peak efficiency at different speeds.
Answer: To optimise fuel economy.
The jet engine needs to provide thrust that is higher than drag, the exit speed of the gas stream $V_e$ must be higher than the air speed $V_0$. For the thrust $T$ in N generated at full expansion to ambient air pressure, we can write:
$$T = \dot m\cdot \Delta V$$
with:

$\dot m$ = mass flow through the engine [kg/s]
$\Delta V = V_e - V_0$ = exhaust speed minus air speed [m/s].

The internal kinetic power of the gas stream $P_g$, provided by burning fuel, is:
$$P_g = \frac{1}{2} \cdot \dot m \cdot V_e^2$$
To generate a given amount of thrust, if we choose $\dot m$ as high as possible and $V_e$ as low as possible, we have generated the required thrust with the minimal amount of fuel required, since the $V_e$ term occurs squared in the required power equation. So we want to choose the jet exhaust speed as low as possible above the required cruise speed.
The jet engine itself does not care too much about how fast the aeroplane is flying, as long as the intake air is slowed down sufficiently and the exhaust air accelerated to above airspeed. For this we need to consider the jet engine as the core of the total engine installation.

The main design parameter for the type of jet engine to be used is the cruise speed. The image above (ref) is from prof. Wittenberg's college handout VTH-D 14, and depicts seven types of jet engine:

Ramjet
Pulse jet
Two types of turbojet
Three types of turbofans

If the aeroplane is to fly hypersonic the ramjet is the most suitable type, no turbine required since the incoming air is compressed adequately by the intake. However, the ramjet does not work from a standstill.
Turbojets and bypass turbofans are used in supersonic aeroplanes: most thrust is generated by the hot air exhaust, which exits at supersonic speed.
Turbofans are best for high subsonic aeroplanes: most of the thrust is generated by the fan, some by the hot exhaust.

The role of the intake and exhaust in thrust generation as a function of airspeed can be seen in picture above, earlier used in this answer. What is not shown here is the fuel economy: bypass & fan thrust is way more economical than exhaust gas thrust, but can only be used at lower speeds. The lower the cruise speed, the higher the fan thrust proportion should be. And fan thrust is subject to a speed limit, and above certain cruise speeds the intake-exhaust provides all the thrust.
Answer: Several points limit the top speed of the jet engine

Efficiency equation you're probably referring to is: $\eta_p = \frac{2}{1 + \frac{v_9}{v_0}}$

This never does stop increasing
Yet the growth is logarithmic with speed ~0.4*ln(v0)
Trying to fly 2x your speed only gains 1.33x efficiency
This type of efficiency only measures how much of the engine's fuel burn effort is applied to the airframe, rather than just moving air.

This efficiency matters, but it also needs Specific Impulse

Like others have noted, its not just an issue of fuel burn work efficiency
The engine is translating a certain amount of the fuel burn into work on the airframe.
How much of that work then gets applied as acceleration?
From Wikipedia: Specific impulse (usually abbreviated Isp) is a measure of how efficiently a reaction mass engine (a rocket using propellant or a jet engine using fuel) creates thrust.
Specific Impulse pretty much uniformly goes down with speed.

By Kashkhan at English Wikipedia, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=10086744

Together, you end up with curves like the below for turbofans

Jet engine design drivers: past, present and future

Finally, all these considerations also ignore drag

The airplane is flying through air
The air has density and inertia.
To put the airplane where the air used to be you have to do something with the air
Generally means diverting or deflecting the air, or piping it through the plane

Busemann Biplanes are interesting variation on the last idea, although they don't produce lift.
Drag is generally thought of as two terms (Lift Drag and Parasitic Drag)
Lift Drag, drag because you're redirecting airflow to create lift, conveniently goes down with speed.
However, Parasitic Drag, drag because the airframe shape is diverting / deflecting air and the air has a friction effect on the skin, effectively rises as $V^2$
You put them together, and you get a drag curve that looks like this:

By Olivier Cleynen - Own work, CC0, https://commons.wikimedia.org/w/index.php?curid=51974460

This is one of the main reasons that most airplanes have a cruising speed.

Ideally, what you would want (if it was not highly complex) is an engine that acts like a turboprop, then a turbofan, then a ramjet, and then a scramjet.

Move a lot of air slowly at low speeds, and then move less air with a much higher exit velocity at high speeds.
Answer: Here is a thrust equation from the NASA website, which seems to have perked up a bit since the success of the Artemis mission.
We see thrust is produced by net momentum change and net pressure differential from a given exhaust area.
With turbojets, higher pressure is created by compressing ambient air.  Heating it (by the relationship of Pressure and Volume being proportional to Temperature) allows both the exhaust area to be larger than the inlet and the exhaust velocity to be greater, producing net thrust.  There is only a slight increase in mass flow in the engine core (but adding fans or props greatly improves this in subsonic flight regimes).
The issue is that drag is created by the inlet and temperature increase is caused by compression, robbing the engine of its net thrust until a thrust/drag breakeven point is reached.  This is why some people claiming "hypersonic" aircraft these days are simply flying horizontal rockets, which are unburdened of the task of compressing adequate amounts oxidizer/mass from the atmosphere.  But, then again, that is exactly how the X-15 managed hypersonic speeds back in the 1960s.
The limiting factor for jet propulsion is inlet temperature.  Use of cryogenic fuel and/or oxidizer to cool inlet air is one way of improving overall efficiency.


How do you protect against Zerg and marine rush as Protoss?

Question: How do you protect against zerg and marine rush or large groups as protoss?
My zealots and stalkers just get trounced. They are upgraded but still, mass marines just destroy me.
What can I do as Protoss?
Answer: The essence lies in how to handle "large groups", you need to look at the advantages you have:

Sentries: These early units allow you to split up or trap an army by using force fields, reduce incoming range damage using their Guardian Shield and allow you to create hallucinated units which will take damage aways from your real units.
Colossus: There mid game units are known for their AoE damage, they will quickly fry a bio ball. Watch out for air though, although Stalkers are useful against air to some extent... :-)
High Templar: These mid to late game unit is also known for their powerful storms, they also have Feedback to drain energy from units and can warp in more powerful Archons...
Carriers: These late games units have interceptors that work for them so they can stay at a safe distance and thus result in devastating damage if your enemy doesn't manage to take them, supported by an army it can be tricky for your opponent to handle you.

Check the macro of one of your replays that is related to your question, you might be able to find an economy or production gap that makes it clear why you got outnumbered. Check if you expanded well (at 2 workers / min patch), check if you resources were too high (not enough gateways), and so on...
Answer: As you are asking about rushes, I would say that (in addition to obvious things like good macro and fundamentals):
As direct face-to-face technique, positioning. They have many more units than you, and you should exploit this by leading them into chokes, funneling them into tight spots etc, and using force fields. The goal is to let ALL of your units shooting while only a few of their units can.
Otherwise, scouting (ok this is a generic one but very important). The easiest is if you see an early spawning pool from zerg. If you know beforehand that your opponent is going for a ling / marine rush, set up defenses. Wall off your ramp and put a zealot on "hold position", with stalkers in back, and a sentry to forcefield and keep half their units at the bottom of the ramp. In the case of a zealot rush, this is completely solid, there is nothing they can do.
If that doesn't defend against it, then your fundamental mechanics just need improvement.
Later in the game marines can still pose a huge threat, and by this time you should move up to higher tier units like colossus.
Remember to keep every single unit alive, as even a zealot costs twice as much as a marine. Even if your micro skills are crap (like mine), it's easy to just select a zealot whose shields are out, and run him to the back of your army. If they were focus-firing him, their army will move (thus not attacking). If they were not focusing, then at least he can live to recharge his shields and fight again.


Sharp corners in PCB traces

Question: Why does a typical PCB always has rounded tracks? What harm can a sharp edged PCB track can cause? Please explain!
Comment: Sharp corners don't make sense from topological point of view: you can always "cut" a sharp corner and make your trace shorter.
Comment: [Possible duplicate](http://electronics.stackexchange.com/q/7913/16051).
Answer: This is a great question, because the default answer is usually wrong for 99% of applications. The default answer is: to avoid reflections and other problems with high frequency signals.
The default answer assumes that you are dealing with very high frequency signals - signals with a wavelength that is small enough to fit a couple of times in your trace. When you regard such a signal as a wave, when it hits the end of a trace or a 90 degree corner, it gets reflected back and causes destructive interference with itself, attenuating the signal.
However, almost all signals you will ever route through a PCB are either DC or - in terms of these kinds of problems - very low frequency. Even 1MHz is a very low frequency and you will not run into these kinds of problems. It's 100+ MHz that starts entering into routing problems. A great example of signals that benefit from clean layout in this respect are serial buses: PCIe, USB 2.0+, etc.
This does not mean that it's good practice to make sharp corners all over the place. There are a couple of reasons why you even want DC signals and basically all your routing to have nice 45 degree angles or rounded corners:

First of all, board area use. 90 degree angles or worse still: more than 90 degree sharp corners will always cause longer traces (higher impedance, more copper use) than traces that try to snake around obstacles. And often, your board size is limited, so you want to use as much area for the actual components, not the traces in between.
Cleanliness. A clean, nice-looking board layout is easier to optimize, transfer and  troubleshoot.
Manufacturability. This is much less of a concern than in the past, but still something to consider if you plan on prototyping this on a hand-etched or milled PCB. Sharp corners tend to get loose when milled or get under-etched when using crude manual etching methods. Fluent lines are easier to produce.

However, if you know what you are doing, don't hesitate to use sharp corners when you need them. As always: strict rules are for beginners and dumb people, once you know what you are doing you know when it's alright to deviate from the rules.
Comment: And if an electron tries to take a sharp corner too fast, it could end up flying off.
Comment: @John This is why I always upgrade my boards with banked traces. However they are not rated for microgravity.
Comment: Signal Integrity expert Howard Johnson put it this way (paraphrased): "Do 90 degree turns matter? Sure, they do at high frequency. But you have bigger problems if they do, because every via you put on a board is two 90 degree turns as your trace dives down the via and onto the next segment of trace."

Source: [Interview on The Amp Hour](http://www.theamphour.com/the-amp-hour-77-winsome-waveform-wizardry/)
Comment: Don't forget "that's what most software does by default, and most people have no reason to do it differently" as a reason :)
Comment: electronons don't fly off, Dr Howard Johnson explained the answer to this questions and the surrounding misunderstandings quite clearly in his course on high speed digital design I must say.
Comment: I am just adding few points. One way whenever there is sharp corner, charge will accumulate(electrons), they can radiate efficiently. 2nd in terms of SI issues, at the 90degC bend you will have trace width changes ==> gives impedance mismatch >>>> gives rise reflections .
Answer: Electrons like any other masses have inertia and when they reach to corner conductor it is likev a obstacle for them and stack for a moment behind the corner then pass through and that corner act like a capacitor. In 90 degree (and actually in any angle other than straight path)we impose an extra capacitance to the circuit. The higher frequency the more significant capacitance.
Comment: Good joke, but no, electrons don't behave like that.
Comment: I am pretty sure electrons have mass and inertia, there are even a simple experiment showing it. I meant that angles in conducting path don't add capacitance (in most cases, they add inductance instead) and it is not because electrons are reluctant to take turns.
Comment: @fraxinus While it may not really be relevant at electronics scale, electrons do indeed have inertia, which plays a large part in many physics mechanisms.

Sharp corners in PCB traces


Can we still create unauthenticated webhooks?

Question: Following Winter 20' release, it looks like Site Guest user will have restricted access to objects. We heavily use unathenticated webhooks to notify of external systems changes to Salesforce. Can this still be done? If yes, what considerations do we need to make?
Comment: The Community Team also have this site which is helpful in explaining some of the changes: https://www.learncommunitycloud.com/s/news/everything-you-need-to-know-about-securing-public-sites-20Y1U000000UkRSUA0
Answer: You can, but you have to be incredibly careful. I've been going through the process of testing and modifying such implementations for our customers.
Approach 1
Write your REST class as without sharing, and make sure any triggers/flows which follow from the DML of your REST class are OK.
This has the advantage of being simple, but is somewhat brittle. If someone later introduces something like a Flow which gets invoked as a result of your REST service, then this can cause a fault which would have been hard to anticipate. We even found this a problem when the customer installed Financial Services Cloud on top of what we'd already done, and that introduced a load of profile-restricted stuff.
Approach 2
Just fire a Platform Event from the REST class, and do the DML in a trigger on the PE. This works by switching to the Automated Process User, who should have the required permissions.
This is robust to changes like the ones above, but makes it harder for you to give a synchronous response to the REST call. For example, if you were previously doing DML in your REST class, and returning validation errors back to the caller, you won't be able to do that anymore as you won't get a synchronous result. You would have to check the validity of the REST call manually in your rest class, and trust that if it passes the check, then the DML will succeed later. Arguably, this is a better way to separate concerns anyway, but it adds complexity.


Kernel of the character of congruence groups

Question: Let $\Gamma$ be a congruence subgroup of $SL_2(\mathbb Z)$ and $\chi:\Gamma \to \mathbb{C}^*$ a character of $\Gamma$ with finite image. Is then $\ker(\chi)$ also a congruence group? If not, can someone give me a counterexample?
Comment: I guess you can find some counterexamples in the answers to this question: http://mathoverflow.net/questions/130062/ You should be more specific about $\Gamma$ or the group in which it is a congruence subgroup. If the congruence subgroup problem has a positive solution, then $\ker(\chi)$ will automatically be congruence again if the image of $\chi$ is finite.
Comment: This rank 1 case is quite complicated for the congruence subgroup problem, but the standard reference is Serre's paper:
*Le probleme des groupes de congruence pour SL$_2$*,
Ann. of Math. (2) 92 (1970) 489-527.
Comment: Sorry, i forget to assume that $\chi$ is a finite character.
Comment: $\Gamma$ is a congruence subgroup of $SL_2(\mathbb{Z})$
Comment: Dear Abdullah, I have slightly edited your question in order to introduce the precisions you gave in comments.
Answer: The answer is NO, in general. For a specific counterexample, let $\Gamma$ be the principal congruence subgroup of level two in $SL(2,{\mathbb Z})$. Then, $\Gamma$ modulo $\pm 1$, is the free group on two generators, and hence there is a homomorphism from $\Gamma$ onto ${\mathbb Z}/5{\mathbb Z}$ (the latter  realised as the quotient of the free abelian group on two generators modulo a suitable subgroup). The congruence closure of $\Gamma$ may easily be shown to be the product
$$SL_2(2{\mathbb Z}_2)\times SL(2,{\mathbb Z}_3) \times \prod _{p\neq 2,3} SL(2,{\mathbb Z}_p)$$where ${\mathbb Z}_p$ denotes the ring of $p$-adic integers. Using the fact that for $p\geq 5$, the group $SL_2({\mathbb Z}_p)$ is its own commutator, it is easy to see that any Abelian quotient of this congruence closure  consists only of two and three torsion.  Hence the kernel of $\Gamma$ to ${\mathbb Z}/5{\mathbb Z}$ cannot be a congruence subgroup.
[Edit] I see that the link provided by Matthias Wendt answers this question completely.


Resolution of a rotation

Question: Can the rotation of a point about some arbitrary axis $\vec{n}$ be described by some rotation of the point about z-axis followed by some rotation about y axis?
Comment: Yes, with Euler angles
Comment: @MatMorPau22 How do we find the Euler angles equivalent to rotation of angle $\theta$ about given axis $\vec{n}$?
Comment: See https://math.stackexchange.com/questions/513397/how-can-i-convert-an-axis-angle-representation-to-a-euler-angle-representation
Answer: Say we want to rotate point $(x_0, y_0, z_0)$ to $(x_1, y_1, z_1)$ where $\rho= \sqrt{x_0^2+ y_0^2+ z_0^2}= \sqrt{x_1^2+ y_1^2+ z_1^2}$.  First rotate about the z-axis so that $(x_0, y_0, z_0)$ is rotated to $(r, 0, z_0)$ where $r= \sqrt{x_0^2+ y_0^2}$.  That can be done with a matrix of the form $\begin{pmatrix}a & b & 0 \\ -b & a & 0 \\ 0 & 0 & 1\end{pmatrix}$.  We want $\begin{pmatrix}a & b & 0 \\ -b & a & 0 \\ 0 & 0 & 1\end{pmatrix}\begin{pmatrix}x_0 \\y_0 \\z_0\end{pmatrix}= \begin{pmatrix}ax_0+ by_0 \\ -bx_0+ ay_0 \\ z_0\end{pmatrix}= \begin{pmatrix} r\\ 0 \\ z_0\end{pmatrix}$.  So we have $ax_0+ by_0= r$ and $-bx_0+ ay_0= 0$ and we want to solve for a and b.  Multiply the first equation by $x_0$ to get $ax_0^2+ bx_0y_0= rx_0$.  Multiply the second equation by $y_0$ to get $-bx_0y_0+ ay_0^2= 0$.  Adding those eliminates b: $a(x_0^2+ y_0^2)= ar^2= rx_0$.  $a= \frac{x_0}{r}$.  Then $-bx_0+ ay_0= 0$ becomes $-bx_0+ \frac{x_0y_0}{r}= 0$ so $bx_0= \frac{x_0y_0}{r}$ and $b= \frac{y_0}{r}$.
The first matrix, rotating about t the z-axis, is $\begin{pmatrix}\frac{x_0}{r} & \frac{y_0}{r} & 0 \\ -\frac{y_0}{r} & \frac{x_0}{r} & 0 \\ 0 & 0 & 1\end{pmatrix}$.
Now we want to rotate around the y-axis so that $\begin{pmatrix} r \\ 0 \\ z_0\end{pmatrix}$ rotates to $\begin{pmatrix} 0 \\ 0 \\ \rho\end{pmatrix}$. Rotating about the y-axis requires a matrix of the form $\begin{pmatrix} a & 0 & b \\ 0 & 1 & 0 \\ -b & 0 & a\end{pmatrix}$.  Then we must have $\begin{pmatrix} a & 0 & b \\ 0 & 1 & 0 \\ -b & 0 & a\end{pmatrix}\begin{pmatrix} r \\ 0 \\ z_0\end{pmatrix}= \begin{pmatrix}ar+ bz_0 \\ 0 \\ -br+ az_0 \end{pmatrix}= \begin{pmatrix} 0 \\ 0 \\ \rho \end{pmatrix}$ where $\rho= \sqrt{x_0^2+ y_0^2+ z_0^2}= \sqrt{r^2+ z_0^2}$.  Now we have the two equations $ar+ bz_0= 0$ and $-br+ az_0= \rho$ that we want to solve for a and b.
Multiply the first equation by r to get $ar^2+ brz_0= 0$ and multiply the second equation by $z_0$ to get $-brz_0+ az_0^2= \rho z_0$.  Adding the two equations eliminate b: $ar^2+ az_0^2= a(r^2+ z_0^2)= a\rho^2= \rho z_0$ so $a= \frac{z_0}{\rho}$.  Now, $ar+ bz_0= 0$ becomes $\frac{r z_0}{\rho}+ bz_0= 0$ so $bz_0= -\frac{r z_0}{\rho}$ and $b= -\frac{r}{\rho}$.
The second matrix, rotating around the y-axis, is $\begin{pmatrix}\frac{z_0}{\rho} & 0 & -\frac{r}{\rho} \\ 0 & 1 & 0 \\ \frac{r}{\rho} & 0 & \frac{z_0}{\rho} \end{pmatrix}$.
Answer: First you have to bring one of the axis (for instance $z$) onto $\bf n$.
To do this, you can rotate around $z$ to bring e.g. $y$ normal to the plane $z, \bf n$, then rotate around the new $y$ to bring $z$ to $\bf n$.
After that, then you can rotate around the (new) $z$ for the required angle.
If the point to be rotated is given in advance, in the original base system, then before applying the last required rotation around $\bf n$, you shall express $P$ in the new coordinates.
Finally, the new point $P'$ will lay on a centered sphere same as $P$, so it will always possible to pass from one to the other with a latitude + longitude steps.
You could use spherical trigonometry, but I do not think that the process would be simpler.

Resolution of a rotation


Substitute for alkali-iodide-azide reagent for BOD test of water samples

Question: To measure the biological oxygen demand (BOD) of water samples, I am following a procedure that uses manganese sulphate, $\ce{H2SO4}$, and titration with standard sodium thiosulfate solution. Alkali-iodide-azide reagent is an important part of the procedure, but my school lab does not have this reagent. Is there a substitute for it?
Answer: There are two types of oxygen demand of water: easily oxidated substances and  oxidated with difficulties. Thus potassium permanganate, $\ce{KMnO4}$ (permanganate index) are used for first group or potassium bichromate $\ce{K2Cr2O7}$ (Chemical oxygen demand)  for both groups. Both $\ce{KMnO4}$ and $\ce{K2Cr2O7}$ are used in acidic environment.
Alternatives are iodates and cerium(IV) compounds.
I recommend using $\ce{KMnO4}$, but it is prohibited as precursor in some countries. also it is not primary standard, thus standardization by titration of solution of primary standard like oxalic acid needed.
$\ce{K2Cr2O7}$ is primary standard, but it is highly toxic, carcinogen. Thus be very careful with that chemical.
You can try iodates for determination but they are not very common at school. Some bleaching agents contain iodates, but I can not guarantee their usability for analysis.


How can I create Skooma in Skyrim?

Question: Is it possible to create skooma in the game. I know it's illegal but I can run forever with this. If so what's the ingredients required to create it.
Answer: No, you can acquire all of its ingredients but cannot reproduce it.
You can, however, obtain it at the following locations:

It is sold by most Khajiit caravans throughout Skyrim.
Fort Dunstad Commander's quarters.
Random NPC's sell it near Whiterun, Riften and Solitude. If you respond to the NPC by asking if it is illegal to sell skooma, he will attack you and you will be able to loot his skooma and other items (including Sleeping Tree Sap) once he is defeated.
Unnamed bandit camp at a rock overhang NW of Whiterun, below Dragonsreach; follow the city wall or the foot path north towards Halted Stream Camp. About five bottles of Skooma in the shelf, as well as other provisions, ingredients, and a locked chest.
Knifepoint Hollow. One bottle is on a table next to a flute.
Three bottles on a barrel outside of Ustengrav.
Enthir of The College of Winterhold sometimes sells skooma.
M'aiq The Liar can be pickpocketed for 3 bottles of Skooma.
Prisoners at Cidhna Mine can be bribed, brawled, or persuaded to give the Dragonborn skooma. The skooma can be traded with Borkul the Beast to have Madanach's cell unlocked.
Cragslane Cavern has some Skooma and Moon Sugar.
The NPCs in the quest "Skooma Trade" may have some on them.
In Liar's Retreat, there are two bottles on the shelf behind the bar.
In the Riften Warehouse there are bottles of skooma and moon sugar on the shelves. This location is part of the quest Skooma Trade and can only be entered at a certain point in the quest.
Three bottles can be found in Septimus Signus's Outpost, in the cupboard. Taking them is considered a crime.

http://elderscrolls.wikia.com/wiki/Skooma_(Skyrim)
Answer: Someone made a Mod that adds skoooma crafting:
Realistic Skyrim Skooma
Answer: Skooma can be found at the red water den
The woman at the desk sells it and
13 bottles of skooma
And 13 bottles of red water den skooma along with moon sugar can be found there
Answer: Skooma can be fond or purchased throughout the world
Such as riften warehouse. Cidnah mine . Red water den and it can also be made with moon suger and mammoth tusk powder
Comment: This combines an existing answer with a modded answer.  This adds nothing...
Answer: You can make it. You need Moon Sugar and Powdered Mammoth Tusk. You can get the powder from Imperial Wanderers. (As in Wanderers who are of the Imperial race, not people that are part of the Legion.)
Comment: You must have a mod that enables crafting it. In the vanilla game it is not possible to create.

How can I create Skooma in Skyrim?


"Report a 3 mile right base" - where is it measured from?

Question: At which position should you report to ATC?
Comment: How long a base leg would you actually be flying in the "position 3" case?
Comment: This *IS* a duplicate...
Answer: It's neither of the above, it's a base leg which will converge onto the final approach leg 3 miles out from the runway threshold. In other words when you turn from base onto final you'll be on a 3 mile final.
Comment: Do you report when established on the base that will intercept final at 3 miles?
Comment: I've never been told to report on a 3 mile base before, but if I was I would report when established on the base leg as the key part is to report on base.
Comment: How is that different from "Report a 3 mile final"?  If you're turning base-to-final, or just on final, you're at the same position, 3 miles from the threshold, just on a different heading.
Comment: The difference is that the controller wants to know when you enter the base leg, not when you are on final @abelenky. Maybe it's important for separation. I'm not convinced this is standard phraseology.
Comment: I like this answer.  I'd like even more to see if there is a source.  PC glossary?
Answer: A "3-mile base" means a base to 3-mile final, with downwind being at the normal distance from the runway; it's named that because it's the base leg that moves.
All of your positions are based on the idea of a 3-mile base to (normal) final, which would mean the downwind (not base) has moved.  If that's what they wanted, you would get an instruction to simply "enter right base", regardless of how far away that may start, and possibly some other reporting instruction if they're non-radar.
Also, position 1 doesn't really make sense.  If you called in north or northeast of the field, they would tell you to "enter downwind", so position 1 shouldn't happen.  If you were already in the pattern and they wanted you on a 3-mile final, they would tell you to "extend downwind" and either tell you 3 miles (or a landmark 3 miles away) specifically or, more likely, tell you what traffic to follow.
If you called in east or southeast of the field, tower would assume you're in position 2 or 3, not position 1, because any sensible inbound caller would have their nose pointed either at the field generally or at whichever leg of the pattern makes sense given the runway in use (i.e. wind) and their position.


Do crystal dice offer any advantages or disadvantages?

Question: Do crystal shaped dice (example) provide any notable advantage or disadvantage over traditional hobby dice shapes (example)?  Are they equally random?
Comment: You can't stab your foot on a d4...
Comment: If you have e.g. 10 d10 crystal dice and otherwise traditional dice, it is easier to find those d10 (or what kind soever) in that huge heap of dice. (You're role-playing, you got a heap of dice, right?)
Comment: In the early runs, the crystal d20s had a design flaw that ensured that one of the numbers could not be rolled — the face was opposite an edge, and the die would roll to one of the numbers beside it.
Comment: @Random832, as a rogue, I say that those d4s come in handy when you forget your caltrops...
Comment: How far do hey roll? I noticed that the crystal d6 I got in Dragon magazine comes to a stop much more quickly then traditional ones.
Comment: http://www.toplessrobot.com/2009/04/the_10_most_shameful_rpg_dice.php
Answer: Short answer: there's no real difference between the two types.
The type of dice you're calling crystal are also known as rolling-pin or rolling-log style dice.  They're actually just n-sided prisms with the ends tapered so they never land on them.  Rolling a prism die like this is just as fair as any other die.
To see why, take a look at a picture of a prism -- Wikipedia's article on pentagonal prisms, for example.
In that article, there's an image of a 5-sided prism at the upper right.  A die in this shape would have 5 rectangular sides around it, and 2 pentagonal ends.  If the ends are convex enough (like the "crystal" dice of your example link), then the die can never land on them.  This leaves only the 5 rectangular sides as options.  All of them are evenly distributed around the "waist" of the die, and all of equal size.  Therefore, they're all just as likely of landing points.
Comment: Totally this.  No statistical difference, but you get plenty of style points if you roll with the rolling pin dice (or other unusual dice).
Comment: They are harder to read from non-critical angles, though.
Answer: Two things:

If dice are symmetrical and of uniform density, it doesn't matter which material are they made of. The problem with cheap dice is that they're usually not manufactured up to exacting standards.
[snark]If the rolling-pin dice they sell have the quality of their website design...[/snark]

Do note that the density and symmetry problem can show up on both kinds of dice. Just because they can't land on some ends doesn't mean they're good dice.
Comment: @okeefe, that d12 promised me there was a *+10 sword of gleaming awesomeness* in that cave last adventure.  Three ghoul bites and a broken arm later, and I'm beginning to mistrust my dice.
Comment: I think it is definitely worth testing your dice for 'honesty' if you doubt them, but do this when you're bored, not during your weekly rpg-sessions. You'll need to go dig up some statistics lessons on hypothesis tests anyway so...
Answer: There are several key advantages to barrel shaped dice:

Not limited to even numbers
only roll in one linear direction
are slightly easier to spot untrue dice amongst (roll it down a 30-40° drum, and uneven ones will not make a steady sound! Discovered by accident at work.)

Disadvantages:

tend to be larger for a given number of sides
hard to tell number of sides at a glance (esp d10 vs d12)
larger (d20 & up) ones can be hard to determine the "up" face on
more expensive (both due to more material and fewer produced)
Smaller (d4/d6/d8) wedge-style ones are easier to throw for specific numbers than normal dice. Readily solved by use of dice cups.

Comments:
I find that I like them well enough when used with a dice cup. But when not used with a dice cup, I don't much like them.
Besides, there are other shapes of dice besides the "normal" ones that ARE fair, but sure don't look it... the Gamescience d7 is fair when used with dice towers and/or dice cups, but can easily be thrown for a flat by hand on tables with a tablecloth.
Answer: Because of the nature of the fact the rolling-dice can only roll in two directions (forward an backward), whereas a standard dice "tumbles" in any direction, it may be easier to modify the dice by filing a particular edge so it's wider than others...
I'm not talking from personal experience, as I have only recently started playing table-top RPGs and haven't seen one of these die before, but I'm thinking in practical terms.


How to exclude personal traffic without IP in Google Analytics?

Question: How to exclude my personal traffic from Google Analytics without IP? I am working on site regularly from many browser's but on one computer and just from home.
Comment: We would have to know more. Are you doing this at home or work for example?? Are you doing this when you are out such as from the local coffee shop hotspot?? Otherwise, there is not way for us to answer this.
Comment: Just only from home.
Answer:
To completely disable data tracking, you can add an opt-out function to your site:
https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced#optout
You could also use the Opt-out browser plug-in (available for multiple browsers):
https://tools.google.com/dlpage/gaoptout
Set-up a custom dimension to exclude traffic
Create a custom dimension, call it "Internal traffic" (or anything you wish). Make it "User"-level to make it persist across visits. If your browser automatically clears cookies, you'll still have to revisit the page each time you open it.
Create a filter to exclude traffic when that dimension (ie: Dimension1) is set to the value (ie: "Internal traffic").
Set-up a page on your domain that you can visit that sets this custom dimension in your browser. It will stay as long as your cookies are not cleared.
<code>ga('send', 'pageview', {
    'dimension1':  'Internal traffic'
});
</code>
Help on custom dimensions: https://developers.google.com/analytics/devguides/collection/analyticsjs/custom-dims-mets
Answer: Your telco should be using a sub-domain that identifies you in a manner of speaking. It will change each time you connect your cable, dsl, or heaven forbid- dial-up. Each time, you will get an IP address that is tied to a sub-domain name by your carrier. You can get this by accessing something on your website and checking your log file. You may have to wait for the log file cache to write though. Do something unique so you know it is you. Then you can simply exclude that domain name from your reports. It will not be perfect, but close enough.
Answer: I realyze that Ghostery is my solution.


Derivation of Interaction energy of Dipole - Induced Dipole Interaction

Question: I see that the formula giving the potential (interaction) energy of a dipole and an induced dipole is $$V=-\frac{C}{r^6}$$ where $$C=\frac{\mu_1^2 \alpha'_2}{4 \pi \epsilon_0}$$ and that the formula giving the potential (interaction) energy of an induced dipole and another induced dipole is $$V=-\frac{C}{r^6}$$ where $$C=\frac{3}{2}\alpha'_1\alpha'_2\frac{I_1I_2}{I_1+I_2}$$. Subscripts 1 and 2 represent the dipole or induced dipole, $\mu$ represents the dipole moment of a permanent dipole, and $\alpha$ represents the polarizability of an induced dipole. Also, $r$ represents the separation between the two in each case, and $I$ represents the ionization energy of 1 or 2. I have been unable to figure out how people have derived the interaction energy in cases that involve an induced dipole (and couldn't find it in Atkins or on Google), and was wondering if someone might be able to show me how it is done. Thank you.
Comment: The dipole induced-diple interaction equation does not seem right.  Permitivity should have a square since we have it twice--once inducing the dipole, once calculating dipole-dipole interactions. And polarizability should not have a square.  Can you double check?
Answer: I don't think you need quantum mechanics to understand what's going on in dipole-induced dipole interaction. The basic mechanism is quite simple and just the details of the calculations change by switching to a quantum description.

Polarizable molecule in an external field
So first things first. Let us consider a simple model of polarizable molecule as being a charge with valence $z$ attached to a spring of strength $k$ and zero length at rest (this is valid model in the harmonic approximation of a dipole).
Upon placing such a molecule in an electric field $\vec{E}$, the charge feels a force $ze \vec{E}$. This force pulls in one direction while the spring pulls in the opposite direction and eventually the system reaches a new mechanical equilibrium where
\begin{equation}
-k \vec{d} + ze \vec{E} = \vec{0}
\end{equation}
We can find then that the spring constant can be related to the size of the induced dipole $ d = || \vec{d}||$, the amount of charge displaced $ze$ and the electric field magnitude $E = ||\vec{E}||$ via:
\begin{equation}
k = \frac{ze E}{d}
\end{equation}
Now, to induce this dipole, of course the electric field had to work. The amount of work it provided is equal to the potential energy gained by the spring-like molecule i.e.
\begin{equation}
W_{induced} = \frac{1}{2}k d^2 = \frac{1}{2} ze E d
\end{equation}
Now, we can define the induced dipole $\vec{p}_i$ as being $ze \vec{d}$, it then comes that:
\begin{equation}
W_{induced} =  \frac{1}{2} \vec{p}_i\cdot \vec{E}
\end{equation}
Now, the energy of dipole in an electric field is given by $U_d = -\vec{p}\cdot \vec{E}$. It then comes that the total energy of the dipole induced by an external field is then:
\begin{equation}
U_{induced} = U_d + W_{induced} = -\frac{1}{2}\vec{p}_i \cdot \vec{E}
\end{equation}

Potential energy of dipole-induced dipole system
Let us consider now that the external field is generated by permanent dipole $\vec{p}_p$ such that the interaction energy is now:
\begin{equation}
U_{int} = -\frac{1}{2}\vec{p}_i \cdot \vec{E}_p \equiv \frac{1}{2}\alpha_i ||E_p||^2
\end{equation}
where I have introduced the polarizability $\alpha_i$ of the induced dipole such that $\vec{p}_i = \alpha_i \vec{E}$ in the general case.
Now, the electric field generated by a permanent dipole $\vec{p}_p$ at a point $M$ is
\begin{equation}
\vec{E}_p(M) = \frac{1}{4 \pi \varepsilon_0 r^3}\left(3(\vec{p}_p \cdot \vec{u}) \: \vec{u}-\vec{p}_p \right)
\end{equation}
upon taking the square of it, we get:
\begin{equation}
||\vec{E}_p(M)|| = \frac{1}{(4 \pi \varepsilon_0 r^3)^2}\left(3(\vec{p}_p \cdot \vec{u}) \: \vec{u}-\vec{p}_p \right) \cdot \left(3(\vec{p}_p \cdot \vec{u}) \: \vec{u}-\vec{p}_p \right) = \frac{p_p^2}{(4 \pi \varepsilon_0 r^3)^2}(3 \cos^2 \theta +1)
\end{equation}
where the angle $\theta$ is defined such that $\vec{p}_p \cdot \vec{u} = p_p \cos \theta$.
Finally the total interaction energy reads:
\begin{equation}
U_{int}(p_p, \theta, r) = \frac{\alpha_i p_p^2 (3 \cos^2 \theta +1)}{2(4 \pi \varepsilon_0 r^3)^2}
\end{equation}

Approximate free energy of the system
The free energy of the system, when in contact with bath at inverse temperature $\beta$ is defined as follows:
\begin{equation}
e^{-\beta \mathcal{F}(p_p,r)} \equiv \int d\Omega_p \: e^{-\beta U_{int}(p_p,\theta,r)}
\end{equation}
where $d\Omega_p \equiv \sin \theta d\theta d\phi$ is the integral element of the solid angle over the possible orientation of the permanent dipole $\vec{p}_p$.
At sufficiently high temperatures, we can expand the exponential inside the integral and this gives:
\begin{equation}
e^{-\beta \mathcal{F}(p_p,r)} = \int d\Omega_p \: [1-\beta U_{int}(p_p,\theta,r) + \mathcal{O}(\beta^2 U_{int}(p_p,\theta,r)^2) ]
\end{equation}
this integral gives then:
\begin{equation}
e^{-\beta \mathcal{F}(p_p,r)} \approx 4\pi + \frac{4\pi \beta p_p^2 \alpha}{(4\pi \varepsilon_0) r^3)^2}
\end{equation}
finally
\begin{equation}
\mathcal{F}(p_p,r,\alpha) = -\beta^{-1} \ln \left[ 4\pi + \frac{4\pi \beta p_p^2 \alpha}{(4\pi \varepsilon_0) r^3)^2}   + \mathcal{O}(\beta^2U_{int}^2) \right] \approx - \frac{ p_p^2 \: \alpha}{(4\pi \varepsilon_0)^2) r^6}
\end{equation}
This interaction is called the Debye van der Waals interaction. So you can also look it up in other textbooks to get more details, especially on the quantum treatment of what I have done here.
Comment: So, the heart of this really just was that the induced dipole itself depends on the applied electric field of the permanent dipole. Together with the fact that the electric potential for a dipole falls as 1/r^2, and thus, the electric field for a dipole falls as 1/r^3, the 1/r^6 follows pretty naturally. Thanks. I was looking around for explanations and though I can't say I followed all of what you did, especially around the point where you talked about the approximate free energy, this is the best and clearest explanation I could find online.
Comment: If there is a point that you think requires more explanation, please tell me, I will try to edit my answer accordingly when I get the time.


Linux filesystems recoverability

Question: I am on Debian 8.6 and have 1x 4 member RAID6 2TB size in effect. Apart from backup system I now need to decide what filesystem to use.
The purpose of this array is reliability, availability, and the possibility to recover deleted files.
Answer: Use ext4.
The mature (and not stale) choices are basically ext4 and xfs.  Redhat like XFS for it's scalability, performance.  I have nothing against it but ext4 is more commonly used and hence slightly better understood (community documentation like StackExchange).
Don't expect to recover unlinked files.

There used to be an undeleter for linux ext2.  There isn't one that works for modern filesystems, in my experience.
(When the FAT filesystem on your camera breaks with much-wanted photos on it - or you accidentally delete all - photorec is amazing.  It works for many document types, not just photos.  But you don't want to run it the server of a small business, it can't exclude files which are not deleted and it can't tell the filename).

New-fangled copy-on-write filesystems can carry historical snapshots, allowing recovery if you delete a file that existed in the last snapshot.  But:
btrfs is not considered stable in Debian.  (Everyone tells you to use the latest upstream kernel for btrfs, or possibly a distribution like SUSE where they were backporting fixes).  btrfs' nascent native raid5/6 code was recently discovered to be broken and AFAIK still needs rewriting.
ZFS would be a valid solution.  But since you don't mention it yourself, I would not suggest it.  It is not even included in Debian.  ZFS is kind of its own thing... it even has it's own weird cache system separate from the normal Linux VFS.
Answer: This might not be the answer you want to hear but... As far as I know, there is currently no filesystem that can recover deleted files in a reliable way. I say "reliable" because I know there are tools available that claim do this, to some extent.
The only foolproof way to recover accidentally deleted files is via backups.
My suggestion is that you, instead of looking for a filesystem that can recover files, make sure that you know which data you want to back up, and do so regularly using whatever tool suits you best (I rely heavily on rsync but there are plenty of other backup tools available).

Linux filesystems recoverability


Audi A3 2005 Damaged ignition barrel?

Question: I am experiencing a problem with starting my 2005 Audi A3. This morning I inserted the key into the ignition and could not switch it to the ON position. I could only switch it to the Accessory position. I have checked that the wheels are not locked. I tried to wiggle the key as well as wiggle the key while slightly turning the steering wheel. I suspect the ignition key barrel. If I need to disable the steering column cover I would also change the ignition switch as they come as a kit. I would like to make sure that I will not experience any problems with the immobiliser if I change the ignition switch. As far as I understand immobiliser reader is a separate device housed nearby and I could be connected to a new ignition assembly. Lastly, a new key will most likely not have an immobiliser chip or remote control and it will not be programmed. Therefore, I am planning on switching the key in my current fob. At the same time, I would also change the driver's side lock to keep the key universal rather than carrying two keys. This approach assumes that the immobiliser chip is integrated into the fob and that I can connect the immobiliser chip reader to the new assembly. Would like to verify if my assumption is correct. Thanks
Comment: Have you tried to put some kind of lubricant into the barrel to see if it would turn?
Comment: Hi. Not yet as all I have is WD40. People recommend graphite paste. However, graphite is conductive. Unsure if it is conductive in paste form. Will need to research it. To add a few details the issue is only when switching from ACC to ON once in the ON position it works normally.
Comment: While on the subject I was planning to use compressed air before WD40. My thinking is that it could blow out all loose debris. And then I would use WD40 to lubricate and push all gunk to the bottom of the barrel.
Answer: To answer my question. The ignition assembly is made of four parts: housing, ignition switch, ignition barrel and immobiliser coil. If the immobiliser coil is removed and fitted to the new assembly the car will start as long as the new key blade (that came with the new ignition barrel) is fitted to the old fob (the fob is where the immobiliser chip is located). This approach requires a swap of the driver's door lock if we want to keep the key universal for everything in the car. I will add pictures and links to good step-by-step tutorials.

Audi A3 2005 Damaged ignition barrel?


How can I display how a website will look in another form factor?

Question: Some websites use different CSS styles to display on different systems. How can I use those style sheets to show this on another form factor? For instance, I would like to show how the screen style will look on a laptop.
Answer: You might be interested in checking free online services like TestSize.com or ViewLike.us, hope it helps!
Answer: You can modify your user agent (with an extension in Firefox, or with the <code>--user-agent=</code> parameter when calling chromium).  This can allow you to mimic your browser as Android's browser for example.
A pretty decent list of different user agents can be found here: http://www.useragentstring.com/pages/useragentstring.php


Physical resistance vs. Armor vs. Defence

Question: I'm playing Dragon Age: Origins for the first time. I'm trying to build both Alistair and my character as tanks and so I was wondering which of the three of these  are more important: armor, physical resistance, or defense? If one item has a higher armor rating than another one but a lower physical resistance boost or defense boost, then which should I opt for?
Comment: would argue DAO tanking is more based on agro management and healing. Its important to know how damage works in DAO first though - armor is flat -damage, phys resistance protects against knockdowns, and defence helps you from being hit. In general you'd want to opt for armor rating because incrementally, it would likely contribute the most to your tank staying alive. However, once again the most important part of tanks are agro management to keep everything focused on the tank, and healing, to keep the tank alive (moreso on nightmare)
Answer: This question is an interesting one.  It is a little subjective, but a brief explanation of these statistics may serve us well.
Armor: This determines a flat amount of damage that will be subtracted from a physical hit. This is directly countered by an enemy's armor penetration (AP) stat. Rouge-like foes will have more of that.  Example: You heavily armor your character and he has 50 points of armor. Burly brute hits you for 60 damage with 0 armor penetration. Damage taken is 60 - 50 = 10 points. Suppose sneaky rogue hits you instead for 35 damage with 30 armor penetration: 50 armor - 30 AP = 20 effective armor. 35 damage - 20 armor = 15 damage taken. AP can never add to damage beyond negating armor.  Because most enemies have some AP, very small amounts of armor are effectively treated as 0 armor.
Defense: This determines how likely a foe is to hit you in the first place. This is opposed by an enemy's attack (accuracy.) Even amounts of attack and defense lead to a 54% chance of hit. Every point in favor of defense reduces that probability by 1% and vice versa.  Note that many special attacks (not even mentioning magic) will ignore the defense stat. At a low enough level of defense, all attacks will hit, making tiny bonuses beyond that possibly worthless.
Physical Resistance: This determines the probability of avoiding nasty status ailments that are often side effects of physical attacks (or the primary purpose of them) such as being stunned or knocked down. Every point of this stat grants roughly an additional 1% chance of avoiding the effect.  This is countered by enemy level, enemy type (champions are harder to resist for instance) and enemy attack attribute (often Strength.) At somewhat low levels of physical resistance, this will be reduced to a 0% chance of resisting a physical effect.
Note: Two common and nasty physical effects are knockdown and stun. The indomitable two-handed stance will completely prevent these from affecting you, so if your tank is a two-handed weapon wielding warrior and has the stamina to spare, physical resistance becomes even less helpful as it is redundant for these nasty and common ailments.
Fatigue: This one wasn't mentioned in the question but is very important. If an armor is very heavy, it will often increase fatigue, increasing the amount of stamina or mana required to use abilities. If a warrior is unable to use his taunting or damaging abilities, he will be unable to tank very much because his aggro control will be limited.
Analysis: Due to everyone having a small amount of armor penetration, small amounts of armor are useless. Due to exceptionally low defenses playing little/no role in chance to dodge, it also is worth less in small amounts. Due to the way resistance checks work, very small amounts of resistance are basically ignored. So, the general plan is to focus on statistics that you are already pretty good in, rather than spreading your stats around. If you get lots of armor, you will be effective at resisting damage and allowing your healers time to restore your health. Additionally, the heaviest armor grants a very small bonus to your aggro control.
If you already have very high defense, increasing that further can be a good idea instead of increasing the armor stat. This will leave you vulnerable to attacks that ignore the defense stat as well as becoming a problem for the times when you get unlucky and are hit by normal hits because the damage will be high and spiky, making it difficult to predict when you'll need healing.
Investing in physical resistance is a good secondary goal if you already have a high physical resistance to build off of. It is very difficult to accrue enough of this stat to make it a serious primary objective for your defensive strategy, and it will do nothing to help against basic attacks.
Keeping a low fatigue is crucial to pulling foes away from weaker party members. Thus, for warriors, the main considerations are:
1) Get enough Armor to survive some hits.
2) Get skills/equipment to allow for reasonable stamina management. If you can afford heavier armor and still use your taunt-like abilities, go for it. (This is much less of a consideration in the expansion where you have stamina potions.)
3) Physical Resistance is nice but don't really worry about it unless you have more than one piece of equipment offering an explicit bonus to it.
4) Worry about defense only if you have a shield and/or skills that really benefit it. It likely won't matter much if you are using a two-handed weapon as your defense stat will be mostly whatever you can get from your rather low dexterity stat.
5) Make sure to read your armor descriptions for "set" bonuses. Some armor will give a small (or large!) bonus if you complete the set. It can occasionally be worthwhile to use an inferior piece of gear in order to acquire the set bonus for matching your other gear.
For rogues:
1) Get lots of defense. Your dexterity will already be good, so improving this further will help more than a modest increase in armor that will often be overcome by penetration.
You really shouldn't be tanking with mages unless you are a particular specialization or are shapeshifted to a bear.
One interesting theme in this game is that specializing in one thing very singly tends to pay off more than diversifying.


Minecraft Online Play

Question: One day I tried to play in a LAN world via Hamachi. But when I gave her the IP she said it didn't work.
Then she gave me her ip, but it didn't work also! My version is 1.7.2 and hers is 1.7.2 also.
What do I need to do to establish a connection?
Comment: What error message do you get?
Answer: Hamachi uses a custom IP.
Give your IPv4 IP that's shown in the Hamachi app, not in the ipconfig command!!!
Comment: This is the correct answer if you're suing Hamachi.  MC is going to display the local address, but it's unlikely to see the Hamachi address.  Your computer can see both of them though.  Just make sure to include the port number at the end if there is one.
Comment: Thanks everyone but none of this helps works.
Answer: I don't know if single player networking works outside our home, but you can use lan at your home, or do this:

Try download a Minecraft server from minecraft.net (or here, 1.7.2)
Try ipchicken.com, I guess you're using IPv4 IP (IPv4: 192.168.1.something), try to send her the IP you'll see on ipchicken.com

Minecraft Online Play


Which way is length and which way is width?

Question: I hear people refer to the dimensions of things as "$2$ by $4$" etc. and I know its length by width, but I can't tell if the length dimension is vertical (up and down) or horizontal (side to side). Does anyone know?
Comment: This seems more like a question on language, than a math one.
Comment: An $m$ by $n$ matrix is $m$ rows by $n$ columns (I've never seen it otherwise).  But most other times it's just ambiguous.
Comment: For a rectangle, I tend to use "length" for the longer side and "width" for the shorter one.
Comment: I think length is vertical and width is horizontal
Comment: In mathematics it does not usually matter how you name the dimensions. In English, I feel, _length_ is usually in the "most important" dimension while _width_ is horizontal and at right-angles to the length. Neither is usually vertical: that is the _height_. The "most important" dimension is often that in which you move or look, or the longest. _Length_ can also apply to time, while _width_ cannot.
Answer: I think "length" and "width" are ambiguous.  I can confirm that native English-speaking college students will sometimes use length=2, width=4, and sometimes use length=4, width=2.  Of course, the area is 8 either way.
When I want to avoid ambiguity, I say Area = (base)x(height) or Area = (width)x(height).  For 3-dimensions, I use Volume = (width)x(height)x(depth) or Volume = (length)x(height)x(depth) to avoid ambiguity.
(Of course there's nothing wrong with Volume = (length)x(width)x(height), but you can't be sure people will label the dimensions the same way.)
If I'm asked to draw a "2 by 4" rectangle, I'll probably draw it two units wide and 4 units tall (taking "2 by 4" to refer to the x- and y-measurements respectively).  But I think this is also ambiguous, and people may satisfy the request with a rectangle at any orientation.
Comment: I agree it's ambiguous, but because of the relationship between the words "length" and "long", I always assume "length" means the longest dimension. I think this is the most common usage in colloquial speech.
Comment: In the lumber industry, when specifying the cross-section, the smallest dimension is always given first, e.g. a two-by-four. Generically, one can speak of two-by lumber to include two-by-six, two-by-twelve, etc and form sentences such as 'I think we can make all of this out of two-bys' Matrices are always rows first. Trousers are always waist-by-leg. Having a convention saves time and/or space, within the expert community
Answer: The Merriam-Webster dictionary defines width as the measurement of the shortest or shorter side of an object. Similarly that dictionary defines length as the longer or longest dimension of an object. It also defines length as the longer or vertical dimension of a piece of a clothing. Now this is just a bit of "tailoring", that it is common to use elbow-length for measuring the sleeves (vertical) of a shirt, and waist-width (horizontal) of trousers. (It is a different matter if someone's waist-width is more than their elbow length, which is quite possible)


Intended date of arrival error in Schengen visa application

Question: I have applied to the Netherlands for a Schengen visa. While I was writing the intended date of arrival in the Schengen area, I wrote 28/7 instead of 29/7.
Could this cause a problem or for my visa to be refused?
Comment: Why do you think this would be a problem?
Comment: @Neusser, it would mean that the numbers in the itinerary don't add up. That's a bad start, but if everything else looks fine the visa may be granted anyway.
Answer: Your error is unlikely to be a significant problem or be the cause for a refusal. One day earlier is would be preferable than one day later. The additional information you provide, flight details and hotel reservations, would clarify your actual arrival on the 29th, in addition to mentioning it during a visa interview.


How to correctly pronounce "pan" and "pen" differently?

Question: As a Portuguese speaker, I would pronounce both pan (/pæn/) and pen (/pɛn/) the same.
In what can I base my pronunciation so I don't mistakenly pronounce these words the same again?
Answer: First, it might help to listen to the difference between the two words, since Portuguese may have different vowel sounds. An audio clip for pen can be found here. A similar audio clip for pan is here.
Next, the two vowel sounds are represented differently in the International Phonetic Alphabet (IPA). However, since the IPA represents all the sounds in every language, there are words from Portuguese which can show the difference. First, the sound from pen is written <code>/pɛn/</code>, which sounds like the Portuguese word for "coffee", or café.
Depending on your dialect, the sound from pan may be very similar. Wikipedia notes that the vowel sound from pan sounds like the first vowel of the Portuguese pedra, but that this vowel may also seem very close to the sound from pen. If this is the case for you, I suggest listening to the other words from this page, which provide words from other languages which use the same vowel. It could help you hear the difference.
Hopefully hearing the vowel sounds on their own, as well in context (in perhaps another language you already know) will help you learn to pronounce them. Otherwise, a speech therapist could possibly help you learn to form the vowels differently.
Answer: Simchona has already explained the difference between /æ/ and /ɛ/ with reference Portuguese, but I'll shed some light on how to articulate those vowels.
Preliminaries
To begin with, here's the vowel chart:

This chart depicts a schematisation of two dimensions of tongue movement, demarcating the boundaries of the vowel articulatory space within the oral cavity. The slanted line to the left marks vertical displacement of the front of the tongue, showing us different degrees of open/close approximation i.e. how far or near the tongue is positioned from the roof of the mouth.

Open vowel: the tongue is positioned as far as possible from the roof of the mouth e.g. [a ɑ].
Close vowel: the tongue is positioned as close as possible to the roof of the mouth without creating a constriction e.g. [i u]
Other vowels such as near-close, close-mid, mid, open-mid, near-open etc., lie in between open and close vowels.

The horizontal lines mark vowel backness i.e. whether the highest part of the tongue is positioned in the front or the back of the mouth.

Front vowel: the highest point of the tongue is positioned relatively in front in the mouth e.g. [i e æ ɛ]
Back vowel: the highest point of the tongue is positioned relatively back in the mouth [u ɑ ɔ ʌ]
Central vowel: the tongue is positioned halfway between a front vowel and a back vowel [ɜ ə ɐ]

There's another feature called vowel roundedness which refers to the amount of rounding in the lips during the articulation of a vowel. In the chart, some vowels occur in pairs such as [i, y], [ɨ, ʉ], [ɛ, œ] etc., the ones to the right side are rounded (the lips are rounded while producing that vowel) whereas those to the left side are unrounded (unrounded lips).
[Some information about the vowel chart has been adapted from Understanding Phonetics by Patricia Ashby]

/ɛ/ vs /æ/

/ɛ/ is the vowel found in bet, bed, pen, ten, set, met, pet etc.
/æ/ is the vowel found in bat, bad, pan, tan, sat, mat, pat etc.

[ɛ] is called open-mid, front, unrounded vowel while [æ] is called near-open, front, unrounded vowel:

both of them are front vowels: the highest point of the tongue is positioned in front in the mouth
both are unrounded: no roundedness of lips

If you look at the vowel chart, you will see that [æ] is located a bit lower than [ɛ]. It means the main difference is that [æ] is a bit more open than [ɛ].
In [ɛ], the tongue is positioned one third of the way from an open vowel [a] to a close vowel [i] (the vowel in 'see') whereas in [æ], the tongue is positioned similarly to an open vowel [a], but slightly more constricted.
Answer: In British Received Pronunciation, the vowel of "pan" is at least as close to [a] as to [æ], which is why some are now adopting /a/ as the representation for the phoneme:
"The position of trap on our plot (figure 1) seems to unequivocally support Cruttenden's (2014) decision to adopt /a/ as the symbol for it, but this is probably the least controversial of our findings"  Bjelakovic, A. The Vowels of contemporary RP. 2016 ( https://www.cambridge.org/core/journals/english-language-and-linguistics/article/vowels-of-contemporary-rp-vowel-formant-measurements-for-bbc-newsreaders-1/3109BF90B3630215DAABD95111C3DD9C ).
In Portuguese, [a] is found in words like "pacto".
Therefore, it would make sense to pronounce "pan" as [pan] if you find it difficult to produce [æ].


During the Greed Island arc, are "Sage's Aquamarine" and "Lonely Sapphire" cards contradictory?

Question: In Greed Island, one card, "Sage's Aquamarine", gives the user friends for life. Another card, "Lonely Sapphire", gives the user immense wealth but all of his/her friends will forsake him/her and he'll/she'll be lonely.
Are these cards contradictory? If so, what would happen if you used both cards?
Answer: Are these cards contradictory? No, they are not. Sage's Aquamarine's effect is the following:

Its owner will have many intelligent friends and keep those friendships for their entire lives.

while Lonely Sapphire's effect is stated as follows:

The owner of this sapphire will acquire vast wealth, but in exchange will spend a lifetime alone, forsaken by friends, family, and significant others

From what I understand here, a contradiction would occur if two things are polar inverses of each other. For it to be contradictory, Sage's Aquamarine must have an effect that, instead of acquiring vast wealth, will place you in a huge debt or anything opposite of 'acquiring vast wealth'.
What would happen if you used both cards? Sage's Aquamarine will grant him/her friends 'rich in intelligence' that will get him/her through life. Lonely Sapphire, however, will contradict this effect but in addition, will grant him/her a life of wealth.


Bike feels like it is getting stuck when I start pedaling or increase pressure as I go up hills

Question: My bike feels like it is getting stuck when I start pedaling or increase pressure as I go up hills. Of course, I checked to see if the brakes were rubbing but they are completely free of the wheel. When I try to start riding after a stop I get the rubbing noise and feeling of tremendous friction but once I reach a constant speed it disappears. It will reappear as I speed up quickly or climb a serious hill.
Comment: Could it be that applying extra torque causes the rear tire to hit the frame?
Comment: If the problem settles when freewheeling, it could also be a broken axle.
Comment: Welcome to [bicycles.se] @Ryan. As BSO rider suggests, it could be the wheel rubbing the frame. This can happen if the quick release or axle nuts are not tight enough.
Comment: Yeah, the rear wheel is likely twisting in the frame.  This can happen especially on bikes with "old-fashioned" nutted axles, if the nut on one side comes loose.
Comment: Would the loose QR/axle nuts cause the problem to come and go? I can kind of see it with a nutted axle, where one side stayed tight and provided an "anchor" for the wheel to realign when tension on the chain dropped (if it was the left nut that was loose), but it seems like a QR would just pull over to the left side and stay there.
Answer: To summarise the comments, it sounds like your rear wheel has some freedom of movement where it shouldn't.
If you stand beside the bike and wiggle the top of the tyre sideways, can you perceive any movement?  You shouldn't be able to feel anything.
Try the same sideways push at the front or rear of the rear wheel.  Again no motion should be detectable.
I'm going to go with a broken axle, a loose axle nut or stretched skewer, or a bearing problem that is permitting lateral play in the wheel rim when under load.
Good news is all this is fixable.  Take the rear wheel out and start investigating, and do let us know what you find.
Answer: Check your shoes. You might be changing the position of your feet to bring them closer to the cranks. The rubbing noise will be when your shoe rubs against the crank with each rotation.


is a 6 years Biology Degree comparable to a Master's Degree?

Question: I live in Argentina and we don't have the Bachelor/Master's division. I've studied 6 years of a Biology Degree. Most of my subjects had Lab practices besides the theory/calculus part so my total amount of college was big (a normal subject would have 12 hours/week with a total of 23 subjects). Within the 23 subjects, we have 13 "general to all Biologists" and there are 9 which are "specialization" subjects. Then, if you're going for "neuroscience and behavior" you have to attend "Neuroscience 101" and you can't go for "Plant Vascular System 4".
Also, in order to graduate I have to have research experience and present a written "thesis" (and give an oral presentation) which is considered your last subject. I've worked for two years in a Lab doing this research.
Because I want to do my PhD abroad I'm wondering if there's a way to explain this or have some kind of equivalence. Since there are lots of automatic systems that are ready for you to complete Bachelor + Master, I'm having a lot of trouble dealing with this. I feel that it's too difficult to get to talk to a real person and when you actually do, the person gives you the "go to the website and..."
Any experience will help (specially if you had the same problem and you found the way to deal with it).
Comment: The 2 year research and thesis part sounds a lot like a Master's. In the US people usually don't do a Master's before a PhD so your research experience will probably be a plus, and you can explain this in a cover letter.
Comment: Usually when you apply to a graduate program in the US you submit both a CV and a cover letter. You can think of the cover letter as a short essay explaining why you should be selected for the program. I suggest you google it there is plenty of material online (including in this website).
Comment: What do you mean "explain this in a cover letter" ? I'm very bad with forms and bureaucracy. How should I explain this? How should I put it on my CV?
Comment: Yes but I thouhgt that I should write about my research interest and "what can you bring to the program?" there not about equivalences between universities and how many hours of Organic Chemistry I had compared to other. I'll chek Cover letters anyway. Thank you
Comment: Considering that many countries even in Europe has this system till recent years, I don't think it is a big deal.
Comment: Why not use the title of the degree you earned rather than potentially presenting it as something it is not?
Comment: @virmaior Maybe my question was not explicit about it. The main doubt is if my "Licenciatura en Biología" would be accepted as equivalent/enough for PhD application the same a "Master's Degree" is.
Answer: You are in a slightly tight but not an impossible to overcome situation.
What you describe relates very closely to the pre-Bologna_Process situation in Europe. People especially in Science- and Engineering-related disciplines had 5 to 6 years Bachelors (usually called Diplomas). When these graduates applied for graduate studies, especially in UK where the BSc in usually 3 years, they found themselves massively downplaying their qualifications. (The situation is somewhat sorted now.) Currently the old diplomas are almost universally accepted as Masters degrees because the retroactively calculation of ECTS points puts them nearly always in the same range as a Masters degree.
When you say abroad you do not specify where.
If abroad translates to Europe then things are quite straightforward. You say you have a Masters and leave things be. Departments are quite used to the phenomenon of "5/6 years of studies". Most of admissions committees will not blink an eye. It would almost certainty good to present it in your CV as "Integrated BSc and MSc studies" or something equivalent, so one can immediately spot it. Your programme of studies is far from unheard in Europe.
If abroad translates to US/Canada I do not have personal experiences; I think it will greatly dependent to the particular university's guideline. (I will be happy to be corrected at this point from a North American native if there is some standardised framework I do not know of). I can tell you for sure that 4-year BSc are not counted as Masters. I know very few people who applied for PhD straight out of a 5-year Engineering degrees from Greece; both them were accepted but they were very strong students anyway so I would not extrapolate based on them. Some others went for Masters (and continued to PhD eventually).
In general, a 6-years degree puts you in a very strong position if you are to be compared with simple BSc holder for PhD admission, probably your compare favourably to most MSci programmes as well. I would not worry much in that aspect. Having strong grades in those six years will be more important than what one equates your certificate to. (Assuming your references, cover letter, etc. are the same.)
Comment: I'm a bit confused by the "straight to PhD" bit -- in the US, a typical student is admitted to a PhD program with a bachelor's degree, and it is *not* common to do a master's first separately from the PhD program. So as far as grad school goes, either way you'd be applying to a PhD program, just if you had a master's you might skip coursework.
Comment: @cpast: You are right. My wording is misleading, thank you for spotting it. I will amend it. (I also realized that one of the people I was thinking of from the MEng>MSc>PhD route went from an EE diploma to Maths MSc and then to a Maths PhD so he was not a *representative* case.)
Answer: This really depends on the college and the department you want to get into. You should look around for some candidate programs and see what you can find online, and talk to some of the professors who work in that department.
At my university, the postgrad program directors wanted to see work experience. They wanted to see that you'd gone out into the world, and put your learning to the test beyond the confines of an internship. The more real experience you have, the more benefit you'll extract from the program - and the fewer questions you'll have to ask in class. However, this doesn't mean ALL postgrad departments are like this. Perhaps in your field they expect to see someone go straight from undergrad to graduate without working in the field for a few years. Perhaps some departments will care about this, and others won't. It depends on where you go.
It's a good idea to establish some contacts with the advisors now, so that they can come to recognize your name and help you out a little. You might just find an e-mail one day that one of them sends you about an important change, which wasn't sent to others, because they didn't bother to maintain contact. Social networking is very important!!!


Is it possible to add a horizontal line to apple notes on a mac?

Question: On MacOS I see ways to enter checklists and tables but no way to enter a horizontal line. Is this possible to do?
Comment: Wow, the amazing thing is, that with all the answers below, the right thing would be for Apple just add the  to the Notes > Format menu, just above the Table. I would suggest it to Apple right now...
Answer: I'd like to see this as an actual formatting option too… but it seems unlikely to come any time soon. Experimenting with various Unicode line characters (like ―) or a series of em dashes (opt + shift + dash) is not a great solution as the width of the "line" doesn't change with the width of the note window. And if you squeeze the window width narrower than your faux line, it will wrap. Ugh!
Here's the best workaround I've come up with (it ain't perfect, but it works for me!):

In Photoshop (or similar), make a new document of somewhere in the neighborhood of 2400 pixels wide by 6 pixels high.
Fill it with black.
Save as a .jpg (or .gif, or .png… it doesn't really matter) in a place that you'll have easy access to, like your Desktop.
In Notes, put the cursor on a new line where you would want the horizontal line to go.
Click to select the file you saved to your desktop, and copy it to your clipboard (command + c).
Head back to Notes and paste it in (command + v). You'll end up with something like this:

What's nice here is as you adjust the width of the window, the horizontal line image will always span the full width:

You'll notice that the height of the line also changes proportionally with the window width… so you'll have to experiment with a size that works for you. 2400 x 6 seems to work for me. Here's a link to the file that I'm using, if you want to give it a try (right-click to download):
https://i.stack.imgur.com/U7JXL.jpg

BONUS PRO TIP: If you're using TextExpander (or similar) make a new snippet that inserts this line graphic so you don't have to do steps 5 and 6 (above) every time. I've got mine set to -----. Adding the horizontal line with this shortcut has become second nature.

If you do not have TextExpander (or similar) to make a new snippet that inserts this line graphic so you don't have to do steps 5 and 6 above, you can create an Automator service as shown in the image below using the following example AppleScript code:
property hLine : (path to pictures folder as string) & "hLine.jpg"

set the clipboard to (read (hLine as alias) as JPEG picture)
delay 1
tell application "System Events" to keystroke "v" using command down

As coded, the linked "bcnfe7K.jpg" was saved in the Pictures folder within the Home folder as "hLine.jpg", so adjust it in the example AppleScript code as necessary.

Then assign it a keyboard shortcut, as in the image below, I used ⌘L as it was not assigned in Notes.

Now to insert the horizontal line in Notes, set the cursor where you want the line and press: ⌘L

Note: The example AppleScript code is just that and does not employ any error handling and is meant only to show one of many ways accomplish a task. The onus is always upon the User to add/use appropriate error handling as needed/wanted.
Comment: I added an Automator Service to your answer, which by the way is an excellent answer. +1
Comment: Wish I could upvote this more than once
Comment: @Xecure True, you can only upvote once… but you can still mark it as the solution. *wink*
Comment: @Xecure, While you can only up vote a question once, you can also choose to click the check mark thus making this the accepted answer, if you so choose.
Comment: Bonus points go to whomever can get something like this working on iOS!
Comment: The image solution is brilliant!
Comment: Can't add "/Users/travelbae/Downloads/hLine.jpg as alias". Path is correct and file exists. Suggestions?
Answer: Hold down the hyphen key on the keyboard. When you let off, the dashes will draw in as a solid line.
Comment: That just uses a built-in option for using "smart quotes and dashes" to convert hyphens into em-dashes, and it will cause the wrapping of the line already described if you should narrow the window.
Comment: This is the correct answer
Answer: There is a solution to add a horizontal line by just using a keyboard shortcut that triggers Automator to type a line of underscores for you. It works well, and it would be great if the keystroke animations were removed when pressing the shortcut!
Check this brilliant answer at macrumors.com by chown33 (note that the steps below were written for OS X 10.8.4 Mountain Lion so test it accordingly):

The main phases of a solution are:

Make a Service in Automator that types '_' your desired number of times.
Assign a Keyboard Shortcut to the Service using System Preferences.
Test it.

Phase 1 : Make a Service in Automator

Launch Automator.app.
Choose "Service" from the "Choose a type for your document" dialog.
Add a "Run AppleScript" action to the workflow.
Paste the following AppleScript into the action:
  Code:
tell app "System Events" to keystroke "_______________________"

The pasted-in AppleScript should completely replace the template
  AppleScript that automatically appears in the "Run AppleScript"
  action. That means you click in the box of the action, choose Select
  All from the Edit menu (⌘A), then delete everything. Optional: you can
  increase the length of the __ string.
At the top of the workflow, set the popups to show: Service receives no input in any application
Save the Service (⌘S), and give it a name.

Phase 2 : Assign a Keyboard Shortcut in System Preferences

Launch System Preferences.
Choose the Keyboard pane, then click the Keyboard Shortcuts tab.
Two side-by-side lists will appear.
Choose Services in the left-hand list. The right-hand list will show the available Services.
Scroll down the list until you see the name you gave your Service. It will probably be under the General heading.
Ensure your service's checkbox is checked.
Click its "add shortcut" button, then press your desired key combination to assign it a keyboard shortcut (the key combination must
  be unique).

Phase 3 : Test it

Launch Mail.app.
Click the Mail menu, then move down to the Services hierarchical menu.
Does your named Service appear in the menu items?
Does your named Service have its assigned keyboard shortcut?
Create a new message (⌘N).
Click in the body of the new empty message.
Press the keyboard shortcut.
Is the series of _'s correctly added to the message?
Answer: Picking up on Sam's and bmike solution, I did not wanted to have a reference to a static file on disk. So I used openssl to base64 encode a 2400pxX1px image line and changed their script little bit.
set base64line to "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQH/wAARCAABCWADAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEA
AAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIh
MUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6
Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZ
mqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx
8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAV
YnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hp
anN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPE
xcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD4
PoAKACgAoAKACgAoAKACgAoAKACgBT1/Bf5CgBKACgAoAVeo+o/nQAlABQAUAFAB
QAUAKvUfUfzpS2fo/wAgEpgFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAU
AFABQAUAFACr1H1H86AEoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoA
Veo+o/nQAlABQAUAKvUfUfzpS2fo/wAgEpgFABQAUAFABQAUAFABQAUAFACr1H1H
86AEoAKACgAoAKACgAoAKACgAoAKAFXqPqP50AJQAUAFABQAUAFABQAUAFABQAUA
KvUfUfzoASgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAV
eo+o/nQAlABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAq9
R9R/OlLZ+j/IBKYBQAUAFABQAUAFABQAUAFABQAq9R9R/OgUtn6P8hKBhQAUAFAB
QAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAq9R9R/OlLZ+j/IBKYBQA
UAR/xf8AbT/2lQBJQAUAFABQAUAFABQAq9R9R/OlLZ+j/IBKYBQAUAFABQAUAFAB
QAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAq9R9R/OgBKACgAoAKACgAoAKACg
AoAKACgAoAKACgAoAa/3G/3W/kaAGn+L/ron/tOgBW6H/fT+aUAJH/H/ANdG/pQB
JQAUAFABQAq9R9R/OlLZ+j/IBKYBQAUAFABQAUAFABQAUAFABQAq9R9R/OlLZ+j/
ACASmAUAFABQAUAFABQAUAFABQAUAKvUfUfzoASgAoAKACgAoAKACgAoAKACgAoA
Veo+o/nSls/R/kAlMAoAKACgAoAKACgAoAKACgAoAKAP/9k=
"

set filen to "/tmp/line" & (time of (current date)) & ".jpg"
set decoded to do shell script "openssl enc -base64 -d <<< '" & base64line & "' > " & filen
set the clipboard to (read (filen) as JPEG picture)
delay 1
tell application "System Events" to keystroke "v" using command down
do shell script "rm " & filen

Comment: Works, and works really well. Pro: line thickness not affected by window width. Was a major irritant with bmike and Sams solution above, but they do deserve credit for a very clear writeup.
Answer: I find myself often needing to write a date before the divider line. Inspired by @Muthu's answer, I made the following Applescript:
on run {input, parameters}
    set _Date to short date string of (current date)
    tell application "System Events"
        keystroke _Date
        keystroke return
        keystroke "-------------------------------------------------------"
        keystroke return
    end tell
end run

Assigning this service a shortcut, it outputs something like:
2019-04-07
-------------------------------------------------------

You can define the line as long as you want.
Answer: Kudos to bmike and Sam for their brilliant solution.
I created a Keyboard Maestro macro that copies the specified image to the clipboard and pastes it. It consists of these two steps:
    Set System Clipboard to Image
    Image from File "~/Documents/Horizontal-line images/white horizonta…"

    Paste

I assigned it to ⌘L.
FYI, since I use Notes in dark mode, I made the line image white, and I reduced it to 5px in height (personal preference). You can find my image here: https://i.imgur.com/R76NXHs.png
Answer: A simple option which also works on iOS/iPadOS is using the built-in text replacement settings.

Open spotlight (cmd+space) and navigate to Text Replacement settings. Alternatively, go to Settings > General > Keyboard > Text Replacement.
Tap the + button at the top right.
Type your desired output in the Phrase field, and the text shortcut you want to use for it in the Shortcut field.
Now any time you're using the keyboard, you can type your text shortcut and you'll receive a suggestion for your replacement phrase.

Note: To access this on MacOS you'll need to turn on Substitutions in the Edit menu.
Source: https://support.apple.com/guide/ipad/use-text-replacements-ipad997d96b7/ipados


Why are discharge tubes filled at reduced pressure?

Question: Why are the gas sample tubes of hydrogen filled at a reduce pressure when observing hydrogen's emission spectrum? In my HS chemistry lab, we looked at gas sample tubes of hydrogen through a spectrometer and I am wondering why they were filled at a reduced pressure?
Comment: Think of the distance that an electron travels before hitting an atom of hydrogen. If the gas were dense then that distance would be short. In other words it would require more voltage to get a discharge across the tube, and more voltage to maintain the discharge. With more voltage, you'd also get more current when the discharge does occur. That would mean more heat. // ;-) I'd guess part of the reason here too is safety. A high voltage with very, very low current isn't deadly. I got a nasty jolt and a small electrical burn from such an apparatus, but lived.
Comment: Googling 'Paschen curve' may prove enlightening (pun intended).
Answer: Not only does it take a high starting voltage and a current-limiting device (e.g. inductor) to maintain a continuous discharge at higher pressures, but the quality of the light emitted is changed by atomic (and ionic) interactions, tending to broaden lines into a quasi-continuous spectrum.
A good example is the sodium-vapor lamp, often used for street lighting. In the example cited, compare the line spectrum of a low pressure lamp with that of a high pressure one (though there is also a contribution from other gases in the second image) .
The low-pressure hydrogen glow discharge corresponds well with calculated values and is a useful tool in showing how theoretical calculation of orbitals can be translated into an observable spectrum. Calculation of high-pressure phenomena is much more difficult.


iPhone 4s repetitive charging sound with black screen

Question: This didn't happen before so it's new.
Every time the iPhone is out of battery and I plug it, it doesn't show up on screen that it is charging and keeps repeating the plunging sound. And it won't turn up if I let it still plugged and it heats so I leave it without charge for 2-5 days then when I check if the screen works before charging and displays no battery icon I will charge and it will return charging normally and opens. Do you think this has to do with the battery? or some bugs in the iOS? Please help me.
Answer: If the phone's battery is original, it is surely now defective due to age. Have it replaced. Continuing to try and use it may cause it to swell and physically damage other components in the phone.