Logical behaviorism vs Functionalism

Question: I'm a little unclear on where exactly the distinction is made between logical behaviorism and functionalism.
The ability to experience pain, for instance, would seem to increase my chances of survival if, say, I am in danger of being burned alive. The pain I experience would contribute to behavior aimed at removing the threat. Would this relationship between my brain states and actions then be an example of behaviorism or functionalism? Or would it be both?
Comment: Welcome to SE Philosophy! Thanks for your contribution. Please take a quick moment to take the [tour](https://philosophy.stackexchange.com/tour) or find [help](https://philosophy.stackexchange.com/help). You can perform [searches here](https://philosophy.stackexchange.com/search) or seek additional clarification at the [meta site](https://philosophy.meta.stackexchange.com/). Don't forget, when someone has answered your question, you can click on the checkmark to reward the contributor.
Answer: Short Answer
Both behaviorism and functionalism are related to the philosophy of mind, but they do so in slightly different ways. Functionalism is an idea about the relationship between material things such as brains and abstract things such as thoughts and minds and roughly maintains that it's not what the brain is made of that is important, but how it works that is somehow related to the mind. Logical behaviorism is a perspective that aspires to scientific objectivity in regards to the social sciences particularly psychology and was championed by the Vienna Circle and Oxfordians like Gilbert Ryle. Ultimately, some flavors of functionalism aspired to the same end as logical behaviorism by appealing heavily to behavioral dispositions for explanation without completely banning reference to mental states.
Long Answer
At the beginning of the 20th century, the Vienna Circle split radically with German Idealism and started down the path of the analytical tradition separating themselves from the coming Continental philosophy of the mainland. From Hempel's own The Logical Analysis of Psychology:

The method characteristic of the studies of the Vienna Circle can be briefly defined as a logical analysis of the language of science.

Further on, he goes to say:

Perhaps the best way to characterize the position of the Vienna Circle as it relates to psychology, is to say that it is the exact antithesis... that there is a fundamental difference between experimental psychology... and introspective psychology.

In short, men like Carnap, Hempel, and Neurath saw the phenomenological inherently connected to the noumenonological. The tension between the relationship between the physical and that which was endowed with meaning or the abstract was planted heavily in the Western conscience by Cartesian dualism, and this question of behavior and thought was again revisited by the philosophical clashes of psychologism before and during the time of Gottlob Frege, who is commonly called the father of analytical philosophy.
The Vienna Circle and philosophers such as Gilbert Ryle in his The Concept of the Mind attacked the dichotomy between the logical, psychological, and physical. In fact, Gilbert Ryle is known for his coining of the term 'categorical mistake' in his rejection of Cartesian duality, and maintained his own version of logical behaviorism. From 'Psychology', the last chapter of his book:

In the course of this book I have said very little about the science of psychology... [which is perverse] since the entire book could properly be described as an essay... in philosophical psychology... I have been examining the logical behaviour of a set of concepts all of which are regularly employed by everyone.

Hence, by analyzing language, logical behaviorists sought to show that the language which represented phenomenological expression was an artifact of science itself, and that the methods of Wilhelm Wundt should be applied equally to the analysis of logical basis of language as it was to neurophysiology, generally speaking. That is the nature of logical behaviorism. This was done by translating a set of statements about mental state to those of behavioral dispositions.
Functionalism is a different beast because it attempts to characterize the relationship between the physical and mental in a particular fashion by claiming that mental states are dependent not on material constitution, but function. From SEP: Functionalism:

Functionalism is the doctrine that what makes something a thought, desire, pain (or any other type of mental state) depends not on its internal constitution, but solely on its function, or the role it plays, in the cognitive system of which it is a part. More precisely, functionalist theories take the identity of a mental state to be determined by its causal relations to sensory stimulations, other mental states, and behavior.

Where the two meet is that a type of functionalism called by the same article "analytical functionalism" which attempts to preserve what is good in logical behaviorism. One of the methods of logical behaviorism was to reduce a statement about mental state to a statement purely in dispositional terms. To be hungry, in essence, was logically equivalent to occurrent and dispositional eating. But the problem with that is sometimes people are hungry and don't eat, and sometimes they eat and aren't hungry. At the end of Section 2.1:

[A]s many philosophers have pointed out... logical behaviorism provides an implausible account of the meanings of our mental state terms, since, intuitively, a subject can have the mental states in question without the relevant behavioral dispositions.

In Section 3.3:

Like the logical behaviorism from which it emerged, the goal of analytic functionalism is to provide "topic-neutral" translations... of our ordinary mental state terms... Analytic functionalism... permits reference to the causal relations that a mental state has to stimulations, behavior, and other mental states.

So here we have the crux of the difference. Whereas a logical behaviorist, much like psychological brother or sister would reject ANY reference to mental states, one form of functionalism strives to the same end, but softens the stance on using terminology in reference to mental state. In this way, explanations for behavior could be given in terms of the relation of one mental state to another attempting to bridge the explanatory gap created in a situation of why someone might eat who is not hungry, for instance, out of anxiety, which itself is a mental state not allowed to be invoked under logical behaviorism.

Logical behaviorism vs Functionalism


Changing primitive properties retrospectively - options not visible below the tool panel

Question: When adding a circle I can see the 'Add circle' panel below the tool bar, but once I do something else it disappears. How do I get this back? How can I change the number vertices on an existing circle for instance? It appears that you have to do this immediately after adding the primitive, otherwise you're scuppered?
Answer: Creation is special.  Some options you are see are valid at creation time only.  That is standard Blender behavior. The options panel will disappear as you move on to the next mode or task.  If you created a with sphere 32 rings and then in [edit mode] removed many faces ... it is difficult to understand what it would mean to change the rings to 7.
It is difficult to get a creation panel behavior that is acceptable to a large consensus after some object has been potentially modified.


Can you describe someone as a no-brainer?

Question: I understand the meaning, and to be sure I searched its definition: something that requires or involves little or no mental effort. This noun literally can have another meaning logically to describe a person, it makes sense to me. My question is, is it the right usage to use no-brainer to describe someone who don't use their brain to think at all?
Comment: An appropriate term for what you are wanting to describe might be 'empty-headed'
Comment: This isn't the question you asked, which has been ably answered multiple times below, but some terms which you *could* use for a person who is not using the brain are halfwit, dimwit, ignoramus, dunce, dunderhead, numskull, shit-for-brains, ... (I can't believe how easily that list came to me).
Comment: If I heard you say that "Person X is a no-brainer" I would first think that you had to select a person to fill a position and Person X was far and away the best person for that role
Comment: @DaveMongoose aren't you amazed at English language that empty-headed and no-brainer literally mean the same thing but you use them so differently.
Comment: @drerD I think you have similar cases in other languages as well, but English certainly has a lot of them!
Answer: No. A "no-brainer" is a decision that is so obvious, you don't need to use your brain to decide. However, it's never applied to people, but rather to the decision itself.
Comment: Although it's possible (but admittedly rare) that you might use metonymy to refer to a decision *involving* a person as that person. E.g.: "We should try to predict which of these students are likely to pass this class." "Well, Sally's a no-brainer." This would mean that Sally is either so bad *or* so good at the subject that it's obvious ahead of time whether or not she's likely to pass. Trying to guess whether she'll pass or not is very easy, i.e. a no-brainer.
Answer: Yes.
The OED describes "no-brainer" as the other answers say:

Something that requires or involves little mental effort or intelligence to perform or understand; esp. an easily made decision

But it also includes the definition you mention:

A foolish or unintelligent person or action.

They quote the sentence: "If a no-brainer wants to talk on the radio—even if the message makes no sense whatsoever—he or she can do it."
But...
It's worth noting that as a native English speaker, I wasn't familiar with this definition (and neither it seems, were the other answerers), so while it does exist, I would advise against using it unless you hear it often in your region.
Answer: 'NO' is the answer from numerous examples in the site 'Context. Reverso. Net':
'Cremation versus burial is such a NO-BRAINER when l think about it'.
'Well... the tires are a NO-BRAINER'.
etc.
According to Merriam-Webster's Dictionary:
 no-brainer
: something that requires a minimum of thought.
According to English Language Learners Dictionary: no-brainer
: a decision or choice that is very easy to make and requires very little thought.
Answer: You could, and in context people will understand the intended meaning, but at the same time people will be aware that you are using the term wrong. A "no-brainer" already has a different definition: it refers to a problem, a task, or a decision.
You can use your meaning in the context of sarcasm, jokes, or if you're intentionally trying to show unfamiliarity with the language.
Answer:
Is it the right usage to use no-brainer to describe someone who
  doesn't use their brain to think at all?

Exactly as others have said. The expression does not refer to a person. To further illustrate here are a couple of examples of the correct usage.

"Should I go to the cinema with my friends or with Julia?"
"That's a no-brainer. Definitely go with Julia - she's gorgeous."

"What is 2+2?"
"That's a no-brainer. I don't even have to think about it. The answer is 4."


What property of logistic regression is useful for modeling user behavior?

Question: I want to know that what property or attributes of logistic regression make it to useful for modeling user behavior.
Comment: You use logistic regression when your dependent variable is dichotomous (or ordinal). Your question is too vague to be answerable as it currently stands.
Comment: Is this for some class?
Comment: i mean how to model user behavior using logistic regression?
Comment: thank you, Patrick Coulombe for your comment. i know that logistic regression is used for modeling user behavior, so how it model user behavior. there are some other methods e.g. linear regression, but linear regression can not model user behavior so what property present in logistic regression which will model user behavior. please reply me...
Answer: You'll have to be more specific about what you mean by "user behavior", but I think you're actually wanting to know what is logistics regression in the first place. Lightly speaking, logistics regression is a method of regression where we have a binary response variable; that is, a 1/0 response variable. More specifically, it predicts the probability that an observation is either a 1 or a 0. This is useful if you want to classify an observation into one of two categories. For example, in terms of user behavior, we might want to predict whether a link will be clicked on, whether a customer will purchase an item, whether a voter will vote for one candidate or another, etc.
Basic linear regression cannot be used to predict probabilities due to the constraints of ordinary least squares (you should know these). Now, basic linear regression can still be useful - your response variable won't always be a 1/0 variable. For example, you can model consumer spending on luxury items as a function of income.
I hope this answers your question. Linear regression can be used to model user behavior, so long as you can represent the response variable in the appropriate way. But you may want to measure the probably of whether or not a user will do something, and logistics is useful for that.
Comment: The correct term is _logistic regression_ and it is not used to classify observations; it is used to predict probabilities.


Marketing Cloud System user updating Accounts in Salesforce CRM

Question: We have been facing a unique situation where we are seeing lot of updates from Marketing Cloud user(MC System user) in Salesforce Account object. Our Service and Marketing Cloud are connected by MC Connect.The issue is When MC System user makes an update(multiple times) on Account object,it is configured in our code to make a callout to MDM system. Any update on Account object is followed by a callout to MDM system and we have making a lot of unnecessary callouts to MDM but When we check the Account object history, we don't see any update per se. What could be the potential reasons? Is any tracking update made by Marketing cloud back to Service cloud related to Account object?
Answer: From the details sounds like that the Account record was used in some Email send activities and tracking related data is flowing back to Salesforce.
Though, the update won't happen directly to account object but to its contacts, as IER are basically tied to Lead, Contact.


Differences between flip-flops and gates

Question: Whatever I searched the web I found things about differences between latches and flip-flops. I'm so new in electronics, my question is what is the difference between gates and flip-flops?
Comment: Or the difference between a car wheel and a car.
Comment: Did you do any research? This is a bit like the difference between a bicycle wheel and a car.
Comment: @immibis: Here the wheels are the gates and the car a flip-flop.
Answer: A flip-flop is a type of logic circuit. It is made up of gates. Flip-flops are generally used to store information while a gate only knows about present inputs.
Said another way, a flip-flop is a group of gates arranged such that they have memory of previous inputs.
Comment: Feedback. The output of the flip flop is routed back to one of its internal gates. Try and digest wikipedia article on flip flops or google around a bit. https://en.wikipedia.org/wiki/Flip-flop_(electronics)
Comment: So gates cannot store values but flip-flops which are made up of them can store! How?
Comment: It's the most straight forward answer, I pick it.
Answer: A gate performs a logic function (AND, OR, NAND, NOR).  Its output always represents the current state of its inputs.
Flip-flops are bistable storage elements.  Their outputs represent the results of the inputs at some previous time.
Answer: Both latches and flops are made of more basic gates.  These are NAND's, NOR's, Inverterters, Transmission gate, Tri-state elements, and possibly more depending on technology node.  But both a latch and a flip flop would still be considered a logic gate (but not a single stage logic gate).
A flip flop is made of two back to back latches with opposite phase clocks, in a master-slave topology.  This forms a lock-and-dam system where only on one active edge does the output of the FF change states.
Alternatively a latch is open during some transparency window w.r.t the clock.  This means that the latches are typically open (transparent) during an entire half-cycle (when clock is either high or low).
See other posts which go into a bit more detail with circuits:
What is a flip flop?
Difference between latch and flip-flop?
Answer: The basic difference between Gates and Flip-Flops is much like the difference between DNA and humans....one is defined by and subsequently built entirely from the other.
Gates are the fundamental building blocks of all logic solutions and are inherently asynchronous but can be used to build synchronous (clocked) logic networks.
If you know little to nothing about digital logic and really want to learn enough to be dangerous I'd start with some basic design learning.
The problem today is that an introduction to logic is invariably on a very rapid progression from SSI (your typical SSI gate like an xx7400) to an HDL (Hardware Descriptor Language, the language used to describe logic) and rapidly becomes quite complex.
To start learning with SSI, MSI and LSI (the older and smaller logic blocks) you really need to be using a book that's 8-10 years old.
Some texts do try to modernize like Roth&Kinney Fundamentals of Logic Design but becomes somewhat harder to read in the process. (you can find this text online with a Google search "fundamentals of logic design 7th edition pdf")
My personal recommendation is books like Wakerly's Digital Design Principles and Practice which are focused on HDL as a solution, but lead you through SSI, MSI, PAL/PLD, CPLD and eventually to FPGA. It's an excellent learning resource matched to Xilinx FPGA solutions and directly to their development platform.
Again your can search online and find copies of the book.
IMO for anyone trying to learn digital design these days you need to rapidly get to using PLD/CPLD devices. They are still the only remaining opportunity to learn with DIP chips. In a few more years these may be gone forever, but today you can still get a decent number of 22V10 based PLD's in which you can build conventional gate based logic solutions.
Answer: An ideal gate and an ideal flip flop encapsulate two fundamentally different behaviors.  An ideal gate has an output which will go high or low instantaneously based upon the states of the inputs.  An ideal flip flop has an output which will remain at a steady value except on a rising, falling, or any edge is received on the clock input, whereupon it will instantaneously capture the state the data input had an infinitesimal amount of time before the clock edge, and will start outputting the new state an infinitesimal amount of time later.
Ideal gates provide no means of creating any sort of delay, since their outputs respond immediately to changes in their inputs.  It is possible to build latching circuits out of ideal gates if the conditions necessary for latching will always be held for a finite amount of time.  Building a flip flop out of ideal gates, however, is not possible because a flip flop requires an element that can delay the change in the output until after it has sampled the input and/or delay any change in the input so that it will capture the state the input had before a clock edge.
When working with real parts, the distinction between flip flops and gates is less rigid than with ideal parts, because it often takes real gates' outputs a somewhat-predictable amount of time to change in response to their inputs.  This makes it possible to use gates to construct delays of the sort needed to make a flip flop work.  Still, I think the distinction is a useful one because a design that uses flip flops and gates can be made to work when using any combination of parts which are at least as good as they promise to be, while a design which tries to build flip flops out of gates may fail if some gates are faster than promised but other gates are not.


Poisson Distribution practice problem

Question: I have just started to learn Poisson Distribution and I have no idea how to deal with the following practice from my textbook: Suppose the average amount of cars passing on a street per minute is Poisson (8.6). It takes a lady 5 seconds to cross a street and she waits for two cars to pass. What is the probability that she is safe to cross the street ?
Answer: The lady waits for 2 cars means:
the first 5 seconds, the lady waits because there is car passing.
the second 5 seconds, the lady waits because there is car passing.
the third 5 seconds, the lady waits because there is no car passing.
there is no car passing is P(0)=48.8% (you can do the math)
there is car passing is 1-P(0)=41.2%
so the probability is 41.2% x 41.2% x 48.8%
Answer: THe first step is to calculate the law of the number of car that pass on the street in 5s.
It can be shown that it follow a Poisson law with $\lambda = 5\times\frac{8.6}{60} \simeq 0.7166$
Then the number of car that pass on the street in 5s is
$$P(X = k) = \frac{\lambda^k}{k!}e^{-\lambda}$$
So the probability that no car pass in the street in the next 5s is
$$P(X=0) \simeq e^{-0.7166} \simeq 48.8 \%$$
Comment: that's what I thought too, but I wasn't sure if I need to do anything with the "wait for 2 cars to pass . Thanks for the reply.

Poisson Distribution practice problem


Test for fractional Brownian motion in Matlab

Question: Is there a test in Matlab if a time series satisfies properties of being a fractional Brownian motion?
Comment: Have a look at our [help/on-topic] to see what kinds of questions are considered on-topic here. Finding implementations of a test on a particular statistical platform is outside our scope, but the wider question of how to test for fractional Brownian motion would be on-topic. I think it would be worth editing the question to bring out the underlying statistical point rather than focus on the software implementation.
Answer: I don't know if there's a direct routine but, there are spectral and chi-square tests for fractional brownian motion that are fairly straightforward to implement. See for example section 3.2 of this: http://www.columbia.edu/~ad3217/fbm/thesis.pdf
Keep in mind that spectral tests don't preclude your signal from having similar spectrum to fractional brownian motion but being something wholly different (although this is a bit esoteric).


Formal languages and theories - difference between these two symbols

Question: I am new to formal languages and their theories and I am confused by these two particular symbols: $\models$ and $\vdash$. For example, let's say that we are working  with the language of an ordered field:
$$\mathcal L = (\{+, \cdot)\}, \{\le\}, \{0, 1\})$$ where the functions and the predicate are binary. Now, let's also assume that our model is the field of the real numbers and let our theory be the set of the field axioms.
Let's denote our theory by $\mathcal T$. Now, what is the difference between these two notations:
$$\mathcal T \models (\forall x)(\forall t)(x \cdot x  \le x \cdot x + t \cdot t)$$
$$\mathcal T \vdash (\forall x)(\forall t)(x \cdot x \le x \cdot x + t \cdot t)$$
Answer: $\Gamma \vDash \varphi$ means that based on the formal semantics of the symbols involved, it is impossible for all statements in $\Gamma$ to be true while $\varphi$ is false.
$\Gamma \vdash \varphi$ means that we can syntactically derive $\varphi$ from $\Gamma$.  So that should really be defined relative to some kind of proof system with specific rules of derivations. That is, if $S$ is such a system, then we can say that $\Gamma \vdash_S \varphi$ if and only if using the rules of derivation of system $S$, we can derive $\varphi$ from $\Gamma$.
We can then also define the impotant notions of soundness and completeness of system $S$:
$S$ is sound iff for any $\Gamma$ and $\varphi$: If $\Gamma \vdash_S \varphi$ then $\Gamma \vDash \varphi$ (in other words, $S$ does not allow you to infer things that don't logically follow)
$S$ is complete iff for any $\Gamma$ and $\varphi$: If $\Gamma \vDash \varphi$ then $\Gamma \vdash_S \varphi$ (in other words, the rules of $S$ are string enough so that anything that logically follows can in fact be derived using the rules in $S$)
Since we typically assume that the formal proof system we are working with is both sounds and complete, we often drop the $S$ from $\Gamma \vdash_S \varphi$ and simply say $\Gamma \vdash \varphi$
Comment: @Aemilius Yes, that's it!
Comment: So, in my example:
$T \models \phi$ means that - if the field axioms hold - the square of a number can never be negative
$T \vdash \phi$ means that it is possible to derive from the set of field axioms the fact that the square of a number is never negative?
Comment: I would also note that $\vDash $ means "(tauto)logical consequence"
Comment: @Aemilius I think you mean "*ordered* field axioms" - there is no general notion of "positive" or "negative" in an ordinary field. (And indeed in some fields the additive inverse of the multiplicative unit - that is, $-1$ - *can* have a square root. For example, in $\mathbb{Z}/2\mathbb{Z}$ we have $-1=1$ so $-1$ is its own square root, and less trivially in $\mathbb{Z}/5\mathbb{Z}$ we have $2^2=-1$.)


System.InvalidCastExecption error message when a programm with Interop.photoshop.dll after updating Windows10

Question: After updating to Windows 10, C# program on VisualStudio 2017, which processes images and uses Interop.Photoshop.dll and Interop.PhotoshopTypeLibrary.dll, got following issue :
<code>"System.InvalidCastException: Unable to cast COM object of type 'Photoshop.ApplicationClass' to interface type 'Photoshop._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{5DE90358-4D0B-4FA1-BA3E-C91BBA863F32}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
   at Photoshop.ApplicationClass.Quit()"
</code>
The same program was working before the update and it works on windows 7 and 8.
Can someone help me?
Comment: Why does this was at -1?  Why someone downvoted this?  This a legit question!
Answer: Solved it running Photoshop as administrator and then restart my machine.
Besides that I used the following function to find my instance of PS.
And instead of crashing again, it got executed correctly:
<code>        /// <summary>
    /// Find the Photoshop instance and return it
    /// </summary>
    /// <returns>Photoshop Application COM object</returns>
    [STAThread]
    public static Photoshop.Application SetPhotoshop()
    {
        Type photoshopType = Type.GetTypeFromProgID("Photoshop.Application");
        Photoshop.Application psApp = null;
        object obj = Activator.CreateInstance(photoshopType);
        if (photoshopType != null)
        {
            try
            {
                psApp = (Photoshop.Application)obj;
            }
            catch (Exception ex)
            {
                //Console.WriteLine(ex.ToString());
                return null;
            }
        }
        return psApp;
    }
</code>
Answer: You must close Visual Studio and start it by right clicking and choosing "Run as administrator"
Answer: Anyways, what I have found out is that it's not a Photoshop problem, it's a .Net Problem:
Using CreateInstance in Windows 10 Universal Apps
This answer suggests a solution, though I haven't tried it out yet:
InvalidCastException of a Activator.CreateInstance object during an installation procedure


Some pages ask for authentication although user is already authenticated

Question: In an MVC 4 project, i've used ASP web form authentication and is implemented in a base controller.
There are no specific roles created. Just simple combination of user name , password and authentication cookies.
It works all fine in development phase.
But after hosting at client, i found out that at specific area called Report, it asks for another authentication using browsers input form and is not authenticated even by original user name and password.
But hosting at my own development pc no such authentication is required.
What could be the possible reason?
Answer: Have you checked the 'Report' folder permissions on disk? Looks like the browser is asking you for windows authentication.


Can I place an equity order to buy/sell at an exact price, no better or worse?

Question: Limit orders allow buying or selling stocks or options at a certain price or "better".  Is there a way to enter or request that an order execute only at an exact price (for whatever reason)?  If not, are there regulatory or other reasons why such an order cannot be entered?
Comment: Why would you NOT want to trade at a better price? There is no mechanism to trade at a specific price because there is no practical reason that I can think of to forego a better price.
Comment: @DStanley By your logic, there would be no reason for stop orders. The reason I might "forego a better price", say when buying, is that if the price goes down too much, it may indicate that the technical strength that motivated me to buy is no longer present.
Comment: The only way to execute the buying or selling of a stock at an exact price would be with an option.  A limit order will guarantee that your trade will not be executed at an inferior price but there is no standard order type that avoids price improvement.  For further information, read about the NBBO quote.
Comment: So it's a technical trading strategy? I want to trade at this price, but if it goes _too_ low I want to stay away?
Comment: @BobBaerker that's not true. You're at the mercy of the MM. I mean, I have never seen any option that let's me trade at $xx.69.
Answer: No. (Or at least, "not today, not for retail/individual investors")
The Regulation National Market System (NMS) established by the Securities and Exchange Commission in 2005 was designed in part to help investor orders execute at a better price whenever possible.
The Order Protection Rule portion of the Regulation NSM mandates, among other things, that brokers route orders using the "most advantageous terms for the customer [..]"
So price improvement is effectively built into the requirement since it is "most advantageous".


Adding help button for each window

Question: I have found that user can associate help with his application using Help Viewer. Users typically launch Help Viewer by choosing the application help item from the Help menu, or by typing a query in the Spotlight For Help text field in the Help menu.
I have some different requirement: I want to associate component specific help to my application, means that there will be a small '?' marked icon at bottom left corner of a window and when user clicks it, appropriate help page will open. This case is similar to 'print' panels where there is a small '?' icon.
Can anyone suggest me some way to accomplish it, if it is possible?
Thanks,
Miraaj
Answer: The following thread may be of help: http://lists.apple.com/archives/apple-help-authoring/2001/Sep/msg00000.html.

Adding help button for each window


Deflated QQ plots in genome-wide association studies

Question: I am working on a GWAS dataset containing 920 individuals with genotype information on ~1.5M SNPs (genotyped on Illumina 2.5omni chip; no imputed SNPs). I am testing several different phenotypes in this dataset, but everytime I run an association analysis (logistic regression), my QQ plots look deflated, i.e. the P values are systematically less significant than the expected distribution. I have tested several different phenotypes, and get very similar results every time.
I tried running an association analysis using randomly generated phenotype labels (equal number of cases and controls), and the QQ plot is still deflated:
I have tried the following solutions:

adjustment for PCA coordinates
increasing minor allele frequency threshold to only include SNPs with maf>0.05
LD-based pruning down to 240.000 SNPs

None of which remove the deflation.
I searched for literature on this, and while some studies report this type of QQ plot, none seem to actually address the reason for the deflation. From what I can tell, deflation is known to occur in studies using imputed SNPs or data on copy number variation, but should not be seen in a dataset such as mine.
Does anyone know why my plots look like this, and whether this reflects a problem in data?
Answer: This is an answer to the old question, but many people still run into this issue.
Ok, so I guess the answer is that if your QQ plot looks like that, and the distribution of -log(P) values is linearly related to the expected values to some point, than the effects of the loci are truthfully lower than expected from the normal distribution. This is expected in highly quantitative traits, and directly related to the trait heritability. However, you can apply some less stringent provisional threshold (usually 3 or 4). According to the results of Bian and Holland (2017), the predictive abilities of the loci cut-off with threshold of 4 and the Bonferoni threshold were not notably different in poligenic traits.


lilypond & tin whistle

Question: I have prepared a songbook including notes, chords and lyrics. Some songs are good for the guitar as accompanying instrument, but some of them also are played well with the tin whistle. Are there any ideas, how to extend my scores by tin whistle diagrams?
Answer: Woodwind diagrams are relatively simple with LilyPond (see here).
But it's not automatic; you do have to type in the tone holes used for each note.
<code>\score {
    \new Staff {
         \set Staff.instrumentName = "Tin Whistle"

         \key d \major

         d'4^\markup {
             \woodwind-diagram #'tin-whistle
                 #'( (cc . (one two three four five six))
                     (lh . ()) (rh . ()) )
             }
         e'^\markup {
             \woodwind-diagram #'tin-whistle
                 #'( (cc . (one two three four five ))
                     (lh . ()) (rh . ()) )
             }
         fis'^\markup {
             \woodwind-diagram #'tin-whistle
                 #'( (cc . (one two three four ))
                     (lh . ()) (rh . ()) )
             }
         g'^\markup {
             \woodwind-diagram #'tin-whistle
                 #'( (cc . (one two three ))
                     (lh . ()) (rh . ()) )
             }
         |
     }

     \layout {
         indent = 25
     }
}
</code>
Comment: Is it possible to show partially occluded tone holes or the double tone holes of a baroque recorder?
Comment: In the link above: you can see how to show the various types of partially covered holes.

As for the recorder, unfortunately there isn't currently a woodwind diagram template in LilyPond.
You might be able to create one yourself if you know Scheme.  (I did try to learn Scheme myself for this exact reason, but I just couldn't understand it.  I ended up making my own diagrams by drawing them in LilyPond, which worked, but my coding was rather ugly.)
Comment: That looks pretty good!
But, as I have understood, I have to change all of my already prepared scores?
There isn't any dirty trick?
Comment: To simplify the coding:  You could make a function for each of the various fingering diagrams that you will use, and place these in a table that you _include_ when compiling.

You'll still have to make a function call after each note in the score to render each diagram though.  As far as I know there is currently no way to get LilyPond to read all of the notes and place the diagrams automatically.  (But you probably could get this to happen somehow if your computer science skills are really good.)

lilypond & tin whistle


How can I handle this splice joint between two shorter pieces of lumber?

Question: I want to build a mostly ground level deck. I have created plans and I want it to be 16' x 20' one long side will have a notch for a circle of rocks and a firepit. my issue is along straight the 20' side. I don't have 20' lumber available. How can I handle where two 10 foot boards meet? I've kept everything well below max span. I'll be using ground contact pressure treated lumber, and I checked it's southern pine.
Comment: If possible, I would put each splice directly over a footing.
Comment: Did you ever get this resolved? If so, please give a check-mark to the answer that helped you the most, or write up your own answer explaining what you did to get it fixed and give yourself a check mark. That will help others with this kind of problem know that this has a resolution and is a good place to look for their answer.
Answer: Another idea, I'd shorten that middle joist by 1.5" and double up the (looks like) 30.5" section of the rim joist between the adjacent joists with a piece 2x8 x 30.5".
Comment: so the back joist would be two 10's with a 30.5" board binding them? and the center joist that is perpendicular to half hexagon would be trimmed down at the back to accomodate?
Comment: @MVCylon - Yes, that's what I'd do.
Answer: You could double up on the Joist back to the blocking and just have one rim a bit longer than the other.
Not sure how you are fastening the Rim to the end of the Joists, but you could use a double 2x Hanger on the rim to attach the joist and its doubler from the inside with something like an HHUS26-2.
If you wanted to go Simple get a 10' and a 12' and then put the splice between the joists and then use the scrap from the 12' as a backing to bind the two rims together.
Answer: That is called the rim joist and in this case does not take load but just ties everything together, and very little of that as the deck boards will do most of that work. It's very common and very typical to just splice in the middle of a joist with 3/4" of each piece on the 1-1/2" wide joist and just nail each just like the other joists (number and size of nails), but a slight angle so the nails are fully in the joist


What's the difference between "finance hub" and "financial hub"?

Question: Though the phrase "financial hub" is much more widespread (according to a Google search), I have seen "finance hub" as well on news sites. Does the second have a different meaning?
Comment: Commerce centre vs commercial centre. Intention declaration vs intentional declaration. Alcohol salesperson vs alcoholic salesperson. Hyperbole occurrences vs hyperbolic occurrences. Explosion events vs explosive events.
Answer: The first uses the adjective financial as an adjective (as one would expect, I suppose).
The second uses the noun finance as an adjective.
You're allowed to use nouns in this way, but it is not as commonly done in cases where there is a well-known simple adjective, so we would expect the first to be more common, and it would probably be the better to go for, if you are choosing between using the two.
That said, business-y types seem to have a particular fondness for noun adjuncts. I think they've got the impression that they're more punchy or something. (If so, they are, IMO, wrong, but there's no accounting for taste).
Answer: Finance is noun ,say like mother tongue.financial is adjective for hub,so here hub is financial and there is a finance hub .we can also  say financial finance hub.so here hub is financial ,it may not be financial or we may discuss about the financial growth of the hub over given years and so on .now by  saying finance hub we get similar sense like defence hub,shopping hub ,teaching hub and vice versa and finance hub is one type similar to them.


Proteus ARES PCB - How do I wire a link pad to some component pad?

Question: I'm designing a single side pcb, due to trail's density, I decided to use link wires in order to avoid overlap, but when I started routing, the software didn't allow me to connect any wire to link's pad. I tried to assign some netclass but couldn't find a way to that. Sometimes, only by luck, I successfully make the connection, but I'm clueless about what made it possible. I attached a picture that illustrates both situations.
I'm using Proteus 8.6 SP2.
Answer: After we switch from ISIS to ARES, Proteus creates a netlist with information regarding the pads interconnection. This information is graphically represented with green lines once the components are placed in PCB layout. Those green lines are called Ratsnest. The manual states:

The term Ratsnest is used to describe the pattern you get on the screen when the pin to pin connections specified in the netlist are shown as single straight lines rather than copper tracking.

If using autorouter, ARES will generate copper tracking only between pads with ratsnest connection.
In this problem, a manual routing is being performed. ARES will use the ratsnest to assist the user in the routing process, it won't let a connection be made between two pads that don't belong to the same net, the same is true for a pad without a net. The former case is what is preventing us to connect the trace and the link's pad.
The link is a component that only can be generated inside ARES, but as long as the netlist is generated with the information provided by ISIS, ARES won't allow us to create any trace with the link, once the schematic doesn't give any information about it.
Thus, we need to include the link's pad to a specific net and then create our route, according to this procedure:

Select the Ratsnest Mode (Red Rectangle);

Click in link's pad;
Click in a pad belonging to the same net in which the link should be connected;
If you have done this right, you will see a ratsnest (green line);
Now select the manual route and create a trace;

Although this could be seen as an issue, this behavior really helps avoiding accidental connections in layout, specially in large PCB's.
I recommend reading this page before using the Ratsnest Mode.
Comment: Please, be kind and notify me from any grammatical mistakes, English isn't my mother language.
Comment: I don't fully understand your method, since I haven't used ISIS and ARES.   However, it sound like it requires several manual steps for each link, and probably breaks the link between the schematic netlist and PCB connectivity, so you won't be able to do a DRC check between schematic and PCB.  Designing the PCB as if it was two layers, and minimizing the tracks (which will become links) on one layer will require manual routing to minimize the number of links, and to locate the vias for the ends of the links as required, but will not break the link between schematic netlist and PCB, so you ...
Comment: ...can do a DRC between schematic and PCB, and get useful results.
Comment: I've done some testing after reading about the your feedback about the DRC check issue and here is my conclusion:
In the Ratsnest Mode, Proteus won't allow the link to be connected to two different nets, when one link's pad is assigned to some net, the other one automatically will be attached to the same net. I belive this behavior exists to avoid breaking the bond between schematic and layout, therefore the DRC and CRC remain valid.
Comment: Just to remember that this is valid for the component "link", I'm pretty sure that what @Peter mentioned will be valid for almost any other component like resistors, capacitors, transistors, etc... You will mess up with the CRC and DRC functionalities.
Comment: The manual advises against the use of Ratsnest Mode, exactly by this reason. So I recommend to avoid it, for any component other than the "link".
Answer: Design the board as two-sided, with vias large enough to accept the link wires.  I would try to make any tracks on the "link" side straight, as they will be replaced with wire links on the finished board.
If you design the board as single-side in the PCB program, you will need schematic symbols to show the links, along with a variety of footprints to cover the various lengths (and shapes) of links you have.
Comment: You are right @Peter, your method works and indeed is what almost every one in my research have recommended. But i came to a solution that I think is simpler, although I don't know if it have any drawbacks. What are your thoughts about the method I proposed? I would like to see your feedback.


List all keys with SHA-1 in the gpg keyring

Question: After reading a paper about "First Chosen-Prefix Collision on SHA-1 and Application to the PGP Web of Trust", I wonder how many SHA-1 keys are left in specific key rings.
How to list all keys in a gpg key ring, which use SHA-1?
Comment: @PauloTomé this would list **all** keys, not just the keys with `SHA-1`.
Comment: Is this related to [this paper](https://eprint.iacr.org/2020/014) by any chance?
Comment: The command `gpg2 --no-default-keyring --keyring  --list-keys` maybe of some help. Seen [here](https://lists.gnupg.org/pipermail/gnupg-users/2010-June/038847.html).
Comment: @StephenKitt Yes. While there is technically no direct link to the paper, it made me to think about this question. I have added the link to the paper in the question. I did not in the first place, because I do not want to discuss the paper.
Answer: To get the details of hash algorithms nominated for use with a particular key, edit the key, and then show the key's preference list:
gpg --list-keys

Get the key fingerprint that you want to query, and then edit to query the key prefs:
gpg --edit-key <key fingerprint>
gpg> showpref
[ unknown] (1). Bob Smith (GPG Key) <email@example.com>
     Cipher: AES, CAST5, 3DES
     Digest: SHA1, RIPEMD160
     Compression: ZLIB, ZIP, Uncompressed
     Features: MDC, Keyserver no-modify

You can control the hash used for key generation at the command line, for example, with "--cert-digest-algo SHA512" and "--s2k-digest-algo SHA512". See the man page for more details.
You can also change you default preferences. "gpg --version" will show your current settings. Edit gpg.conf to explicitly remove SHA1 for future default key creation of setpref resets:
personal-cipher-preferences AES256 TWOFISH AES192 AES
personal-digest-preferences SHA512 SHA384 SHA256
personal-compress-preferences ZLIB BZIP2 ZIP

From the man page:

showpref
More verbose preferences listing for the selected user ID.
This shows the preferences in effect by including the implied
preferences of 3DES  (cipher),  SHA-1  (digest),  and Uncompressed
(compression) if they are not already included in the preference list.
In addition, the preferred keyserver and signature notations (if any)
are shown.
setpref string
Set  the  list  of  user  ID  preferences to string for
all (or just the selected) user IDs. Calling setpref with no arguments
sets the preference list to the default (either built-in or set via
--default-preference-list), and calling setpref with "none" as the argument sets an > empty preference list. Use gpg2 --version to get a
list  of  available algorithms.  Note  that  while you can change the
preferences on an attribute user ID (aka "photo ID"), GnuPG does not
select keys via attribute user IDs so these preferences will not be
used by GnuPG. When setting preferences, you should list the
algorithms in the order which you'd like to see them used by someone
else when encrypting a message to your key.  If  you  don't include
3DES,  it  will  be  automatically  added at the end.  Note that there
are many factors that go into choosing an algorithm (for example, your
key may not be the only recipient), and so the remote OpenPGP
application being used to send to you may or may not follow your exact
chosen order for a given message.  It will, however, only  choose an
algorithm that is present on the preference list of every recipient
key.  See also the INTEROPERABILITY WITH OTHER OPENPGP PROGRAMS
section below.

To automate, would need to extract each key and then query prefs.


gcsfuse fstab configuration with google compute engine

Question: I am running freepbx Centos on a GCE VM. Syncing stops when FreePBX/Asterisk tries to write and create a folder in the mounted folder and FreePBX is unable to write / create folder in the folder. Everything works again when the system is rebooted because gcsfuse is no longer mounted.
gcsfuse works when:
-create a folder /var/spool/asterisk/cloud.
-mount it using gcsfuse --implicit-dirs siphqrecordings /var/spool/asterisk/cloud.
-create a sample text file nano test.txt.
-it syncs up to my bucket just fine
It completely stops working when:
-FreePBX tries to place a file and folder in the directory (a recorded call), the folder and file never gets written. I have unmount/reboot the server and then freepbx is able to use the folder and write files and directories to it. Even if I try to create a manual file using nano it never sync up.
FreePBX is unable to write to folder mounted with gcsfuse and the sync stops even for manually created files.
I think I need to somehow mount it in FSTAB but dont know-how… the user is root on the folder but asterisk is the user posting to the folder, so it's probably some kind of permissions?
drwxr-xr-x 1 root root 0 Nov 21 15:45 cloud
drwxrwxr-x. 2 asterisk asterisk 6 May 2 2018 fax
drwxrwxr-x. 2 asterisk asterisk 6 Nov 21 15:44 incron
Answer: OK I got it to work:
nano /etc/fstab
mybucket /var/spool/asterisk/cloud gcsfuse rw,allow_other,file_mode=777,dir_mode=777


HTTP Fetching failing on PHP OpenID

Question: I have dropped a php v5 openid library into a site and ran detect.php which fails on 'HTTP Fetching' (report at the end of this message). The discovery.php also fails. The server is running on HTTPS and has all the needed libraries added so should just work - as it has on other servers I have implemented it on.
Any attempt to run the consumer/try_auth.php fails with an error 'not a valid OpenID' which apparently is being caused by the failure to http fetch.
Any pointers would be appreciated.

OpenID Library Support Report
This script checks your PHP installation to determine if you are set
  up to use the JanRain PHP OpenID library.
Setup Incomplete
Your system needs a few changes before it will be ready to run the
  OpenID library.
Math support
Your PHP installation has gmp support. Good.
Cryptographic-quality randomness source
Using (insecure) pseudorandom number source, because
  Auth_OpenID_RAND_SOURCE has been defined as null.
Data storage
No SQL database support was found in this PHP installation. See the
  PHP manual if you need to use an SQL database. The library supports
  the MySQL, PostgreSQL, and SQLite database engines, as well as
  filesystem-based storage. In addition, PEAR DB is required to use
  databases.
If you are using a filesystem-based store or SQLite, be aware that
  open_basedir is in effect. This means that your data will have to be
  stored in one of the following locations:
'' If you are using the filesystem store, your data directory must be
  readable and writable by the PHP process and not available over the
  Web.
HTTP Fetching
This PHP installation has support for libcurl. Good.
Fetching URL failed!
Your PHP installation appears to support SSL, so it will be able to
  process HTTPS identity URLs and server URLs.
XML Support
XML parsing support is present using the Auth_Yadis_dom interface.
Query Corruption
Your web server does not corrupt queries. Good.
Answer: This error has been thrown because SSL verification fail when curl_getinfo on Auth_Yadis_ParanoidHTTPFetcher. To solve this issue, you should disable SSL verification by adding this option:
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);

to Auth/Yadis/ParanoidHTTPFetcher.php at line 93 (after $c = curl_init(););
Hope this help.

HTTP Fetching failing on PHP OpenID


RAID 1 on Boot Disk Recovery

Question: I am using software RAID 1 under Linux on a bootable partition. I am worried that when a disk dies or is corrupted, the system might boot from the empty replacement disk or from that corrupted disk (instead of the good one) and start overwriting the good disk with no or bad data. Is this a valid concern? If so, does anyone have a good strategy for preventing it?
Answer: into raid one you don't access the drives directly
but trough a second layer so you should not be worry
FYI http://www.howtoforge.com/software-raid1-grub-boot-debian-etch
describes as well the way to install grub which is
the boot loader.
Comment: This answer doesn't really allay my concerns. What if the higher layer gets confused? Is that likely? How would it know which copy of the data is not corrupted? Maybe that empty disk is the result of a legitimate deletion and that disk full of data should be deleted.
Comment: if you install the grub into both disks you should be fine - see the tutorial on how to do it. even if one disk is bad you can still boot from the other one but the key is to have grub installed.

RAID 1 on Boot Disk Recovery


Believe it or not

Question: Shouldn't "believe it or not" be "believe it or don't?"
I do not see the word "not" being used like that elsewhere.
Comment: Perhaps it should be "don't", but a century or so of [Ripley's Believe It or Not](https://en.wikipedia.org/wiki/Ripley's_Believe_It_or_Not!) has made that phrasing idiomatic.
Answer:
I do not see the word "not" being used like that elsewhere.

For that particular construction, there are others that are similar and easily understood:

Ready or not..., Like it or not..., Whether he knows it or not..., etc.

There is a dropped verb there, not necessary for understanding. You did understand "Believe it or not," did you not?

Believe it or [do] not [believe it]...

Words that are easily understood to be part of a phrase are often omitted. For example, the same can be said this way:

Words easily understood to be part of a phrase are often omitted.
Comment: Makes sense to me. Don't know why the drive-by downvote. *Words easily understood to be part of phrase *are* often omitted!*
Comment: @Rathony - I do agree as a matter of grammatical purity, but support the truth of what Medica asserts: fluent English users do a lot of crazy things that don't follow the rulebook, and are understood clearly all the same. I think I was watching while the downvote happened, and lobbed a dinner roll... Cheers!
Comment: @Rob_Ster I get your point. but this community is not about how native English speakers parse a phrase or sentence. There is a grammatical rule that explains that omission. BTW, I am not a grammar purist but this answer has room for improvement.
Comment: @Rob_Ster I am not the downvoter, but if you write a full sentence, you have to write the subject of the sentence, too. There is a possibility it is short for "Whether (even though, although, etc) you believe it or you don't believe it"
Answer: You can explain it as a shortened form of " Believe it or do not believe it". As this is a frequently used sentence introduction "or do not believe it" was reduced to "or not".
Despite the shortened form the sense of this idiomatic formula remains clear.
Answer: It seems to follow a slightly more archaic pattern than suggested in the previous answer.

Believe it or [believe it] not.

Believe it or not


Setup Production Database on Staging server in Magento 2.4

Question: I downloaded the production database. Now I want to setup the database on the staging server. So what sanitize process I have to apply on the database before uploading to the staging server.
Answer:
sales_flat_order
sales_flat_order_address
sales_flat_order_item
sales_flat_quote
sales_flat_quote_item
sales_flat_shipment
sales_flat_shipment_item
sales_flat_creditmemo
sales_flat_creditmemo_item

These tables store data about orders, quotes, shipments, and credit memos. Truncating or removing the entries in these tables will reset the data for these entities on the staging server.


Windows: Why does Bonjour's mdnsNSP.dll inject itself into every process?

Question: In Windows, why does Bonjour's mdnsNSP.dll inject itself into every process?
Answer: Sounds like you are curious about security and privacy. If so, your question should be "Why does my operating system allow third-party software to become aware of and affect every process?" or, "If I care about security and privacy, why am I using Windows?"
Bonjour is Apple's implementation of zero configuration networking. A very long time ago, and very shrewdly, Microsoft began making its OS and most of its processes, and the file system as well, network aware. Most notably, the file manager Windows Explorer was made network aware, which was also basically the same application as the native web browser, Internet Explorer,  and this change in the behavior of the operating system led to antitrust cases regarding which web browsers shipped with Windows. By now, I imagine, everything running in Windows is probably network aware, and are identified and advertised as 'Services' to the Windows kernel and the network. If so, it makes sense that Bonjour would make itself available to every processes to enable zero configuration networking.
Comment: The answer is saying that this is because Microsofts's networking is inserted into notepad and the MS network includes Bonjour
Comment: Windows did not allow it; I allowed it by installing iTunes as admin. Why does Apple need to inject this DLL into notepad.exe, for example?


Price of a European Call option is a convex function of strike price K

Question: I'm trying to show that the price of a European call option (payoff function is $(S_1-K)^+$) in a no-arbitrage market is a decreasing and convex function of K.
That it shall be decreasing makes sense; as $K$ increases, $S_1-K$ decreases and we make less profit. But why shall it be convex?
Answer: Let the price of an option at strike $K$ be given by $V(K)$. To say that the price is convex in the strike means that
$$V(K-\delta) + V(K+\delta) > 2 V(K)$$
for all $K>0$ and $\delta>0$. Let's assume that the opposite is true, i.e. that there exist tradeable option contracts expiring on the same date such that
$$V(K-\delta) + V(K+\delta) \leq 2 V(K)$$
I therefore buy a contract at $K+\delta$ and one at $K-\delta$, and finance my purchase by selling two of the options at $K$ (which I can do, because the two options struck at $K$ are at least as expensive as the other two combined).
At expiry the price of the stock is $S$, and my total payout is
$$P = (S-(K-\delta))^+ + (S-(K+\delta))^+ - 2(S-K)^+$$
Now there are four regimes:

$S<K-\delta$, which means $P=0$
$K-\delta < S < K$, which means $P=S-(K-\delta) > 0$
$K < S < K+\delta$, which means $P=S-K+\delta - 2(S-K)=K+\delta-S>0$
$S>K+\delta$, which means $P = S-K+\delta + S-K-\delta - 2(S-K) = 0$

So I have the possibility of making a profit, but no possibility of making a loss - which is an arbitrage. Since no arbitrages exist, the option price must be convex in the strike price.
Comment: @User you can show that the case $t =1/2$ is equivalent to standard convexity when the function is continuous. In this case, the black scholes price is continuous in $K$/
Comment: Why this definition of convexity is equivalent to the std definition : $\forall K_1, K_2$, $t \in(0,1)$, $V(tK_1 + (1-t) K_2) \leq tV(K_1) + (1-t)K_2$...??
Comment: @ChrisTaylor, but by taking t=1/2, aren't we considering a particular case only?
Comment: Choose $K_1=K-\delta$, $K_2=K+\delta$ and $t=1/2$ to see the equivalence.
Answer: There is a much simpler solution to the question regarding the convexity of the call option function. Let $K$ be the strike price and $x$ the stock price. Since the function from $K$ to $\max(0, x-K)$ is convex and conditional expectations are linear, the function $K$ to the conditional expectation of $\max(0, x-K)$ (under the risk-neutral density function) is also convex. Therefore we have shown that the call option price function is convex.
Comment: The expected pay-out (under the risk-neutral measure) is the call option price.
Comment: By the Fundamental Theorem of Asset Pricing it's known that the market is arbitrage-free if there exists at least one risk-neutral probability measure. (The market is even complete if there exists only one risk-neutral probability measure). Therefore, if there is no risk-neutral measure, the market is not arbitrage-free. So we can "assume" that there exists at least one risk-neutral probability measure, since we want the market to be arbitrage free for our model/calculations.
Comment: Your answer concerns the expected pay-out instead of the price. The latter includes a risk premium.
Comment: The call price is the expected payout under the (unique) Martingale risk-neutral measure. This can be written as an iterated expectation first conditioning on the stock  price at expiry, then the expectation over those stock prices is a linear combination of those simple convex functions Quant Finance uses. Linear combos of convex fns are convex fns.


Count on beat 2 and 4

Question: Why do jazz and funk musicians count on 2 and 4 beats on a 4/4 beat?
I've noticed that most musicians of other styles count on 1 and 3 or 1,2,3,4.
Is there any advantage in counting on 2 and 4?
Comment: If the legendary Barry Harris says it's ridiculous to tap on 2 and 4, I'd follow his advice, and stick to 1 and 3. See this video at 03:00 https://youtu.be/jeWO0vYTmsI
Comment: The genre of reggae music many times emphasizes the 2 and 4 beat heard often by the guitar strum.
Answer: I don't think it's really an advantage, but more of a stylistic choice.  It's like a form of syncopation, only instead of emphasising between the beats of the bar, you're emphasising the weak beats(or between the stressed beats) of the bar.
It's a staple technique of certain genres like Ragtime and Ska, but in the case of Jazz, funk and most other genres it's more something that's occasionally used to add interest and contrast to the music.
Answer: It's supposed to mimic the jazz sound of the hi-hat on 2 & 4, and the theory is that learning to play over that kind of counting/tapping is better for your rhythmic awareness and swing feel. It definitely takes more practice. YMMV.
Answer: I don't know how it started, but there are a few subtleties about it.  As Alexander Troup said, it's stylistic, and it sets the style for the song.
Beats 2 and 4 are equal in weight.  The downbeat is always the strongest beat, followed by the third beat.  When you count all four you count "ONE two Three four ONE two Three four" with weak and strong beats.  Counting on two and four is like "(rest) two (rest) four / (rest) two (rest) four" with two and four being equal in weight.
Additionally, counting on the strong beats gives a feeling of downward motion like a march.  We call these beats "downbeats" and "upbeats" for a reason.  For most dances, your foot goes down hard on the downbeat.  In a jumping dance, you jump up on the upbeat and land on the downbeat.  Counting only on the upbeats emphasizes this feeling of upward motion and leaves out the downward motion.  As Shevliaskovic said, it makes the song swing, and I think it's the "lift" and the absence of "thud" that does it.
Answer: The backbeat (2 & 4) is accented in many types of jazz, but One is still One, and the count-in is still 'One, two, one-two-three-four!'   It's a often-quoted truism that the key to Swing is 'knowing where One is'.
In Reggae there is a heavy accent on Four, lesser accents on the second half of each beat - One AND two AND three AND four AND.   The first beat may even be un-played!   But it's still there, and very important.  You can't accent Four unless you know where One is.
Answer: I think counting (tapping) on two and four also applies to other forms as well. Country, rockabilly, folk, ska, reggae, and probably other styles. Some people find this easier than others to do this. I find that counting this way makes me play locked into the rhythm of the song, where as when I tap on the strong beats, I tend to float over the tune with no
rhythmic emphasis. Uptempo songs also seem to benefit form this style of counting (2 & 4). If the tempo is 200bpm, set the metronome at 100. These
beats will imply the 2 & 4. I find when playing these faster tempos in this fashion I never speed-up or slow down.
Answer:
Counting off a tempo to a jazz band is one of the most important things a director needs to do.  The whole tone and style of the music is dictated by the way the director kicks off the chart, yet it's something that easily gets neglected.
[..]
How you snap or clap depends on the style of the groove you're kicking off.  With a swing feeling you should always snap or clap on beats two and four, assuming a 4/4 time.
[..]

via wilktone
So, counting on beats 2 and 4 makes the song swing
Comment: Not COUNTING.  One is still one.  You might 'click' on 2 and 4, but they still ARE 2 and 4¬
Answer: Actually the difining trait of funk music is an emphasis on the 1 and the 3 - but especially the one. If you listen to James Brown, you'll here him say things like, "Gimme the one," or "Hit me". "Hits" were beaten the one. It's something that he pretty much came up with. Before that the emphasis for jazz was always on the 2 and 4 - even though they like to experiment - and the emphasis in the blues was usually on the up beat. Both were a swing kind of feel.

Count on beat 2 and 4


Make the horizontal bars less prominent

Question: The new design has very prominent 2px or 1px solid black horizontal lines separating questions and comments.
I personally find those bars distracting, and think they should be toned down significantly by making them gray and/or not solid.
As I was unsure if that was only personal preference I checked every SE site with a design on how the dividers between questions looked. None of the SE sites use a solid black line, they're always at least gray and most of the time they are dotted lines that are pretty understated.
Answer: this has been changed to light grey.

Make the horizontal bars less prominent


At What Point in My Workflow Should I Apply a Mirror Modifier?

Question: I applied the mirror modifier to my object. So now, how can I return the mirror modifier and work symmetrically? When I try to add the mirror modifier again, the faces of my existing mesh have been duplicated.
Answer: Either undo (CTRL+Z), or File > Revert, or load a backup file, or manually remove mirrored vertices:

Press Numpad 7 if your object was mirrored around X or Y, or e.g. Numpad 1 if it was mirrored around Z, then press SHIFT + Z for X-Ray mode and drag-select all vertices that have been mirrored - and press Del or X to remove them.
Answer: One important thing to understand about modifiers in Blender is that they are non-destructive, meaning that their effects are non-permanent for as long as they continue to be in use. This has a lot of advantages, such as tweaking the modifier's specific starting values in order to get a complex outcome on the fly, for the sake of visualization, without the need to commit to the results.
So when you apply any modifier, then, that is the moment at which it becomes final, or permanent. That modifier is no longer in use once applied. If the modifier is one that generates geometry (as the Mirror modifier does), then applying it makes the geometry it generates "real". You can see this by going into Edit Mode both before and after the modifier is applied. Before it's applied, the new geometry is not shown in full, substantial form, because Edit Mode does not lie, and so it only shows the real geometry in full form. After the modifier is applied, Edit Mode will show you the new geometry fully represented along with the old, as if the new geometry had already been part of your mesh, ready to be tweaked as needed.
Once this is understood, your problem becomes clear. Applying your modifier created extra geometry (or duplicated faces, as you say). If you want your modifier to remain editable, then you must not apply it; you should not apply a modifier until you are finished tweaking it or dialing its starting values. This is because there's no going back after applying, unless you are in a position to Undo back to that point, which you may or may not be able to do in various cases.
Hope this helps.


A doubt on waves

Question: We know that every progressive wave depends on its position X and time variable T.
y= Asin (kx- wt)
My doubt is
"Even an election is a wave (de broglie's hypothesis), but we cannot write its equation as a function of position because of heisenberg's uncertainty principle. So is there a mistake in our equation or is there some other equation for subatomic particles?
Comment: The wavefunction of any particel basically gives you the probability of finding a praticle at a given position. There is no contradiction to the uncertainty principle.
Comment: The uncertainty principle states that we cannot determine the exact position and velocity of a particle simultaneously. But to define the particle's wave nature, we need to no its exact position right? There should be no uncertainty in that. Then how is it possible to call an electrons path as a wave?
Comment: No, this is a misconception. The wavefunction gives you a tool to calculate the probability to measure a particle at a given position. Without a measurement it doesn't even make sense to ask where it "really" is. When you are doing a measurement you can get the position of the particle with a given uncertaintay. This uncertainty actually gives you the limit for the accuaracy of an additional measurement of its momentum - fully in line with the uncertainty principle.
Comment: Make the question title more specific. "Doubt on waves" is too generic
Answer: There is an equation for the de broglie's wave and its depend on the coordinate, for example for the particle which moving with the given energy $E = \frac{\textbf{p}^2}{2m}$ and momentum P  along X-axe it will be as $$\psi(x,y,z) = exp\left(\frac{i}{\hbar }(Et - px)\right)$$
But x is not the coordinate of the particle, it is the coordinate of the point of space in which you want to calculate the probability of particle detection.
Answer: The wave function is just a function that tells you what are the probability amplitudes associated with the particle being found in a certain state. The $x$ in $\psi(x,t)$ is NOT the position of the particle; it is a point in space(time) at which $|\psi(x,t)|^2$ tells you the probability density of finding the particle. The fact that at the same $t$, a different point $x'$ has a nonzero $|\psi(x',t)|^2$ reflects that it is not certain that the particle WILL be at $x$(or $x'$), rather there is a certain probability that it will be in any given position.
These positions can now thought to be a random variable, and the standard deviation of that distribution would tell you the uncertainty in position. Moreover, the schrodinger equation tells you only the undisturbed, causal time evolution of the wavefunction- a measurement will collapse the wave function to a value the Schrodinger equation cannot causally determine(it will be in one of the eigenstates).
The specific example of a plane wave associated with a free particle(which, by the way, is not the 'right' solution, since it is not normalizable-the correct wavefunction would be given by a fourier integral of the plane waves) has the wavefunction $$\psi(x,t)=e^{i(kx-\omega t)}$$ tells you that the probability amplitude is $$|\psi|^2=\psi\psi^*=1$$, which is a constant; i.e. the particle is equally likely to be found at all points. This means that there is infinite uncertainty in position-you have no information about where the particle is. This is consistent with the uncertainty principle-the wavefunction above assumes that we know exactly what $k$ (and hence $p$ ) is. The more general result is to introduce a 'variance' in $k$-i.e. consider a superposition of various plane waves, and do a Fourier transform. The true wavefunction would be $$\psi(x,t)=(2\pi)^{-1/2}\int{\phi(k)e^{i(kx-\omega(k) t)}}dk$$ , and now this will show a spread in both $x$ and $k$(i.e.$p$), consistent with the uncertainty principle.

A doubt on waves


Countlines of code : include deleted lines?

Question: Should we need to consider deleted lines of code , along with inserted(added)/modified lines of code while taking metrics? ( say revision's to code made me to delete some lines of code)
Answer: That really depends on what the metrics are trying to show.
Personally I'm always more smug and self-satisfied after deleting code than after adding it. But then I've never found that "lines of code" ends up as a particularly useful metric in the first place. Be careful of what importance you place on such a figure.
Answer: LOC is rarely correlated with quality of code, which is what you should be measuring.
If im asked to write a function to, say, reverse a linked list, then whats likely to be a better solution? A one liner that reads like I mashed my head on the keyboard, but works (Perl, im looking at you...), or a 100 liner that goes into excriuciating detail to explicitly step through everything?
Or somewhere inbetween?
Answer: The problem with using SLOC (software lines of code) as a metric is that it can be gamed easily:
if( condition ){
    return 1;
}
return 2;

That's 4 lines but...
if( condition )
{
    return 1;
}
else
{
    return 2;
}

Well, that's 8 lines.  So what are your employers or customers trying to do with the data?  How much does it really tell them?  There are a bunch of much better metrics to be had than SLOC.
Answer: Yes.  The number of lines deleted is significant if you consider line counts significant.
But that begs the question of what use you are going to make of these line counts.  I certainly hope that you don't say that the person with the largest line counts is the most productive.  That certainly isn't true.  Indeed, if you make it clear that people are being assessed on the number of lines they commit, you only encourage people to do things to inflate their commit line counts.


Marketing Cloud Connect 208.2 Connection Error

Question: I have hit a dead-end with one of our Marketing Cloud Connect implementations. If anyone can throw in any suggestions, I'd be very grateful (are grasping at straws at this point).
Problem Summary
After the Connector is all setup, even though we can see the reports and email templates, when we actually do a send, nothing occurs. Specifically, when we send to a report from Salesforce, it shows 'Processing' with a message of 'Data retrieval retried.' In Marketing Cloud, when sending to a report, the send never get's scheduled or appears in the Tracking. The API logs show a message of 'User Not Authenticated'.
Interestingly, this is a Multi-Org environment and we were able to connect another Salesforce Instance without issues (everything works).
We have narrowed it down to some form of an OAuth / Permissions issue, but we are ultimately hitting a roadblock.
Attempted Resolutions
We have followed every single step in the help documentation, including the troubleshooting guide (eg. re-change your password, make email opt-out visible to all).
We have set all the Salesforce System User / API user credentials to System Admins and relaxed all security restrictions. We have also manually whitelisted all the IPs.
We also manually went through each step that the Connector Setup Wizard goes through.
We also had a separate independent Marketing Cloud instance, manually mirrored the settings, hooked it up to our Salesforce Sandboxes and got it to work on that end (2 Salesforces connecting to 1 Marketing Cloud).
Long story short, we are open to any ideas out there.
Answer: You can raise a case with Salesforce Marketing Cloud and provide proper case details. They will try to resolve the problem from their end.


Output voltage level of TTL gate

Question: The output voltage level of the TTL logic family is from 0 to 0.4 volts (LOW) or 2.4 to 5 volts (HIGH). Suppose we have a TTL inverter with a square wave of 5 volt amplitude as input (0 volt and 5 volt). What will be the voltage levels at the output? On what factors will the output voltage levels depend?
Comment: Is this a homework question? It certainly reads like one.
Comment: This question was asked to me in an interview.
Answer: The output voltage of a TTL gate will depend entirely on what's connected to it, how it is "loaded".
In fact, the output voltage of anything will depend on the load. It's just that TTL logic outputs are notoriously "weak", having resistance that seriously limits the current they are able to source and sink into/out of any connected load.
To complicate matters, their outputs are far better at sinking current (from a higher potential), than sourcing (to a lower potential). In other words, they are better at "pulling down" (where current is drawn into the output, from a higher potential) than "pulling up" (in which case current is leaving the output, flowing to a lower potential). For example, it's generally OK to connect an LED between a TTL output and +5V (below left), but not to ground (right):

simulate this circuit – Schematic created using CircuitLab
It's not easy to say what the output voltage will be; everything depends on the load, and whether that load is a current source or sink, from the perspective of the gate itself.
In general, for an output to be called "TTL compatible", it must comply with a certain set of extreme-case requirements. For example, it must be able to source a certain amount of current, while maintaining a "high" output of at least +2.4V. It must also be able to sink a certain amount of current while maintaining a "low" output of at most +0.4V.
The actual output current limits depend on the family of logic ICs. the 74xx series  has different specifications from the 74LSxx series, which differs from 74ALSxx, and so on.
Compare this to CMOS devices (like the 74HCxx series), which have much more symmetrical output characteristics (meaning they can source and sink current with similar ease). Their outputs are entirely compatible with TTL, in that they meet (and far exceed) TTL output voltage minima/maxima, but have much better current sourcing ability. That's why you often see LEDs connected between CMOS outputs and ground, something you'd never do with TTL.
It's perfectly possible for you to over-load both TTL and CMOS outputs in some way that renders the gate unable to comply with specified minima and maxima, but that's not the gate's fault.
For these reasons it's not possible to say with any certainty what a TTL gate's output voltage will be. The best we can do is say that as long as the output is connected to a load that doesn't violate the gate's recommended operating conditions, when it's supposed to be high, the output will be +2.4V or greater, and when it's supposed to be low, the output will be +0.4V or less.
For a TTL inverter (such as one of the gates in a 74LS04), this translates to: as long as the output is connected to a load that doesn't violate TTL recommended output loading, then

When its input is less than +0.8V, the output will be +2.4V or greater.

When its input is greater than +2.0V, the output will be +0.4V or less.

These are the only guarantees you get, regarding output voltage.
Comment: Here goes away my doubt ! Thank you very much Simon for your detailed explanation.
Answer: All we can say for certain is that a logic LOW should be under 0.4 volts, and a HIGH should be above 2.4 volts.
If I recall correctly, in practice, a LOW may be about 0.2 volts, and a HIGH will be 3 - 4 volts when connected to a TTL input.
Both levels will depend on what the output is connected to.  If the output is connected to a load passing more than 20 mA, the output voltage (high or low) may not meet the official TTL High or Low voltage levels.
Comment: Depends on which exact TTL compatible logic family is in question. Standard TTL can't even sink 20mA and source current is anyway about one tenth of sink current, so 20mA is a poor example of a load that a TTL output can't drive anyway.
Comment: can you please clarify : "If the output is connected to a load passing more than 20 mA, the output voltage (high or low) may not meet the official TTL High or Low voltage levels."
Answer: The output voltages are in the range you quoted so you have the answer already.
The output voltages will be guaranteed to be within that specified range, when loaded within the specified load current range, and the chip being powered with supply voltage that is also within the allowed range.
If there is a heavier load than specified, then the voltages may be out of the specified range.
There are different TTL compatible logic families and even within them there are chips with standard outputs and some chips with stronger outputs that can be used as a buffer.
For any specific chip, you need to see the data sheet to know what it is capable of.
Comment: @MajidAhmad There is no such thing as "exact" output value so you can only have a "range" where it is, as it depends on supply voltage, output load, logic family type, IC manufacturing tolerances, and so on.
Comment: @MajidAhmad: for TTL (and most other logic families) the exact output voltage will not depend on the input voltage if the input voltage is within the "official" input logic levels.
Comment: Thanks Justme, but I was interested in knowing the "exact" value of output voltage, when we know the "exact" value of input voltage.
Answer: It is complicated to explain the detail.
Briefly speaking, traditional 5V TTL gate output stages use two NPN transistors.
The transistor at the bottom is for pulling down (sink current.) We know a saturated NPN Vce can be as low as 0.x voltage. Therefore, the low output is below 0.4V.
The transistor at the top is for pulling up (source current.) We know an NPN needs about 0.6V Vbe to turn on. For some reason, a diode is needed between the top NPN and the output stage, another 0.6V. Therefore, TTL output high is almost impossible to be higher than 5-0.6-0.6 = 3.8V. In a real IC, there is a protection resistor causing more voltage drop.
In my experience, TTL output low is about 0.2V to 0.4V; output high is about 3V to 3.5V.
Comment: "A diode is needed between the top NPN and the output stage" for this "NPN" to be reliably switched off.
Answer: How do we demystify TTL output stage?
TTL circuits are some of the strangest creations of circuit designers (perhaps rivaled only by ECL circuits). If we type in the Google window "transistor-transistor logic", more than 18 million pages will pop up telling us "this is so..." but we will hardly find any pages that say "why this is exactly so..." We have no choice but to try to answer our own questions.
There are two oddities in these creations - first in their input part and then in their output part. Here, the object of our attention is their output part.
Reinventing TTL output stage
I am not a circuit designer, just a "circuit thinker"... and I can only guess what the designers had in mind in the 60's. What I can do is try to reproduce their train of thought in the form of an imaginary pseudo-invention.
The idea of the complementary output stage
... is extremely simple and intuitive  - to change simultaneously and in opposite directions the resistances of a voltage divider. This configuration can be thought of as two cross-fading "pull-up" and "pull-down" resistances.
Potentiometer
This idea was implemented in its simplest electromechanical form already in the 19th century as a potentiometer. A unique property of this device is that when we move the wiper, the total resistance, current and voltage remain constant;  only the ratio between partial resistances and voltage drops changes...

simulate this circuit – Schematic created using CircuitLab
... and we use one of the voltages (usually the grounded one) as an output voltage Vout. Use DC sweep simulation.

Complementary (push-pull) stage
It was implemented a century later using tubes and transistors. The only difference with the potentiometer is that the resistances are electrically controlled and non-linear.
The most logical solution in our opinion now would be for them to then use different (NPN and PNP) transistors. They should be connected with their collectors (as today MOS transistors in a CMOS pair are connected through their drains). We can name this "complementary TTL" structure CTTL:-)
I will use CircuitLab to explore the schematics below. Since they are conceptual, I propose to drive the transistors in the most straightforward way by applying two separate input voltages (Vin1 referenced to Vcc and Vin2 to ground) directly to their base-emitter junctions. Because this is inconvenient in practice, later we will combine them into a single input voltage Vin. We only want to be careful not to exceed the permissible base-emitter voltage. Let's first manually explore three typical states of this configuration.
Vin = 0 V (Vin1 = 700 mV, Vin2 = 0 V). After carefully setting these input voltages, Q1 will be on and Q2 off. A current flows through Q1, exits and passes through the load (a voltmeter with intentionally reduced to 10 k resistance). So the stage is sourcing.

simulate this circuit
Vin = 2.5 V (Vin1 = 750 mV, Vin2 = 712 mV). During the transition, both transistors must pass current (the output should not remain "floating") and the output voltage must be equal to half of the supply voltage. Adjust Vin1 and Vin2 carefully to achieve this condition.

simulate this circuit
Vin = 5 V (Vin1 = 0 V, Vin2 = 700 mV). Now the roles are reversed - Q1 is off and Q2 on. A current flows through the load (a voltmeter with intentionally reduced to 10 k resistance), enters and flows through Q2. The stage is sinking.

simulate this circuit
Vin = var (Vin1 = 750 mV - 0 V, Vin2 = 0 V - 697 mV). Finally, let's investigate the stage by a linearly varying input voltages to see the transition. Since I have used CSV voltage sources, use time-domain simulation.

simulate this circuit
As you can see from the graph, the characteristic resembles that of the CMOS stage. It is very steep in the middle because the transistors behave as current sources at the time of switching (dynamic load) and reach the supply rails when they are on. So our "CTTL stage" is almost perfect.

Conceptual phase splitter circuit
It is time to replace the two separate input voltage sources (one of which is connected to Vcc) with just one grounded source Vin. Let's model it first with the ubiquitous voltage divider, only a little more complicated - with two constant resistors R1 and R2 and a variable  resistor RQ inserted between them.

simulate this circuit
When we vary RQ, the common current through the three resistors in series varies (unfortunately non-linearly) and the voltage drops across R1 and R2 vary as well. So if RQ is a voltage-controlled resistor, the two transistor input voltages will be controlled by the single input voltage.

Practical phase splitter
It remains only to replace the variable resistor with a transistor Q that will act as a voltage-controlled "resistor".

simulate this circuit
Now the voltage drops across R1 and R2 depend almost linearly on the input voltage.

Prototype of TTL output stage
However, for a number of reasons, PNP transistors were inconvenient to use, and so the designers decided to replace Q1 with another NPN transistor... and this is where the trouble starts (note that it works in active mode as an emitter follower, not as a transistor switch). Let's do it and connect the phase splitter to the NPN transistor pair...

simulate this circuit
... and sweep Vin. But what is this significant current surge at the moment of switching?

Aha... clear!  This is the moment when both transistors are "on". We need to somehow reduce the overlap and limit the current surge.
Classic TTL output stage
We notice that when Q is on, only the Q2 base-emitter junction is in parallel to Q1 base-emitter junction and that is not enough to be Q1 off. We need to insert another diode somewhere in the loop. The designers chose to put it in the emitter of Q1 apparently because the current is higher there. Then, to limit the current, let's insert a 130 ohm resistor R3.

simulate this circuit
Now let's see how the output voltage changes.

At the moment of transition, the current is significantly reduced.

Why the HIGH output voltage is low
A bunch of problems lead to this:

A voltage drop is lost in the resistor R1

Another voltage drop is lost in the resistor R3

0.7 V is lost in the emitter follower Q1

Another 0.7 V is lost in the diode D

You can see it in the graph below.

How to make it high
We can "pull up" the TTL output by another resistor R4 connected to Vcc. The trick is that diode D is off and disconnects Q1 from the output.

simulate this circuit
As you can see, the output voltage is almost 5 V but only if there is a high resistance load connected.
Comment: I'm glad you got some value from my observations. Just to add that if you look at the accepted answer, which is well-upvoted, it's addressing the content of the question rather than the whole subject like here.
Comment: Sorry, no time and I think most here can see how it could be a fraction of its size, because most answers are far smaller. For example, take the first two paragraphs with GIANT heading, they're just chatting - they add nothing and use an inch doing it. It's written as a lecture. As I said, it reads like you want to say it, rather than think someone needs to read it. The speaker's coming first, not the listener, and that never leads to good results. I can't start a long 'how to do it' talk but you don't need me, the site's packed with examples: highly-upvoted answers, all far more succinct :-)
Comment: Downvoted as the answer is so very excessive, rather than concise and useful. So much of this can go answer without losing anything and I think it's a real slog getting through it or following its points. It could be about a quarter of its length. Being frank, it comes across like a case of the answerer enjoying delivering a lecture, not an answer, and a far-too-long one, rather than delivering what the OP/etc needs. That's reflected in the nice, concise text of the other answers here, and throughout the site. Hence my downvote.
Comment: No, it isn't when you lose the audience :-) I see your arguments but disagree. If you look at the accepted answer, which is well-upvoted, it's addressing the content of the question rather than the entire subject like here. They can go to a different site for tutorials if they want the derivations from root. This site's all about a clear answer to a clear question. My own experience is (generalised): the shorter and more succinct, the better and more memorable. As you say, time and voting will tell. But I understand the question and its answer backwards and I couldn't get through your answer.
Comment: a contra opinion from me and a reason for my upvote.  When this question appeared, I found myself wondering "what again is the schematic for a TTL totem pole output.... and will I ever figure out why that diode is in it??" and my initial lame googling didn't turn it up.  When this answer appeared, it answered all that and more.  A standard Circuit fantasist answer is not the shortest and most minimal... but if you are looking for a deeper dig or reasons behind the problem, they fill that need.  I also particularly enjoy @Simon Fitch's thorough answers as of late.
Comment: @TonyM, Thanks for the feedback; it was useful for me.
Comment: @TonyM, I'm actually thinking about how to make my answers more concise. The problem is that I try not only to explain the specific circuit solution but also to show in several steps how it was arrived at. And because I do it with CircuitLab simulations, my answers get bigger. I think it's good to have a variety of answers, and my approach fills a gap. Usually, OPs pursue their specific goals and are not so interested in the philosophy behind circuit solutions. But the written remains and many other visitors will read it afterwards... and they may be interested and evaluate it.
Comment: I also want you to pay attention to the fact that in my answer I consistently reveal the problems in the internal structure of the TTL gate, and this requires more explanations and illustrations. In conclusion, I want to ask you a simple question, "Isn't it better when we see something different and original than usual to encourage its creator by first noting the positive in it and then criticizing it?"
Comment: @TonyM, It's good that we still manage to exchange some methodological thoughts, because otherwise we'll turn into "answering machines" (I wonder if Chat GPT won't replace us soon?) But let's go back to the question of what the answer should look like. Perhaps a combined option - a short answer followed by a more detailed explanation or vice versa would be optimal?
Comment: @Daniel Chisholm, Thanks for the encouragement; I need it to move forward in this way. No one likes "prophets" and punishes them at every convenient opportunity with downvoting and silence. But aside from that, I'm used to it. I want to ask you something specific, "Do you understand exactly how the diode ensures that the top transistor is 'off'?"  For this purpose, two diode strings with different threshold voltages connected in parallel should be seen. If you like, I can add a more detailed explanation in my answer.
Comment: What does "prophets" mean here?
Comment: @TonyM, Maybe I'm not expressing myself correctly in English, but I mean (figuratively speaking) people who emphasize circuit philosophy and formulate general circuit principles.
Comment: I ask the anonymous downvoter to explain the reasons for doing so.
Answer: Your interviewer is probably trying to gauge your experience with different logic types, as well as your level of knowledge about IC input and output structures.
The answer to the TTL output swing question is, it depends on how much current the gate is being asked to source (drive high) or sink (drive low.)
What is that output voltage, then? You can't say exactly, at least without an accurate model of the device. But you can say under what load conditions (sourcing or sinking) the gate can achieve a valid high or low, as these are stated in the datasheet and tested in manufacturing.
Example TTL datasheet: 74LS00 (link)
What are those limits? The 74LS00 datasheet only guarantees:

When sinking logic-low, Vol will be of no greater than 0.5V at 16mA Ioh
When sourcing logic-high, Voh will be no less than 2.5V at -0.4mA Ioh

Notice that TTL Ioh is really weak compared to its Iol: just -0.4mA for the stated Voh vs. 16mA for Vol. Why is that? TTL inputs require DC current to pull them down, so a output driving a lot of TTL loads will need much more Iol than it will Ioh. So the TTL output can get by with a weak high drive and save some power.
What makes the output behave that way? TTL devices use an output structure composed of a pull-up resistor, two NPN transistors, and a diode; together called a 'totem-pole' output. Totem-pole outputs have limited output swing and weak high drive because of the behavior of these components. But for driving other TTL it's ok, as the TTL loads themselves will be pulling up the output too.
More detail about TTL here: NAND gate problem
And try a simulation here

Output voltage level of TTL gate


Whistle-stop tour

Question: I came across this phrase 'Whistle-stop tour' while reading an article. Please throw a light on it's origin and meaning.
Comment: Looking at these might help: [Freedictionary](http://idioms.thefreedictionary.com/a+whistle-stop+tour); [wikipedia](http://en.wikipedia.org/wiki/Whistle_stop_train_tour); [World Wide words](http://www.worldwidewords.org/qa/qa-whi5.htm), etc.
Answer: whistle-stop tour
The true definition of the term derives from the practice of a small, only occasionally used railway station of signaling a train by steam whistle so the engineer will know to stop to pick up a passenger. Therefore, the first usage of the term in the political context, by Robert Taft, was derisive. He accused then President Harry S. Truman of "blackguarding Congress at whistle stops across the country".
Source : Wiki
Use of the term has spread to cover any travel done very quickly and with only brief pauses. It is common to hear this expression in the United States, where the term originated, as well as the United Kingdom.
Answer: It is simply a tour where someone gets in and gets out of a city/location quickly and moves to the next city for the same thing a few times a day.
When train was the only viable quick form of travel politicians did whistle stop tours where basically they could talk for a few minutes in each town while the train was stopped and unloading/loading.  They might have 20 minutes to make a speech and then be on to the next town an hour later.

Whistle-stop tour


Having Stock Options Without Knowing Total 409a Valuation

Question: I have just received some of my first stock options in a company. The paperwork states the FMV of stock,  my exercise price, and the total number of shares reserved for employee options. However, I don't know the total 409a valuation of the company itself, so I'm not sure what valuation the option price is based on. Are companies required to disclose this information when options are exercised?
Comment: Just curious, what would you do with knowledge of the total valuation?
Comment: Evil evil things. But seriously, the lower the total valuation the more incentive there is to exercise your options and roll the dice that things will go well and you'll only get hit with capital gains. The higher the 409a the less of an upside there is to exercising. I've got a rough idea of what a successful company like us might be worth in an acquisition, but less of an idea of what the 409a is.
Answer: The company is not required to share the last valuation with you, and probably won't. They did a valuation at some point recently, and your option strike price will be based on that value.
I would certainly ask about the valuation though, and try to convince them to tell me - but like I said they probably won't.
If you knew the total shares outstanding, you could back into the valuation based on your strike price. But they won't tell you the total outstanding shares either.