Why is there overhead when calling functions?

Question: Often, people speak of the calling of functions producing a certain amount of overhead, or an inescapable set of additional concerns and circumstances, in a program. Can this be better explained and compared to a similar program without the function call?
Comment: It's not always possible to inline. Recursive functions, virtual functions, and function pointers are examples. (sometimes they still can be inlined, but not in the general case)
Comment: possible duplicate of [What happens in assembly language when you call a method/function?](http://stackoverflow.com/questions/1585137/what-happens-in-assembly-language-when-you-call-a-method-function)
Comment: What are _"these routines"_  you refer to?
Comment: It's also important to notice that, input arguments are sometimes constant values (hard coded parameters, such as a loop count, known at compile time but different depending on call site). `inline`ing such functions exposes those constant values to the compiler, which enables more aggressive optimization.
Answer: It depends on your compiler settings and the way it optimizes code. Some functions are inlined. Others are not. It usually depends on whether you're optimizing for size or for speed.
Generally, calling function causes delay for two reasons:

The program needs to hook to some random location in memory where your function code starts. To do this, it needs to save the current cursor position into a stack so it knows where to return. This process consumes more than one CPU cycle.
Depending on your CPU architecture, there may be a pipeline, which fetches the next few instruction from memory into the CPU cache in parallel with your current instruction execution. This is to speed up execution speed. When you call a function, the cursor hooks to a completely different address and all the cached instructions are flushed from the pipeline. This causes further delays.
Comment: 1) and 2) are not the norm. Modern architectures are pretty good predicting code execution. Also note that a function call is _always_ predictable because you know where execution goes, and therefore you can prefetch code and fill the pipeline. No delays there.
Comment: They are for the x86 arch AFAIK
Comment: Nope, x86 `CALL` is about one cycle these days.
Comment: Calling convention matters too.  Callee and caller clobbered registers need to be saved and restored.  When you add in stack adjustment and frame pointers, it is often cheaper to inline small functions even when optimizing for size.
Answer: Also see here and here for a discussion on when inlining would make sense.

Inlining
In general, you can only suggest to the compiler to inline a function, but the compiler might decide otherwise. Visual Studio offers its own forceinline keyword though. Some functions can not be inlined, e.g. when they are recursive or when the target function can not be determined at compile time (calls through function tables, virtual function calls in C++).
I suggest you trust the compiler whether or not a function should be inlined. If you truly want to inline your code, consider using a macro instead.
Overhead
Memory overhead is at a minimum when you use functions because you do not duplicate code; inlined code is duplicated into the call site. Performance overhead these days is negligible because modern architectures are really good predicting and calling with about 1-2 cycle overhead only.
Answer: The functions can be inlined, but the norm (mostly) is functions are at a particular address, and values passed to the function are put on the stack and the result is then put on the stack and returned.
Comment: Almost all architectures use register based calling conventions when code is optimized to keep data as close to the execution as possible. Return values are always returned in a register.
Comment: some are, but I consider that an optimization.  I do a lot of embedded programming, and a lot of those have very little in the way of register space to do that.
Comment: @Jens x86 still uses stack-based calling convention and most other microcontrollers still use the stack to pass parameters due to the lack of registers. Return values are only passed through register if it's small enough to fit in 1 or 2 registers, otherwise it'll be returned via stack
Answer: Functions certainly can be inlined, if some conditions are met, but they are definitely not always inlined. Most often, calling a function produces a genuine non-inlined function call. A function call has some additional expenses attached to it, such as

Preparing parameters for the function in accordance with the function's calling convention
Receiving the return value of the function
Function prologue and epilogue code, responsible for local memory management, parameter memory management and register value preservation
Function can clobber some CPU registers, thus disrupting their usage in the calling code and thus impeding optimizations
Less CPU-cache-friendly and virtual-memory-friendly behavior of code executed in non-linear fashion

All this will produce overhead likely would no exist if the function body was embedded inline into the calling code.


What did Daniel Plainview whisper?

Question: Was it ever revealed (in an interview, script draft, etc.) what Daniel whispered to Eli in the church after the baptism in There Will Be Blood? It certainly looked like Eli was not pleased with hearing whatever it was. I think I've seen two script drafts with no mention, but maybe there were others.
Answer: I have no interest in saying that there is no answer. But I want to point out that this has been discussed a lot online and no one has any idea. It's not in PT Anderson's script for the film, and there is no audio in the film at all in regards to something being whispered. It only occurs visually. Also, there is no mention of anything like this in the book!
What we might be able to conclude is that it was an acting choice, but Anderson had no interest it playing the decision out to the audience, and leaving it in as a sort of "environmental" decision (idk if that makes sense. I just mean that it visually adds to the intensity, but doesn't have a direct impact on the plot).
Answer:
"It's not in the script, nor the soundtrack, nor the subtitles. It's
  left to your imagination or else it was just a bit of ad-libbing on
  the actors' part. My interpretation was Daniel was telling Eli off
  after allowing Eli to humiliate him."

http://ask.metafilter.com/128362/What-does-Daniel-Plainview-tell-Eli
Answer: We can easily assume it is some sort of threat, as confirmed by the end scene, where just before killing Eli, Daniel says

I told you I would eat you! I told you I would eat you up!

What did Daniel Plainview whisper?


Does light only mimic water waves, or also the properties of water?

Question: Huygen's Principle compares diffraction to ripples in water. Do the similarities translate to surface tension? The hydrophobic effect?
Answer: The principle is based solely on the wave nature of light.
Surface tension and the hydrophobic effect are related to the interface of the water with some other medium. In the case of light the equivalent would arise when considering the behavior of light at a boundary: for instance a conductor (fixed interface) or a plasma (free interface).
In particular in this second case the plasma dynamics could perhaps mimic the conditions you have at an interface between water and another fluid (air). Surface tension is a heavily static concept though, so in the case of lightwaves and some plasma you could hope more to find the equivalent of the system sea-surface+air, or water and seafloor.
Comment: static concept? I thought that surface tension created a sort of elastic band on the surface of moderately disturbed bodies of water. Ah, but the molecules at the surface can't switch out for others?
Comment: Yeah, this sort of elastic resulting force is also responsible for ripples. But as you said it must be a moderate excitation, which means that it happens on time scales much larger than the time scale coordinating the surface tension (i.e. how fast surface tension propagates). This is what I was referring to: the surface tension "only cares" about the instantaneous configuration of the water.


Windows Server 2012 Essentials - Trying to setup "Anywhere Access" but the "Computer Access" list for users is blank

Question: I have a new installation of Windows Server 2012 Essentials and I'm trying to setup "Anywhere Access" for both VPN and remote desktop.
The basic setup is all working. Shared folders is working but remote desktop has no computers available.
On the server, if I edit a user with the Essentials Dashboard and go to "Computer access", the list is empty.
The desktop computers have been joined to the domain. I can see them in AD under "Computers".
I think our mistake was that we didn't use the connector tool to join the domain. We moved from a previous domain and went to Computer / Properties, changed the domain and started with a new profile.
Is there something I can do now to make these desktops available for remote desktop?
I can access a desktop directly no problem by going directly to it with the RDP client on port 3389. I do that from the outside world through an SSH tunnel.
Answer: As I thought, it is related to the fact that we didn't use the connector tool.
I removed one computer from the domain (added it to a temporary workgroup) then used the connector tool to rejoin the domain and that computer now appears in the list. More significanty, I guess, it now appears in "Devices" in the dashboard.
The nice thing is that by doing this, it did not build a new profile.
When I look at the deleted and re-added computer in AD, I can't see what's changed.


Is 'good evening' more formal than 'good night'?

Question: I'm confused about these two sentences, I do not know if 'good evening' is more formal than 'good night'.
Answer: They don't even mean the same thing.
"Good evening" is a greeting (like "hello") used when you greet someone in the evening.

Good evening, Alex! I'm excited to see you perform tonight!

"Good night" is a farewell (like "good bye"), said before someone goes to sleep or parts with you at night.

Hope you sleep well. Good night.
Answer: Good night is probably the last greeting a person can get in his day. And usually, a 'Good Night' is used during late evenings. Say, it is a late evening party and you're about to leave. You say 'Good Night' to your host rather than a 'Good Evening' as you are most unlikely to see him again for the rest of the day (or night). And when you say 'Good Evening', you tend to consider the fact that nightfall is still due and the day isn't over yet. More significantly, these phrases are based on the time you greet a person. You don't say 'Good Night' to somebody you see at 5 PM, you said 'Good Evening'. On the other hand, when you're off at 8 PM, you could say 'Good Night', which can be substituted by a 'Good Evening' too. There is no hard and fast rule for this. Its all about formality and common courtesy. Both are pretty formal on its own, and neither exceeds the other in its formal degree. Generally, people tend to use 'Good Evening' instead of 'Good Night' during formal conversations, but that doesn't mean 'Good Night' is any less formal.


Meaning of `max_depth` in GradientBoostingClassifier in scikit-learn

Question: when I use the GradientBoostingClassifier from scikit-learn, I find that there is a parameter max_depth to set, which controls the maximum depth of the regression tree. May I know what exactly does that parameter do? If max_depth=3, does it mean that the construction of a regression tree will stop growing once the tree exceeds a depth of 3? In this case, this parameter is basically used to control the complexity of the regression tree?
Answer: You are right. max_depth bounds the maximum depth of regression tree for Random Forest constructed using Gradient Boosting. However, default value for this option is rather good.
To see how decision trees constructed using gradient boosting looks like you can use something like this
from sklearn import tree
from sklearn.externals.six import StringIO
import pydot
import numpy as np

# generate training sample
training_points = np.random.rand(20, 3)
training_values = np.sum(training_points, axis=1) > 0.8 * np.random.rand(20,)

# get decision tree
decision_tree = tree.DecisionTreeClassifier(max_depth=3)
model = decision_tree.fit(training_points, training_values)

# save tree as pdf
dot_data = StringIO()
tree.export_graphviz(model, out_file=dot_data)
graph = pydot.graph_from_dot_data(dot_data.getvalue())
graph.write_pdf("decision_tree.pdf") `

Comment: Thanks for the code! Learned some tricks as well :) I'm still learning the concept of Gradient Boosting. May you elaborate why you mention Random Forest is constructed? It that because you have many regression trees (having the same regions but with different weights) in the final decision function?
Comment: I think that we construct a random forest with Gradient boosting - while it is the terminology question, and in many cases authors consider Random Forest and Gradient Boosting as different approaches.


How can I shop at a merchant?

Question: I've just recently got Starbound for Christmas, but I can't seem to interact with a merchant that sells guns. I've looked on the internet, but I can't find a thing.
Answer: Press E near an NPC to interact with them.
Comment: Also, don't have a weapon out when approaching these merchants or you might have a bunch of characters "interacting" with you in a more lethal way.
Comment: Some merchants wander about a bit and you need to wait until they've returned to their pitch before you can speak to them. They don't usually go far and they head back to their shop as you approach.

How can I shop at a merchant?


How do I change the color of a hyperlink?

Question: When I create a hyperlink in a notebook, the text is blue, like the user defined variables.  (Any word in the title like Graph which is a M function is in black.)  How can I change the color to something else, e.g. red?  Everything I've tried so far, in the Option Inspector, or by editing the cell expression has not worked.  I'm new to M and have only modest programming skills and might be missing something obvious. I have M10.2 on Windows 7.
Comment: Is this ok too? `Hyperlink["www.google.com", BaseStyle -> Red]`?
Comment: @Kuba.  This will work if you start the link with http://
Comment: It didn't work for me unless I had the the prefix. @Kuba
Comment: Your solution is the simplest for a basic solution.
Comment: Let's assume `Hyperlink["http://www.google.com", BaseStyle -> Red]`, what limitations are there?
Answer: You can change the style of a hyperlink in your notebook by modifying its stylesheet.

Open the Format>Edit stylesheet... menu. Private definitions stylesheet opens.
Click on the blue "Default.nb" link. Default stylesheet opens.
In the notebook that opens click on the blue "Core.nb". Core stylesheet opens
Search for (using the Find dialog) for Hyperlink
Copy the appropriate cell found this way to the first sheet that opened and change its style using the Format menu

In pictures:
A hyperlink in a notebook

Step 1

Step 2

Step 3 & 4

Step 5

Result is visible immediately

Done.
Comment: The comments above and below are good for a simple link to a web site or the top of another notebook.  To get to a tagged cell somewhere in another notebook, I had to create the link as shown here and then use the Insert->Hyperlink menu to get to the target cell. At that point, I can tweak the appearance
Answer: I you only want to have a custom style for one particular hyperlink, you can just write it as a Hyperlink call.
For example,
Hyperlink["Link: Mathematica.SE",
  "http://mathematica.stackexchange.com/q/76971/3066",
   BaseStyle -> {"Subsubsection"},
   ActiveStyle -> {Gray}]

Evaluate this and then hide or delete the code cell. (I prefer hiding.) Depending on your current stylesheet, you should see something like

when the link is inactive and

when the link is active (mouse cursor is over link).


Why is the units of kcat 1/s?

Question: I understand that $k_\text{cat}$ measures the turnover number of an enzyme. This measure is therefore a quantity of molecule conversions per unit of time. I suspect that my problem is more that of a lack of maths but why is the unit expressed in $\mathrm s^{-1}$? Why not just seconds?
Answer: The turnover frequency is a rate. (It's actually the kinetic rate of the reaction in saturating substrate concentration, normalized to the amount of enzyme.)
It might be helpful to think about something like a factory that makes a certain number of widgets in a certain number of time. How would you naturally describe how fast the factory could make widgets? Most people would express how fast the factory works in terms of "widgets per hour". It's the same with enzymes - it's most natural to describe how fast the enzyme works in terms of "turnovers per second". It's just that the "turnover" is implied and is viewed as "dimensionless", so it's left off, leaving you simply with "s-1" as a unit.
(Note that even though the "turnover" is left off, it's still very important to know it's there, and to know what, exactly, one "turnover" is. In complicated reactions there is sometimes different reasonable ways to count what "one turnover" is, and different definitions could result in a 2, 3, 4, 5, etc. fold difference in value. Those vexing numeric differences become easy to explain once you realize this researcher is using the formation of one molecule of this product as "one turnover", but that researcher is using the disappearance of one molecule of that substrate as "one turnover".)
Naively, one could invert the ratio to come up with a value in time, rather than in 1/time. For example, if a factory makes 5 widgets per hour, it takes them 0.2 hours to make a widget ... sort of. One issue you run into is that that's the time on average. In a stochastic process like enzyme turnover, it's highly unlikely that any single turnover will take exactly the time specified. Some will take longer, some will be quicker. Only for a large number of turnovers in aggregate does that time value have meaning. Saying that "a turnover takes 5 s" gives a false impression about individual turnovers in a way that saying "this enzyme works at 0.2 turnovers per second" doesn't.
Additionally, in the case of multi-step reactions, saying that "a turnover takes 5 s" may be incorrect. The entire pathway may take much more that that. It's just that once the pathway has reached steady state it's only the rate limiting step which takes 5 s.  For example, take a pathway of 20 steps, 19 of which take 4 s each, but one which takes 5 s. It's going to take (19*4 + 5) = 81 seconds for any given substrate molecule to start at the beginning of the pathway and make it to the end. However, once the pathway is full and each step is handing off products to the next step, the pathway will be producing product at a rate of 1 every 5s. (This, of course, doesn't apply to enzymes where all reactions take place at the same active site, but it's a consideration in the general case, which explains why 1/s is the preferred unit for reaction rates.)
Comment: This is a good answer and gets a +1 from me.  But _"(It's actually the kinetic rate of the reaction in saturating substrate concentration.)_" doesn't actually seem to be correct.  Somewhere in there we'd need to multiply by a concentration, presumably the concentration of catalyst, to get a rate.  Also, the idea in the last paragraph is sound but the math doesn't work out.  The "rate" of a 20-step process with 19 4-second steps and 1 5-second step is given by $\nu_{total} = \frac{1}{\sum{\frac{1}{\nu_i}}} = \frac{1}{19\frac{1}{4} + \frac{1}{5}}=\frac{20}{99}$.
Comment: @CurtF. You're right that there is a factor related to the amount of enzyme - I'll edit to clarify. On your second point, I don't quite see where you're getting that equation from. It's likely being misapplied if it's saying that adding additional steps in series to a reaction that takes 5 seconds per turnover can somehow make the combined reaction (all of which passes through the obligate 5 per second step) take only 4.95 seconds per turnover.
Answer: You were actually describing the turnover frequency of a catalyst, and frequency has the unit hertz which is 1/s. Turnover number is a dimensionless value: number of molecules of reagent that a catalytic site can convert before becoming inactivated.
Comment: Is the description on [wikipedia](http://en.wikipedia.org/wiki/Turnover_number), that it has different meanings in enzymology and other chemical fields, wrong then?
Comment: I think that it is. I don't see why it would be differently defined in enzymology.
Comment: In enzymology, the turnover number has no relationship to the enzyme becoming inactivated.  Instead, it is the reaction rate per mole of enzyme, in the extrapolation of infinite substrate concentration.
Answer: As you say this represents "conversions per unit of time".
The mathematical expression for "per time unit" is 1/(time unit), and seconds is a particular time unit.
Comment: Compare to a situation where you are paid 5 dollars per hour for your work.  You work 8 hours and expect 40 dollars at the end of the day.  But your boss says, "no your pay for today is 5 hours, not $40".
Comment: Okay, but why does it have to be 1/(time unit). I.e. why does it have to be (eg.) 5 conversions per second = 5 1/s. Why not simply 5 s. I don't understand the requirement for the '1 divided by'. Thanks
Answer: Vmax=kcat * ([E total])
If the units for Vmax are M/s i.e. s-1 and you divide Vmax by the concentration of total enzyme which has units in M, the Ms will cancel out, leaving you with 1/s or s-1

Why is the units of kcat 1/s?


Find the value of $\sin(90-a)$

Question: I was wondering if anyone here knows how to find the value of $\sin (90 - a)$ using a right-angled triangle. I can find the value using $\sin (a - b)$ but that's too lengthy and the value comes something like $\cos a$... the following might be helpful, but I'm not sure how.
link 1
link 2
Comment: $sin(a-b)$ is the way to go, then use your knowledge of $\cos a$ and $\sin a$ when $a=90$.
Comment: And notice that it's $90$ [degrees](https://en.wikipedia.org/wiki/Degree_%28angle%29). Angles are usually measured in [radians](https://en.wikipedia.org/wiki/Radian) in mathematics (and also on computers or handhelds, is case you are also doing numeric experiments).
Answer: There is a reason why we don't call the ratio $\dfrac{ADJACENT}{HYPOTENUSE}$ the HORIZONTALUS. It is because both of the non-right angles of a right triangle are related to each other, as they are called complimentary angles. Instead we call said ratio the $COSINE$, as an abbreviation of the COMPLIMENTS SINE. Suppose a right triangle has angles $\theta$, $\theta^\prime$ and $90^\circ$, then clearly $\theta+\theta^\prime$ must equal $90^\circ$ (because the sum of the angles of a triangle must be $180^\circ$). Both $\theta$ and $\theta^\prime$ share the same hypotenuse, but note that the side that is opposite $\theta$ is adjacent to $\theta^\prime$, and vice versa (see diagram).

Therefore the following relationships must hold.
$$\sin\theta^\prime =\dfrac{a}{c}=\cos\theta$$
$$\sec\theta^\prime =\dfrac{c}{b}= \csc\theta$$
$$\tan\theta^\prime =\dfrac{a}{b}= \cot\theta$$
But substituting $90^\circ-\theta$ for $\theta^\prime$ we have
$$\sin (90^\circ-\theta) = \cos\theta$$
$$\sec (90^\circ-\theta) = \csc\theta$$
$$\tan (90^\circ-\theta) = \cot\theta$$
Comment: Try Googling "triangular function"... then try Googling "circular function". Do you know why we always begin trigonometry with triangles and Satanic chants like "SOHCAHTOA"? I have no idea!
Answer: Hint: Think of a right angled triangle with angles 90, a and 90-a then use soh cah toa stuff and see what you get.
Comment: how do i use that.. idk any of the sides of the triangle...
Comment: Because if you let the hypotenuse be C the side adjacent to angle a be A and the side adjacent to angle 90-a be B you have sin(90-a)= A/C and cos(a)=A/C by trigonometric ratios.
Comment: therefore sin(90-a)=cos(a)... i get it now.. thanks... is this the simplest way there is... or is there anything simpler than that..? and how about sin(180-a) or cos(180)?
Comment: you can also do it by considering the unit circle. Sin(180-a) is not equal to cos(180). Perhaps you mean sin(180-x)=sin(x) This is true by the unit circle or you can use the fact that sin(a-b) =sin(a)cos(b)-cos(a) sin (b) so sin (180-x) = sin 180 cos(-x) - cos(180) sin (-x)= 0 - - -1 *sin (-x)= sin (x)
Comment: you wouldn't mind if i ask you how to use the unit circle to solve that... thanks again...
Comment: To do that i would need pictures all lots of words - this is easier http://www.algebra.com/algebra/homework/Trigonometry-basics/Trig-identities.lesson
Answer: Using the unit circle:
Draw a unit circle with a dot at $90^\circ$. Now see if the value of the sine varies as the dot moves $a$ clockwise ($90^\circ-a$) and $a$ counterclockwise $(90^\circ+a)$.

Find the value of $\sin(90-a)$


Why you use log to measure metallicity in galaxies?

Question: For example, I saw the next expression for matallicity in a paper: $\log(O/H) + 12$.
I understand O/H is the O(Oxygen) to H(Hydrogen) ratio but why is there the number 12? And why the logarithm?
Answer: The distribution of metallicities appear to be more evenly spread out in logspace than in linear space. The reason for this can be ascribed to there being no preferred scale for the abundance of a given element; rather they span several orders of magnitude. The same can be said for instance about the distribution of dust grain sizes, the distribution of the mass of dark matter halos, and the distribution of the area of lakes on Earth.
So, if you measure the number of oxygen atoms (or ions) in ten stars, and divide by the number of hydrogen atoms, you may get values like
$$\mathrm{O}/\mathrm{H} = \{0.03,3.5,25,0.003,0.9,0.4,0.09,0.01,8,0.02\}\times10^{-4}.$$
Plotting this in a linear and a logarithmic plot, you see that on a log scale, the values are easier to tell apart:

(Another reason, as zibadawa timmy writes in his/her answer, is that taking the log you don't need to write all those $10^x$ factors).
Now why add 12? This factor corresponds to measuring the number of a given atom per $10^{12}$ hydrogen atoms. I've been asking colleagues from students to professor level, and the best answer we can come up with, is that the least abundant elements in the Sun (uranium, rhenium, thorium, …) have abundances of the order of one per $10^{12}$ hydrogen atoms, so adding 12 to $\log(X/\mathrm{H})$ makes all values positive. This angst of negative values, I don't understand, though. Usually, we're okay with minuses. And measuring metallicities in stars or gas of sub-solar metallicity yield negative values anyway. Moreover, the scale was in use even when we had only lower thresholds for uranium and bismuth of $\log(\mathrm{U}/\mathrm{H})+12<0.8$ and $\log(\mathrm{Bi}/\mathrm{H})+12<0.6$, respectively (Grevesse 1969) and didn't know if they were actually smaller.
Comment: I have been unable to unearth the reason for the 12 either. Your explanation is plausible. Perhaps like the pH scale.
Comment: Fordømt! You were my best shot at someone who would know this, @RobJeffries.
Answer: The logarithm is there because the ratio $O/H$ is really tiny.  The log converts essentially points out the order of magnitude.  If we have $O/H= 10^{-14}$, then $\log(O/H)=-14$.  Taking logarithms is a standard practice in science and mathematics when the numbers range over several orders of magnitude (especially so when they are either very large or very small).
As for the +12, that is most likely because they want their preferred example to have value 0.  It is then easy to tell at a glance if other stars/galaxy have more ($>0$) or less ($<0$) oxygen-to-hydrogen metallicity than the preferred example.  In most cases this will be our own Sun, but without knowing where you saw this it's impossible to say for certain.  We have far more information about our own sun than any other star, so it is the most reliable measuring stick we have for comparison.
Indeed, the value tells you approximately how many of orders of magnitude more or less metallicity it has.  For, supposing $\log(O_\mbox{sun}/H_\mbox{sun}))=-12$, then $$\log(O/H)+12 = \log(O/H)-\log(O_\mbox{sun}/H_\mbox{sun})) = \log\left(\frac{O/H}{O_\mbox{sun}/H_\mbox{sun}}\right).$$
So if the value of this is 1, then you know the star in question has an $O/H$ ratio $10^1=$ten times that of our sun.  Similarly, if it were $-3$, then the star in question would have an $O/H$ ratio that is $10^{-3}=1/1000$-th that of our sun's (or, equivalently, that our sun's ratio is $1000$ times larger).  A value of $0$ means the ratios are the same.
Comment: In this notation, the Sun has a metallicity of 8.7. A metallicity of –12 means 12 orders of magnitude less than the Sun, i.e. less than even the most metal-poor (and hypothesized) Pop III stars.
Comment: The factor 12 is standard. Everybody uses it. But actually, the last couple of hours, I've been asking colleagues from student to professor level, where the factor comes from, and nobody knows. We just use it. The factor means that we measure the amount of atoms of a given element with respect to $10^{12}$ hydrogen atoms, but why exactly $10^{12}$? I'll get back if I find the answer.
Comment: Okay, re-reading my comment I see it was poorly written, but log(O/H)+12 is ~8.7 for the Sun, and "log(O/H) = –12" would mean 8.7 dex lower than the Sun, less than Pop III stars.
Comment: @pela Good to know.  Without the OP specifying where he read the 12, it's hard to know where that came from.  He did seem to suggest galaxy, which should be more metal poor than its stars on the whole due to the diffuse clouds of hydrogen and helium.  Though if it's even poorer than the Pop III stars...that'd be weird.


How to install RaspberryPIOS on WSL

Question: I am trying to install Raspberry Pi OS on Windows subsystem for linux (WSL), but I do not know how to install it.
Could you tell me how to install it or tell me good homepage instructing installation?
Should I install Raspberry Pi OS  on WSL or WSL2?
Which OS should I install, the Raspberry Pi OS(for Raspberry device) or Debian with Raspberry Pi Desktop (Raspberry Pi Desktop for PC and Mac)?
Comment: This is not possible because Windows run on Intel x86 processor architecture and Raspberry OS is made for RPI arm CPU. Also the RPI has hardware which is completely different from what your Windows computer has. - You would need a complete RPI emulator in Windows - which I have not seen so far.
Comment: There is an x86(-64) version available: https://www.raspberrypi.com/software/raspberry-pi-desktop/
Answer: I'm new here.
Not sure if the answer to the posted question raises the correct point in answering why you can't run Raspian OS under WSL because the Raspberry Pi runs an ARM processor instead of an x86_64 Processor..
Since the release of Windows 10 on ARM 64-bit the issue of processor architecture differences (x86-64) vs
ARM64 seems moot.
That said, there could be two different paths to pursue to run an ARM64 based OS like Raspian 64 under WSL. The first would depend on how much support for the Raspian Linux kernel based OS is now available from the WSL running under Win 10 ARM64. Since Debian 64-bit (Buster) is the core of RASPIAN OS 64-bit and WSL now supports Debian 64-bit, a path forward appears open to port a Raspian OS 64-bit kernel to run as a WSL guest OS.
Alternatively, the Raspian OS drivers for the Pi 3B and the board device support to run it under WSL could be the next hurdle to overcome. Here, if QEMU is available on the Windows 10 ARM 64 platform, then there's an avenue to pursue to run the Raspian 64-bit OS using WSL with QEMU taking some of the board device burden.
Comment: I'd presume the OP is talking about this: https://www.raspberrypi.com/software/raspberry-pi-desktop/

How to install RaspberryPIOS on WSL


Can mowing weeds cause them to spread?

Question: I know that there are plants that can sprout from cuttings, so I wonder about this.  I have a mulching mower that deposits clippings back on the lawn.  There are some weeds like thistles and violets that seem to thrive the more I mow them.  Is it because my mower is propagating them?
Comment: What height are you mowing at? Too short (a common error) and you can favor weeds over grass.
Comment: @Ecnerwal I've never tried to measure, but it's the middle setting on my mower.
Comment: Yes, mowing spreads the seeds faster than leaving them to nature.
Comment: @YosefBaskin in this case I think I'm mowing before the seeds have a chance to develop.  For sure on the thistles, and I think for the violets as well.  I didn't even mention dandelions because it's an obvious problem with them.
Answer: Highly unlikely that your mulching mower is causing cuttings to grow. The cut weed parts won't have good soil contact and will dry out and die. Weeds that have gone to seed stand a better chance of seeding, but they'll do that regardless of your mower.
Cutting too short, on the other hand, can definitely favor weeds over grass, where grass can shade out weeds if permitted to grow tall enough. Fairly stock recommendation is 3"/75mm cut height, and cut when it gets to 4"/100mm. Apart from tipping the balance in favor of grass, that also permits enough root growth for the lawn to be more drought-tolerant than very short grass.
Comment: Speaking from experience, the point about cutting too short is _especially_ true about violets (mentioned by the OP) and wild strawberries.
Comment: There's a few exceptions here, which is something like Japanese Knotweed which will root readily if a length of stem with a node is trodden into the ground.
Answer: Violets, maybe. But not thistles, unless you cut them when they have seeded. As far as I  know, thistles will grow from root cuttings, but not stem or leaves.

Can mowing weeds cause them to spread?


Which Image format is recommended/ best for geoserver raster wms services?

Question: I have very high resolution image of vast area(true color RGB bands). I am planning to to reduce the image size by reducing it to 16 bits (or less). which image format is best for performance point of view. finally to narrow down more my question shall i use mbtiles or tiff or mrsid or any other format/ method you like to suggest ?
Comment: Have you read the raster sections of the GeoServer on steroids presentation http://www.slideshare.net/geosolutions/gs-steroids-foss4ge2014?
Answer: What ever the format, the raster tiles can be loaded faster using the GeoWebCache,
where all the tiles has been pre generated and the tiles can be loaded directly without generating it for each request.

GeoWebCache is integrated with geoserver no additional component is required.

check out this link GeoWebCache for integrating this with geoserver

The most preferable format is geotiff
Comment: i will be using geowebcache by default. can you state reason why geotiff is preferable ? as if I use mrsid i will save lots of space as compared to geotiff . so will it make difference if i use mrsid rather than geotiff ?
Comment: GeoTIFF with JPEG compression is no bigger than MrSID but if you will finally use tiles then just use whatever you want as originals. When you seeded the cache you can even remove the originals from your server.
Comment: Rather than format the memory is mainly depends on the number of zoom levels or resolutions you used in the application and by selecting suitable tile size for your application.
Answer: The best Format is mbtiles . I used tilemill to make mbtiles (note tile mill only accepts 3857) The final size of image was 16 GB . Using Tile server it was very easy to make WMTS out of it . Which was almost 20 times faster than geoserver wms . (note geoserver is ImageMosaic ,GeoTIFF are ok when the image size is less than 2 GB)


Why is this Targaryen not immune to fire?

Question: We know that Jon Snow is the son of Rhaegar Targaryen and has Targaryen blood running in his veins. Also, we have earlier seen that he is not immune to fire, unlike his aunt Daenerys. Why is this so? Is he not a true dragon?
Comment: AFAIK Darnerys is the only targaryen to be fireproof
Answer: Source: Quora
Targaryens are not immune to fire. What happened to Daenerys on the funeral pyre was a one-time event (or rather two-time - recall episode 4 of season 6), according to the author, who's discussed it at fan events. So Daenerys herself isn't immune to fire either (and the thing with the eggs, where she isn't burned, IS NOT in the books). Plenty of Targaryens have been killed because of fire or extreme heat: Viserys, Aerion Brightflame who drank wildfire, Aegon V and his son Prince Duncan who died in a fire at Summerhall, and Rhaenyra Targaryen who was fed to her brother's dragon. So it's not that Viserys should have been fireproof, it's that NO Targ is inherently fireproof.
Comment: This question seems to be about the show, though, where Daenerys is immune to fire. Perhaps you could give a show answer?
Comment: Well, there isn't much canon regarding this to go by in the show. Having said that, I will dig around a bit to see if I can find some more info.
Comment: You forgot to mention the instance of Daenerys bathing in scolding hot water and not minding it at all (episode 1 of the show I believe) - which, of course, foreshadowed the later survival of the pyre. So it's safe to say that these were not accidents - in the show at least, Daenerys is indeed immune to at least pyre levels of heat. It doesn't demonstrate, though, that she is immune to wildfire and dragonfire, which are presumably hotter.
Comment: Not to mention, her confidence in deliberately orchestrating the burning events goes to show she has quite a high confidence in her fire immunity, suggesting she had similar occurrences and possibly experiments that are not shown on-screen.
Comment: For Rhaenyra, it could be possible she wasn't actually burned, just eaten.


Covenant of pieces; cutting

Question: The birds or pigeons in this covenant making (the ברית בין הבתרים) are not cut in two, but why? What is the meaning behind this?
Answer: Read Rash"i on Breishit 15:10. In summary (my loose translation) Rash"i says
The nations of the world were compared to rams and bulls, and they were destroyed (symbolism of cutting these animals). Israel was compared to a dove (yonah - Targum Onkelos on 15:9 translates "gozal" as "bar yonah") and Israel will never be destroyed (thus, the birds were not cut.)
Your reference to Vayikra 17:1 is imprecise, but I assume you're referring to the whole paragraph Vayikra 17:1 - 7? This discusses a rule that people must offer animals for sacrifice prior to eating them. I don't see anything mentioned, there, about cutting / not cutting these animals, and, v 3 refers specifically to oxen, goats or sheep - nothing about birds. Are you referring to the correctly intended verses? If not, please edit your question.

Covenant of pieces; cutting


Effective power of a lens-mirror combination

Question: In case of thin lenses in contact the effective power of the combination is given as: $P=P_1+P_2+P_3$.....
For a lens - mirror in contact, like a lens with silvered surface (where lens and mirror are seperated by virtually $0$ distance) can we say that the effective power is the sum of power of mirror and lens.If so how?
Answer: For a silvered lens, the power formula would be $P_{eqv.}=P_{lens}+P_{mirror}+P_{lens}$.
(the lens power is doubled as rays travel through it twice).
eg. for a biconvex lens ($\eta,R$) with one side mirrored:
1. $f_{lens}=\frac{R}{2(\eta-1)}$
2. $f_{mirror}=R/2$
3. $P_{eqv.}=\frac{2(2\eta-1)}{R}$
4. in other words $P_{eqv.}=(2+\frac{1}{k})P_{lens}$ where $k=f_m/f_l$

The power formula doesn't seem to care what the underlying optical instrument is as long as they are thin and close enough for linearity to hold. When mirrors are involved appropriate multiplicities account for multiple passage of light rays.
Comment: How can we prove $P_{eqv}=P_{lens}+P_{mirror}+P_{lens}$. I was able to prove $P=P_1+P_2+P_3$ for combination of only lenses but unable to prove for combination of lens and mirror
Comment: @Param_1729 its just linear optical instruments in series
Comment: its linear optical instruments in series but mirror formula is different from lens formula. Consider two lens of focal length $f_1 and f_2 $ if u is the coordinate of the object then $\frac{1}{v_{1}} = \frac{1}{u}+\frac{1}{f_1} $now$ v_1 $will act as object for second lens therefore $\frac{1}{v_{final}} = \frac{1}{v_1}+\frac{1}{f_2}$ by using these two equation we get $\frac{1}{f_{eqv}} = \frac{1}{f_1}+\frac{1}{f_2} = \frac{1}{v_{final}}-\frac{1}{u}$ and in the similar way we can prove formula of $P_{eqv}$for combination of more than two lenses but i am unable to prove it for lense + mirror


The structure of "come on in"

Question: Why do two adverbs follow come in the phrase, come on in? I know come in, come on, go away, but when I hear "Come on in" in American movies, I can't figure out its grammatical structure.
Comment: I've always interpreted it to be a subtler *forth, forward:* i.e. the same as the *on* in *he continued on* and *so on and so forth.*
Answer: I would see it as a contraction of "come on + come in". Somehow the "Come on in" has the effect of an invitation a bit more friendly and encouraging than the short "Come in". Maybe "Come in" can evoke memories of the time one did military service.
Comment: I think that's dead on. _Come on_ -- which is common enough to have an eye spelling _c'mon_ -- and _come in_ are both frequent idioms, often appearing in exhortations and politeness formulas. _Come_ already participates in thousands of idioms, and many of them carry over with both _come on_ and _come in_; the conflation combines the chumminess of _c'mon_ with the invitation to enter of _come in_. In both the effect is to disarm the bare imperative.
Answer: Come on in is the longer version of come in. It's an idiom as mentioned by WS2, which means proper meaning cannot be deduced from individual words. Here's the full description of this particular idiom:

Come (on) in. and come on in(to) something
  Enter.; Come into this place. (A polite invitation to enter someone's home, office, room, etc. It is more emphatic with on.) Bob: Hello, you guys. Come on in. We're just about to start dinner. Bill: Come in. Nice to see you. Mary: I hope we're not too early. Bill: Not at all. Come on into the house and have a cold drink.
Comment: Nice definition! Have an upvote.
Answer: It is a well-known idiom, perhaps more used by Americans than in Britain, in which someone is enthusiastically welcomed into the home, or some other place.
'Come on in'.
Comment: No explanation is provided, when we say it is an "idiom".

The structure of "come on in"


Can I combine a Mystery/Meltan box with an incense?

Question: Both the incense and Mystery Box spawns extra Pokemon. Even with the current extra spawns from the incense, I am waiting in between spawns when I am sitting at home. I would like to combine an incense with a Mystery Box so that I have more spawns, and can actually continue catching for a full hour. Is this possible?
Answer: No, this is not possible.
If you have an active incense, and open up a Mystery Box, the animation is working correctly so you might think it worked, but what is actually happening is that you consume another incense. This means that your incense duration is another hour longer, one incense is removed from your inventory, and not more spawns per minute.
If you have an active Mystery Box, you get an error message when trying to apply a lure. This is probably because you do not have another Mystery Box in your inventory.
No matter the order, it does not yield you more spawns per minute, so you have to be happy with the current number of spawns per minute.
Comment: An alternative strategy for obtaining more spawns is to combine a Mystery box with a Lure Module.
Comment: That's also a good idea. Not within the range of a Pokestop unfortunately (not even with the increased range). Within the range of a gym though, which yields more benefits.


Length limit for HDMI cables

Question: The idea is to build a server and run virtual operating systems compatible with touch screen monitors.  Server in one location with four displays in different rooms.  The idea is to only have the display as a hardware element in the room hardwired to the server which is in a separate location.  The goal is to have the ability to let the kids have their own computers without them having access to any hardware outside of the display.  They would in essence have their own VM but the trick is to eliminate mouse and keyboard.  I believe this setup would be possible but my concern would be limitations on the wiring.  Is there a length limit for HDMI cables?
Comment: Are you asking for the length limit of HDMI cables, or for an overall solution to your problem?
Comment: From Wikipedia  Although no maximum length for an HDMI cable is specified, signal attenuation (dependent on the cable's construction quality and conducting materials) limits usable lengths in practice
Answer: Yes an no...  from Wikipedia's HDMI entry

Although no maximum length for an HDMI cable is specified, signal
attenuation (dependent on the cable's construction quality and
conducting materials) limits usable lengths in practice.
A cable of about 5 meters (16 ft) can be manufactured to Category 1
specifications easily and inexpensively by using 28 AWG (0.081 mm²)
conductors. With better quality construction and materials,
including 24 AWG (0.205 mm²) conductors, an HDMI cable can reach
lengths of up to 15 meters (49 ft).
Answer: I assume that USB distance is not an issue? You'll need USB for your touchscreen and other input devices. In that case, you might consider using a USB video adapter next to the monitor, instead of running HDMI all the way to the host.
The big problem with these adapters is performance. But I'm guessing the apps you intend to run will not be high-performance, since they're running in a VM.
Answer: According to http://www.hdmi.org/learningcenter/kb.aspx#44 there is no maximum cable length:

HDMI specifies the required performance of a cable but does not specify a maximum cable length

Length limit for HDMI cables


Different UI in Wordpress

Question: I want to know if it's possible in WordPress to have two types of UI. In Uber, we have the driver UI and the client UI. I want to know if a plugin exists or a theme. As the role may be the UI change.
Answer: Of course this is possible. The question is too broad to fully answer in a Q&A format like WPSE's, but roughly this is what you need:

Two custom user roles to base the two different UI's on. There are plugins that can do this for you.
A theme that changes template based on the current user role. You would probably need a custom made theme to incorporate this.

Different UI in Wordpress


Industrial 3-phase.wiring

Question: I have 480 volts 3-phase from main service to a step down transformer--120 V, 208 V 3-phase on a single circuit: black, white, ground. I have 120 V from black to white wire with breaker in on position, in off position 0 V.  Black to ground 120 V  breaker on breaker off, 0 voltage from white to ground 90 volts. Do I have a bad or no neutral coming out of the transformer?
Comment: This doesn't appear to be about Home Improvement.  It appears to be about commercial power.
Answer: Fix your Grounding Electrode System or Neutral-Ground Bond
You need to have ground rods or a tie to an UFER ground set in your concrete.  From there you should have copper wires (typically bare) to your panel. It's not unheard of for those to be stolen.
From your main panel chassis you should have a bond connecting ground to neutral.  Remember that the first panel fed by a transformer's output is a main panel! This is easy to overlook.
Also easy to overlook in commercial work is grounding generally, since the metal conduit does all of that for you.  You don't need to worry about it on branch circuits, but it makes the neutral-ground bond easy to overlook.
Answer: Is the neutral (centre of for a transformer wired as 'star') on the secondary bound to a 'reference' ground, if neutral (common' is not bound to the ground, it's voltage will depend on the load acrosIs the neutral (centre of for a transformer wired as 'star') on the secondary bound to a 'reference' ground? If neutral ('common' is not bound to the ground, it's voltage will float according to the load across three phases and neutral itself). Transformers does not provide 0V neutral 'itself', they do so only if load is perfectly balanced, at least with unbalanced loads, to do so you have to reference the centre to ground by connecting the 'center' of your transformer to a grounding electrode.
So my answer is simple: connect the 'center' of your transformer to a good ground so it's potential will be kept near 0V

Industrial 3-phase.wiring


Are Sith the only ones who "deal in absolutes"?

Question: In the climactic battle of ROTS, where Anakin and Obi-Wan fought, Obi said, "Only a Sith deals in absolutes." But isn't that very statement an absolute? Plo Koon, another famed Jedi Master and general, was also known to see things in black and white, which is absolute.
When Obi-Wan said that statement, was that a way of showing that the Jedi weren't very different from the Sith? Or was that unintentional on George Lucas' part?
Comment: But I think the short answer is that you're interpreting the sentence far too literally.  Or perhaps I should say "far too absolutely". :-)
Comment: @HarryJohnston I didn't think to look for another similar question.
Comment: Should I just delete?
Comment: We generally don't delete duplicates, because the rephrasing may help other people find the original question.  But that's up to you.
Answer: When Anakin and Obi-Wan were fighting on Mustafar this was the dialogue.

Anakin Skywalker: If you're not with me, then you're my enemy.
  Obi-Wan Kenobi: [realising that Anakin is consumed by evil and there's no reasoning with him anymore] Only a Sith deals in absolutes. (Source)

Absolute is defined in the dictionary as being "a value or principle that is regarded as universally valid or that may be viewed without relation to other things." or "that which exists without being dependent on anything else." Normal English translation being - black and white idea that does not take into consideration other events or ideas.
When Obi-Wan says

"Only Sith deal in absolutes"

He means that Anakin's black and white ideology is wrong and that only the Sith would hate everyone who is not their friend.


How to force users to authenticate to get IP adress from DHCP?

Question: Can You help me !!
I want to force users to authentificate to get IP from DHCP-server (win server) if not they can't get ip @ adress !! even they are connected to network
Comment: There are products that do this, but they are expensive and complex to set up.  What will you do if a user sets their own static IP?
Comment: What is this products ?
Answer: There's a standard to achieve this: 802.1X.
Basically the switch request authentication from the computer, then contact an authentication server to validate the credentials and depending on the answer the switch will deny or allow access.
There's further possible options, like placing the host in a guest vlan if not authenticated or placing the host in a specific VLAN depending of some of the user properties.
Obviously your switch must support 802.1X and you need an authentication server (usually a radius server).
In a windows environment, the Network Policy Server role can act as the authentication server. It is natively integrated with Active Directory.


Adobe Illustrator CC:How to adjust blurred corners for this shape?

Question: As I draw the rectangular shape, the corners are blurred. How to solve such problem in Adobe Illustrator?
Answer: Looks like you have the pixel preview on. Switch it off if you don't want to see pixels.
If you do want to enable the pixel preview, then set your zoom to 100% instead.  You can't zoom in on raster images, or you will see the pixels.
The corners are not blurred by the way - it's called anti-aliasing. Anti-aliasing is used to get smooth results when rasterizing images. To see the effect properly, you need to set your zoom level to 100%.
Example


Ext4 partition problems

Question: I have an 1.5tb external hdd. Yesterday morning it worked well.  The system accidentally freezed, and i restarted the system and i cant mount the partition.
I removed the hdd from the cage, and used ddrescue to copy the partition image into a file..
The copy was successfull without any errors, so the hardware seems ok.
But i cant mount, the e2fsck freezes as well. If i start, eats some cpu for 1-2 seconds then stops working.
What can i do ? I've read lot of threads, but i havent found anything about this problem.
If nothing will work, is there any way to rescue few directories ? It would be very very important. At christmas night my main hdd damaged, this hdd was my backup disc. I bought spare hdd  thats why i started to copy files from this disc when this happened, so i dont have any backups.
Comment: it seem i solved the problem, i can mount the partition without journals.
Comment: If you solved your problem, can you please write the solution as an answer and accept it, to let others know how it was solved.
Comment: Possibly the problem was with the jorunalling fs, and fsck and the mount cannot handle the problem well. So i mounted the fs with the following mount flags: -t ext4 -o ro,noload. This worked for me well.
Answer: Possibly the problem was with the jorunalling fs, and fsck and the mount cannot handle the problem well. So i mounted the fs with the following mount flags:
-t ext4 -o ro,noload.
This worked for me well.

Ext4 partition problems


What does "not XXX in the sense that YYY does not ZZZ" mean?

Question: This could be a weird example, but consider the following statement:
"She is not cute in the sense of being a cat."
Which of the following should this sentence be understood as?
"She is not (cute in the sense of being a cat)." i.e. She is cute, and moreover, not just cute being any random cat--indicating that she stands out to be cute even among her kitty counterparts. In this case, "in the sense of" is only modifying "cute" but not the "NOT".
OR
"She is (not cute) (in the sense of being a cat)." i.e. As a cat, she is NOT cute. Shame on her.

For instance, I see a professor saying this in his handout:
"In fact, the model is not identified in the sense that data cannot distinguish
between model A and B."
In this case he is clearly using "in the sense that" as a "because" clause explaining how this model is "NOT identified".
The fact that there's another "not" in the subordinate clause just made this sentence even more confusing.
This kind of sentences can really take me a while to understand, which makes me wonder if that's my fault as a non-native speaker or if there actually exists ambiguity to some extent.

Is this a common way to use "in the sense of/that" to modify the entire negative independent clause?
Comment: I would have said it meant "Her being a cat is not what makes her cute."  I.e.  her cuteness derives from a different source.
Comment: The model example does not compare easily to the cat example. You have it right that *not identified* is caused by *data not distinguished*. "He is not dressed right in the sense that gym shorts do not fit job interviews, usually."
Comment: This sounds similar to the ambiguity in "I am not going to the movies because of the rain". It could be I'm not going to the movies and the reason is the rain is stopping me, or it could be I -am- going to the movies but the rain is not the cause of my going (it is some thing else).
Comment: "Sense" can refer to a meaning of a word, and it could be rephrased "not 'cute' in the meaning that word has when applied to a cat". It's not a very obvious expression or common idiom, but context is all.
Comment: Your second example would be better rephrased. _In fact, the model remains unidentified: the data we have does not enable us to distinguish whether model A or model B is involved._ // Your first example sounds unfelicitous. Perhaps it's meant to mean 'She is not cute in the typical dear-little-kitten, fluffy-bundle-of-fur sort of way.'
Answer: The expression in the sense that, implies that from the existing senses, the speaker is concerned with a particular one. So it's restrictive. And it can be negated without ambiguity. But I agree that if another negation follows in the sense that, the sentence can become intricate.
Your funny example,

She is not cute in the sense of being a cat.

means that

She is cute, but not in the sense of being a cat [i.e. not because she is a cat, not due to her "catness", it is not her being a cat that makes her cute - maybe she has a certain affinity to emotions or gestures that seem human, or something else, we don't know]

So the sentence asserts a quality, but denies a particular reason for that quality.

A is not B in the sense that C (A is B, but not because of C).

"Not" negates the verb "is" but not in an absolute way, as the NP "in the sense of being a cat" comes to limit this negation. The negation is true only in this sense...
Your other sentence

In fact, the model is not identified in the sense that data cannot distinguish between model A and B.

means that the identity of the model does not lie in the inability of the data to act in a certain way. The model is not identified by a certain fact [that of the data being unable to distinguish between A and B], and that fact happens to be expressed by a negative clause. So the model can be identified, but not by means of that negative fact.
The sentence is correct, but intricate, and might prompt the reader to re-read it in order to process the information because of the two negations. Normally, I would use an affirmative verb, if you ask me, and use but not in the restrictive clause. It is less prone to ambiguities:

She was a lady, but not in the sense that she was not modern.

But your sentence would look awkward, without stating by what the model is actually identified:

*In fact, the model is identified, but not in the sense that data cannot distinguish between model A and B.
Answer:
which makes me wonder if that's my fault as a non-native speaker or if there actually exists ambiguity to some extent.

The ambiguity exists because there is not enough context. It is impossible to overstate the importance of context in English (and most other languages.) Ambiguity recedes as relevant context increases.
The professor example is not ambiguous; the cat example is - in fact it's almost incomprehensible. The cat example lacks context - why did the speaker choose a cat?


jNetPcap vs Jpcap

Question: wondering any of you can give me a bit of comments + insights please.
In term of performance, which one should I use, jNetPcap or Jpcap?
Thanks!
Answer: The referenced post contains an admittedly biased opinion by the owner of the jNetPcap project. It is hardly a reliable source for a true comparison.
One difference that is obvious between the two projects is that jNetPcap uses JNI for access to native code. PCap4j (http://www.pcap4j.org/) uses JNA for access to native code and a "com.sun" JNA compatibility library (https://github.com/twall/jna).
Also, the latest version of jNetPcap does not build on Mac OSX and the patch file that was posted to the support forums does not work, even if manually applied. PCap4j run on Mac OSX if the instructions at http://tomute.hateblo.jp/entry/2013/01/27/003209 are followed; for PCap4J 1.3.0 you must replace the JNA 3.3.0 library with the newer versions JNA 4.1.0.
The following command line is an example for PCap4j 1.3.0 on Mac OSX 10.9.5:
sudo java -cp pcap4j-core-1.3.0.jar:pcap4j-packetfactory-static-1.3.0.jar:./libs/jna-4.1.0.jar:./libs/slf4j-api-1.7.10.jar:./libs/slf4j-nop-1.7.10.jar:pcap4j-sample-1.3.0.jar -Dorg.pcap4j.core.pcapLibName=libpcap.dylib -Dorg.pcap4j.sample.Loop.count=2 org.pcap4j.sample.Loop icmp
Answer: I was looking for the same thing.. Just for the ones who come across with this question. Here is the link.
Comment: Thanks. I have decided long time ago to use JNetPcap so your link confirmed that I made a good decision.
Answer: I researched it and found three Java wrapper libraries for pcap: jpcap, jNetPcap, and Jpcap. But both jpcap and jNetPcap were unsuitable for SNeO because they seemed to be designed for mainly capturing packets and not to be useful for making and sending packets so much. On the other hand, Jpcap looked useful for making and sending packets. But it had a defect in capturing ICMP packets and its development seemed to be stopped long ago. That's why  Pcap4j.
https://github.com/kaitoy/pcap4j#system-requirements

jNetPcap vs Jpcap


My friend's pepper plant has some odd leaf lesions

Question: It looks like the leaves are being distorted by whatever these lesions are. Any ideas? Viral disease?
Answer: The third photo shows distinctive leaf puckering which indicates that some creature injected something into the leaf and caused a chemical reaction. It looks rather as if some caterpillar crawled up onto the underside hoping to attach itself and spin a coccoon, but found the sap in the leaf rather hot. Plants have defensive mechanisms to discourage free riders and it looks like the rider found the ride too bumpy and moved on. MIght want to examine the soil surface for evidence, or expand the search area to see if it found another perch.
A virus would show more generalized evidence over more of the plant; the plant looks good and healthy and soon the leaf will be gone and no longer a concern.
Comment: The lesion is the shape of a caterpillar, too! Head and all. Look carefully at the second picture.

My friend’s pepper plant has some odd leaf lesions


Heating of an non-ohmic conductor

Question: So I know that if you increase the voltage across a wire then the current will increase. But an increase in current leads to a increase in heat production though $P=I^2R$, but as the temperature increase the vibrations of the metal ions increase and so the current is more restricted implying the resistance increases. But as the resistance has increased, the heating has increased again and this will go in a cycle leading to infinite resistance and heat production so where am I going wrong?
Answer: I am not completely sure but if $R$ increases the current $i$ will decrease and $P=Vi=\frac{V^2}{R}$ will decrease as well because V is constant.
Comment: Re, "V is constant."  That would be true if the light bulb* was connected to a _constant voltage power supply._  In fact, the electical power grid and most modern electronic power supplies do a pretty good job of maintaining constant voltage, but that's by _design_.  There's no physical law that says voltage _must_ be constant in any given circuit.  If the bulb were connected to a _constant current_ power supply, then the power would continue to increase until something happened.
 [*This problem sounds exactly like what happens when you switch on an incandescent light bulb]
Answer: Short answer: Yes, the increase of resistivity with temperature can cause a "thermal runaway" process in which a wire fails quickly by melting from an applied current. This is one of the failure mechanisms of incandescent light bulbs.
Let's consider a small region of the wire, small enough to have an approximately uniform temperature. The volumetric heating in this region is $J^2\rho(T)$, where $J$ is the current density (which is generally a function of many things, including the wire geometry and resistance outside our small region) and $\rho(T)$ is the resistivity, a material property that depends on the temperature of that region.
Mathematically, we can apply heat transfer models to solve for the temperature in our region. For  example, considering conduction to the surrounding regions along with our heat generation term, we can write $$k\nabla^2T+J^2\rho=cd\dot T$$ where $k$ is the thermal conductivity, $\nabla^2$ is the spatial second derivative, $c$ is the specific heat,  $d$ is the density, and $\dot T$ is the  time derivative and use the boundary conditions to solve for the temperature T as a function of time. (For simplicity, I'm considering  material properties other than resistivity to be temperature independent.) What this equation says is that of the thermal energy generated by resistive heating, what isn't conducted to the neighboring regions must increase the temperature of our own region.
But more simply, I think you're wondering why, if the resistivity $\rho(T)$ increases with temperature $T$, as it generally does in metals, why the heating doesn't spiral out of control. The answer is that it can; the increasing resistivity can cause a fuse-like effect in which the wire melts and fails. (Of course, this effect can occur with sufficient current if the metal resistivity is temperature independent or even if the resistivity decreases with temperature, but the process is accelerated by a positive temperature coefficient of resistivity.) So there's nothing wrong with your intuition here.
What about the fact that $\rho(T)$ contributes to the total resistance of the circuit and thus influences $J$ in conditions other than constant-current control? Here, we must ask whether the resistance of the heated region dominates over all other resistances. If so, then under constant-voltage conditions, for example, the current decreases concomitantly with the resistance increase, and the configuration may be stable. This occurs in an incandescent light bulb, for example, for which the current changes as the bulb heats up.
If the hot region is relatively small, however, then even a large increase in local resistivity won't change the total load resistance significantly, and thermal runaway can occur even in constant-voltage conditions. This can also occur in incandescent light bulbs; any local damage or imperfection can produce a hot spot that fails, flashing much whiter than the rest of the filament as it undergoes rapid heating and melting.
(I studied this process (Appendix A here, p.61, with plenty of thermal modeling and material property discussions) in the context of thin metal films undergoing resistive heating when surrounded by water. The context was an implantable medical device containing tiny reservoirs that could be opened by an electrical pulse. In this case, the film was adjacent to liquid, so another runaway effect occurred: a vapor bubble next to the film, which cut off easy heat transfer to the liquid and thus accelerated the temperature increase.)
Answer: You're going wrong because you're making the fallacy that a monotically increasing function will eventually diverge. This is not true. Sure, it can (as Chemomechanics points out), but it needs not. Unfortunately this hasn't been addressed in neither of the two answers so far.
Details:
Suppose the room temperature is $T_0$ and the resistance of the wire is $R=R_0+R_1T_0$, because $R(T) \approx R_0+R_1T$. Note that I use a linear temperature dependence here because this is accurate for most metals when the change in temperature is small enough (but nothing prevents you from using a quadratic or cubic or more complex dependence, my point will still stand). You turn on a current. This creates a Joule heating proportional to $RI^2=(R_0+R_1T_0)I^2$, which in turn creates a rise in temperature $\Delta T_0$. The resistance of the wire is thus now equal to $R_0+R_1(T_0+\Delta T_0)$. This implies that the Joule heat is now proportional to $R_0+R_1(T_0+\Delta T_0)I^2$. Using the same arguments recursively again and again, one finds the result that:
$T=T_0+\sum_{i=0}^\infty \Delta T_i$.
Your fallacy can be resumed in the false belief that the above sum diverges regardless of $\Delta T_i$. However, from calculus, it can be shown that the series converges if $\Delta T_{i+1} / \Delta T_i <1$ for instance, in which case it would physically correspond to a standard heating of a wire a few degrees above room temperature. It is also possible that the series diverges, which would physically correspond to the melting of the wire, but it is by no mean a necessity.
Addendum for the curious:
The values of  $\Delta T_{i+1} / \Delta T_i$ depend on the material's properties (such as the resistance's temperature dependence) and on the current. This is why, in general, using a high current will eventually melt the sample, and also why some materials are heated up to higher temperatures than others, for a same current.

Heating of an non-ohmic conductor


Should I use getwork or getblocktemplate

Question: I am working on an fpga mining device just for fun. I realized that there is a getblocktemplate function which replaces the getwork Json-rpc call. So do I need to switch over to it and change all the code or can I continue using it . Will getwork be removed from bitcoin later or will it still be supported?
Answer: The advantage of getblocktemplate is that work units from it last longer, because you can change the extraNonce field. That's nice if you're writing an fpga miner, because it saves bandwidth.
getwork will probably never go away. It's useful and not very hard to maintain. Note that that's a personal opinion; I'm not one of the Bitcoin developers.
Edit: getwork has been removed in v0.10.0, so you have to use getblocktemplate.
Comment: Just out of curiosity how does it save bandwidth. If the nonce is the maximum value it simple wraps back and starts again right from 0. And since I dont have a very fast fpga the probabilty that some one finds a nonce before I complte the entire cycle is very high. BUt I still kepp calling get work and inserting the data onto the uart lines of my fpga miner from my python script runing on the host computer. So how does it save bandwidth
Comment: `it simple wraps back` If you check the same nonce again, you'll get the same result. If you didn't get a block the first time, you won't get one the second time. Bandwidth savings only really matters in pooled mining.
Comment: What I meant was before I can do the same hash again the block would have already been solved by someone else and I will get the fresh data from the uart line.
Comment: A 6 Ghash/s FPGA will burn through all of the values for the nonce field in less than a second. So, not necessarily.
Comment: Can you take a look at http://bitcoin.stackexchange.com/questions/11456/i-am-unable-to-figure-the-getwork-api question


Why is Blender Guru UV unwrapping?

Question: I am doing this tutorial of Blender Guru. And about 15 minutes he is UV unwrapping the mesh. Why is he doing that ? Although I am a beginner I think I understand the general purpose of UV unwrapping. Buy not what Blender Guru is trying to establish here.
Comment: He needs uv coodinates for the grunge texture introduced at min 18 and also use that to have better control on the procedural texture.
Comment: UV unwrapping allows you to gain more control over how a texture is applied to the surface of the mesh. Without a UV map you can only map a texture through various automatic methods that rarely fit well on a complex mesh.

If view the part before and after the UV map is applied in the tutorial (around 15:50), you'll see how using the UV map affected and improved the look of the object.
Answer: The cube on the right is flattened/unfolded so a texture can be applied. On the left is what it looks like after it is unfolded. Where it is cut to unfold these are called seams. In the video he places the seams to unfold the object.

By creating a 2D view of the object you can add a texture in an external editor (for example) exactly where you want the texture to be. The 2D version is mapped to the 3D object ... UV Map
Answer: It's so he can place the texture on the model. Without unwrapping it first, you can't put a texture on. It's just how it works, you can't project a 2-d picture on a 3-d object unless it is also 2-d.

Why is Blender Guru UV unwrapping?


Is Huion Kamvas Pro 13 supported?

Question: I'm thinking of gifting a drawing tablet to a person who uses Ubuntu. I had my eyes on the Huion Kamvas Pro 13 and I would like to know if it is supported before making a terrible mistake. However, I couldn't find any clear information online and the related questions here on AskUbuntu are quite outdated.
Answer: I plugged my kamvas 13 pro in a fresh Ubuntu 20.04 LTS and it works :

full-hd screen recognized
stylus working well as mouse
stylus pressure working in blender !!
multi-monitor setup (except for the stylus, see below)

What does not work out-of-the-box :

tablet buttons and slider
forcing the stylus area to a single monitor (tablet) ; the stylus moves to the entire desktop

To force the stylus area read
input coordinates transformation
and
tranformation matrix.
It works with this xinput fix :
xinput set-prop 15 --type=float "Coordinate Transformation Matrix" 0.5 0 0.25 0 0.333333 0.666666 0 0 1

... here is my monitors setup :

4K monitor on top
full-HD kamvas monitor below centered

I can now work on blender with my kamvas pro 13 in a dual-monitor config !!!!
Comment: On my side, I tried my Huion KAMVAS Pro 12 GT-116 on two PCs (desktop PC and a laptop) with Linux Mint 20.1 (which is based on Ubuntu). Everything works fine on the laptop which has a 1920x1080 resolution that matches that of the tablet. However, On my desktop PC, I found that I had to lower the screen resolution from 2560x1440 to 1920x1080 to get it to work properly.
Comment: With Ubuntu 20.04 and the application Krita, then everything works fine with Huion Kamvas Pro 13.
Answer: Huion does not offer a Linux driver, but you can go to this website and it offers huion for some linux versions: https://github.com/Huion-Linux.
Comment: Thanks. The model I mentioned is not in the list of officially supported devices, unfortunately (https://digimend.github.io/drivers/digimend/tablets/). Does this mean it will not work or only that the list is not updated?
Comment: The list is probably not updated, but you can still try it though. If it doesn't work you can try this: http://www.magicbluesmoke.org/getting-a-huion-hs610-working-in-linux/ it seems to works for most people.
Answer: I was able to get the Huion pro 13 setup and working without using any dkms kernel drivers. I recomend the kamvas-driver python driver from here: https://pypi.org/project/kamvas-driver/.
Settting up the driver was not very difficult,  sudo apt update && sudo apt install python3-pip && sudo pip3 install kamvas-driver && sudo ln -s /usr/bin/python3 /usr/bin/python && sudo apt install xserver-xorg-input-evdev
Once those commands are finished run kamvas -c in your home directory to generate a configuration file. then run kamvas start or kamvas stop to respectively start or stop the driver. You can set what your buttons do in the ~/.kamvas_config.yaml file. In your control panel settings set your monitors to mirror, enjoy your new working Huion tablet!
Comment: I suggest you edit your answer and include that valuable information!
Comment: I forgot the most critical part of the install, install the xserver-xorg-input-evdev driver with sudo apt install xserver-xorg-input-evdev before running kamvas -c or kamvas start. My bad :)
Answer: I managed to get my Huion Pro 13 working (including buttons) on ubuntu 20.04 and 20.10 with kamvas-driver python as suggested by Michael (thanks a lot!) . But I had some issue, here is how I solved it if someone is interested:

I had to change product_id in ~/.kamvas_config.yaml (i used lsusb to get the proper value)
I had to change default_display in ~/.kamvas_config.yaml (i used xrandr to get the proper value)
I had to set /usr/bin/python to refer to python3. I used :

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
sudo update-alternatives --config python

I added a file /etc/X11/xorg.conf containing:

Section "InputClass"
    Identifier "evdev tablet catchall"
    MatchIsTablet "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
EndSection

Is Huion Kamvas Pro 13 supported?


How to remove the top, bottom, left... region when theming a node in Drupal 6

Question: After some revise on the template.php, I can theme a node with specific content type. However, could I remove the default region such as header, footer to make it likes a blank page?
Answer: I think You need to create specific page.tpl.php for your content and don't include these regions in the template. You name them page--YOUR_CONTENT_TYPE_MACHINE_NAME.tpl.php according to this thread. You can also try this module


Why hasn't the Republic of Ireland returned Anglican church properties to the Catholic Church?

Question: I know that some key fighters for Irish independence were Anglican, and that Ireland has had an ambivalent relationship with Catholicism in modern times. That said, has there been any serious effort by Irish Catholic bishops to reclaim Church of Ireland properties like Christ Church Cathedral or St. Patrick's Cathedral?
Comment: Why do you think the Irish government would want to do that? What legal grounds would there be to do that?
Comment: This question may be interpreted as unhelpful in context to the recent ratification of the Good Friday Agreement and contains opinions that may offend, i.e. Irish Catholicism. There is the current Northern Ireland Assembly issue to consider. Any possible answer(s) should be carefully considered, with a full understanding of the current context of recent events.
Comment: One could also ask the same of France or England!
Comment: @PeterTurner The ancient French cathedrals are Roman Catholic; and England, unlike the RoI, is an officially Protestant country, so it isn't the same thing really.
Comment: @davidlol both are property taken during their respective revolutions.  The [French cathedrals are government property](https://www.churchpop.com/who-actually-owns-the-notre-dame-cathedral-the-answer-may-surprise-you/), guessing the same goes for England, technically
Comment: @PeterTurner Yes, but not Ireland (which is where the diffeence lies).
Answer: This is a partial answer.
To some, this question may seem strange, but it needs to be understood in context of neighbouring countries. As @PeterTurner points out, the ancient cathedrals in France are state-owned, but are run entirely by the Roman Catholic Church and function in every way as any Roman Catholic cathedral does.
In England the ancient cathedrals are state-owned, via the national established church, the Church of England. This is because England is officially a Protestant country as His Majesty's Coronation reminded us recently.
So many people assume that the Dublin Cathedrals are state-owned, as their French and English counterparts are, and that, since Roman Catholicism is the predominant religion of the Republic of Ireland, it seems natural that the Roman Catholic church should run the cathedrals.
Dublin, unusually, had two cathedrals before the Reformation, both now Church of Ireland. There is also a Roman Catholic pro-Cathedral built in 1825. It is called a pro-Cathedral because, in the view of the Roman Catholic Church, Christ Church Cathedral is the real Roman Catholic Cathedral and proper seat of the Archbishop of Dublin. The pro-Cathedral functions exactly as a cathedral.
Many  tourists assume that Christ Church and St Patrick's Catherals are Roman Catholic and that the pro in pro-cathedral is an abbreviation for Protestant (on tourist maps etc.)
However, since 1871, Dublin's two historic Cathedral's have not been state-owned. From 1st January 1871 the Church of Ireland was disestablished and disendowed. The United Church of England and Ireland was separated into two parts. The Church of England remained, and remains, the established and official state church in England. The Church of Ireland was constituted at that time as an independent denomination. All buildings in Ireland in actual use by the United Church of England and Ireland at that date passed to the new denomination which was constituted as any other private organisation. Land and endowments not in actual use for religious or educational purposes remained state-owned and were used in various ways, but mainly to fund education.
So by the time the Irish Free State was formed in 1922 Dublin's two ancient cathedrals were effectively the private property of an independent organisation, the Church of Ireland. As they were no longer state-owned, the Irish government had, and has, no say in what happened to them.
This is only a partial answer because it could be argued that the Republic of Ireland government could compulsorily take over the cathedrals despite their being, in a sense, private property. I am fairly certain that this was never seriously considered.
It is possible that improved eccumenical relationships, and/or maintenace costs, may at some point bring about changes.


replacing text in a file, Python

Question: so this piece of code is meant to take a line from a file and replace the certain line from the string with a new word/number, but it doesn't seem to work :(
else:
    with open('newfile', 'r+')as myfile:
           x=input("what would you like to change: \nname \ncolour \nnumber \nenter   option:")
           if x == "name":
               print("your current name is:")
               test_lines = myfile.readlines()
               print(test_lines[0])
               y=input("change name to:")
               content = (y)
               myfile.write(str.replace((test_lines[0]), str(content)))

I get the error message TypeError: replace() takes at least 2 arguments (1 given), i don't know why (content) is not accepted as an argument. This also happens for the code below
if x == "number":
          print ("your current fav. number is:")
          test_lines = myfile.readlines()
          print(test_lines[2])
          number=(int(input("times fav number by a number to get your new number \ne.g 5*2 = 10 \nnew number:")))
          result = (int(test_lines[2])*(number))
          print (result)
          myfile.write(str.replace((test_lines[2]), str(result)))

f=open('newfile', 'r')
print("now we will print the file:")
for line in f:
    print (line)
f.close

Answer: replace is a function of a 'str' object.
Sounds like you want to do something like (this is a guess not knowing your inputs)
test_lines[0].replace(test_lines[0],str(content))

I'm not sure what you're attempting to accomplish with the logic in there. looks like you want to remove that line completely and replace it?
also i'm unsure what you are trying to do with
content = (y)

the output of input is a str (which is what you want)
EDIT:
In your specific case (replacing a whole line) i would suggest just reassigning that item in the list. e.g.
test_lines[0] = content

To overwrite the file you will have to truncate it to avoid any race conditions. So once you have made your changes in memory, you should seek to the beginning, and rewrite everything.
# Your logic for replacing the line or desired changes
myfile.seek(0)
for l in test_lines:
    myfile.write("%s\n" % l)
myfile.truncate()

Comment: Actually I think he wants to replace the first character in test_lines with content, so:`test_lines.replace(test_lines[0],str(content))`. I could be wrong though.
Comment: Yes, I just noticed. My bad.
Comment: Yeah,  I want to completely remove the line and replace it, the code you gave worked for the argument error but the old line is still there despite the fact that there's also the new line there. thanks for the answers dude, appreciate it.
Answer: Try this:
test_lines = myfile.readlines()
print(test_lines[0])
y = input("change name to:")
content = str(y)
myfile.write(test_lines[0].replace(test_lines[0], content))

You have no object known purely as str. The method replace() must be called on a string object. You can call it on test_lines[0] which refers to a string object.
However, you may need to change your actual program flow. However, this should circumvent the error.
Answer: You need to call it as test_lines[0].replace(test_lines[0],str(content))
Calling help(str.replace) at the interpreter.

replace(...)
     S.replace(old, new[, count]) -> str
Return a copy of S with all occurrences of substring
     old replaced by new.  If the optional argument count is
     given, only the first count occurrences are replaced.

Couldn't find the docs.

replacing text in a file, Python


Windows Live Messenger for Mac?

Question: I have a friend who uses a Mac, and was wondering if there is a version of Windows Live Messenger for Mac?  Or something comparable that uses/takes advantage of the Windows LIVE ID?  I'm interested in recommendations, as well as "is there a Mac version of Live Messenger?
Answer: The most complete instant messaging multi protocol client for mac : adium
There is also a live messenger for mac, but I think adium is far better.
Answer: It's sometimes easier to use web based tools for this, such as Meebo or eBuddy.
With all of these tools, I'd still be careful about giving Live credentials to any website (or app). Think of all the websites that you use this Live ID on, and whether someone can use your hotmail address to 'mail a new password' and compromise those accounts.

Windows Live Messenger for Mac?


Why is the reciprocal heading of a line drawn between two points on Google Earth not equal to 180 degrees?

Question: If I measure a line from point (A) to point (B) Google Earth gives me a heading. if I measure a line from B to A I would think it should be 180 degrees from (A) to (B). It is not. I'm trying to find the angles of a triangle drawn on Google Earth and the variation is making it difficult.
Comment: Angles are complicated on a sphere, and even more so on a spheroid.
Comment: There's some information [here](https://www.movable-type.co.uk/scripts/latlong.html).
Answer: "Heading" means, which direction on the compass your line is pointing to. A at the equator, B at the north pole would mean heading = 0, vice versa heading = 180.
Answer: Technically, because the line is an orthodrome, not a loxodrome.
Google Earth measures the shortest curved distance between both points. The shortest curved line between two points is a variable heading line. Basically, it satisfies that the cosine of the true curse multiplied by the cosine of the latitude, at any point of a great circle, is a constant. Source
Therefore, that line has different orientations in its initial and final point. When measuring in one direction or another, Google Earth is showing you the heading at the beginning of the line, but the starting point of the measurements is being exchanged.
This has nothing to do with seeing it as a straight line. Measurements on Google Earth should not be seen as straight lines (however the loxodromes do).
To calculate the internal angles of a spherical triangle, there are some interesting theorems in spherical trigonometry that could help you.


From all Documents in a folder in SharePoint,get only documents related to particular user

Question: From All Documents in a Folder in SharePoint,get only documents related to particular user using API.
I have a generic account which has access to all the documents in the folder and by using API call would like to get documents only for a particular user.
I cant pass username and password for that user
Comment: What do you mean by "related" - Author? Editor? Has access?
Answer: You need to pass the current logged in user in the API calling and SharePoint will take care of authorization and authentication by itself, so for a particular user only the documents which they have access to will only be fetched by the API.
Since you did not mention whether you are calling the API from SharePoint or from any external standalone application. I am assuming that you are calling it from outside otherwise this issue would not have come.
Please refer to this link on how to achieve this task. LINK
Let me know if you still face any issue.


Why is the turbine that drives the compressor is placed before the free turbine in a gas turbine engine?

Question: For example in the picture below we can see that the turbine of the compressor is just behind the combustion chamber and gets the hottest gas and i think therefore can extract the most energy? The power turbine comes after the compressor turbine but power turbine is the turbine that propels the vehicle. Why is the power turbine placed after compressor turbine if it is the one propelling the vehicle, shouldn't it be placed first so that it gets the hottest gas and extracts the most energy and propels the vehicle forward with more torque?
Comment: But-- if you did that, you'd be taking energy away from the turbine that keeps the motor/engine turning in the first place!  This seems kind of like a "if I do this, can I get closer to having perpetual motion" kind of question.
Answer: The compressor-turbine spool, the "gas generator" in turboprop/turboshaft lingo, or "core engine", in a turbofan, has to come ahead of the power turbine because the turbine has to be directly connected to its compressor to maintain the combustion cycle.
The power turbine needs to go after, its shaft either running inside the spool of the gas generator out the front, or out the other way (like a PT-6, similar to your diagram).
To put the power turbine ahead of the compressor turbine, you'd have to transmit its power through some transmission method at the outer rim of the turbine, maybe using a ring gear on the outside of the power turbine.
Aside from flow issues likely to have to be overcome when you are extracting energy ahead of the compressor turbine, you would have an unwieldy transmission structure on the outside of the engine, where a pinion gear would mesh with the outside of the power turbine. Just thinking about it sounds like a mechanical nightmare.
So much easier to stick the power turbine in the exhaust of the gas generator, like putting a windmill behind a regular turbojet's exhaust.
In any case, the energy required to compress the incoming flow has priority over energy being used to make torque, so that's another reason to put the power turbine after.
Comment: i see thanks, also im wondering one more thing. You said that "the energy required to compress the incoming flow has priority over energy being used to make torque", do you know in a general gas turbine engine, roughly how much percentage of the power is used to drive the compressor and how much percentage is left to drive the power turbine?
Comment: Not off the top of my head, and I'm retired so I can't ask anybody to find out any more lol.
Answer: The "compressor turbine" is the turbine (or group of turbines) which extract from the exhaust enough energy to drive the compressor stages, nothing more.
The remaining energy possessed by the exhaust after the "compressor turbine" can be used in two ways:

we add another turbine (called "free power turbine") which we connect to the propeller (in a propeller airplane) or to the rotor (in a helicopter) or to an electrical engine/generator (for ground applications); in total some 80% of the energy is converted in torque on the shaft;

if the jet engine is used to push (thrust) the aircraft then no "free power turbine" is needed and the whole exhaust energy goes into "pushing" the airplane.


Reference SVG file in CSS of custom plugin

Question: I have built a custom plugin and have a css file that is being injected as an assetbundle.
This works great but when I want to set a background image (SVG in this case) I'm not sure what the path should be.
I would like to store the SVG inside the plugin folder and not in the main project.
Should I store the SVG in the resources folder or create a web folder like some other plugins seem to do?
Answer: For assets (images, CSS, JS) stored in your plugin's source folder, you'll need a published file URL to use them in front-end or control panel templates.
Essentially, in "publishing" a file, Craft will copy it to the cpresources folder under your web root - meaning that it's eventual URL will be something like https://foo.ddev.site/cpresources/1sdfasz/icon.svg.
Assuming your icon lives in a resources folder inside your plugin, here's how to do it in PHP and Twig, respectively:
$url = \Craft::$app->assetManager->getPublishedUrl(
    '@vendor/plugin/resources/icon.svg',
    true
);

{% set iconUrl = craft.app.assetManager.getPublishedUrl('@vendor/plugin/resources/icon.svg', true) %}

Note that the '@vendor/plugin' part should be replaced with your plugin's auto-generated Yii alias.
See the official docs for more info!
Answer: I managed to get it working thanks to the awesome Craft CMS support.
As explained in the question I already had my CSS and JS files registered and working in the plugin.
The assetbundle's sourcePath is @vendor/plugin_handle/resources/dist/
So I had to move my SVG inside the dist folder.
Then in the css file I just had to adjust the path to the SVG relative to the css file. In my case it was ../img/icon.svg


Do you think "parent" link here should be changed to "parent site" link?

Question: Of course, "parent" takes up less space, but the first comers may think it is a link to a board discussing children upbringing.
Answer: This was discussed briefly in the blog comments
http://blog.stackoverflow.com/2010/07/new-per-site-metas/
I considered and discarded a lot of the alternatives, such as

main (too close visually to meta)
parent site (too long)
actual name "english", "boardgames", "cooking" (too variable in every sense)

Main isn't bad but consider:

tools | chat | meta | about

vs

tools | chat | main | about

They're so close visually.. ugh.
edit: since this kept coming up across the network I decided to change it from "parent" to "main".
Comment: @brilliant I AM SURPRISED SOMEONE ON THE ENGLISH SITE WOULD PROPOSE CHANGING TO ALL CAPS TO MAKE TEXT DIFFERENT.
Comment: Why not put 'main' in capital letters and 'meta' keep in small case?
Comment: Actually, now that I think on it a little more, *main* is better. It's obvious which site you're on — meta or main — so the fact that the names are both four-letter words beginning in "m" means nothing.
Comment: @Jeff Atwood: Why not?
Comment: @Jeff: It's a reasonable technique for SHORT pieces of text, though admittedly overused by lawyers (and presumably also by programmers back before the invention of the seventh bit :-P).
Answer: I don't see what difference it would make. I wondered what it meant for about 0.75 seconds and then figured it out. Shorter is better in links, IMO.
Comment: this was kind of my conclusion as well -- any college educated person should be able to figure out "meta", I hope, and it is part of our mission to *educate* folks in the broadest possible sense of the word. That said if there was a slam-dunk great alternative I would consider it but I wasn't seeing that.


Does Microsoft still support SharePoint 2013?

Question: Does Microsoft still support SharePoint 2013 ?
Answer: Mainstream Support ended on 10.04.2018. The extended Support for SP1 will end on 11.04.2023. See the Microsoft Prduct Lifecycle page for more info
Answer: The mainstream support end date of SharePoint 2013 SP1 is 4/10/2018 and the Extended Support End Date is 4/11/2023.
The detailed guideline of policy is here:https://docs.microsoft.com/en-us/SharePoint/product-servicing-policy/updated-product-servicing-policy-for-sharepoint-2013?redirectedfrom=MSDN
You can always check the life cycle here:https://support.microsoft.com/en-us/lifecycle/search?alpha=SharePoint%20Server%202013


Do we still need centrallize database at all for Dapp development?

Question: This question keeps popping up in my mind, do we need centralize database at all for Dapp development like PostgreSQL, MongoDB and more, what if we want to store user's email and send them email everytime? How are those Dapp which require people to add their email address to get news letter e.g Opensea and more, how did they built it, was everything stored on the Blockchain/Ethereum?
I understand we need something like gmail for now since we are still at the early stage of web3 and people can only gain engagement/get in touch with users easily with gmail. But my question is, do we abadon centralized database totally while building our dapp on Blockchain/Ethereum?
Answer: No, you definitely still need centralized databases.
Writing data to a blockchain is expensive and slow. Reading is free but slow. You most likely can't use the blockchain as your main data storage, unless your project is very much designed around blockchains.
Sites like Opensea use a lot of traditional databases, and the blockchain only contains the most essential parts, which can be utilized also by external parties (such as users, directly). External parties have no access to the data in the databases.
Some reasons why you need regular databases:

Sensitive data: you can't store sensitive data in public blockchains
Speed: a lot faster to read and write to a regular database
Recording blockchain metadata, such as indexing contract events to be able to answer queries such as "which NFTs does address X own?"
Tighter access control
Comment: Firstly, thank you so much for answering my question.
Secondly, I get your whole point and the first point was a real thing to consider. But for the indexing part, I thought TheGraph, which is a decentralize database already solve that?
Comment: Can you pls highlight some few informations we can store on blockchain since it's public and their would be some specific data to store there
Comment: Sorry, I'm not quite sure what you're asking. Contracts are good for doing simple logic where users don't trust each other. Please post a new question if you have further questions
Answer: There are both centralized and decentralized database. Some Dapps use both of them. There are off chain data protocols like Ceramic and Thread.db and tools like The graph. Arweave and filecoin are used to store data.
Comment: Do all these tools already provide what we need for switching to totally to decentralize database?
Comment: The Graph is a decentralized protocol for indexing and querying data from blockchains, starting with Ethereum. It makes it possible to query data that is difficult to query directly.
Answer: You don't need centralised database because you can use decentralised indexers like

TheGrapgh

Subquery

If your application does not run without a centralised database then it is not truly decentralised.
Of course, not all applications can be done purely on-chain yet due to high decentralised state and storage costs, but these costs are coming lower every day.