Why isn't temperature measured in units of energy?

Question: Temperature is the average of the kinetic energies of all molecules of a body. Then, why do we consider it a different fundamental physical quantity altogether [K], and not an alternate form of energy, with a dimensional formula derived from three initial fundamental quantities, length [L], mass [M] and time [T]?
Comment: Possible duplicate: http://physics.stackexchange.com/questions/60830/why-isnt-temperature-measured-in-joules/60839#60839 (Even if it's not a duplicate, you might find the answers helpful.)
Comment: See also my answer to a related question: http://physics.stackexchange.com/questions/17551/units-and-nature/20776#20776
Answer: Temperature is nothing else than energy per degree of freedom. It is purely for historical reasons that energy per degree of freedom is measured in Kelvin, and not in, say, micro-eV. It is just that these systems of units got fixed and became widely used before the statistical meaning of temperature became clear.
For the same reason, mass measured in kg and not in, say, Tera-eV.
If you would correct all of this, and apply more rational choices of units, you would end up with a natural system of units. This is what many physicists do in their professional lives. In such a system constants like the speed of light and Boltzmann's constant end up as being defined equal to unity. This makes it clear that these are not constants of nature, but man-made artifacts caused by the use of clumsy systems of units. In that respect Boltzmann's constant k is no different than the constant measuring the number of cubic inches in a gallon.
Comment: Do you happen to know of a page that translates legacy cruft like kelvin to the future standards you speak of?
Answer: Particle physicists indeed do like to express temperature in the units of energy, usually in their most favorite unit of energy, a gigaelectronvolt.
Kelvins are used for historical reasons as well as for the sake of having reasonable numbers in everyday conditions. Before the temperature-energy relationship
$$ E \sim kT$$
was realized in the late 19th century ($k=1.38\times 10^{-23} {\rm J/K}$), people used various temperature scales such as the Celsius scale (they still do). The Celsius scale divides the interval between the freezing and boiling points of water to 100 parts (percent of the length of the interval). The linearity is given by the volume of an ideal gas at fixed pressure, $V\sim T$.
Later, it was appreciated that the freezing point isn't a terrible fundamental special temperature worth the label "zero", so a shifted Celsius scale, the Kelvin scale, was defined. It's still convenient to use the Celsius degrees because it's sensible to talk about temperatures near 0 and not 300 kelvins.
Today, we know it's sensible to express the temperature via the equivalent energy per degree of freedom (times two), $E=kT$, but it's still reasonable to use kelvins and Celsius degrees because the room temperature is of order $10^{-20}$ joules.
Comment: You're on the right track but your number isn't right. The temperature as energy is calculated from the absolute temperature. 273.15+25.8 is 298.95 kelvins. Multiply it by 1.38 e-23 J/K and you get 4.12 e-21 joules or 4.12 zJ. How did you get the much higher figure? By the way, particle physicists etc. would prefer to express the temperature in electronvolts. Divide 4.12 e-21 by 1.602 e-19 and you get 0.0026 electronvolts for your room temperature. This gives you an idea how hard it is for the heat to thermally excite molecules etc.
Comment: Joule is not too much for a human. But the temperature-as-energy means that the corresponding energy is given to every atom (more precisely every direction or "degree of freedom" in which it may move). And one joule per atom is huge, indeed. Even the LHC only pumps 6.5 GeV per proton. It's some $10^{10}$ eV or $10^{-9}$ joules, a nanojoule. The equivalent energy to the LHC energy-per-proton is some tens of billions of kelvins, you may calculate it precisely.
Comment: So my room, being about 25.8 degree Celsius, is 258 zJ?
Comment: I wondered why it was unreasonable, but now I know a joule is just too much. Thanks for the explanation.
Comment: Yet the "[negative kelvin / beyond infinite hot](https://www.mpg.de/research/negative-absolute-temperature)" experiment probably used less energy than the LHC.
Answer: You actually explained why already by yourself and well done for noticing the problem. Dimensional analysis does show that temperature and energy are not the same.
Just to convince ourselves of this, lets look at the ideal gas equation for a single mole, (i.e. number moles n=1 below) of ideal gas:
$$pV=nRT=RT$$
With $nR=8.31\mathrm{m^2kg s^{-2}K^{-1}}$ looking like it has the units we use for energy over those for temperature (i.e. the units are $   \mathrm{\text{ } m^2kg s^{-2}K^{-1}}=JK^{-1}$).
$$\frac{pV}{R}=T$$
What happens to the units now? The units in this expression do not amount tot units of energy. This means $\text{Energy}\neq\text{Temperature}$ and is what we expected.
As others have said, in various ways; temperature is a function of state. The sum of variables the function of state depends on tells us the number of degrees of freedom it has. These are represented by the number of invariables in the function of the state. i.e. general form:
$$g(x_1,x_2,..,x_n)$$
Where subscript n, is a positive integer which gives the degree of freedom. The Empirical temperature is a single valued result found at a particular time (i.e. so we have a result that is independent of time) when we examine our function of state. Look at the function of state variables volume, V and pressure, p which are represented as follows:
$$\Phi(p,V)=T_{empirical}$$
Proof:
Proof for existence of temperature (derivation is from C. J. Adkins equilibrium thermodynamics and paraphrased a bit here to illustrate the concept) added for anyone who wants to convince themselves of what I just said.
The condition for thermal equilibrium is described by the zeroth law of thermodynamics that is:
If two bodies A and B are in equilibrium with a third, C then they are also in equilibrium with each other.
Consider a simple example where we model a thermodynamic process involving fluid of fixed mass (i.e. independent of mass).
The condition for thermodynamic equilibrium for function, F of two arbitrary states,with body A at state 1 and and body C at state 3. (You may have plotted a p/V indicator diagram so it will help you to think of this now)
$$F_1=(p_1,V_1,p_3,V_3)=0$$
Next the condition for equilibrium for body B at state 2 and C at 3.
$$F_2=(p_2,V_2,p_3,V_3)=0$$
Solving both for $p_3$
$$p_3=f_1(p_1,V_1,V_3)=0$$
$$p_3=f_2(p_2,V_2,V_3)=0$$
and equating the two:
$$p_3=f_1(p_1,V_1,V_3)=f_2(p_2,V_2,V_3)$$
Solve for $p_1$. The reasoning for this change of variables did actually confuse me for a little while, but it is again just a matter of being comfortable manipulating expressions.
$$p_1=g(V_1,p_2,V_2,V_3)$$
$$F_3=(p_1,V_1,p_2,V_2)=0$$
$$p_1=f_3(V_1,p_2,V_2)$$
$$p_3=f_1(p_1,V_1,V_3)=f_2(p_2,V_2,V_3)$$
$$p_3=f_1(p_1,V_1)=f_2(p_2,V_2)$$
$$\Phi_1(p_1,V_1)=\Phi_2(p_2,V_2)$$
Which gives the conditions for thermal equilibrium  the existence of temperature as a function of p and V.
Hence the result expressed earlier.
$$\Phi(p,V)=T_{empirical}$$
This should convince you that temperature and energy are not the same thing!
Comment: Downvoter care to explain?
Comment: I saw ;-) I do also see what you mean now about the degrees of freedom bit now. I think I misused the word depend there. I'll change it.
Comment: Concerning the first question, I think the first dimensional argument why temperature and energy are not the same is a good one, and indeed it could be that this is all what the OP wanted since the question is titled "Dimensional Analysis".
Comment: the rest confuses me a little bit. For example as Johannes said in his answer, temperature is the kinetic energy of a degree of freedom, so I think it should not depend on the number of degrees of freedom as I see it. In a system with different kinds of degrees of freedom in extreme nonequilibrium each degree of freedom can have its own temperature. In theormodynamics and statistical mechanics, the temperature is the intensive quantitiy (it does not depend on the size of the system) which corresponds to the energy of the system, so they are related.
Comment: When deriving the equilibrium state by maximazing the entropy, the temperature is the Lagrange multiplier corresponding to the energy.
Comment: @Dilaton I don't think energy and temperature are the same thing. This is what I am saying with the derivation. It is a bit of an aside but essentially it should just to show that temperature has a dimension of its own.
Comment: yes I know and I think the dimensional argument is a good one. Now the downvote seems to have been compensated ;-)
Answer: Heat is the total energy of the molecules in a body caused due to there random kinetic movement. Thus, heat depends on the size of the body, as more the size of the body, more the molecules in the body, and more the molecules moving, more their combined kinetic energy, more the heat. Thus, a hot tub and a pan which have water with the same temperatures, may have varying amounts of heat, because the hot tub has more water and thus, more vibrating molecules.
Temperature, on the other hand, is the quantity which actually tells the hotness or coldness of a body. It DEPENDS on the AVERAGE kinetic energy of the molecules constituting the body (which is misinterpreted by some who think that temperature IS the average kinetic energy of the molecules constituting the body, who argue that it should be measured using the unit of energy.) Two bodies with the same amount of heat, may have varying temperatures, because the heat may either be caused due to there size or their temperature. For example, a large hottub and a pan which have the same amounts of heat, may vary in temperatures because the heat in the hottub is caused due to the large number of molecules while the heat in the pan is caused by the high temperature of water. Thus, heat depends on the size of the body and its temperature.
Here is a real life situation which might give you the difference between heat and temperature:
As discussed earlier, heat depends on size of the body and the bodies temperature and the temperature of the body. But in that definition, shouldn't a large iceberg have more heat then a hot pan (assuming you have not heated the water to like, a million degrees kelvin/ celsius/ fahrenheit)? Suprisingly, yes! But then why does the iceberg feel so cold and the pan so hot to touch? This is because we do not feel the heat of a body as much as its temperature. Temperature is the quantity which actually tells us the thermal state (hotness or coldness) of a body. It is true that increase in temperature results in increase in heat, but temperature is definitely not a measurement of heat!
Comment: See Magpie's answer. What you're saying is very unclear; are you saying the same thing as Magpie? .
Comment: Ok, with the anonymous paragraphing, I think it's clear enouggh now.
Comment: This is the only answer that explains it clearly to layman me.
Answer: From the phenomenological point of view of thermodynamics, the unit of temperature is somewhat arbitrary and has been fixed by historical 'accident' - as long as
$$
Q = T\cdot\Delta S
$$
ends up being an energy, everything works out.
From the point of view of statistical mechanics, it makes sense to make the entropy $S$ unitless, same as the probabilities in terms of which it is defined.
This corresponds to setting Boltzmann's constant $k_B=1$ and makes temperature an energy. This as well as further unifications (like setting speed of light $c=1$ to unify the dimensions of space and time as well as mass and energy) are features of 'natural' systems of units.
Answer: Kinetic temperature is the average of the kinetic energies. The thermodynamic concept of temperature $T$ is more general.
Temperature measures the partial ratio of energy to entropy changes $T\equiv (\partial E / \partial S)$. Temperature cannot be considered an equivalent of energy, because the concept of entropy is needed for the definition as well. Notice from the definition that energy is an extensive quantity whereas temperature is an intensive quantity. It is possible to have a composite system with a given energy, but without a thermodynamic temperature (e.g. a composite system made of two thermally isolated solids: one hot and the other cold)
Using the fundamental equation of thermodynamics we find that $T=T(E,V,N,\dots)$, which implies that the concept of temperature surpasses that of energy. For instance, temperature can change whereas energy remain constant.


Is it OK to write $z^{1/2} = \pm z^{1/2}$, where $z \in C$?

Question: In particular, is it OK to write $z^{1/2} = - z^{1/2}$, where $z \in C$?
Comment: $z=-z$ implies $z=0$
Comment: Is it okay to write $i=-i$?
Comment: Usually, neither is.
Comment: http://mathworld.wolfram.com/ComplexExponentiation.html
Answer: No, not at all. First of all, $z^{1/2}$ is ambiguous, since every non-zero complex number has two square roots. So, unless you explain first how you are choosing a square root, don't use $z^{1/2}$ and, for the very same reason, don't use $\sqrt z$.
Besides, in $\mathbb C$, $a=-a\iff a=0$.
Comment: Does the ambiguity of $z^{1/2}$ not make it okay to write $z^{1/2} = -z^{1/2}$ because $z^{1/2}$ represents two values, which are basically $\sqrt{z}$ and $-\sqrt{z}$? Similarly, $a = -a \implies 2a=0 \implies a=0$ for complex numbers, but can one actually say, $z^{1/2} + z^{1/2} = 2z^{1/2}$?
Comment: No, it doesn't make it okay. If you want  that $z^{1/2}$ is a number,  then you simply cannot have it equal to its symmetric, unless that number is $0$.
Answer: Usually, when we write an algebraic expression such as $z^{1/2}$, we are assuming that it has a unqiue value. For example writing something like $z^{1/2}=i=-i$ will give you some weird looks, to say the least. Sure, what you mean by this could be that $i$ and $-i$ are the values which satisfy $z^2=-1$ (which is true), but this is not how you denote it. For the same reason $z^{1/2}=-z^{1/2}$ is not acceptable notation.
Furthermore, as José states, writing $z^{1/2}$ is already frowned upon as it is not clear which square root of $z$ is intended (since there are two possible values). So to even use this notation, be sure to define it first (e.g. as the root with the smallest argument).
Comment: "Sure, what you mean by this could be that $i$ and $-i$ are the values which satisfy $z^2=-1$..." That is exactly what I meant when asking this question. Thanks for information about the general perception of using $z^{1/2}$. This was essentially a query about the acceptable notations. Having said that, is it possible to interpret this equation as basically stating, $z^{1/2} = \pm \sqrt{z} = -z^{1/2}$; and does it then become acceptable in this regard? Also, often in textbooks, especially Physics textbooks, $a^{1/2}$ is used instead of $\pm\sqrt{a}$; it is also incorrect notation?
Comment: @AB Note that notation is correct if and only if it is generally "perceived" as being acceptable. So the "general perception" of $z^{1/2}=-z^{1/2}$ being frowned upon can be rephrased as saying that it is plain wrong. No, $z^{1/2}=\pm\sqrt{z}=-z^{1/2}$ is not acceptable. Although it is true that $\pm i$ are the roots of $z^2=-1$, **this is not how you denote it** (like I said in the part of that sentence you didn't quote)! And I strongly doubt any textbooks use $a^{1/2}$ in place of $\pm\sqrt{a}$, and strongly suspect they've properly defined $a^{1/2}$ to mean one value and one value only.
Comment: Thanks for clearing that up. In Introduction to Quantum Mechanics by Griffiths, there is an equation on page 23, which goes like: $\int_0^h \frac{1}{2 \sqrt{hx}} = \frac{1}{2 \sqrt{h}} (2 x^{1/2}) |_0^h$. Would it be more appropriate to write: $\int_0^h \frac{1}{2 \sqrt{hx}} = \frac{1}{2 \sqrt{h}} (2 \sqrt{x}) |_0^h$ ?
Comment: @AB Is $x$ here a real or complex quantity?
Comment: A real quantity.
Comment: @AB Indeed, so there is no ambiguity here whatsoever. The integral is taken over the interval $[0,h]$ (assuming $h>0$), and $x^{1/2}$ for real $x\geq0$ is understood to be the positive square root of $x$. So in this case $x^{1/2}$ and $\sqrt{x}$ are equivalent.


Join GPS data and video from UAV to get frames from specific locations

Question: Is there any piece of software capable to present gps track simultaneously with video ie. google maps data and allowing to clip a frame on selected locations on track? Both data and video are from Phantom 3 Advance
Answer: You can use the Qgis 3 plugin Video Uav Tracker.
Comment: Thanks for answer. I find VUT as a beta plugin to earlier version of qgis and it did what i want to ;)


Refreshing and bubbly

Question: What would be the english equivalent of bubbly and refreshing to describe something like a soft drink? What other words could be used to describe aspects of a soft drink, like the fizz and pop?
Comment: Can you give an example using 'pop'?
Comment: @NS.X. e.g., "The sparkling water made fizzing and popping noises as the dissolved CO2 came out of solution"
Comment: You mean what would be the Chinese equivalent?
Answer: Not sure how literal you are trying to be, but if you want to say that this is a sparkling drink as opposed to a flat drink, 有气 or 有气泡 is what I've heard.
On the other hand, foods and drinks can be described as 爽快 (Shuǎngkuài), meaning refreshing, puts you in good spirits, etc. 爽 can also be used to describe a good feeling or state, i.e. 我感觉很爽 after a good meal or experience.
Answer: To say soft drink is refreshing, there are some common words like

提神 (spirit-lifting)
醒脑 (mind-awakening)
消除疲劳 (fatigue-removal)

E.g.

喝点柠檬茶提提神吧。How about some lemon tea? It's refreshing.
碳酸饮料的醒脑效果来自咖啡因。Sodas are refreshing because they contain caffeine.

Some other words that also mean refreshing but have a strong implication on the taste:

清新 (fresh and pure) this word implies a 'fresh' flavor like lemon or mint.
清凉 (fresh and cool) this word implies the drink is cold and has 'fresh' flavor.

These words are best suitable for drinks like: lemon water, ice tea, cold beer;
Not best fit but okay to use for drinks like: Coke or stout;
Not suitable for drinks like coffee or Gatorade. (Unlike 提神 and 醒脑, which are totally suitable for describing coffee.)

To say a drink is sparkling, people say

饮料有气(泡) (the drink contains air bubbles)
苏打饮料 (soda drink)
碳酸饮料 (carbonic acid drink).

碳酸饮料 is a common term in Chinese, not 'nerdy chemist language'.

To describe the popping or fizz sound, there are some onomatopoeia words like

砰/嘭 (loud pop)
噼/啪 (mild pop/crack noise)
嘶 (hiss/fizz)

E.g.

可乐的气泡噼噼啪啪作响。The bubbles in the coke are making cracking noise.
他拧开瓶盖,汽水发出嘶嘶的声音。He opened the bottle and the soda started to fizz.

In spoken language, you can use any imitative voice, not limited to those have onomatopoeia characters.
Comment: Very comprehensive answer.I would add 清新 for pure and fresh.
Comment: @QuestionOverflow Good suggestion, I'll think about phrasing and update later. 清新 or 清凉 are some properties (most likely flavor or taste) of a refreshing drink, but not 'refreshing' itself.
Answer: Normally I'd look on a list of Chinese onomatopoeias, but soft drink sounds aren't listed.
The second option is to look at dictionaries for Chinese translations of English onomatopoeias, which leads to adequate answers (for example you can search Google for "XXX in Chinese"):

fizz = 嘶, 嘶嘶

"Pop" is problematic though; first it also means "popular music", and second the translation is 砰, which is more of a loud pop, bordering on a bang - the sound a balloon popping would make. In this case I'd avoid looking for a Chinese pop, as you can't really hear popping sounds from soft drinks anyway - fizz is adequate.

Refreshing and bubbly


How do I gently bend 4 bottle sides inward simultaneously to create a uniform dent?

Question: Trying to create a dent on 4 sides simultaneously on a roundish square bottle. But first in order to get it symetrical I should find away to select the same face area on each 4 sides.  Ideas? Suggestions?
Comment: I'm surprised no one has suggested proportional editing yet
Answer: May I suggest a Lattice?

Create a Lattice object, and link it to the bottle with a Lattice modifier on the bottle object. Set the Lattice object to an acceptable resolution, and in Edit mode, move some lattice vertices closer to the center with the Scale transform tool. The deformation depends on the subdivision of the lattice and the selection of vertices. Experiment until you find the correct values for your situation.
Comment: Seems by the Lattice modifier animated example above I won't get the square-ish effect, rather rounds the whole thing(?)
Comment: @Marc More subdivisions on the lattice should help with that.
Comment: This is not a reliable modeling technique.
Answer: What may be the easiest is to just use a Boolean modifier> difference. While in top orthographic view, you can place your difference objects where you need them, perhaps start with a uv sphere. After placing the first uv sphere, press  Shift+D, then move the duplicate across on the x or y axis and repeat until you have your four target objects.
To make placement simpler, select your press  Shift +S>cursor to center, then  Shift +S selection to cursor after selecting your object while in object mode. Add a uv sphere, and press G then X or Y and move the object accordingly. Repeat for the three remaining spheres.
Add your Boolean modifier>difference to your bottle object, with 'sphere' as the target object. Then add another Boolean>difference with "sphere.001" as the target, and so on. Then apply the Booleans in the order added, and you should be all set.
Answer: You could cut the bottle into fourths and then add a mirror on both the Y and X axis. From there you can easily indent the bottle by simply moving a vertex with a connected constraint to it.
Comment: Welcome to Blender.SE MadDog!  Please try to add some more details, like maybe a screenshot or [GIF](http://meta.blender.stackexchange.com/questions/963/what-is-the-process-for-creating-gifs-for-questions-and-answers) of how this is done.  Thanks!
Answer: Using high dense objects in this kind of modeling is wrong.

Low density topology is more easy to manipulate

I would suggest using subsurface modeling.

Add a cube and subdivid it one time and scale the middle loop inward a bit.
Add a subsurface modifier.

Now extrude couple of time to get the shape of the mouth of the bottle.
Use the circle operation from the loops tools to get a perfect circle at the top.

Add a bevel modifier and set it to weight,mark the lower loop with edge bevel weight,This will make the lower loop a sharp one.

To add the indentation we will select every side and insert a face using the insert tool with the ratio 0.5 and then by using the circle tool,convert it to a circle and then scale it with the factor 0.8 in its axis.(make sure the new edges don't have bevel weight).

Select all the new faces and then extrude them inward and mark the exterior and the interior edges with bevel weight.

and by this you have your bottle.with a clean and nice topology,you can do some more edits to math your references.
Answer: For future models you should remember to place objects in the center, wich makes symetrical and precise editing a lot easier.
Doing that later can be a bit tricky.
For doing the circle i would suggest not to select square faces like you, but rather adding a circle from the add-menu, rotating it 90 degrees along the x-axis, aligning it along the z-axis and pulling it towards you, so it is in front of the mesh. then you would want to use a knife project:
Cutting a shape out of an object with another object
get the circle behind the bottle (move along y-axis) and change the view with numpad 4 or 6 to the back and do the same.
repeat that for the sides.
when you're done with that you can select the circles with shift+alt+right mouse button in vertex mode and scale them to your needs (if you select front and back circle/ left and right you can scale them along just one axis to move them in.
it's actually pretty simple.
Comment: there might be faster ways. you could use the cut through option to save a few keystrokes. + for precise editing you can always set values for moving, extruding and scaling via your number keys. (for extruding for example you press e, x/y/z and then something like 0.2 to extrude the mesh 0.2 blender units along the desired axis)
Comment: Wow, thanks. Sounds like it would work. But unfortunately that's way beyond my current modeling abilities. I'll just mess with selecting each side one by one and using "O" in edit to dent each side.
Comment: i'll see if i have some spare time in the next days and depending on that i'll upload and link a video explaining it, so a beginner can understand and follow the steps (it's really simple, trust me. these things come with time, experimenting and practice. then you'll be able to figure out the most things on your own)
Comment: I'm grateful. Thank you. But just as I attempt to work thru it on my own now anyways... It seems like what you're describing is like a boolean operation whereas I'm sectioning one object from another.. so with that in mind don't you mean add a sphere? Not a circle? A circle is flat so cutting something flat from this does not seem like it will make a dent. If that makes any sense a'tal.
Comment: nah, i don't mean boolean. a circle, not a sphere, because it's not about erasing something of the bottle, but rather "burning" the shape of the circle into the bottle and then moving the faces inside of that "burned" circle inwards (:


Doctoral program vs Doctorate prgram

Question: If I am referring to a PhD program, is it better to say "Doctoral Program" or "Doctorate Program"?
Answer: Doctoral would be the better choice. Doctoral is an adjective and doctorate is a noun. The degree is a "doctorate," and you might call the program itself a "doctorate" (as in "my doctorate took six years"), but a Google ngram shows that the phrase "doctoral program" is much more common than "doctorate program." This is probably because it's more natural to modify the noun program with an adjective. (Though it's not impossible for a noun to act like an adjective and modify another noun—"The Mitchell house," "my car keys," "school transcript.")
Comment: It might be good to add that while "Doctoral Program" is *by far* the *better* choice, "Doctorate Program" is not *wrong*, and is still idiomatic.

Doctoral program vs Doctorate prgram


HTTPS is not green and there is no padlock icon, is it safe for a debit card payment?

Question: I was about to pay online with my debit card, but now I'm not sure, is it safe ?
Comment: No it is not safe, your browser is advising you it is not safe.  It's hard to tell from your post exactly why this is, this could be because of mixed content, it also depends on your browser.
Comment: "Is it safe ?" "You should not enter any sensitive information on this site (for example, passwords or credit cards)". Well it says nothing about debit cards! /s
Comment: @iainpb That should really be an answer, shouldn't it? You're missing out on *points*!
Comment: I've just contacted to the Cloudbeds team and now the HTTPS is green. ;)
Comment: Thank you! I'm in a hotel booking site, and it is strange, because when I'm choosing a room, https is green, but then when I click "next" to make the payment with my card info, https goes grey. I'm using chrome btw.
Comment: Some of the html content is being delivered to you from an unencrypted domain. You can see in **uBlockOrigin** which domains are connected to that site. Attacker can modify those unencrypted contents and can inject its own malicious javascript code to steal your credentials along with OTP.
Answer: Note: this question is a few years old and browsers are changing how they report issues with secure sites over time.  The below answer still describes why some problems may exist but the way the browsers show it may have changed.  For example, sometimes browsers may block non-secure elements on a secure page instead of loading them and showing a warning.
The little "i" in a circle contains important information regarding why the HTTPS or site name is not green or shows no padlock.  In this case the explanation is that the connection is not secure - a suitably vague warning intended for average users, but nonetheless correct and worth trusting.  The "security" tab in the developer tools accessible by F12 key can often give more info if you are that way inclined.|
Why is it not secure even though it says it's using HTTPS?
Based on the notice it's giving, in this case the likely (but not definite; this is an educated guess) explanation is that while the page itself uses HTTPS, the page contains items on it which are fetched separately over plain HTTP.
This may sound like it's not a big security issue, but if any of the fetched items have been modified by an attacker it is possible for them to modify the page in misleading ways or even read and steal private information from the page, even though the rest of the page was initially fetched over HTTPS.  Scripts included in the page may read anything you type into forms or text fields.  CSS may modify the page to trick you into pressing something or submitting something.  Images may make the page appear to be something it isn't or try to exploit bugs.
Browsers respond to this problem in varying ways, but at minimum they indicate that the page is "not secure" in the location bar somehow.  They may display a warning and they may also block loading some elements on the page.
Why is it sometimes green but sometimes not?
This issue is usually an accident on the part of whoever built the website: they forgot to ensure some of the items on the page are using HTTPS.  Different pages can fetch different items: images, scripts, styles.  Sometimes one of the scripts fetched by a page can in turn fetch scripts of its own, and then the page is marked insecure due to a fault by a third party script that the owner of the website may not have anticipated.
What's an appropriate response?
On any page that is not marked as secure by your browser, you might choose to avoid entering personal or credit card information.  You could report the problem to whoever owns the site (as it could be losing them sales).


College student interested in starting a stock portfolio, how much should I invest?

Question: I have about 6k in my bank account, Ill be graduating next year with about 20k in loans. I want to start investing now though, how much of my savings do you think I should invest in a stock portfolio.
Comment: Welcome to money.SE .  Too little detail here. What is the loan rate and monthly payment? What kind of job will you get? How does that job's income compare to cost of living in the area you'll be? Once we know this, some good answers will follow. (Also pls add a country tag.)
Answer: You should invest a trivial (<500$USD) amount of money in a stock portfolio. If you aren't able to make more on the market than the interest rates of your loans, you are losing money. This question has discussed this topic as well.


Parenthetical plural of unique examples

Question: Sometimes media announcers, especially sports and business reporters, will make their examples plural, or parenthetically plural, even though those examples are obviously unique.  For example, an NPR announcer recently referred to
"The Googles and the Apples," When citing very large Silicon Valley firms, like only Google and Apple can be.  Sports announcers will often make players names plural, when citing them as examples of one thing or another, even though the players are obviously one of a kind.  Is there a name for this behavior, and is it correct in any way?
Answer: This is a kind of metonymy. Within the realm of metonymy, it is a case of synecdoche; more specifically, it is a pars pro toto, but applied in a peculiar construction, pluralising the pars. (In a way, metonymy is a subclass of metaphory.)
Comment: Does this qualify as a link-only answer?  :-)
Comment: @hel If that is your preferred term, why not! I would call it a comment-turned-annotated-answer...

Parenthetical plural of unique examples


YUV Overlay in SlimDX / DirectX?

Question: I decode a video file using ffmpeg and once decoded I get a YUV image.
How can I display this YUV image as an overlay to a surface (or texture ?) using SlimDX / DirectX ?
Thanks.
Answer: You can create an offscreen with color format YUV.
get a pointer to the offscrren with lockBits.
copy the data from the ffmpeg buffers to the offscreen buffer.
release the lock.
using the device->stretchRect method to copy your image to the required position in your surface.

YUV Overlay in SlimDX / DirectX?


Magento 2 create Order programatically and set a custom date to it

Question: I have a order to create an order in magento 2. But the order it create is with the date when i run the script. I don't want to save the current date for the order. I want to set a certain date to the that order.
Answer: A tricky wat, you set your desired time to  created_at field
Magento 2 has a method setCreatedAt()   and using this method can set Order created time.
So add below code after the end of your order creation code and run  update() of this code.
public function __construct(
    \Magento\Sales\Api\OrderRepositoryInterface $orderRepository,
    \Magento\Sales\Model\ResourceModel\Order $orderResourceModel
) {
    $this->orderResourceModel = $orderResourceModel;
    $this->orderRepository = $orderRepository;
}

public function update()
{
    $order = $this->orderRepository->get(1); // 1 is  order id
    $order->setCreatedAt($createdAt); // set time
    $this->orderRepository->save($order);

}

Comment: No it didn't worked.
Answer: Finally i found the solution.
My question was not fully complete. Sorry about that. I wanted the order date to be on certain date. The order is not yet created. I am creating the order using my custom code. To create an order i need to create Quote. So if i change the quote create and update date then i reflects to order date too.


90s cartoon about guardians against nightmares

Question: In the 1990s, I saw an animated show about some guardians of dreams that protect children's dreams against nightmares. I dont remeber much, only that they travel in pillow-like space ship and there was a rule that the kid can't wake up because they die or something. Does anybody know this show?
Answer: Maybe it is Captain Zed and the Zee Zone.

Captain Zed and the Zee Zone is a short-lived CITV television series, airing in the United Kingdom. When children go to sleep it is Captain Zed's and his Partner PJ job to prevent children from having nightmares in the dreamzone. The 26-episode series was animated by the Collingwood O'Hare studio and co-produced by DIC Animation City & Scottish Television (now STV Central) in association with HIT Communications PLC.

Captain Zed flew around in a pillowshaped spaceship.
His main enemies were the shape-shifting creatures Mutter and Snort that wanted to cause nightmares for everyone.

I do not remember if the children were unable to wake up, though it is possible that they where stuck in the dreamworld until the nightmares was gone. Getting killed in the dream was generally considered a bad thing, and something the nightmares did their best to do to Captain Zed and his crew. Still no one tried to wake up as an option to get back to safety but preferred to deal with the situation from the inside.
The show was ment for younger kids and only lasted one season.
Comment: Yes, thank you! This is it... I thought it was a dream :D
Comment: Glad i could be of help
Answer: Could this be The Dreamstone?

The Dreamstone is set in an alternative world called 'The Land of Dreams,' and concerns itself principally with the struggle between good (personified by The Dream Maker, a Merlin-esque white magician), and evil (personified by Zordrak, Lord of Nightmares).

....

The Land of Dreams is populated by Noops (the humanoids of the land, who live and work like humans in a town called 'Noopville') and Wuts (the defenders of the land, who fly around on leaves and ward off Zordrak's evil forces with staffs that have orbs of light attached to them, through which they communicate).

I found it by searching for 90s cartoon dreams nightmares
Comment: And if so, a duplicate of [Cartoon from the 80s or 90s about a dream master?](https://scifi.stackexchange.com/questions/166079/cartoon-from-the-80s-or-90s-about-a-dream-master/166080#166080)
Answer: Slightly less likely would be Midnight Patrol: Adventures in the Dream Zone.

The series tells of four children and Potsworth the dog who live in the same neighborhood. When they go to sleep at night they turn up in the Dream Zone where, as the Midnight Patrol, they are appointed by the Grand Dozer to protect it from nightmares and other threats and are given their missions by the Snooze Patrol. Their main enemy is the Nightmare Prince.
Whilst they are in the Dream Zone, the five have special powers. Keiko has a flying skateboard; Carter can draw anything and then have it come to life; Nick is super-strong and is able to fly; his stuffed toy Murphy comes to life; whilst his cynical sister Rosie tags along. Potsworth himself acquires the power of speech which enables him to complain about the way he is treated in the real world, and make wry comments about the kids and their own attitudes and relationships. The cartoon Potsworth had a very "English" accent, even in the American version of the programmes, reflecting his real-life counterpart's British origins.

I haven't found any reference to the kids dying if they woke up, but if the Grand Dozer fully wakes, the Dream Zone ends.


What is an accurate expression to calculate IAS as a function of TAS?

Question: Does anyone know a good source for an expression of IAS as a funtion of TAS? I was hoping to find an accurate IAS equation that is only dependent upon TAS, static pressure and static temperature.
Answer: You might look at Ed William's aviation formulary.
http://www.edwilliams.org/avform.htm#Mach
From there:
<code>> The airspeed indicator measures the differential pressure, DP, between
> the pitot tube and the static port, the resulting indicated airspeed
> (IAS), when corrected for calibration and installation error is called
> "calibrated airspeed" (CAS).
>
> For low-speed (M<0.3) airplanes the true airspeed can be obtained from
> CAS and the density altitude, DA.
>
>   TAS = CAS*(rho_0/rho)^0.5=CAS/(1-6.8755856*10^-6 * DA)^2.127940
> (DA<36,089.24ft)  Roughly, TAS increases by 1.5% per 1000ft.
</code>
Note that you can go from TAS to CAS, but you will need help getting to IAS, specifically the instrument error for that AS indicator in that aircraft.
Answer: TAS : True Air Speeda
IAS : Indicated Air Speed
CAS:  Calibrated Air Speed (reference airspeed based on  an idealized Pitot tube)
IAS = CAS + Ki, where Ki is an error component specific of your instrument
The conversion between TAS and CAS (and IAS) needs also to take into account the variation of air density (i.e. altitude).
So the conversion requires a bit more parameters.
A good answer is provided here:
How do you convert true airspeed to indicated airspeed?


How is Maoism differentiated from classical Marxism Ideology?

Question: Is this because China hads then a predominantly rural economy so the standar suppositions about the proletariat (and lumpen-proletariat) didn't hold?
If this is right how did Mao modify the theory?
Answer: Marxism talks of proletarian revolution arising out of the class conflicts in the society and to be led by the working class. Maoism talks of a protracted peasantry revolution by eliminating the class enemies by guerrilla warfare. Maoism believes in extreme violence as the only weapon to seize power.
The key differences are in the Maoist focus on an aggraian rather than industrial society and the degree of violence to be employed in the revolution. Marx advocated strike action and other basically peaceful demonstration with escalation to more violent forms of protest if this proved uneffective. Examples of this can be seen in the labour union disputes of 1970s britain and the early days of the actual russian revolution.
Maoism goes much further, advocating extreme violence and guerilla warfare of the sort the viet cong engaged in in the Vietnam war.
Answer: Perhaps it could be said that Mao was a Marxist, modifying the theory for the problems he faced in China. The most famous difference is the ascendency of the peasantry, but there's also guerrilla war and the "cultural revolution".

A large segment of the population was forcibly displaced, most notably
  the transfer of urban youth to rural regions during the Down to the
  Countryside Movement. Historical relics and artifacts were destroyed.
  Cultural and religious sites were ransacked.

Lots of Communists have modified or expanded upon Marxism, here and there.
But whatever his Marxist credentials, Mao was in no way a Communist as Marx understood the term, or any sensible Communist Party. Contrast the Paris Commune and the People's Republic of China.
Comment: Sure; its interesting to speculate why Mao started the Cultural Revolution; I'd suggest it was the link between high culture and the  elites of the ancien regime.


How do I create floating Islands and lava columns?

Question: How can you create these formations? I've seen them in some pics but they seem pretty hard and I have no idea how you can even manipulate lava.  I'm new to Minecraft but I've been hooked!
Comment: Just a FYI since you have to reach your floating island somehow: instead of a bridge you can use a [water elevator](http://www.minecraftwiki.net/wiki/Water#Water_Elevators)
Answer: Floating islands are generally natural formations that are made on the map, however you are free to create them yourself.
Basically, any block outside of Sand and Gravel do not actually obey gravity, and simply stay in place when the block below them is destroyed (or when placed adjacent to another block with nothing underneath it). Using this simple concept, you can create your own floating platforms by first building using a grounded scaffold, and then destroying the scaffold.
If you "sneak" (check your configuration for the key) then you will not fall off the edge of any block, so you can place several adjacent blocks while on top of your platform by looking over the edge of the platform and placing a block. This will allow you to create vast floating platforms.
As for lava you need a Bucket crafted and a lava source block, that is, a block of lava that isn't "flowing". You can than harvest the lava source block while holding the bucket and right clicking on the lava source block. You can then place this like any other block (and lava will start to flow from the source block).
Comment: Instead of building a new structure you could find a nice mountain and remove the bottom.
Comment: Thanks!  And I think the suggestion to make the scaffolding out of wood is nice, then i can just burn it !! :D  And the sneak trick is awesome!! Never understood its purpose before.
Comment: I routinely use sneak when mining.  It's especially important if you're deep down.  By sneaking while mining you'll never have the experience of falling in a hole because you just moved into the space of the block you chopped and it was hollow underneath.  Normal cave falls aren't going to cause much injury but if you're deep it could be lava down there.
Answer: You can manipulate lava via buckets, which work on lava just like they work with water. Right click to collect a lava source block,
For floating islands, ducking is very useful (you won't fall down while you duck, which makes it easier to build horizontally.
Comment: Alas, I have yet to find a good way to build *down* from a floating island.
Comment: @Raven Drop down enough sand/gravel to act as a foundation to duck and build upon.
Comment: that's *a* way, but not always a *good* way, and sometimes not even a way at all, such as when building out over lava, etc.
Comment: there really is no way to build down. Its best to find the nearest wall adjacent to you and build out a scaffold from there. Make it wood for easy burning action.


Dual-purpose pins on MAX 10 FPGA

Question: I am breaking into the world of FPGA development at my internship for an aerospace company. I keep coming across the term "Dual-Purpose Pin" in the documentation for the MAX 10 family of FPGA devices.
I cannot figure out what this means, since these pins seem to each have one purpose (like DEV_OE, for example) yet they are referred to as Dual-Purpose. Can someone explain this to me?
Answer: These pins can be used for a specific purpose or used as general userI/O pin, this is the reason why they are called "Dual-Purpose Pin".
Take DEV_OE for example. If you enable "device-wide output enable" function in Quartus, this pin is used to set all outputs tri-stated or not. If you disable this function in Quartus, this pin is available as a normal use I/O.
Answer: Some of the pins can be used for transcievers/recievers and diff pairs. Most pins can be used for general purpose I/O, you can choose what their use is in the pin planner in quartus.

Dual-purpose pins on MAX 10 FPGA


Power Automate Flow doesn't fire when submitting from PowerApps

Question: I have a PowerApps app that uses a SharePoint list as a data source. There is a Flow associated with that SharePoint list that is set to trigger when an item is added or updated. When I submit an item to the list from PowerApps, the item is created, but the Flow does not fire. If I create or edit the item directly in SharePoint, the Flow triggers and runs as expected. Is this a known bug, or do I have to design the flow differently?
Comment: Here is a link showing some [troubleshooting tips](https://docs.microsoft.com/en-us/power-automate/triggers-troubleshoot)
Comment: Do you have any trigger conditions configured for the flow? If so, perhaps creating the list item in PowerApps is not meeting those trigger conditions.
Comment: I found the issue- it was the trigger condition- I had a condition set to prevent the flow from re-triggering itself by editing the item. That trigger was blocking the flow from running at all.
Answer: I found the issue, thanks to Matiur's link to the troubleshooting tips. I had a trigger condition set to prevent the flow from running if the triggering entity was the service account we have that we used to build the flow. That prevented it from firing at all when it was triggered from PowerApps.


How to output to a compiler's console and how to stop the build when an error occurs from an external tool?

Question: I have a tool that is added to the build-chain.
I am wondering how to redirect stdout to all compiler consoles and also, how do I break when an error occurs while executing that external tool?
Answers are sought for modern common compilers. If there is a generic process or if it can be done automatically let me know.
Comment: The problem is that it should be portable
Answer: in Visual Studio, simply have your external tool printf to stdout, and return a non zero code from main().
Comment: printf? I cannot use cout? How about GCC?


Kentico Claims-based authentication SAML 2.0

Question: I'm doing some research for the company I work for trying to determine if we're able to utilize Claims-based authentication within our clients application. According to this web-page Kentico offers out of the box built in support for SAML 1.0 but version 2.0 isn't supported. Our client wants to use version 2.0 because it is the latest standard which seems like a reasonable desire. This web-page mentions that Kentico is able to implement custom Claims-based authentication but I'm not sure how to go about doing that, or if it's worth the effort. It seems that if it were an easy task Kentico would have switch to version 2.0 by now. Does anyone know if there is an "easy" way to utilize SAML 2.0 within Kentico? Thanks.
Answer: I guess it depends a little on your definition of "easy", but there is no automatic nor out-of-the-box way to integrate SAML 2.0 with Kentico currently (especially if you want to do more than just authentication and actually use the info in the claim for something like role based authorization).
However, with that being said, we have accomplished SAML 2.0 integration with Kentico many times (both authentication and authorization) through custom code at my company, so it is possible. But it requires you to write custom code to do pretty much everything.
Also, let me add that with Kentico MVC the story is getting a little better. Check out this link on external authentication. But again, you are writing a lot of the code.
Comment: Unfortunately we are using Kentico via webforms so I don't believe we have ASP.NET Identity. I'm currently in the process of trying out a library. https://github.com/Sustainsys/Saml2/


I see dead people

Question: So it is a popular quote in The Sixth Sense movie. But I wonder if it could be used  when you are seeing dead people at the present time. Because I think it sounds unnatural when it is said "I am seeing dead people". And people ask from someone who is seeing this at the moment "What do you see?" not "What are you seeing?". So HELP I am tired of this English thing, so many paradoxes, I am neither American nor British.
Comment: Whether you are talking about past, present, or future must be established by the context of the sentence.
Comment: You're correct. Certain verbs like *see* are rarely used in the progressive form: a related question is [Is it really wrong to say "I'm hearing"?](https://english.stackexchange.com/questions/150616)
Answer: Sorry, I may have missed the basis of your question, but I'll try and clarify it as much as possible for you.
Well, grammar-wise it's perfectly okay. "I see dead people" is a sentence in the present tense, so it seems to fit. You're right that most people would not say, "I am seeing dead people" but that's grammatically correct as well.
About "What do you see?" and "What are you seeing?", both of them are used in variable contexts. If the person sees something momentarily, or has just seen something, you would use the first question. If the person has been looking at something for a while, then you would use the second, but personally I would not use the verb 'see' there - it just feels out of place.
To return to the topic, the quote is grammatically valid, even though it's logically messed up, because "How do you see dead people?" I hope that clears your doubts, and please tell me if I completely missed the point of your question.
Comment: Sorry for missing the basis. I am asking that how do people differentiate whether it is  Past Simple or Present Simple. But as Hot Licks said, I think it depends on the context of the sentence whether it is Past Simple and Present Simple. Also correct me if I did any grammatical or composition mistakes. Also thanks for answering, it really did help me.
Answer: Firstly there is a difference between US and British English. I shall answer for my variety of British English.
"I see dead people." -  This means that I regularly see dead people. This might be said by a mortician for example. Seeing dead people is part of their job.
"I am seeing dead people." - This might be said by someone who is having a hallucination but doesn't believe it represents reality. It means "I am currently seeing dead people at this very moment".
"I can see dead people." - This says that right now there are actual dead people in my field of view. Someone might say it when looking at a battlefield.

The above examples are not exhaustive. There are contexts that could change the meanings. I have avoided giving them so as not to confuse you further.
Don't expect English (or indeed any human language) to be entirely logical. You cannot learn a language by simple rote memorisation of rules. You need to read and listen to actual people speaking.
Note: It is a good idea to decide whether you want to learn American or British English (or some other variety) and mention that when you ask a question.
Comment: Also "I am seeing dead people" = "I am involved in informal romantic relationships with dead people"
Comment: Thanks for your answer! really helped

I see dead people


What version of Ubuntu for MacBook Pro (Intel)?

Question: first-time poster, fairly long-time Ubuntu user, zero Mac experience.  Trying to help a friend select a version of Ubuntu for her MacBook Pro (Intel Core2 Duo 2.53GHz chip).  Having a tough time finding a version to download and my Google-fu is failing me.  Can someone post a direct-download link for an image of 13.04 that will work on this hardware?  I see a lot of different versions but am unsure which to use.  Ideally we'd like one with a "LiveCD" option, so she can try it out prior to committing to a full install.  Thanks!! :)
Answer: I too have a Mactel, Core 2 Duo 2.4GHz triple-booting Ubuntu 13.04, OS X and Vista using rEFInd.
Look for Mac ISO in:
http://releases.ubuntu.com/raring/
Core 2 Duo should be able to use 64-bit linux.
You could also use UNetBootin for Mac to automatically download and create a live CD (pretty sure it can get you an ISO that works on a Mac.)
http://unetbootin.sourceforge.net/
Presumably your friend is not going to a single-install but is going to keep OS X on the machine as well (doesn't need much space, and highly recommended in case something goes funky with the Mac firmware.)
For instructions on how to do the installation see
https://help.ubuntu.com/community/MactelSupportTeam/AppleIntelInstallation
Pay attention to partitioning: Ubuntu needs an "msdos" type partition which is not the standard OS X uses.  Rather than create multiple partitions in OS X Disk Utility, I prefer to create "free space" and then use gparted from the Ubuntu LiveCD to format the appropriate partitions on final install of Ubuntu.  Actually if you're not triple-booting, you can probably just let the Ubuntu installer format the partition on its own.  The point is, if the instructions you are following have you creating a whole bunch of partitions in OS X Disk Utility...ignore that, you just need free space.
Note that the above and most install instructions mention using "rEFIt"; rEFInd is the newer fork.


How can food preparation increase Lectins?

Question: I just read  this articale that shows in table 2 how food preparation effects Lectins. It is said that soaking, boiling, autoclaving, germination and fermentation reduces the concentration, while roasting and baking increases it. I understand that a preparation method can denature lectins. But how can a preparation method increas the concentration of a protein?
Answer: The authors of the paper give no source for their claim that baking and roasting increase lectin content.  I cannot find any other source that supports that claim.  In general, the tables supplied with that paper lack sufficient citations, and it's just all around a bad paper.  It's a "narrative review", whatever that is, and not a study of any kind.
As such, my answer for you is that it's simply wrong, and baking and roasting do not increase lectin content.  I would also recommend against giving too much credence to any of the paper's other claims.
Comment: This is the right answer. One  of the papers ([Adeparusi 2001](https://pubmed.ncbi.nlm.nih.gov/11379294/)) referenced in the section above table 2 in the paper in question actually determined that baking removed lectins completely in Lima beans. Adeparusi published in a respected journal Nahrung/Food, now called [Molecular Nutrition and Food Research](https://onlinelibrary.wiley.com/journal/16134133). I don't see any information on baking in any of the other papers cited in that section.
Comment: This is a very good point. I tried to trace where the claim came from in the paper and couldn't find it, and I was going to put a point about that in my answer, but I (wrongly, it seems) assumed it was somewhere.
Answer: Roasting and baking drive off moisture, therefore concentrating everything else in a food. If a cooking method doesn't significantly reduce the amount of lectins in a food, but it does significantly reduce the amount of water, then the resulting cooked product will have a higher percentage of lectins by weight than the raw product.
Comment: This is a good thought, but in practice if you look at the foods where lectins could be a concern, this wouldn't happen, and most of the lectins are going to be denatured anyway. It's too broad a statement with no proof or references, and if there is a case where there's more dehydration than denaturation per gram it's going to be an edge case, and you can't make a general statement that this cooking method always produces this result (or even usually).
Answer: First and foremost, lectins are proteins, and like all proteins they can be denatured by heat, cold, acids, bases, fermentation, salts, radiation, and other ways. So, if you cook lectins at a high enough temperature to denature the other proteins in your food (and all plant and animal-based foods contain proteins), then you're also going to denature and deactivate the lectins. There is no known mechanism where cooking would increase the lectin content by converting other molecules into lectins
Second, lectins are found in many foods, though we mostly hear about them in beans (particularly kidney beans (phytohaemagglutinin)). In addition to legumes, they are found in grains, vegetables (such as nightshade), nuts and seeds, dairy, and other foods.
Third, lectins are not as evil as people make them out to be. They can definitely cause problems if eaten in large quantities, and lectins vary in their health consequences. Some lectins (like ricin) are extremely dangerous, and some lectins have some therapeutic uses. But the normal amount of lectins that you eat is fine.
I looked at the table and it seems like nonsense to me. Baking does not generate new proteins magically. The only thing I could imagine is that maybe the authors have misinterpreted something or perhaps believe that lectins that are bound to other molecules that get "released," but that doesn't really make much sense either.
I'll try to do a little more research on this, but in general I can give some advice. I teach a lecture on nutritional epidemiology, and I have studied many theories and papers over the last 100 years, and there are an unbelievable number of mistakes, fraud, p-hacking, and other problems in many studies. And sometimes what looks like a piece of evidence as the result of the study may be true in a very small circumstance depending on how the testing was done, but in general, it's going to be just one piece of evidence in a much bigger picture of a very complicated field.
So, I would say, don't worry about it. I can pretty much guarantee that baking for an appropriate amount of time is going to significantly reduce the lectins in your bread (or whatever).
Since beans are most commonly cited as being sources of dangerous lectins, the advice I give my students is to first soak them for a number of hours (I change my water once but that's not necessary) and that will reduce lectins, phytic acid, and even some of the raffinose. Then boil them for a full ten minutes to denature the remaining lectins before turning down the heat and cooking for the remainder of time and a lower and more gentle temperature.
Comment: The only thing I can think of is what Esther's answer states; if they're talking about lectin per weight, that could go up as the food dehydrates, but not the total content in a given batch of food. Assuming you're not decreasing the amount via denaturing, of course
Comment: @fyrepenguin — I thought of that too, but that's just silliness. In order to assert that baking a food increases lectins is if you're comparing against eating that food raw. So we're not talking about wheat or beans or rice. Maybe they're talking about something like a tomato. But still, there's no way that this would increase the number of lectins in it, even if you go by serving size. It is also too broad a statement. There are many ways to bake a tomato. Are you dehydrating it at a very low temperature over a long period of time or roasting it? These would have different results.
Comment: +1 . And The comment of bob1 under another answer clarified it quite well
Comment: @myklbykl I will say that the paper gave me a dim view of "Nutrients" journal's peer review process.  Like, why are they publishing this trash?  I've never heard of the journal before and I strongly suspect that it's pay-to-publish.
Comment: @FuzzyChef — agreed. I have seen a lot of things published that are highly questionable or plain wrong, yet people trust the source so they believe it. I reached out to one of the authors of this paper and I'll post here if I hear back.


I am little confused about automated testing

Question: I am confused about automated testing. In my view Automated testing is the automation of test cases. Then what are automation tools like QTP and all? Do they automate test cases like I automate a test in perl?
Answer: Software suites like QTP give a very broad tooling and or development framework to create, manage and drive tests.
I would compare suites like this as a text editor vs a full fletched IDE, both can be used to develop software, but an IDE makes life easier most of the time.
Tools like this often hide the complexity compared to running automated test from scratch with development tools.
Answer: One use of automated tests is for regression testing. After changes to the application a suite of regression tests are run to check that existing functionality that should not have changed still works correctly.
Another use of automated tests is to apply load to a system to check its performance. This can be to measure transaction timings, to see how the system works with large numbers of users, to see how the system copes at 9am when everyone logs in at the start of the day, etc.
Automated tests can be useful to run the same test case but with many different sets of input data. This is "data driving" or a "data driven test". For example, each row of spreadsheet corresponds to one test case. Ie one execution of a test, but with different values. Each column of the spreadsheet provides different data values for the test, perhaps username, password, product to purchase, quantity to buy, address, etc.
There are many other types of testing that can use automated tests.
Tools like QTP provide facilities to create and to run automated tests, also to perform analyses of how the tests performed.


Where can I find Arabic Quran recitation resources such as audio without Tajweed?

Question: I'm looking for a Quran recitation (mp3, video, application, website, ...) in Arabic which is just a simple reading of the verses without Tajweed enhancement.
Comment: Salam and welcome to Islam SE. What do you mean by without tajweed? I mean most of the Quran recitation you'll find on the net are without tajweed unless it is special quoted. As many recitation are just records from taraweh prayers. If i get you right you mean you want a Quran reading (without use of any rules of tajweed), is that correct?
Comment: Yes, a Quran reading without the use of rules, just a simple reading of the Quran
Answer: The problem with your question is that scholars say it's not allowed to recite the Quran without at least "the odor" of tajweed, so it's not allowed to read it as you would read any text. This applies especially for somebody who know it based on verse (73:4)!

Or add to it, and recite the Qur'an with measured recitation.

Note that Quran has been revealed as "mujawad" and therefore transmitted the same why!
So one is asked to learn at least tajweed of surat al-Fatiha and or do his best to learn the rules step by step. On the other hands Maliki scholars who take the -supposed- teachings of Imam Malik literally would fit. Most Imams in Morocco used to recite in such a style (with a slight application of the tajweed rules and in a neutral theme) when i was a child, but now some adapted the middle-eastern customs and teachings. But they would recite in riwayat warsh 'an Nafi' not the common and wide spread riway of Hafs 'an 'Assim.
Answer: Please check these mobile apps:
android version &
ios version
Note: It has Quran Arabic text, Translations, Transliteration,audio & Thajweed mark plus lot of functionalities.
Answer: You can find Ayat - Al-Qur'an on Play Store or App Store


Finding cases where matrix has 0, 1, or infinite solutions

Question: I have an augmented matrix that represents a system of linear equations. Some components of this matrix are unknown and are represented by $ k $. My task is to find which values of $k$ would create 0, 1, or infinite solutions.
$$ \left[
    \begin{array}{ccc|c}
      k&1&1&-2\\
      1&k&1&1\\
      1&1&k&1
    \end{array}
\right] $$
My strategy is to first reduce the matrix into echlon form, which will hopefully give me some insight into which values of $k$ will make the system either inconsistent (indicating no solutions), have free variables (indicating infinite solutions), or whatever is left (being unique solutions).
Step 1) Multiply Row2 and Row3 by $k$.
$$ \left[
    \begin{array}{ccc|c}
      k&1&1&-2\\
      k&k^2&k&k\\
      k&k&k^2&k
    \end{array}
\right] $$
Step 2) Subtract Row3 from Row2.
$$ \left[
    \begin{array}{ccc|c}
      k&1&1&-2\\
      0&{k^2}-k&k-{k^2}&0\\
      k&k&k^2&k
    \end{array}
\right] $$
Step 3) Subtract Row1 from Row3
$$ \left[
    \begin{array}{ccc|c}
      k&1&1&-2\\
      0&{k^2}-k&k-{k^2}&0\\
      0&k-1&{k^2}-1&k+2
    \end{array}
\right] $$
Step 4) Multiply Row3 by k
$$ \left[
    \begin{array}{ccc|c}
      k&1&1&-2\\
      0&{k^2}-k&k-{k^2}&0\\
      0&{k^2}-k&{k^3}-k&{k^2}+2k
    \end{array}
\right] $$
Step 5) Subtract Row2 from Row3
$$ \left[
    \begin{array}{ccc|c}
      k&1&1&-2\\
      0&{k^2}-k&k-{k^2}&0\\
      0&0&{k^3}+{k^2}-2k&{k^2}+2k
    \end{array}
\right] $$
The matrix is now in echelon form.
If $k = 0$, then the matrix will look like this
$$ \left[
    \begin{array}{ccc|c}
      0&1&1&-2\\
      0&0&0&0\\
      0&0&0&0
    \end{array}
\right] $$
With $k=0$, we have one leading variable (Row1Col2) and one free variable (Row1Col3). This shows an infinite solution set. (A line in 3D space).
Back to the matrix in step 5. We can rewrite the equation in Row3 in general form, which looks like this:
$$ ({k^3}+{k^2}-2k)z = {k^2}+2k $$
If we solve for $z$ and simplify:
$$z = {1\over k-1}$$
If $k = 1$ then we will be dividing by zero, making the system inconsistent. This is clear by looking at the initial matrix, where $k$ equaling to $1$ would create 3 identical equations with 2 different constants ($1$ and $-2$).
So we have:
$k = 0$ $\to$ Infinite solutions.
$k = 1$ $\to$ Zero possible solutions
$k \neq 0$ and $k \neq 1$ $\to$ Unique solutions.
Unfortunately this isn't the answer given to me by my book. Which tells me that:
$k = -2$ $\to$ Infinite solutions.
$k = 1$ $\to$ Zero possible solutions.
$k \neq -2$ and $k \neq 1$ $\to$ Unique solutions.
Seems like I'm making a mistake finding the value of $k$ when the system has infinite solutions, getting 1 instead of -2. I'm making an attempt to use the leading/free variable techniques described in the book. I've re-read it all a few times and it seems to make sense to me.
What am I doing wrong? Thanks!
EDIT: I see that $k = -2$ would create all 0's in Row 3, which would indicate more free variables and thus infinite solutions. But why doesn't 0 work as well?
Comment: In step 1, you multiplied a row by $k$.  **But** what if $k=0$?  You essentially just "deleted" a row and removed all information that it would have given you.  If you decide to multiply or divide a row by an unknown number, you must treat the cases where what you are trying to multiply/divide by is zero and when it is not zero separately.
Comment: Ah you are correct. Reading back it's mentioned that multiplying a row by 0 is not a valid elementary row operation. So in order to take the steps i took, i must assume that $k \neq 0$. Which leaves -2 as the option where the system has free variables and thus infinite solutions. Thanks!

If you post your comment as an answer I will accept it.
Comment: @Variable: It's assumed for these problems that i do not know about determinants. That's for a later chapter. These problems should be solved using basic direct methods of solving systems of linear equations.
Answer: JMoravitz gave me the answer. Step 1 is not a valid operation if $k = 0$, so if we do that operation we have to assume that $k \neq 0$, which makes my solution impossible, and only leaves -2 as the possible option in which the system has infinite solutions.


micro segmentation in the campus

Question: We have so many devices (IoT and wintel, macs, androids, ios) spread across a few VLANs. Worried about any one device getting affected (e.g. Ransomware) and potentially infecting all other devices on the VLAN. Do you see this as a problem too? Any solution recommendation? Data centers are deploying micro-segmentation. Why not for campus?
Comment: There are a lot of assumptions made in your question. And I'm not sure what you are asking. You segment in order to contain problems, so yes, segmentation helps to contain ransomware. Why do you think that campuses do not use micro-segmentation?
Comment: The segmentation in campuses (via VLANs) aren't effective since we have 1000s of devices in a single VLAN which allows free flow communication between those devices. Any of the infected device can potentially infect the entire VLAN, no?

I am not aware of any solution that allows for granular segmentation (beyond VLANs).
Comment: @Ricky: It is possible to do some granular segmentation with software defined networks and do some crude segmentation even without. The question is what exactly do you want to separate. The ability that no machine can talk to the other but still can go to the internet is probably mostly easy to do. But to limit who can talk to the other one with which protocol at which time with which bandwidth .. is way more complex - less from the ability to do the actual separation but from who manages all the necessary separations in a dynamic network environment like a campus. And who pays for it.
Comment: I prefer whitelist approach. Even if some devices need to communicate with each other, I suppose it would be limited applications/ports - unlike data centers. If this approach protects the LAN environment, then the investment may come from the security budget.
Answer: Assuming that in many/all cases there's no requirement for individual wireless clients to communicate with each other (i.e. they only need to communicate with server devices and Ineternet sites), one option to consider for this would be Wireless Client Isolation.
This is a feature provided by some (generally more enterprise) wireless networking setups which stops clients from talking to other devices on the same VLAN apart from their default Gateway. For example this document from Cisco describes their approach.
That would work to prevent clients infecting other devices on the VLAN.  Past that you'd need to make use of standard firewalling to ensure that clients could only get to approved local server serivces and out onto the Internet, and then ensure that your servers are well patched/protected, so that if ransomware does get onto the campus you're limiting what it can affect.
Comment: Yes, I noticed this feature even in my ASUS router. But its all or none option and only works for wireless devices.
Comment: sure it's limited but it's a good part of the control environment where possible.  There's not going to be a silver bullet solution for this issue, it'll be setting up a series of controls to reduce the risk.
Comment: I agree. I just wish there was a micro-segmentation solution for Campuses to reduce the attack footprint by miles. In the meantime, we'd continue to protect the traditional way. Cheers!

micro segmentation in the campus


The Hive Queen in "Shadows in Flight"

Question: Not sure if I have missed something, but how did the hive queen in the ark which Bean's ship encounters in "Shadows in Flight" die? She was still alive years after her homeworld was blown up by Ender and just suddenly died without an prepared daughter ready to inherit?
Comment: @Himarm - Speaker of the dead Queen is completely independent from the one in Shadows in Flight as far as I understand
Comment: @Himarm i think you missing my point, my question is why the Queen in Shadow of flight DIE ? The idea of inherit just a after though (and you have answer though not so sure about that because if you have knowledge of the other books you also know the Queen on Lusitania had prepare not only one daughter to transport to another planets to ensure her species exist so at the time of SiF why the Queen in the ark bet all hope to the cocoon in Ender hand?). And why the workers involve here? I'm asking about the Queen!
Comment: @HenryVarro: I have the vaguest recollection that there was some disease that killed her unexpectedly, but I can't recall if that actually happened or if it was a thought I had.
Comment: have you read the speaker of the dead series? Because it answers the question about what becomes of the Buggers after enders game
Comment: @DVK all the queens still shared being able to contact each other instantly afaik so if she knew she didn't need to prepare a daughter she wouldn't ect. (and you learn how much the queens dont care about there workers in speaker so if she didnt Need to reproduce, why bother since she doesn't care if all the workers with her die) basically just asking if he had the knowledge of the other books before an answer could potentially have spoilers in it.
Comment: @Himarm: You're right that she didn't need to prepare a daughter to maintain the race, but she _did_ need to prepare a daughter to run the ship.
Comment: @MooingDuck I think you're right - that's what the kids thought. She did try to prepare a couple of daughters, but they all died as well (those were the broken cocoons the kids found).
Answer: We don't know for sure.
Bean and his prosperity speculate.

"If it really is a Formic ship," said Cincinnatus, "and it really has been going for seven or weight or ten centuries, anything could have happened. A disease. Running out of unrecoverable trace elements. I think maybe they got to their original destination centuries ago, but it was uninhabitable so they went on, looking for another world. This might be the first one they found."  - Shadows in Flight, ch. 4

The Queen did try to make daughters. For whatever reason none of them survived.

Carlotta looked up. Lots of stringy protuberances hung down from the highest points. A few of them had melon-sized balls hanging from them.
  "What's that?" Carlotta asked.
  "Cocoons. I'm sure they're all dead, but I'm going to want to take one ack to the lab to study. - Shadows in Flight, ch. 8

Later the drones confirm this.

The cocoon Ender had offered them was empty. Dead. It was just another of the cocoons from the Queen's chamber -- they had all died with the Queen. - Shadows in Flight, ch. 8

Ender's communication with the drones also does not explain the Queen's death. One minute she was feeding them, the next she laid down and died.
Whatever happened to her it clearly prevented her from making viable cocoons. Maybe 700-1000 years in an old spaceship eventually allowed radiation in space to make her sterile.

The Hive Queen in "Shadows in Flight"


make permalink go to a custom single.php file

Question: hope somebody can help me with this because I am struggling for a while.
I want to use two single.php on my website, one to display the regular posts and another to display some products that I will style different then the posts. I duplicated the single.php and named it products.php but I cannot figure out how to make the permalink grab my products.php and not the single.php.
Please, is there a way to accomplish this? Thank you very much!
Comment: what differentiates a product from a regular post?
Comment: The product will have a gallery and the text will be displayed different then the post, I need to add featured products bellow and I have to disable comments. Thanks!
Comment: I meant in terms of how WordPress would know which template to load, what defines a product as such versus a regular post?
Comment: I used this function in my functions.php `add_filter('single_template', create_function(
 '$the_template',
 'foreach( (array) get_the_category() as $cat ) {
  if ( file_exists(TEMPLATEPATH . "/single-{$cat->slug}.php") )
  return TEMPLATEPATH . "/single-{$cat->slug}.php"; }
 return $the_template;' )`
Comment: ok, "category" was the answer I was looking for. so this is solved then? add your solution as an answer if that's the case.
Comment: Thank you very much for your time, Milo, the function works fine but a problem never comes alone :(, so my issue now is that I need to use that template for all my categories and I am not sure if in the end it is the best solution for me.
Answer: Try using a custom post type (named "products") and rename your single.php file to single-products.php. It should be much easier like this.
The plugin below (free) should help you create a custom post type without any coding.
http://wordpress.org/plugins/custom-post-type-maker/
Comment: Thank you very much for answering me, Ciprian. I will try what you suggested me but I hoped I can solve it with permalinks. Thanks again!
Answer: I solved my problem by adding in my function.php this function:
add_filter('single_template',
    create_function(
        '$the_template',
        'foreach( (array) get_the_category() as $cat ) {
            if ( file_exists(TEMPLATEPATH . "/single-{$cat->slug}.php") ) {
                return TEMPLATEPATH . "/single-{$cat->slug}.php";
            }
        }
        return $the_template;'
    )
);

and naming my second single.php with the slug name. Here's the tutorial I followed. Thank you all for helping me!
Answer: in your product.php page add this on top
/*
Template Name: anYtemplatEnamE
*/

and then from admin section you will assign this anYtemplatEnamE template to any page.
Comment: Thank you very much for answering me, I am new with WordPress and I used categories, instead of pages. Is there a different solution if I used categories? Thank you!
Comment: sorry i dint get you .
Comment: As I said, I am new with WordPress and I try to explain as best I can, hope I am not upseting you. So, to list my products, I used . From my category.php, I need to link the products to a different single.php then the one it displays posts. Thank you!


Cache. MESI protocol for multilevel cache in Intel processors

Question: Now I'm trying to simulate the performance of Intel CORE 2 Duo processor (but I'll be very pleased with information about any other multi-core Intel processor) and it's work with the computer memory. As I understood, the main problem that exists with memory - is to support the coherence of cache. But how does the protocol MESI work with different layers? For example how does it apply to L2 and L3? I also would be very glad to know enything about non-exclusive write policy implementation and if the replascement algoritm of L2 is connected to the block being replaced from L1? Does Anyone know anything about this?
Comment: This is at some level an electrical engineering problem, and we have several experts who could help you with simulating the performance of PIC or Cortex-M3 processor, but this is an unusual question for our site - we may not have the proper expertise for this question.
Comment: Just to clarify - what to you mean by 'performance'?  Are you interested in data throughput, power dissipation, or ability to compute some algorithm?  Please forgive me if I'm asking silly questions, but this isn't my area of expertise and I'm not sure what you're asking.
Comment: I think this site might actually be the best one for your question on the StackExchange platform. You are however asking for a *very* specific information, that even thou a lot of people here can understand your question, few can answer. I'd guess hitting up the researchers from Intel, or some industry conferences (Intel Developers Forum?) would work out for you.. on AMD side, I think what you're asking for is described well in the BIOS Developers Guide for K8/K10s..
Comment: Ok, first of all, thank you for  your answer!=) Maybe,it's my mistake that I didnt say that I use the GPSS language for modeling.So,I need algorithms of constructive engagement of cache layers,replacement algorithms (and if they are connected to each other) and how does MESI apply to different layers.I consider cache lines(blocks) with their adresses as transacts  in GPSS.
Comment: @Alexander, these are comments, no answers, Kevin is trying to warn you that this may not be the best place for this question. We probably don't house the expertise you seek.
Comment: So maybe You'll probably advice me where to find this information?
Answer: I guess your question is about how a coherence protocol extends to multi-level caches. This book is a good reference. Here's my understanding:
Ill take the example of Core i7 (as I'm not very familiar with core 2 duo architecture).
In Core i7 every core has a private L1 and L2 cache, and all cores share a single large on-chip L3 cache. One can in-turn join multiple such processors using point-to-point links to form a NUMA system.
So there are 4 levels in the memory hierarchy: L1, L2, L3, Main memory.
There is one coherence protocol between multiple L2's on a chip and the L3.
There is a separate protocol between multiple L3's on separate chips. The two are independent of each other. One may use snooping, and other may use directory-based implementation. I think in Core i7, both are directory-based MESIF protocols (F is a new Forward state).
All caches in Core i7 are inclusive. This simplifies the protocol somewhat.
As L2 is inclusive of L1, a block that is evicted from L2, has to be evicted from L1 too. Similarly, a block evicted from L3 has to be evicted from all L2s.
L3 maintains core_valid bits for each block. A core_valid bit is set if the L2 cache of that core has a copy of the block. This way when a block is evicted from L3, the invalidations need to be sent to only those L2s that have a copy of the block. I guess the core_valid bits also act like a kind of directory.
If you have inclusion, only the coherence messages for blocks existing in a lower level cache need to be forwarded to the higher level cache. So the lower level cache acts like a snoop filter.
I'm not sure I understand your question about the non-exclusive policy. Maybe this link will help.
Comment: The link does not work.
Comment: I'm pretty sure Intel's L2 caches are Not-Inclusive/Not-Exclusive of L1d / L1i.  You're right that L3 is strictly tag-inclusive, so L3 tags work as a snoop filter ([Which cache mapping technique is used in intel core i7 processor?](//stackoverflow.com/q/49092541)).  When a line needs to be evicted from a core, L2 and L1i/d all receive the message, I guess.  But [this answer](https://stackoverflow.com/questions/19775173/inclusive-or-exclusive-l1-l2-cache-in-intel-core-ivybridge-processor) quotes Intel's manual as saying L2 is not inclusive in Sandybridge.


Where does Windows store the settings for Scheduled Tasks console?

Question: I would like to know where Windows stores information for Scheduled Tasks. I would like to be able to find the reference for the name, schedule, or command to run associated with a given task. This may not be practical or possible, but I would also like a means to edit the scheduled tasks and their attributes outside the Schedule Tasks console. I've assumed that the data would be in the Registry somewhere, since I doubt it would be stored in a normal file, but I'm uncertain where I should be looking.
Answer: Windows stores scheduled tasks as XML files, AND in the registry.
You can find them in a few places:
Filesystem:

%systemroot%\System32\Tasks
  %systemroot%\Tasks

Registry:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\Taskcache\Tasks
  HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\Taskcache\Tree

Note: You can't edit the XML files directly in \Tasks for security reasons. See here for more information: https://serverfault.com/questions/440496/ok-to-edit-tasks-xml-file-in-c-windows-system32-tasks
To work with importing the XML files without going through the scheduled task UI you can look at these:
Schtasks.exe
Powershell Scheduled Task Cmdlets
Comment: **Great answer**! Can I ask whether you know if there is anything stored per-user in **HKCU**, the **user-profile** or similar user-based locations for scheduled tasks? I briefly perused HKCU and the user-profile and couldn't find anything obvious - light effort however - hoping to save some time if you know outright :-).
Comment: Maybe one more folder to add: `%SystemRoot%\SysWOW64\Tasks`. And Powershell link is broken.
Answer: In Windows 7 they are stored in files under "Windows\System32\Tasks". The files are XML, so you could create and edit task files there.
Other versions of Windows I think they are stored in "%SystemRoot%\Tasks"
Comment: Under XP, the tasks are stored in c:\windows\tasks, but the files themselves are with extension 'job' and are protected from editing (so I don't know whether they are binary or ascii).
Answer: I needed to delete some tasks as in a script as the final part of a system build.
I discovered you can just delete them eg:
<code>@echo ..Audit hardware

"\\vs-files\General\0000 IT\Bginfo.exe" "\\czwgbak\Software\_Build2015\AuditWorkstation.bgi" /timer:0 /Silent /NOLICPROMPT

@echo delete Scan Setup inis

If not exist %systemroot%\System32\Tasks\ASUS\nul goto reg
rd %systemroot%\System32\Tasks\ASUS /S /Q

:reg
</code>
etc...


Reproduce tableView delegate behaviour in a custom view

Question: I am trying to develop a control that will mimic the behaviour of a UITableView control.  I have defined a delegate protocol as follows:
@protocol HPSChoiceDelegate

- (void)choiceView:(HPSChoice *)choiceView didSelectChoice:(NSNumber*)selectedIndex;

@end

The user can tap subviews within the main control view.  I have TapGesture recognisers in place that fire methods within the main control view.  I wire these up like this:
UITapGestureRecognizer *containerTap =
        [[UITapGestureRecognizer alloc] initWithTarget:self
                                                action:@selector(didSelectChoice:)];

I then have a method in the view that attempts to call the correct method in the delegate. The method in the view looks like this:
-(void)didSelectChoice:(UITapGestureRecognizer*)sender
{
    NSNumber* selectedIndex = [NSNumber numberWithInt:sender.view.tag];

    [(id)self.delegate performSelector:@selector(didSelectChoice:) withObject:selectedIndex afterDelay:0.0f];
}

In the delegate controller I have the following method defined:
- (void)choiceView:(HPSChoice *)choiceView didSelectChoice:(NSNumber*)selectedChoice
{
    NSLog(@"HPSFormController didSelectChoice:(HPSChoice*)choiceView tag = %@",[[choiceView class] description]);
}

It all compiles, and when I tap the control then the didSelectChoice is called in the view which then calls the method in the delegate. However, the delegate method crashes with the following error:
-[HPSFormController didSelectChoice:]: unrecognized selector sent to instance 0x29b4e0

How do I fix this?  Thanks very much.
Comment: Just a note: you're not guaranteed to have a delegate, neither that it answers to the selector if it's not marked mandatory. So, do this: `if (delegate && [delegate respondsToSelector:@selector(foo:)]) { [delegate performSelector:@selector(foo:) withObject:bar]; ]`
Answer: If your view, for example, is called HPSChoiceView, you need also to say that its delegate it's the controller where you create that view.
For example, somewhere within the delegate controller (HPSFormController I suppose) you need to do:
HPSChoiceView* choiceView = // alloc-init here
// self refers to an instance of HPSFormController at run-time
choiceView.delegate = self;

This implies that each time you tap in that view, the controller will respond to that tap since it has been set as its delegate.
In addition you are calling the wrong selector. Instead of calling
[self.delegate performSelector:@selector(didSelectChoice:) withObject:selectedIndex afterDelay:0.0f];

call
[self.delegate performSelector:@selector(choiceView:didSelectChoice:) withObject:choiceView withObject:selectedIndex];

choiceView can be retrieved from sender.view. sender is an istance of UITapGestureRecognizer and for this reason you can retrieve the view that was tapped.
To understand what a selector is you could see Selectors in Objective C and Apple doc.
Said this, I would also change the selector for you delegate HPSChoiceDelegate. So, for example, I would call it (just for clarity):
- (void)didSelectChoiceView:(HPSChoice *)choiceView withSelectedIndex:(NSNumber*)selectedIndex;

If you use this, the selector will be didSelectChoiceView:withSelectedIndex:. Pay attention to colons!!
Furthermore, I would add a control before calling a delegate method as the one suggested by @Cirylle. That control allows you to verify if you set the delegate (first part of my answer) and the delegate can respond to that selector since it has been implemented correctly.
Hope that helps.
Comment: Thanks very much - not sure what the procedure is when two people answer so helpfully, apologies for not awarding you the correct answer
Answer: The method is crashing because you are calling
didSelectChoice:

while the method that you defined is
choiceView:didSelectChoice:

I believe that you can fix this by calling:
[(id)self.delegate performSelector:@selector(choiceView:didSelectChoice:) withObject:choiceView withObject:selectedIndex];

You would have to get the choiceView in your didSelectChoice: method of course.
Answer: The class that should act as delegate must declare and conform to the HPSChoiceDelegate protocol and it must also register itself as the delegate of your UITableView'ish class.
Also, try changing to @selector(choiceView:didSelectChoice:).


Evolution of endosymbionts?

Question: Mitochondria and plastids in eukaryotes evolved through a process of endosymbiosis. How does an event like a eukaryote engulfing a bacteria, become a part of the genome? Some of these primitive eukaryotes could have been more predisposed to more vigorous endocytosis as a result of their DNA, but how could the physical event account for evolution of organelles?
Comment: What exactly are you asking here? Mitochondria still have their own DNA, it's not in the "parent" cell. They reproduce on their own, it's just that they wait for the cell reproduction signals to do so. In fact, this is exploited in mapping female genealogies, since mitochondrial DNA is transferred predominantly through the female line (egg cells tend to carry a lot more mitochondria than sperm cells).
Answer: I think you mean mitochondria and chloroplasts and are referring to the endosymbiont theory (Reference to the unedited question as it was originally asked).
The definition of symbiosis for the most part tells you how coevolution can be accounted for by this theory.
The larger Eukaryotes provided the protomitochondria with a protected environment for growth and the protomitochondria produced usable nutrients for their hosts from molecules that the eukaryotes were unable to process on their own.
The two organisms struck up a balance and the mutually beneficial relationship allowed both to prosper. As the Eukaryotes with protomitochondria were better able to utilize more of the chemicals from their environment than those that did not play host to the protomitochondria, they had a survival advantage that other early Eukaryotes did not.
As plant cells have both mitochondria and chloroplasts, it is believed that one of the eukaryotes with a mitochondria endocytosed a photosynthetic prokaryote. This event wasn't as much of an advantage as the first symbiotic relationship. Since all eukaryotes have mitochondria or evidence of ancestors that had mitochondria, but not all have chloroplasts, then it was beneficial enough that the photosynthetic organisms were also able to coevolve within the eukaryotes and alongside the mitochondria, but they were not beneficial enough so as to give those cells that hosted chloroplasts enough of an advantage that they took over all life on Earth.
Mitochondria also have their own DNA, so their complete genome is not found in the eukaryotic genome. Over evolutionary time, mitochondria have lost the genes that allowed them to live freely, so you could not extract them from eukaryotic cells today and expect them to grow external to the eukaryotic cell. They require substances that the eukaryotic cell makes. Whether there was recombination between the two genomes or just that both had the same function at one point and then through genetic drift caused the mitochondria to lose the homologous gene, I could not say.
Answer: If your question is about how the engulfed endosymbionts lost their genes and became dependent on the host cell then this is the answer.
The current theory (Limited Transfer Window hypothesis) says that at some point, injury or membrane rupture of the endosymbionts would have resulted in the leakage of their genomic DNA. The host genome would have acquired these genes by a lateral gene transfer mechanism. Now, because the endosymbionts that have lost these genes randomly, would have a lower cost of maintenance (as they can acquire these gene products from the host cell) compared to those who still maintain these genes themselves, the former will outgrow the latter at some point. Note that there is a constraint on the population size and therefore there is a good chance that the endosymbionts with full set of genes, could go extinct because of their additional growth cost.
This is a probable way by which the endosymbionts lost their genes and became dependent on the host. It has been observed the number of genes transferred to the host correlates with the number of endosymbionts present in the cell. The rationale behind the limited transfer window hypothesis is that if the number of endosymbionts is high, then the likelihood for the host to tolerate damage to a few endosymbionts is higher (note that damage was the first step in the endosymbiont to host gene transfer).
This is still a hypothesis and the exact mechanisms are yet to be elucidated.

References:

Timmis, Jeremy N., et al. "Endosymbiotic gene transfer: organelle
genomes forge eukaryotic chromosomes." Nature Reviews Genetics
5.2 (2004): 123-135.
Smith, David Roy, Kate Crosby, and Robert W. Lee. "Correlation between nuclear plastid DNA abundance and plastid number supports the limited transfer window hypothesis." Genome biology and evolution 3 (2011): 365-371.
Lane, Nick. "Plastids, genomes, and the probability of gene transfer." Genome biology and evolution 3 (2011): 372-374.
Gray, Michael W. "Mitochondrial evolution." Cold Spring Harbor perspectives in biology 4.9 (2012): a011403.
Comment: Thanks for the information. I have a great deal more information than when I started. Rupture of the membrane could explain acquisition of the foreign DNA.
Comment: @user17496 But you should bear in mind that it is just a hypothesis. This has not be explicitly proven.
Comment: @WYSIWYG Once the DNA is out of the symbiont, it would likely be like transfecting a Eukaryotic cell today, easier as the symbiont is already in the cytoplasm. The chromosome would need to get into the nucleus. It would need to be linearized, and there would need to be an area of complementarity that would allow for strand invasion. The rest would be handled by the cells own repair mechanisms. Genes are maintained through selective pressure, and as you said, if it costs less to have the product produced by the host, then sustaining deleterious mutations will not be under selective pressure.
Comment: @AMR Complementarity is not really essential. They can insert via a break and join mechanism. But as I said, we really do not know the mechanism yet. I don't think even the insertion hostpots have been studied in great detail. That reminds me; I should look for that.
Comment: No, not essential, but I was thinking along the lines that there would be more opportunity for homologous incorporation than going down the path of NHEJ, especially to get a productive insertion where the gene is downstream of an active promoter, unless the entire gene "cassette" was inserted. Anyhow, my crystal ball gets very fuzzy after looking about a billion years back.

Evolution of endosymbionts?


Replace Arduino bootloader

Question: My Arduino board is malfunctioning in its bootloading and I thought weather I can overwrite the previous bootloader on the atmega. I mean to ask than can I simply reinstall bootloader on a chip that already has a bootloader installed.
Comment: yes. you need an ISP programmer or other Arduino with "Arduino as ISP" sketch.
Answer: Yes you can. A Programmer that is driven from a PC and connects to SCK/MOSI/MISO/Reset/Power/Gnd (the ICSP header on an Uno/Mega), or a Standalone Programmer that can program a bootload program stored on an SD card and connects to the same ICSP pins, is needed to access the bootload memory to load/reload the bootloader.

Replace Arduino bootloader


I need a popup help file for Vim

Question: Is there some kind of plugin or mode that can be used to display some help for commands? I am increasingly finding nano inadequate. I want to be come a hardcore Vim and Emacs user.
Answer: $ vimtutor for starters.
I remember Emacs has a tutorial of some sort from back when I was choosing an editor, but I don't remember what it is.
I'd say learn enough about both to be able to function, then pick one or the other and master it (as much as possible--I'm finding after 7 years of using Vim that there's always lots to learn).
Answer: vimtutor is an excellent tutorial for you to go through.
Also the built-in help in vim is very nice. Use :help inside vim for explanation about practically anything related to vim.
And of course there's Vigor, a User Friendly cartoon turned into reality. :-)

I need a popup help file for Vim