Want to learn Windows Programming,some suggestions?

Question: Someone told me to use MFC,but it seems that MFC will be dead,although its not already...
so if i want to learn windows programming now, which one should i choose?  thx.
Answer: I encourage you to learn C#, personally is one of the best programming languages for windows nowadays (personal opinion)
Comment: The language is good, but just a bit "complicated/overloaded" (too much syntactic sugar to tie in the frameworks for my taste) but the IDE from Microsoft is ecxellent!
Comment: The .NET libraries do a good job of sanitizing the API, but sometimes it's useful knowing how things work at a lower level.
Comment: Yes @Mark, but I think this can be done on demand, as long as you feel the need to do it. But yes, it gives you a solid understand of how the things work.
Answer: If you want to go to the raw Win32API (Which I think you will learn the most and a must-have for your bookshelf)... Charles Petzold's Bible is a must-have... MFC, ATL, C# Winforms are all basically wrappers for the true API architecture using nice properties/events....
Answer: If you really want to learn windows programming, start with Petzold's Programming Windows book.  You'll get a good understanding of how Windows actually works, which is invaluable when dealing with the more abstracted frameworks.
Then skip over to Windows Forms or WPF.  MFC isn't worth the headache.
Answer: If you are going to program at the windows api level, you would be better off using something like Qt.
Answer: learn plain win32 API not waste your time on MFC ... that is my opinion
Answer: I'm with Andres on this one, learn C#.
Additionally you might consider working with java some. There is a huge knowledge base there and in my experience it and C# cross over a lot in syntax and form.
If you are looking for problems consider Project Euler or Programming Praxis
Answer: If your goal is to learn the Windows API, MFC isn't a bad place to start. It's a really thin wrapper around the API, nearly transparent in most cases. Perhaps the biggest difference is in the message handling mechanism. In MFC you use macros to generate a table of message handling functions, and many messages get rerouted automatically from parent to child or vice versa. In a raw API program you'll typically see a message loop with a huge switch statement, and it all gets handled in one place.
Answer: Depends on the type of application you want to create?  The latest forms-based programming is WPF... that is the latest and greatest, but Windows Forms programming is also an option too (there's a lot leveraged in this still).
HTH.
Answer: Depends, like everything in the IT world depends of what you need.
But C# or Java is a good start!.
Answer: WPF or WinForms with C#.
With WPF you can create very flexible GUIs, WinForms is more traditional.
Try Expression Blend for creating GUI (WPF) and Visual Studio for coding :)
Answer: Well it depends on what you want to do.  Are you new to programming in general?  If so then I would suggest picking up a good programming book or going to a college and enrolling in a CS degree program.
If you already know how to program and just want to write windows programs you have several options.  Which one you pick depends on what you want to do and who your target audience is.
Win32 API - The lowest level you can get.  It's OLD OLD OLD school C code, but you can write small fast good looking programs.  You have to do pretty much everything yourself.  The Win32 API is pretty complicated and you have to know the ins and outs to write the best code possible.
MFC (Microsoft Foundation Classes) - Takes the Win32 API and encapsulates it in C++ classes.  It's again OLD OLD school but has recently been upgraded from MS with the new 2008 feature pack so it's far from dead.
.NET (C#, VB) - The brand spanking new stuff from MS.  It's incredibly easy to write code and create programs.  However it does hide all the lower level stuff from you so you just write C# or whatever and it always works.
And of course you can always write in Delphi, Qt, WxWidgets but these are simply wrappers for the win32 API.
As far as my personal choice goes it depends on what I'm doing.  At my job I write C# because the hardware/software is under my control.  I know what version of the framework is going to be installed, how much RAM, hard disk space, etc.  For my own projects I create I almost always use MFC.  It hides the nastiness of the Win32 API and gives me C++ power.  Would I prefer to make everything .net, absolutely but I've found not a lot of people have the .net framework installed so I was severely limiting my user base.


Is parasocial love a romantic relationship?

Question: Is parasocial love is a form of romantic relationship?
I have read about some articles about parasocial love and have come across the term "parasocial romantic relationships" is this the same as "parasocial love"?
Comment: Could you include a link and citation to one or more of the articles in which you found this in an edit to your question?
Answer: Parasocial interaction
Parasocial interaction can definitely lead to a parasocial relationship
SMU

parasocial relationships mediated the relationships between social media interactions and source trustworthiness, (2) social media interactions influenced parasocial relationships via self-disclosure;and (3) source trustworthiness had a positive effect on brand credibility, which, in turn, led to purchase intention. Implications for research and practice are discussed.

Dr Sandra L. Calvert
Dr Sandra L. Calvert talks about the effects of Parasocial interaction and uses News anchors as a good example of how we can wrongfully begin to trust a media personality and grow an attachment to this person and wrongfully believe this person is speaking directly to us.
Wired

Parasocial interactions were first investigated in regards to their effects on adults watching TV newscasters. News anchors have almost always spoken directly to the camera, fostering the notion that they're speaking directly, almost exclusively, to viewers watching in their living rooms. The parasocial relationship that forms allows the newscaster to seem as though they're intimately connected with the viewer, similar to Jack's connection to Dora or Mildred's connection to the characters in The Family.

These parasocial interactions impact human beings in both a cognitive and emotional way, Calvert says. It's in the overlap of the two that "feeling something" can become easily confused for "knowing something." Parasocial relationships can help a person suspend disbelief, and engage more viscerally with worlds they see on television, in a film, or while playing a videogame.

Parasocial Romantic Relationship
A parasocial relationship can easily turn in to a parasocial romantic relationship, and there is a book on the subject called Parasocial Romantic Relationships and it explains how PRS can turn in to one-sided love.
PRS

Parasocial Romantic Relationships: Falling in Love with Media Figures explores how, why, and to what effect individuals develop romantic feelings toward people they "know" from the media. These imaginary, one-sided relationships, dubbed parasocial romantic relationships, are both profound and pervasive, Riva Tukachinsky Forster argues. These relationships can take many forms, including adolescents who develop celebrity crushes on popular music artist, anime enthusiasts who "marry" their favorite characters, and fanfiction authors who insert themselves into narratives as romantic interests of the protagonist.

Parasocial break up
There is also such a thing as Parasocial break up, which happens when a media figure dies or stops going on air, and this can be quite distressing for an individual, particularly if it is an individual that has fell victim to PRS.
Digital Scholarship

The study of one-sided mediated interactions, commonly known as parasocial interactions, have generated significant investigations which have examined both mediated relationships through television, the Internet, other media, and the discontinuation of these relationships (also known as parasocial breakups). These studies have specifically identified certain trends in which respondents have tended to form strong emotional connections with subject(s) within narrative fictional depictions. This study examines the relationship between parasocial breakup and the dissolution of a viewer following the end of primetime series, How I Met Your Mother.

Is parasocial love a romantic relationship?
For someone that has became a victim of parasocial interaction and went all the way to developing feelings of love, to the point where they're liable to suffer from parasocial break up, then It could definitely be described as a one-sided romantic relationship.


Password relevance in key derivation function

Question: I'm questioning the password used in a key derivation function, whether It makes sense to make it unique for every generated symmetric key and why
Comment: That's a much clearer question; I recommend you edit your original question to be exactly that.
Comment: I'm questioning the password used in a key derivation function, whether It makes sense to make it unique for every generated symmetric key and why
Answer: Key Derivation functions like PBKDF, KDF1, and, HKDF can use a single password to derive a key. To derive an additional key with the same password the common approach is using info as in HKDF which has two steps.
Extract : HKDF-Extract(salt,IKM)->PRK
Expand: DF-Expand(PRK,info,L)->OKM,

IKM is the Input Key Material
OKM is the Output Keying Material
PRK is Pseudo Random Key

The Extract mechanism is important if the IKM is not good random material. The salt strength the PRK. For passwords, this is the case.
With the info one can derive multiple keys ( a python code is included). This is due to domain separation.
The bottleneck is the strength of the password. If one uses a good mechanism like diceware with good entropy then it is beyond attack.
Password-based key generation is usually used for file/volume encryption like Vercrypt or password managers. For end-to-end communication Diffie-Hellman key exchange is used mostly with the ECC version. The established( exchanged) key then used with a KDF to derive a symmetric key.
For encryption, one doesn't need to change a key often. Since there is a good mechanism to reuse a key, the IV/Nonce as in CBC and CTR mode. With the IV/nonce these modes can achieve the standard notion of security IND-CPA.
Therefore, theoretically once can use one good password to secure everything. Practically, this is not preferred. Separating the domains with multiple passwords is better in practice than in turn will require a password manager like keypass.
Answer: A password based key derivation function, such as PBKDF2, is designed to always output the same key given the same input password. In that way, this question reduces to "what are the risks of reusing an encryption key?", which is a well-understood problem.
The first problem is key distribution. Are you going to share the password with others? A shared password is at risk of exposure as you don't control how the copy is handled.
The next risk is password guessing. If you choose a memorable password, it needs to be long enough to secure against brute force guessing. A PBKDF slows down attacks, but does not prevent them.
The next is key management. If you use the same password for multiple applications or systems, changing it becomes a difficult exercise in synchronization. And if it's hard to change, you might not change it as often as you need.
Another is key compromise. If one shared password is leaked, the attackers have access to all data protected by that password. If you use different passwords, you limit the blast radius to only the one system.
The recommended best practice is to use one key for one single purpose, and to use as many keys as it takes to achieve this goal. Entire commercial key management systems are sold to help companies solve this problem. The more passwords you generate, the more likely you will probably turn to a password manager to meet your own requirements. And if your systems become so complex they reach this stage, why use passwords at all? Consider generating random keys directly, without the extra overhead of using passwords; you can still encrypt those keys in a centralized place using a master PBKDF derived key. HashiCorp vault is an open source tool that is designed to securely store secret data, you could use it to protect your keys at low cost.


I accidentally deleted var directory in my linux opensuse system. I can't acces the GUI as var/lib/gdm also got deleted

Question: Message shown:
Server authorization directory (daemon/ServeAuthDir) is set to /var/lib/gdm but this doesn't exist.
Comment: How far can you get in the boot/login sequence?
Comment: As the PC starts it shows the message which i have wriiten above. And then it remains in the command terminal mode. I am able to login to root.. but it shows the message that some" level 5 files" missing.
Comment: Time to restore from backup.
Answer: You could recreate that directory but that would not help much.
The best solution would be to reinstall all packages which create diriectories and files in /var.
The best way to do that is probably to check all installed packages for files in /var:
rpm -qa | while read package; do
    if rpm -ql "$package" | grep -q /var; then
        zypper install --force "$package"
    fi
done

You should create /var/tmp and /var/log with these permissions before:
drwxrwxrwt 1 root root 425K  2. Mai 00:53 /var/tmp/
drwxr-xr-x 1 root root  946  1. Mai 23:53 /var/log/

Other directories may be necessary.
Maybe it is necessary to install the packages in the right order. This should be possible by using a single install command with all the package names as arguments so that zypper uses the dependencies for the right order. I do not know, though, whether dependencies are considered at all during a reinstall.


Abelian category from the category of Hopf algebras

Question: The kernel of a Hopf algebra map $\phi:H_1 \to H_2$ is in general not a Hopf
sub-algebra of $H_1$. Is there some replacement or alteration of the notion
of a kernel in the Hopf algebra setting. Same question for cokernels. So can we construct an abelian category from the category of Hopf algebras (over a fixed field $k$).
Comment: Kernels are not the issue (not the only one at least) the same objection would otherwise apply to the category of commutative and cocommutative Hopf algebras which s abelian, see e.g. https://arxiv.org/abs/1502.04001v2 and references therein.
Comment: @Adrien's [link](https://mathoverflow.net/questions/357446/abelian-category-from-the-category-of-hopf-algebras#comment898589_357446): [Vespa and Wambst - On some properties of the category of cocommutative Hopf algebras](https://arxiv.org/abs/1502.04001).
Answer:
$\DeclareMathOperator\Hker{Hker}\DeclareMathOperator\Hcoker{Hcoker}\DeclareMathOperator\Im{Im}\DeclareMathOperator\coIm{coIm}\DeclareMathOperator\Id{Id}$The category $\mathcal{H}$ of finite dimensional, commutative, cocommutative hopf algebras is an abelian category.
The set $\mathcal{H}(F,G)$ of all hopf algebra maps $F\to G$ is an abelian group with sum given by the convolution product. (The convolution inverse for $f\in F$ is: $f\!\circ\! S_F=S_G\!\circ\! f$ and the neutral element is $\eta_G\!\circ\!\varepsilon_F$).
We have also product of maps, given by composition (and composition distributes over convolution).

This is a classic result. I have been told it was first shown by Grothendieck. I know you can find details in Sweedler's book, ch. XVI, p. 314 (basically the whole chapter, p.303–315 presents a detailed proof of the above).
Remark 1: You are right to mention that in the general case the definitions of the kernels and the cokernels seem to pose a problem when one tries to figure out which hopf algebras would be good to make an abelian category from.
For $F$, $G$, f.d., commut, cocommut, hopf algebras and $\omega:F\to G$ a hopf algebra map, then in $\mathcal{H}$, kernels are defined through: $$\Hker\omega=\{f\in F|(I\otimes\omega)\Delta (f)=f\otimes 1\}$$
which -due to cocommutativity- is the same with $\{f\in F|(\omega\otimes I)\Delta (f)=1\otimes f\}$,
and cokernels through:
$$\Hcoker\omega=G\big/\big(\omega (F^+)G\big)$$
where $F^+$ is the augmentation ideal and $\omega (F^+)G$ denotes the right ideal (which by commutativity is a two-sided ideal), of $G$ generated by $\omega(F^+)$.
Under the above defs, it can be shown that $\Hker\omega$ is a sub-hopf algebra of $F$, $\Hcoker\omega$ is a quotient hopf algebra of $G$ (i.e. $\omega (F^+)G$ is a hopf ideal) and any hopf algebra map $\omega\in\mathcal{H}(F,G)$ "factorizes" as:
$$
\Hker\omega \overset{i_{\omega}}{\hookrightarrow} A
\overset{\pi_{i_{\omega}}}{\twoheadrightarrow} \coIm\omega \cong \Im\omega
\overset{i_{\pi_{\omega}}}{\hookrightarrow} B
\overset{\pi_{\omega}}{\twoheadrightarrow} \Hcoker\omega
$$
where:

$\Hker\omega \overset{i_{\omega}}{\hookrightarrow} A$ is the kernel of $A\overset{\omega}{\to}B$,
$B\overset{\pi_{\omega}}{\twoheadrightarrow} \Hcoker\omega$ is the cokernel of $A\overset{\omega}{\to}B$,
$A\overset{\pi_{i_{\omega}}}{\twoheadrightarrow} \coIm\omega$ is the cokernel of $\Hker\omega \overset{i_{\omega}}{\hookrightarrow} A$ and
$\Im\omega\overset{i_{\pi_{\omega}}}{\hookrightarrow} B$ is the kernel of $B
\overset{\pi_{\omega}}{\twoheadrightarrow} \Hcoker\omega$.

Remark 2: There are even more detailed things to be said about the category $\mathcal{H}$ of finite dimensional, commutative, cocommutative hopf algebras over a field: We can construct a functor $\mathcal{G} : \mathcal{H} \Rrightarrow \mathcal{Ab}_{\text{fin}}$ from $\mathcal{H}$ to the category $\mathcal{Ab}_{\text{fin}}$ of finite, abelian groups (assigning to each hopf algebra of $\mathcal{H}$ the group of its grouplikes) and another functor $\mathcal{F} : \mathcal{Ab}_{\text{fin}} \Rrightarrow   \mathcal{H}$ (assigning to each fin, abelian group its group hopf algebra). It is not difficult to show that these functors satisfy
$$
\begin{array}{cccc}
 \mathcal{G} \mathcal{F} = \Id_{\mathcal{Ab}_{\text{fin}}} & & & \mathcal{F} \mathcal{G} \cong
 \Id_{\mathcal{H}}\\
\end{array}
$$
constituting thus an equivalence of the categories $\mathcal{H}$, $\mathcal{Ab}_{\text{fin}}$.
Comment: Is remark 2 definitely correct? If these categories are equivalent then they have the same isomorphism classes of objects, but there is only one finite abelian group of order $p$ and typically more than one isomorphism class of fin.dim. com. cocom. hopf algebras of order $p$ (for example take the group algebra and its dual over characteristic $p$)? Forgive me if I have missed something basic.
Comment: @James, although i am not sure i have fully understood what you mean with "hopf algebras of order $p$... " (maybe you mean hopf algebra of dim $p$?),  i think you have a point in the following sense: remark 2 is meanignful for hopf algebras over an algebraically closed field of char $0$. Not over arbitrary fields. One can further relax these conditions (to include finite fields), but i think they guarantee that things will work ok (under such circumstances, the group algebra and its dual are isomorphic).
Answer: This is a delicate matter, and there are in principle many possible answers depending on exactly what you wish to apply things to.
Frequently, one of two variations of the Hopf subalgebra mentioned by Konstantinos is used: Given $\pi\colon H\to K$ a morphism of Hopf algebras, we have the left coinvariants and right coinvariants (of $\pi$) defined respectively by:
$$ {}^{\text{co}\,\pi}H = \{ h\in H  \ | \ (\pi\otimes\operatorname{id})\Delta(h) = 1\otimes h\},\\
H^{\text{co}\,\pi} = \{ h \in H \ | \ (\operatorname{id}\otimes\pi)(\Delta(h))= h\otimes 1\}.$$
These need not be the same subobjects of $H$, however.
One could then define a short exact sequence of Hopf algebras (over $k$)
$$ k\longrightarrow K \overset{i}{\longrightarrow} H \overset{\pi}{\longrightarrow} L\longrightarrow k$$
to be a sequence of morphisms of Hopf algebras such that

$i$ is injective and $\pi$ is surjective;
$\ker(\pi) = H\, i(K)^+$;
$i(K) = {}^{\text{co}\,\pi}H$.

Note that the more classical notion of kernel is still involved: it will generally not be enough to conduct any of the usual arguments you'd like to do with a "short exact sequence" to assume only the first and third (or first and second) conditions.  The first and third are enough when $H$ is faithfully coflat, and the first and second are enough when $H$ is faithfully flat.
This is a good definition for short exact sequences and results that normally rely on them, such as looking for Jordan-Holder analogues.  As such, coinvariants-as-kernels will be prominent when working in a category of Hopf algebras.  But as I said it's not the only answer, and in other categorical contexts (generalizing/lifting to functors between representation categories, namely) it is the wrong answer.  The categorical kernels and cokernels of $\pi\colon H\to K$ are
$$ \text{Hker}(\pi) = \{ h\in H \ | \ h_{(1)}\otimes \pi(h_{(2)})\otimes h_{(3)} = h_{(1)}\otimes 1 \otimes h_{(2)}\},\\
\text{Hcoker}(\pi) = K/(K \pi(H^+) K).$$
And this kernel (and cokernel) is not necessarily the same thing as the left or right coinvariants (and associated cokernel). By applying counits to the left/right of the defining relation, we see that $$\text{Hker}(\pi)\subseteq {}^{\text{co}\,\pi}H\cap H^{\text{co}\,\pi},$$ at least. Though equality (of all three subobjects) can happen, and assuring it does is usually the key to making sure attempts at defining exact sequences of tensor categories works out well.
Sonia Natale recently posted a review of these notions, and the related issues with tensor categories, that should be helpful.
Comment: If I am correct $S({}^{co\pi}H)=H^{co\pi}$ and I wonder whether $\mathrm{Hker}(\pi)$ can be characterized thorugh some $S$-closedness condition. After all if you really want to be Hopf the antipode should play a role here...
Comment: @NicolaCiccoli Well, when one moves from Hopf algebras to representations thereof to more general categorical settings like fusion categories, the antipode sort of disappears as a core feature.  What it normally gives us is the existence of duals in the representation category, which as a categorical property is called "rigid", but it doesn't do much else for the category.  And in the categorical setting the rigid property is typically assumed, rather than derived, and you don't necessarily need functors to "respect" underlying antipodes.
Comment: Two questions: First, in the commutative, cocommutative case, the left and right coinvariants are the same: ${}^{\text{co}\,\pi}H = H^{\text{co}\,\pi}$. Are they also equal to your second definition of the kernel: $\text{Hker}(\pi)$? Are there other interesting situations in which the second definition is identified with the one posted in my answer?
Comment: And second, you claim that "categorically speaking (the first def) is the wrong answer". I guess you refer to the non-(co)commutative case. what is the advantage of the second definition for $\text{Hker}(\pi)$ in the general case? Does it enable one, to enlarge somehow the class of hopf algebras which make an abelian category?
Comment: @KonstantinosKanakoglou  Such Hopf algebras would be faithfully flat and coflat, so everything would coincide nicely.  Proposition 4.2 and subsequent remark in the linked paper should answer the remaining matters.


(Finite Automata) Why the following is a NFA?

Question: The first one seems like a DFA. Could someone explain why this is a NFA?
Comment: Every DFA is a NFA by definition (though not every NFA is a DFA).
Comment: @Jamāl, it is standard to omit transitions from DFAs with the intended meaning that any unspecified transition goes to an additional non-final state $q$ (and all transitions from $q$ go to $q$ itself).
Comment: The first one is not a DFA as the final state doesn't have a transition on $0$.
Comment: Don't use images as main content of your post. This makes your question impossible to search and inaccessible to the visually impaired; [we don't like that](https://cs.meta.stackexchange.com/questions/752/should-we-do-anything-about-questions-that-are-just-a-scan-of-a-problem-in-their). Please transcribe text and mathematics.  You can [use LaTeX](https://cs.meta.stackexchange.com/questions/271/add-short-reference-for-latex-commands).
Comment: We require you to credit the original source of all copied material: https://cs.stackexchange.com/help/referencing.  Please [edit] your question accordingly.
Answer: Here is a similar question:

Which of the following are rational numbers: $$ 1, \frac{2}{3}, \sqrt{2}. $$

The correct answer is that both $1$ and $\frac{2}{3}$ are rationals, despite the fact that $1$ is also an integer.
One thing which is confusing here is that none of the given examples are DFAs or NFAs. Rather, they are pictorial representations of automata. Most of these pictorial representations can be interpreted as NFAs, and some can also be interpreted as DFAs. There would be no ambiguity if the automata were given as tuples, since the transition function of a DFA has signature $Q \times \Sigma \to Q$, whereas the transition function of an NFA has signature $Q \times \Sigma \to 2^Q$.
Comment: Mmm, don't know about ambiguity. I would say that a NFA has a transition *relation*, a subset of $Q\times \Sigma\times Q$. Then the question whether every DFA is also an NFA is a matter of taste, whether you agree that a function is also a relation, but with special requirements.
Comment: Your answer got me thinking about the ambiguity of transition diagrams, because I am thinking, specially for very small diagrams such as the one in the question, it should be clear enough that the diagram when presented can be identified as an NFA or a DFA. Maybe your point is about having a formal definition? Or am I missing something?
Comment: A diagram cannot be identified as an NFA or a DFA. Some diagrams can be interpreted as representing NFAs. Some can be interpreted as representing DFAs. The latter are a subset of the former.
Answer: There are two explanations that work:

By definition every DFA is also a NFA (perhaps the question meant to ask which are NFAs but not DFAs and which are DFAs).
In a DFA, each state must have transitions (outgoing edges) defined for each element of the alphabet (commonly referred to as $\Sigma$).

If you look at the first one, states S1 and S2 don't have a transition for 1, and for state S3, there is no transition for 0. One of the comments mentions that it is common to ignore some transitions in a DFA and have them go to a dead state, but by definition, a DFA must be fully specified. Omitting transitions is just a convenience for some people, but isn't universal.
Comment: (1) This depends on the definition, see my answer. (2) Again, this depends on the definitions. Some definitions of DFA allow the transition function to be partial.
Answer: The first automaton is not a DFA because it has missing transitions. Indeed,  the states $s_1, s_2$ have no outgoing transitions labeled with 1, also, the state $s_3$ has not outgoing transition labeled with 0. As you've noted, intuitively, this automaton does not really look nondeterministic because you don't have a guess (the automaton has at most one run on a given input word) and you can easily direct all missing transitions to a rejecting sink to get a complete deterministic transition function ($\delta$ is defined for every state and letter). I agree, and some people consider such automata to be deterministic (this has been explained thoroughly here), but probably, the way you defined it in class does not allow missing transitions.


Is no the same as not?

Question: is いいえ/no the same as not? For example, if I said,いいえ  きょう, would that mean Not Today? Or No Today? I know google translate is known to be inaccurate, but it shows both Not and No as the same, いいえ. Sorry if this is kind of a dumb question, but I'm getting kind of confused. The language app I use to learn is Drops if that helps, and I am a beginner.
Answer: It just means "No". "Not Today" would be 今日じゃないです or 今日ではありません. (Keep in mind that sentence structures are quite different from English.)
Comment: thank you, I am very new to learning, and I dont know much at all about structuring, or punctuation, just speaking.
Answer: For starters, your premise about いいえ not entirely correct.  いいえ does not translate directly to English no; it really means what amounts to negative or opposite.  So while most of the time that can directly translate to no, it "naturally" translates to English yes when the preceding question is negative (and similarly for はい).

A: おい、[今日]{きょう}[公園]{こう・えん}に[行]{い}きますか:   Hey, are you going to the park today?
B: いいえ、行きません:   No (I'm not going)—sounds fine in English.

A: 今日公園に[行きません]{not going}か:  Aren't you going to the park today?
Natural English (what we'd say) → Japanese → Literal English (what it means)

You aren't going:   "No, I am not going" →  「はい、行きません」 → Yes/Affirmative/Correct, I am [not going]{行きません}
You are going:   "Yeah, I am going" → 「いいえ、行きます」 → "No/Negative/Incorrect (I am not [not going]{行きません}), I am going"

So its meaning is directly tied to the actual verb form used.
So now knowing a broader meaning of いいえ, you can see that it cannot be applied to "not today".  As @Vue said, it has to be 今日じゃない or 今日ではありません ("(it is) not today").

Is no the same as not?


1970s Post-Nuclear Holocaust Short Story

Question: I read this short story in an American magazine in the early 1970s. (It doesn't sound like an Analog story, so it was probably Galaxy or Amazing, something like that.) The MCs name was Lank; he has completely rejected logic and rationality because science is seen as having caused the war. He, like everybody else, flips a coin to make decisions - he sees a woman, flips a coin, and then rapes her. I can't remember anything more than that.
Answer: I believe this is probably "Coins" by Leo P. Kelley, published in The Magazine of Fantasy and Science Fiction, November 1968.
The setting is "Afterit," which appears to be a post-apocalyptic world, as distinguished from "Beforeit":

It had been Afterit for at least as long as Lank could remember, which was nineteen Tosses, eleven of which — ever since his eighth year, as the ancient ritual required — he had participated in and none of which he had Lost. For which he was glad.
Now, as he made his way through the network of upright spears that had been living trees Beforeit...

And

Down he went and past the skeletal ruins of Randland, fear sweating his nearly naked hide, and on through the countryside strewn with Beforeit things. Melted autos. Smashed steeples.

He makes decisions based on a coin toss:

The urge to stretch seized him. He spat out his Coin, clawed it from the dirt and expertly tossed it.
Heads, I stretch.
Tails.
Lank cursed.

He sees a woman:

Lank spat. His Coin hit his waiting hand, dizzied up, down. Heads to kill, tails to take. The Coin stared up at him, a copper eye in the ashes. Tails!

He then rapes her, and when she attacks him for it he discovers that she does not toss a coin to make decisions.
It turns out this is a constructed society where everyone is conditioned to make decisions by coin toss as a (rather bizarre) social experiment to prevent future wars.
Comment: Randland? I promise it's not my doing.
Comment: What's the relationship between this short story and [*The Coins of Murph*](https://www.goodreads.com/book/show/1679196.The_Coins_of_Murph), a *novel* by the same author which also features a man named Lank and a coin-tossing society? Is the latter an extension, or a sequel, or inspired, or what?
Comment: The [SF Encyclopedia entry for Leo P. Kelley](http://sf-encyclopedia.com/entry/kelley_leo_p) says "The Coins of Murph (1971) is a Satire set in a Ruined Earth" but it does _not_ say "Coins (November 1968 The Magazine of Fantasy and Science Fiction; rev and exp vt *The Coins of Murph* 1971)" so it's _probably_ not an extension.  It _might_ be a sequel or an "inspired by" but without reading both I couldn't say.
Comment: That said, the short story lacks the religious aspects of the novel; Lank is just a random anybody we happen to be following, there are no priests...  Since one of the Goodreads talks about Lank and Doll meeting, it can't be a sequel, so I'd have to say it's a complete rewrite.
Comment: I've gone ahead and [posted a new question](https://scifi.stackexchange.com/q/243208/31394). Maybe you can turn your deductions into an answer there; maybe someone else here will have read both stories.
Answer: Are you totally sure it was:

Science Fiction
a short story
post apocalyptic ?

It sounds a lot like The Dice Man by Luke Reinhardt.

The book tells the story... of a psychologist named Luke [Rhinehart] who, feeling bored and unfulfilled in life, starts making decisions... based on a roll of a die. Along the way, there is sex, rape, murder, 'dice parties', breakouts by psychiatric patients, and various corporate and governmental machines being put into a spin. There is also a description of the cult that starts to develop around the man, and the psychological research he initiates, such as the 'F**k without Fear for Fun and Profit' programme.

More information:

An American author, Rhinehart lived his whole life in America, the Land of the Free. But The Dice Man perfectly illustrates how you are not free if you live among those who insist on insisting on their own ideas. A successful psychiatry practice in Manhattan, a loving wife and two kids, Rhineheart has it all. But he is trapped by his job and his family, and life seems empty and boring. In a deep funk one night after discussing psychotherapy with his colleagues and friends at a poker game, Rhineheart concludes that 'analysis, were it really on the right track, should be able to change the subject; to change anything and anybody.' Desperate to experience something new and exciting, something fundamentally life-changing, Rhineheart decides that if the dice on the floor is a one, he would march downstairs and rape Arlene. A 'one' is cast. Terrified but excited, Rhineheart does not question the die.

What matches:

Man makes decisions based on random chance
first decision is to rape someone
date is correct (1971)

What doesn't match.

Not SF
Not a short story
not post apocaplyse
uses dice, not a coin
His name is Luke, not Lank.

Possibly you are conflating two stories.  Or maybe you read a parody of the above.
Comment: Dear Pete: It was definitely an SF short story but it certainly has a lot in common with the novel described. It makes me wonder just who copied from who!
Comment: Dear Pete: I am definitely going to look up Rhinehardt's book to see how man other 'coincidences' Luke there are.
Comment: I tried to read it about 30 years ago. I didn't like it at all and gave up. YMMV


Git Signing commits in a private repo

Question: Linus mentioned in 2009 that "Signing each commit is totally stupid".
Has the common view evolved on this subject since then ? Doesn't it protect against someone usurping your identity to commit something into your git repo ?
Thanks
Answer: It's still mostly pointless.
Signing commits makes it possible to check if the commit was signed with a particular key. In return, this lets you infer whether the commit was created by a particular person. This can have value, for example if person A publishes a commit signed by person B. But this is only useful on a social level.
It does not affect the security of a git repository itself.

Integrity is already ensured through Git's blockchain-like Merkle-tree structure. If I know that a commit dd71cae49e1ba0e09034ecca51b0d3ceb44280eb exists, Git can verify the integrity of that commit and the entire history leading to that commit.
Git servers typically have access controls that limit who can push to the server. This access control is entirely unrelated to commit signatures. Git can also work entirely without multiple people sharing push-access to the same repository – its decentralized design makes it possible for people to publish their own repositories from which others can pull.

Some Git web interfaces like GitHub uncritically take the commit metadata and associate the commit with an account. For example, this makes it possible for everyone to create unsigned meme commits that GitHub links to Linus Torvald's account.
But what does this mean?

That Git is insecure? Absolutely not.
That GitHub is insecure? For some definitions of security, maybe.
That GitHub doesn't clearly convey the trustworthiness of the data they display in the web interface? Yes, that's a more appropriate take. Because of this, GitHub has introduced a vigilant mode. If Torvalds were to enable vigilant mode on his account, other people would see an "unverified" badge for unsigned commits created in his name – or created by himself that he didn't bother to sign.

If you have a piece of software and want to know if you can trust the software, signatures can be part of a solution. But this requires threat models involving untrustworthy third parties.

If I download the Linux source from https://github.com/torvalds/linux and trust GitHub, it doesn't really matter to me if the commits are signed or not.
If I download the Linux Git repository from a shady website, but Linus Torvalds tells me through a trustworthy channel that he authored commit 8bb7eca972ad531c9b149c0a51ab43a417385813, I can verify that this commit and all commits and all files reachable from that starting point are the same as those Torvalds saw himself.
If I download the Linux Git repository from a shady website, and Linus Torvalds signs all of his commits, and I know Torvald's public key he uses for these signatures, then I could also verify that his commits have not been tampered with. But this isn't really simpler than the previous scenarios.

Where signatures do play a role is not to ensure integrity of the repository, but as proof of identity for the author or committer. Contributing to a project has legal consequences regarding copyright, or the project may require reviews by certain people. The Linux project uses a Signed-off-by line in commit messages, which works on a trust basis. It would also be possible to use signed commits instead, but that would require (a) a way to add more signatures to a commit without changing the hash ID of a commit,1 and (b) an easy way to know who has which public key. Running a public key infrastructure that works for ordinary people is a pretty difficult problem, with common consumer-oriented solutions like the Signal messenger mostly relying on "trust on first use" that merely show a subtle warning when the key changes. The GPG community tried to build a web of trust via in-person key signing parties parties, but the value of such verifications is doubtful.
1. There might be a sequence of commits A → B → C, where A is the HEAD commit that references other commits. All commits are signed. I want to add a signature to commit C. This will create a different commit C' which has a different hash for C, so that it is not part of the history referenced by A. I could rebase and record a new history A' → B' → C', but now the signatures on A and B would no longer apply. So working with signed commits can be tricky and break some workflows. A different design for signatures could work, e.g. if signatures are recorded in separate objects so that I could create a history Signature(A,B,C) → A → B → C.
I don't sign my commits because I don't trust myself to do proper key management, and because the signature provides very little useful information to other people.
Comment: I think you underplay the value of ensuring integrity. Consider [the compromise of the PHP git repo](https://email@example.com/) where the commits were submitted with false authorship information. Those commits were very quickly spotted, but more carefully crafted commits could have easily been made to look trustworthy.
Comment: @IMSoP That's a good point. Signatures would have accelerated detection of the server compromise, or could maybe even have prevented it with a pre-receive hook that checks the signatures. But in that scenario, signatures would just duplicate the work of the server's access control mechanisms. Maybe good defense in depth, but not the first solution I'd reach for. Ultimately, this depends on the threat model. I'm less concerned about such git server exploits than about compromise of the developer's machine (incl the key), in which case signatures won't help either.
Comment: @amon thank you for your answer. Would you mind answering more specifically the second question of my OP?
Comment: @Gaunt Your second question is "Doesn't it protect against someone usurping your identity to commit something into your git repo?". As discussed in my answer, pushing to your git repo is more a matter of the git server's access control, for which the author/committer metadata in a commit is not relevant. Signatures do not directly help with that issue.

Git Signing commits in a private repo


"Excuse Me"... Is it polite or just a terse way to ask others to step aside?

Question: I often hear people saying "excuse me" when I open a door and someone else is entering/leaving from the other side. In spite of the fact that I may be the first person to have opened the door and making my way out, the other guy would say "excuse me" in a way as if I should make a way for him first. What do you think it means—a polite expression or a curt way of asking me to step aside?
Comment: Probably depends entirely on the tone of voice, for all I know. :-)
Comment: Whatever it is, it's at least more polite than the phrase, "excuse you."
Comment: Something is very wrong when nobody mentions Steve Martin in connection with this phrase.
Comment: I realise the question is about interpreting _someone else's_ "excuse me", but just wanted to point out that if _I_ am the one saying it and, after passing by, want to ensure that it's interpreted the "polite way", a quick "thanks" often helps (and I've seen it loosen some rather stern expressions!).
Comment: "I beg your pardon" is definitely polite and wouldn't be misinterpreted in my opinion - a bit of a mouthful, though. Having said that, it is so polite that people may think you're being sarcastic!
Answer: It could be either, and is entirely context and attitude/tone of voice dependent. "Smile when you say that, partner." I'm told English is not so bad as some other languages in this regard - sometimes the meaning is entirely in the "atmosphere" rather than in the grammar.
Comment: +1 meaning is entirely in the "atmosphere" rather than in the grammar.
Comment: In general, *any* common polite formulation is fairly brief, so it can be turned into a curt demand if delivered in the right way. For bonus marks, you can deliver it in a way that suggests it would unbearably rude not to give way to the demand. Flipping it around and using an extremely rude phrase in a polite way is more of a challenge but I wouldn't say it can't be done :-)
Comment: Maybe I will try opening the door and saying "Gangway" ... in a polite tone of voice, of course.
Answer: It can be either, but often enough it's just an acknowledgement that the vagaries of movement have caused either or both of you to inconvenience the other, with no particular implication of anybody needing to do anything.  This is illustrated by how often people say "excuse me" in polite tones when it was apparently the other person who made an error.
I would say it is mostly social lubricant.
Answer: It depends not just tone of voice, but it also on what part of the anglosphere you happen to be on. British [and related] speakers would likely use excuse me to politely ask someone to make way. Here in the US, it's almost the other way round, where the person who somehow happens to be in your way would be more likely to say excuse me. Regardless of the tone, one may find this rude if they are not used to this particular usage.
I was brought up to always say, "Please, excuse me", and I consider this the gold standard in politeness if you want someone out of your way. If someone were about to bump into me or found me in their way, however, the first thing that would come to my mouth would most likely be, "[Oops,] I'm sorry" (whether or not I was at fault). Most people around me would naturally say, "Excuse me". No please would be required in this context.
Comment: You know you are in Britain if you stand on someone's toe and they say "sorry"!
Comment: @Harpreet: yay :) I get so much grief for my *sorry*'s!
Comment: "[Oops,] I'm sorry": Exactly my phrase! This is what comes out of my mouth too, however every other person tends to pop out "excuse me"
Comment: @S_H Does this mark me as a grump? Its a particular pet-peeve of mine. I believe the phrase is used in both manners here in the US. The difference between the two seems to be in how they are communicated; with cold insistence or a warm expression and eye contact. The cold person is simply plowing their way through, and the second looks me in the eye and we sometimes have amusing exchanges.
Comment: I'm American so I say "excuse me" when I'm passing in front of someone in a store, or behind them when I feel there's not quite enough room. In London (England), if I do that, I always got a surprised look and a jump out of the way.
Answer: Normally, "excuse me" is a polite alternative to "get out of my way". It is traditionally used when a person wants to get somewhere and others are unintentionally standing in the way.
Sure, if someone says it in a rude or demanding manner, then the politeness of the words may be "overridden" by the rudeness of the tone of voice. Likewise if the demand is clearly unreasonable -- like if everyone is trying to get to the same place and one person expects others to make way for him because he fancies he is more important than evereyone else.
Like, if you're at a party and you want to get to the food table, and someone who already has food is standing in your way chatting with a friend, it is completely acceptable to say, "Excuse me, I'm trying to get to the food table." It is generally considered rude to say, "Get out of my way" or "You're in my way". If everyone is trying to get to the food table, of course you should wait patiently in line, and not shout "Excuse me! Excuse me!" as you push your way to the front.
It is certainly true that if you say it in a rude or demanding tone of voice, then it ceases to be polite. But that is true of any polite phrase. If you say, "Thank you for your help" in a sarcastic voice, you change it from a polite phrase to an insult. If you say, "Please pass the salt" in a demanding manner, it ceases to be a polite phrase. Etc etc.
Answer: I think it is a polite way. Beause the speaker is asking to excuse him even if it is not his mistake. e.g. Some person is standing in his way on a footpath. Then it is that person's mistake but still the speaker will say 'excuse me (speaker)' to request the person to give a way.
Answer: I agree with Jimmi Oke. "Excuse me" sounds like a command to some people, while to others it sounds like a request.  I agree it is all about tone of voice from a usage perspective, but there are the physical indicators that go with it.  For example, I know someone who snaps, "Excuse me," in a short but civil manner, while at the same time barging past and shoving others out of her way without even looking at them.
I was taught to give a reason for the request to excuse me, if there is no emergency compelling me hurry.  For example, "Excuse me, but my child got away from me."  When possible, I follow it with "Thanks," at the least.  When I am in distress, I am sure that my request to "Excuse me" sounds obnoxious.
Answer: I only say "Excuse Me" when I am struggling to pass by and the people in my way are being un-co-operative (or aren't aware of my presence) and I always add "Please". People often respond with surprise because it is quite a stern phrase to use - or perhaps that's because in busy situations, people aren't accustomed to being spoken to by strangers well within their personal space. In a pub - where I tend to spend a worryingly large portion of my time - adding "Mate" at the end is a way of softening the commanding aspect of the phrase, and in that sense it tends not to concern anybody. Most will move - on the assumption that the speaker may be a member of staff - before they look.


What exactly is a compound radius fretboard?

Question: I have heard guitar reviewers speak about this type of neck before, but I never really had an explanation of what exactly it is. Is it always better to have this on a guitar and if so why don't all guitars come with it?
Answer: Rather than perfectly flat, like a ruler, guitar necks feature a fretboard that has a slight curve or arc to them, like the middle part of a baseball bat.
Most guitar necks have a radius that is consistent from top to bottom.
This is easier to manufacture, and less time consuming for the luthier or production line worker to craft.
A compound radius guitar neck is one that features a rounder radius at the nut (top of the neck) and a flatter radius at the bottom end of the neck (where it joins the guitar). This innovation was developed by Warmoth almost 30 years ago.
This feature is said to provide the player with maximum hand comfort in the chording area, while allowing greater speed and cleaner string bending as the player moves up the neck.
I personally don't find it to be a big deal.
I play both rhythm and lead, but am not a lightning-fast shredder (like Rob Chapman or Paul Gilbert).
Unless you are a highly-technical, extremely fast lead guitar player, I would not make acquiring a compound radius neck a high priority.
Comment: I think that compound radius necks are also supposed to help get string action a little bit lower.
Comment: @Sparquelito - even if you are a rhythm guitarist, the additional comfort a compound radius neck that suits you can give is amazing. I recommend them for everyone. But try them out and find one that suits you!


Is there a way to wrap any website as an iOS app?

Question: I'd like to take a mobile website and add it to the home screen of iOS, but when I touch it, it would open in its own app, NOT in the Safari app. Is there a service that would let me do this or a way I could manually do it myself, sort of like Fluid App?
Answer: If you are looking to make your own app using web technologies, there are some options. Look into Cordova and PhoneGap. There are similar alternatives for making apps for desktop operating systems as well.
While they may be easier to develop depending on your existing skill set, they may not feel as fluid as native apps. While some developers do a great job making HTML5-based native apps or even hybrids, often times they feel non-native to the user.
If you have an existing mobile-friendly website that you want to package into a native app, you can probably make a basic app with a UIWebView that merely displays the website. This will almost definitely feel like a website to the end user.


Why is $F=ma$? Is there a straightforward reason?

Question: Why is force = mass $\times$ acceleration? I have searched in many sites but didn't actually get at it. Simply I want to know that if a mass in space moves (gains velocity thus further accelerates), how can I think, postulate and further believe that force = multiplication  of mass and its acceleration ?
Comment: It is worth remembering that physics (like all science) is at its heart *descriptive*. We seek a set of rules that allow us to correctly describe the world. And while we have some very powerful chains of reasoning that allow us to explain *why* certain complicated phenomena happen in terms of simple rules the foundation that every single one of those chains rests on is *"because the world is observed to work this way"*. The reason for $\vec{a} = (\sum \vec{F})/m$ is *"because the world is observed to work this way"*.
Comment: That's one of Newton's laws, which are to be taken as axioms in Newtonian mechanics. It also seems to describe the world around us pretty well. I don't know what you want.
Comment: @garyp: a spring scale measures force only because there is a known theoretical construct relating force and acceleration.  At heart, force is "amount of push", but how do you define this?  You can't, without making some appeal to a deeper law.  Your statement about inertial and gravitational mass belies this -- gravitational mass isn't a thing without a gravitational law.  There is no a priori reason that there should be such a thing as "gravitational mass"
Comment: That equation should be the definition of either mass or force.
Comment: @JerrySchirmer No.  Both mass and force (and acceleration) are defined as independent measurable quantities.  A balance measures mass, a spring scale measures force, and a meter stick and clock measure acceleration.  Newton's Second Law relates the three quantities.  (This leaves open the distinction between inertial mass and gravitational mass, but separate experiments can show that they are numerically the same.)
Comment: @garyp I think there is room for multiple interpretations on this matter, but for whatever it is worth Marion and Thornten disagree with you. Their Classical Mechanics text spends some time noodling around the idea of the second law as the (or at least *a*) definition of mass.
Comment: @JerrySchirmer  I was too glib. My point of view: come up with working definitions of quantities.  Physical laws are mathematical expressions that relate them.  The working definition of force is "what a spring scale measures".  No "known construct" is needed.  The justification comes from the fact that the laws work, are simple, and are universal.  Concerning gravitational mass, I should say that the mass that a balance measures works in both Newton's second law, and Newton's law of gravity (a mystery under Newton).  So yes, there are other points of view and I typed too quickly with my "No".
Comment: @garyp Well, force is only measured by a spring scale which has been defined to have a spring constant of 1 kg/m ($F=ke=1\times e = e$). However, the spring constant is dependent on force so this becomes sort of circular. As Jerry Schimer says '' a spring scale measures force only because there is a known theoretical construct relating force and acceleration. At heart, force is "amount of push", but how do you define this?''. Someone else may define 1 Newton using a spring scale with a different spring constant. However they too would arrive at $F=ma$.
Answer: I'm going to give you another approach.
Suppose that you were to perform the following experiments:
1.)
a) You happen to find a ball that is not moving. Well it's going to stay like that if we are in a place where the ball is not interacting with anything (air, gravity, etc.). Like this:

b) If you happen to find a ball that is moving with constant velocity, that is it moves in a straight line and it moves equal distances in equal times. Like this:

What we find is that if we are in a place where the ball is not interacting with anything (air, gravity, etc.). Something like this will happen Video of ball over ice. The ball will keep moving forever.
2.) Now suppose that the ball is not moving and you shot this arrow to move it, you have the same conditions as before:

As you can see the ball wasn't moving and now it is moving, so it accelerated. Suppose it has an acceleration $a_1$.
Now you look for a Weight scale and you find the mass of the ball:

You find that the mass is $m_1$.
Now you repeat the experiments with two balls of different masses, $m_1$ and $m_2$. That is you shot two arrows exactly the same.

As you can see the acceleration $a_2$ of the bigger mass is less that $a_1$ the one of the smaller one. If you multiply the two masses by its corresponding acceleration you find something 1  $S_1$ and something 2 $S_2$ , that is:
$$S_1=a_1\times m_1 \text{     and } S_2=a_2\times m_2$$
If you compare $S_1$ and $S_2$ you find that they are equal (BECAUSE OF EXPERIMENT !!):
$$S_1=S_2$$
This makes you think that the only thing that was the same in your experiment was the fact that you shot the arrows with the exact same conditions, so that thing that was the same is that we call force $F$. And we define that
$$F=S_1=S_2$$
We say that the arrows hit the balls with a force $F$ and we find that useful because it is a quantity that let us predict what is going to happen, that is what is going to be the acceleration.
So from that we have experimental evidence that
$$F=m_1\times a_1=m_2 \times a_2$$
If we consider some arbitrary mass and force, we generalize to this with the known equation:
$$F=ma$$
Answer: Let's break this down in two pieces.
First - the proportionality of force with mass. Imagine you need a certain force $F$ to accelerate a mass $M$. Now imagine that instead of one mass, you have two - each with mass $\frac{M}{2}$. Attach a piece of string to each. The total force on the two strings must be the same as before, so each string sees half the force for half the mass. This should convince you that $F\propto M$.
Now for the acceleration part. Imagine the same mass as before, but now it is mounted on a train:

If the train is accelerating with acceleration $a/2$, you feel a certain force on the string holding the mass which is accelerating with $a/2$ - and the same force on the string pulling the train. If the train is standing still, you can "reel in" the mass, and still need the same force. But once again, you will need to apply that force also on the outside of the train in order to prevent it from moving.
Now if I try to accelerate the mass inside the accelerating train, I have to add these forces together. There is the force I need to move the train+mass with acceleration $a/2$, and the force I need to counter the force of accelerating the mass relative to the train.
From the above it follows that each of these is the same force - so when I double the acceleration, I double the force needed.  It follows that force must be proportional to acceleration.
Putting these two together, you find
$$F \propto M\cdot a$$
The above only proves that $F$ is proportional to both mass $M$ and acceleration $a$ - the fact that it's actually $F=M\cdot a$ and not $F\propto M\cdot a$ is a matter of definition.
Comment: I do have that book; this is MIT introductory book on mechanics. You can go [here](http://books.wwnorton.com/books/webad.aspx?id=13632).
Comment: I realize the second argument needs to be constructed a bit more carefully. I will be back when I can make a diagram...
Comment: +1. The same approach of yours was followed by A . P. French, last century's MIT physics professor in his book.
Comment: @user36790 - do you happen to know what book it was?
Answer: Force comes to play when the body is moving with changing velocity.
To quote one author's statement is rather noteworthy:

Force is the agent that is at the forefront for the initiation of the motion & also responsible for change in the velocity.

The famous relation can be deduced intuitively by means of calculus.
If $v$ is the velocity of a body of mass $m$ at an instant $t$, then its momentum at that instant is given by $$p = mv$$. The time rate change of momentum of the body at that instant is $$ \dfrac{dp}{dt} = \dfrac{dmv}{dt}$$. Acc. to Newton's second law, $$P \propto \dfrac{dp}{dt} \implies P = k. \dfrac{dp}{dt} = k. \dfrac{dmv}{dt}$$ where $k$ is the constant of proportionality. Since, mass $m$ of the body is constant(it need not be, it can change & this can be given as a function of time), we may write, $$P = k. m\dfrac{dv}{dt}$$. But $$\dfrac{dv}{dt} = \text{acceleration of the body} = f$$. Hence, $P = k. mf$. Now, if we agree that force that produces unit acceleration on unit mass will be called unit force ($P = 1$), then the equation yields: $$ 1 = k\cdot 1\cdot 1 \implies k = 1$$.
Addendum :
An interesting historical fact, often overlooked, is that Newton's own statement of the basic law of mechanics was not in the form of $P = mf$; it appears nowhere in Principia. Instead, Newton spoke of the change of "motion" by which he meant momentum & related this to the value of the product of force & its time of application. In other words, Newton's version of the second law was essentially $$P\cdot\Delta t = m\Delta v$$.
I would also like to jot down A.P. French's way to prove the law:
A.P. French's deduction of 2nd law:-
Let an object is placed on a horizontal table pierced with holes through which air is blown from below. It is then possible to pull horizontally on the object & make observations as the following:

A spring, stretched by a constant amount, causes the velocity of the object to change linearly with time - the acceleration produced in a given object by a given force is constant.
If a second spring, identical with the first & stretched by the same amount, is used side by side with the first, the acceleration is doubled. That is, if we take a known multiple of a force, then the acceleration produced in a given object is directly proportional to the total force.

It thus becomes possible to write down simple equations expressing the above relation:
$$a = k.F \quad \text{or} \quad F = k' .a$$ where $k \quad , \quad k'$ describe the inertial properties of the particular object. Now, which result is more convenient??
Let's see:
If we place on the first object a second, identical object, it is observed that all accelerations produced by  given arrangements of the sprins are reduced to half of what was obtained with one object alone. We can express this most easily by choosing the second equation, so that the inertial property is additive. $$F = (k'_1 + k'_2) . a_{1 + 2} \implies a_{1 + 2} = \dfrac{F}{k'_1 + k'_2}$$. It is by such steps that one can be led to the equation that is universally known as "Newton's (second) law": $$ F = ma = m\dfrac{dv}{dt}$$ where $m$ is the inertial mass of the object identical with $k'$ above.
Comment: This is circular reasoning. If one **defines** $p=mv$ and **postulates** $dp/dt \propto F$ then sure $F=ma$. So $F=ma$ because $F=ma$ ...
Comment: I think you need a dot over the $P$ in your last equation, right?
Comment: Who are you quoting?
Comment: @Marcel Köpke: Newton's second law is an established fact. Here, we are not questioning about the validity of second law but rather we have to find the relation between force and acceleration. Now, one can ask whether acceleration is proportional to force or vice versa. So, this is not a circular reasoning . You are not proving the second law but rather using it to find the quantitative picture of the law.
Answer: If a particle is left alone in an inertial system, it will travel on a straight line, that is
$$ \frac{d\vec{v}}{dt} = 0 \tag1 $$
it will not change the magnitude and direction of its velocity. This is an empirical fact. So if a particle does change its velocity the right hand side of (1) is not zero. Lets call it $\vec{A}$:
$$ \frac{d\vec{v}}{dt} =: \vec{A} \tag2 $$.
This is rather a definition for $\vec{A}$, because one can only measure the change in position and then assign a value for $\vec{A}$. Lets assume we know the cause of $\vec{A}$, e.g. because we applied the action of spring under tension to our particle. Furthermore we observed that $\vec{A} = \textrm{const.}$. If we now apply the same action to a second particle of double the mass what we will empirically observe is
$$ \frac{d\vec{v} \ '}{dt} = \frac{1}{2} \vec{A} $$.
This suggests that $\vec{A}$ is not an intrinsic property of the action (since we changed the particle and not the action) but rather $m\cdot\vec{A}$ is.
One can now repeat that process with particles that don't differ in mass but for example in color, volume, etc. What one will find is that really only $\vec{A}$ and $m$ matter.
Lets give that intrinsic property of action a name and call it force:
$$ \vec{F} := m \cdot \vec{A} \ \underbrace{=}_{(2)} \ m \frac{d\vec{v}}{dt} = m \vec{a}$$
with $\vec{a}$ the acceleration of the particle. So the formulation of the equation of motion is the desire to find an expression with quantities that belong to delimitable subsystems only. In this sense $\vec{F}$ is an abstract quantity that is by definition equal to $m\vec{a}$.
Answer: The acceleration is the effect on the objects motion due to the cause(s), which is the vector sum/total of the forces acting on the object, i.e. the total force (composed of many forces) is responsible for the acceleration (which is just one vector).
The mass is just the constant of proportionality that links total force and acceleration.
Answer: Simply put, it's a correlation between a certain action (applying force on a given mass) and reaction (gaining or losing velocity). The mass is a just a factor that was found to give accurate predictions in the world Newton lived in (relativity theory introduced a slight modification).
Both force (over time or distance) and velocity represent energy, that's why there's a direct relation between them.
This relation is held via the multiplication operator because of the type of proportionality between these qunatities, as observed in nature.
Answer: It's from the definition of mass, from this website, the definition of mass is

Mass, in physics, quantitative measure of inertia, a fundamental property of all matter. It is, in effect, the resistance that a body of matter offers to a change in its speed or position upon the application of a force. The greater the mass of a body, the smaller the change produced by an applied force.

and the definition of the unit of force, the Newton, from here

A newton is defined as the force which gives a mass of 1 kilogram an acceleration of 1 metre per second, per second

Once those terms have been defined the relation $F=ma$ follows from the definitions.


Color vision across species

Question: Is it true that color vision is sex-linked for all species with binary sexes? Is there an evolutionary significance to the fact that color vision is X-linked in humans? E.g., only female humans can be tetrachromats.
Comment: The cultural significance of X-linked color blindness would be POB, I would guess.
Comment: POB= primarily opinion based.
Comment: Welcome to Biology! What exactly do you mean with *color differentiation*? Note that one out of three cone opsins is coded on an autosome
Comment: Thanks!  I just mean having fewer or extra cones in general, I suppose.  Since colorblindness and tetrachromacy are both strongly associated with a single sex in humans, I was just curious whether that was a trend in other species.
Comment: I agree with @anongoodnurse and have removed the cultural aspect from the question. Please feel free to roll back though.
Comment: Thanks for the edits.  But sorry, what's POB?
Answer: Short answer
Human females do not benefit much from an extra cone class, as color discrimination is hardly affected in most tetrachromats. In fact, tetrachromats often show increased error rates in their color discrimination. In dichromatic New World monkeys the heterozygous females do functionally benefit from their extra cone as they gain trichromatic vision.
Background
Anomalous trichromats have all of their three cone types to perceive colors, but one type of cone perceives light slightly out of alignment. There are three different types of effect produced depending upon which cone type is affected.
The different anomalous conditions are protanomaly (reduced sensitivity to red light), deuteranomaly (reduced green sensitivity - the most common type) and tritanomaly (reduced blue sensitivity - extremely rare). People with deuteranomaly and protanomaly are collectively known as red-green colour blind and they generally have difficulty distinguishing between reds, greens, browns and oranges. They also commonly confuse different types of blue and purple hues. Red and green cones are indeed coded on the X-chromosome.
One source of variation is the very common Ser180Ala polymorphism that accounts for two spectrally different red pigments and that plays an important role in variation in normal color vision as well as defective color vision. The most common source of variation is the existence of several types of red/green pigment chimeras. The red and green-pigment genes are arranged in an array on the X-chromosome with one red-pigment gene followed by one or more green-pigment genes. Recombination events have given rise to red/green hybrid genes and deletion of the green-pigment genes. Only the first two genes in the tandem are expressed. The severity of red-green color vision defects is inversely proportional to the difference between the wavelengths of maximal absorption of the photopigments encoded by these two genes.
Females who are heterozygous for red and green pigment genes that encode three
spectrally distinct photopigments have the potential for enhanced color vision, as they are effectively tetrachromats (Deeb, 2005, Neitz et al., 1991). However, sensitive color-contrast testing on 43 tetrachromats has revealed that most of these females have no deviating color-discrimination whatsoever. 8 subjects showed relatively small effects, while only one showed a clear increased sensitivity in a narrow range of frequencies. It is believed that the human visual system is not plastic enough to cope with the extra spectral input. In fact, in the group there was an overall increase in error rates on some color tests (pseudoisochromatic plates, and Nagel anomaloscope color matching) (Jordan & Mollon, 1993).
In New World Monkeys, however, the situation is different. Squirrel monkeys are basically a dichromatic species, but two-thirds of the females are heterozygous, and gain trichromatic vision by expressing two of three possible alleles coding for pigments in the middle- to long-wave range of the spectrum. X-chromosome inactivation serves to segregate the alternative allelic products in different subsets of cones. The visual system of the heterozygous female is apparently plastic enough to take advantage of the presence of three classes of cone, because heterozygous monkeys have enhanced color selectivity in the red-green range that are impossible for all males and for homozygous females. This advantage perhaps enables the heterozygote to judge better the ripeness of fruit, or to find fruit or conspecifics (Jordan & Mollon, 1993).
Note that the emergence of trichromacy in humans and some other primates was the result of the red/green gene duplication. Trichromacy in primates was evolutionary selected for likely because of the enhanced capability to discern (ripe) fruits (Lucas et al., 2003). It has nothing to do with sex-differences, because not many human females benefit from tetrachromacy in terms of enhanced color vision.
References
- Deeb, Clin Genet (2005); 67: 369–377
- Jordan & Mollon, Vis Res (1993); 33(11): 1495-1508
- Lucas et al., Evolution (2003); 57(11): 2636–43
- Neitz et al., Science (1991); 252(5008): 971-4
Further reading
- Is our color vision calibrated to sky, vegetation, and blood?

Color vision across species


AMD Driver / No OpencL platforms found / AMDGPU installation

Question: Using a fresh install 17.04 lUbuntu
Fairly new to Ubuntu and as often is my problem any help I try to find is way more advanced than I can follow.
I'm trying to use test my AMD R9 290 card for mining using Genoils miner. I tried it on Windows before installing Ubuntu and that worked fine.
The problem is when I try to get it working I get this error:
[OPENCL]:No OpenCL platforms found
[OPENCL]:
Listing OpenCL devices.
FORMAT: [deviceID] deviceName

I know at least some OpenCL related packages are installed.
As I understand it I should use an open source driver called AMDGPU instead of AMD's driver. But I can't figure out if it's already installed or if not how to install it. The AMDGPU page mentions some xf86-video-amdgpu that I get "unable to locate" on.
I tried AMD's own proprietary driver and with that installed OpenCL works but I then get an error that i have the wrong DRM version: "amdgpu_device_initialize: DRM version is 2.45.0 but this driver is only compatible with 3.x.x."
As I understand it AMDGPU uses 3.x.x while AMD's own driver uses 2.x.x.

So from what I've found out you can use this command to check if you're using the open source AMDGPU
lspci -nnk | grep -iA2 vga

If the kernel driver in use says "radeon" rather than "fglrx" it's using AMDGPU.
I blacklisted AMD's driver using the instrucitons on the AMDGPU page:
/etc/modprobe.d/radeon.conf

blacklist radeon

(Although I find it a bit odd that it here should say "blacklist radeon" while the kernel driver (using the command above) should report "radeon" with AMDGPU)
Anyway I was still unable to get it to work with OpenCL. OpenCL still reported no devices. From what I've learned this seems to be because many things including OpenCL aren't fully supported on newer Ubuntu versions like my 17.04. Best might be Ubuntu 14 for this.
In the end I took the easy way out and installed Windows 10 using an old key :f When I get some more time I will try again using an old Ubuntu release and see if I can get it working.
Answer: The solution for me was: Booting into Kernel 5.4.0-54 and the amdgpu-pro Driver 20.20-1098277 on Ubuntu 20.04.2 LTS with deactivated Secureboot


Hyundai Tucson dash lights

Question: Today, I was in a rental vehicle (Tucson, fairly new model) and noticed this which I hadn't in any vehicles before:
Inserting the key and turning it (without  starting the engine, but just before) makes all the lights in the dash appear and then go away except check-engine light, battery light and engine oil light.
I was under the impression that if any light persists, then that service is needed. However,  these 3 persistent lights disappear once the engine starts. I am confused as to why just these three lights persisted just before ignition.
Answer: The engine oil stayed on because it indicates low oil pressure, theres no oil pressure until the engine is running.
The battery light stayed on because it indicates the alternator isn't charging. It doesn't charge until the engine is running.
The check engine light stays on until the engine is running. It turns off when the engine is running with no faults.
90% of cars do exactly this.
Answer: As stated by @Terry Gould, most cars do this. All the lights turning on is a bulb-check feature, or at least, that's what I've been using it for :) The lights that stay on is explained by Terry.
You should only worry about lights that stay on while the engine is running.

Hyundai Tucson dash lights


Shared ground for 3 circuits

Question: My septic system requires 3 circuits.  A 10Amp & 2 20Amps. Using schedule 40 conduit in a 80ft run underground to the 3 pole  emergency service disconnect. Can these three circuits share a ground? And if so what size does it need to be?
Comment: The way you distinguish neutrals is with electrical tape.  Obviously you can put gray or white tape on white or gray wire.  But you can *also* put colored tape on white wires, because in conduit, it is not allowed to remark white wires to be hot.  Therefore red tape on a white wire signifies it not as a hot, but red's neutral.
Comment: @manassehkatz -- striped THHN is a thing for these applications ;)
Comment: I don't know if you can combine the grounds or not. But everything I've read says "don't pull 3 12/2, pull the equivalent separate conductors and you can get them in different colors so that you don't get confused (well, at least for the hots - 3 neutrals may be a problem since they'd be white or grey and that's only 2 colors, unless *grey* and *gray* look different :-) ). But a small subpanel seems to make sense - they are very inexpensive.
Answer: On sharing ground, that's not a problem, it just needs to be sized for the largest circuit. You are vanishingly unlikely to have a ground fault on 2 circuits at once.   However:
You're up against a NEC 225.30 limit.  You can only run one feeder or circuit to an outside location, unless they are

Different voltages, frequencies, or uses. For example, control of outside lighting...

For instance, you can't run two 120V circuits out there.  You can, however, run two 120V circuits if one of them is switched inside the house.
You can also run, separately, a 120V, 120/240V, and 240V-only circuit.
So that gives you a fair variety.  Two 120V circuits can be accomplished as a 120/240 multi-wire branch circuit.
And then, of course, each circuit controlled differently  is entitled to a circuit - e.g. each section of outside lighting.  So if there's any question of putting the well pressure switch at the head vs at the house, put it at the house - it gives you a free circuit.
In fact, hold on -- won't that well pump be 240V*?  Of course it will.  Your shutoff needs to operate on every hot, so you need 2 blades in your shutoff switch just for the pump. Fortunately, you can have multiple shutoff switches, up to 6.

* By the way, the reason pumps are 240V is voltage drop -- it's not the run from house to well that gets ya, it's the run down the well, which can be hundreds of feet. Well pumps are at the bottom.
Comment: So you'd have to size the ground for 50A in this case?
Comment: @isherwood no, just 20A.
Comment: Assuming just a single fault at a time?
Comment: @isherwood right.
Answer: Eighty feet is a long run. You will likely encounter some line loss at this distance. I would increase the wire gauge by one greater for each of the circuit's conductors in order to reduce the amount of resistance through the wires and therefore the amount of voltage drop. Watch your conduit fill! Always better to go with a sligtly larger sized conduit in case you have need for more conductors in the future. And larger gauge conductors will also affect your box fill calculations. Spend a bit more money and get the larger sized boxes and larger diameter conduit from the beginning.

Shared ground for 3 circuits


Specific adjective to qualify a religion

Question: I am looking for a word to describe a religion which is flexible or liberal enough to accept a variety of folk beliefs, magical practices, other demons etc.
The author (translator) of the text which I am editing used "absorbent religion" (the text was translated from Polish), but I am quite sure there is a much better word, which seems almost on the tip of my tongue, nevertheless I am unable to conjure it up. Some help would be much appreciated.
PS.This is an academic paper about an ancient religion.
Answer: If the adaptation represents a substantial, rather than formal or stylistic change, then the word you are looking for is synchretic.
If the adaptation is merely a change of form dictated by the language and culture of a particular group, but the belief system is not changed in any fundamental way, then one could speak of acculturation.
Your author, however, may have intentionally avoided this terminology and opted for something more neutral, which you could translate as, say, flexible.


Cognitive science/brain sciences and their impact on philosophy of mathematics

Question: How does/did cognitive science influence philosophy of mathematics? I saw somewhere (Wikipedia, "Cognitive science") that it helped to create new perspective on philosophy of mathematics, but it did not mention how it influenced.
Answer: Following the Wikipedia page on Philosophy of Mathematics (linked from the article you cited) would lead you to the Embodied Mind theory, and further, to the canonical explication of this theory in George Lakoff's Where Mathematics Comes From.
For future reference: if an uncited claim in Wikipedia includes a link, follow the link-- the citation may be on the other side.


Cats inhaled diatomaceous earth

Question: My cats had fleas so I used diatomaceous earth around the apartment. After vacuuming, a lot of dust filled the air but I opened all the doors to ventilate the air. After some hours the dust in the air went away for the most part. I cleaned everything up but there are still small areas here and there that need dusting or wiping. After cleaning I realized I used non food grade diatomaceous earth which I know is high in crystallized silica. I cleaned and vacuumed over and over and gave the cats baths to get any powder off of them. I put an air purifier and changed the air filter. I scheduled a vet visit to have the vet listen to their lungs. Should I be worried? Can this cause death in cats? My cats have been acting completely normal so far and this happened 2 days ago.
Comment: Just an fyi in case of need in the future: the tiniest particles are the ones which do the most damage, because they're the ones that can get deep into the lungs. Unless you're using a vacuum with a HEPA filter on it, vacuuming traps the larger particles and sends the much more dangerous ones back into the air for you to breathe in. One exposure is unlikely to do much damage, and if there is any damage, it will be in the distant future, not immediate. (You did everything else that could be done, but if you see any silica dust, try wiping it up with a damp cloth; that causes no harm at all.)
Comment: "Food-grade" DE is safer than non-food grade because the particle sizes are larger, but it does contain small amounts crystalline silica. Non-food grade DE contains more crystalline silica than food grade. High (not one-time) exposure to amorphous silica can cause lung disease. All forms of silica (maybe with the exception of silica gel) should be used with some caution.
Comment: I actually found out that the DE I used is made out of amorphous silica rather than crystallized silica. Made me feel a little better.
Answer: A one-time exposure should have limited effect, despite being something obviously to be avoided regardless. Quoting from section "safety considerations" on Wikipedia (emphasis mine):
Inhalation of crystalline silica is harmful to the lungs, causing silicosis. Amorphous silica is considered to have low toxicity, but prolonged inhalation causes changes to the lungs. Diatomaceous earth is mostly amorphous silica but contains some crystalline silica, especially in the saltwater forms. In a 1978 study of workers, those exposed to natural diatomaceous earth for over five years had no significant lung changes while 40% of those exposed to the calcined form had developed pneumoconiosis. Today's common diatomaceous earth formulations are safer to use, as they are predominantly made up of amorphous silica and contain little or no crystalline silica.
(...)
In the 1930s, long-term occupational exposure among workers in the cristobalite diatomaceous earth industry who were exposed to high levels of airborne crystalline silica over decades were found to have an increased risk of silicosis.

Note that the study considered exposure over a period of five years, and yet a good portion of the probands were unaffected.
Considering work safety regulations, or rather the lack thereof, in the 1930s, one would assume that "exposure over decades" in this context means more or less breathing in the stuff constantly. Still, suffering from silicosis after enduring this for an entire career apparently wasn't guaranteed, but the risk was considerable.
This would suggest that short-term exposure poses relatively little risk.
Nonetheless, care should always be taken when using anything in the household, chemicals or otherwise, with pets around.
Best practice we've been following is to thoroughly check possible health hazards for our pets, and if something isn't proven harmless, we are looking for alternatives.

Cats inhaled diatomaceous earth


Is there any good database for aircraft technical specifications?

Question: Due to using them in my application, I am looking for a database(or guide) of aircraft technical specifications. Is there any source for it(preferably free).
Comment: What kind of technical specifications are you looking for? Manufacturer published marketing specifications such as speed and range? Flight operating specifications such as flap and gear speeds or CG range? Maintenance specifications such as brake wear limits?
Comment: Welcome to aviation.SE! This seems like a very broad topic, are you interested in some specific type of aircraft?
Comment: @Pondliffe, thank you. I am interested all kind of active aircraft. I try to create a quick guide for users who are interested in finding proper aircraft according to their demands.
Comment: At the beginning, I would like to have basic specifications such as speed, range, etc. Afterward, It 'd be good to have more details.
Answer: One word for the definitive authority on this subject: Jane's.  They'll get you anything you want to know - if the price is right.
Another good source, especially for military aircraft is The Military Analysis Network, run the Federation of American Scientists (FAS).  Great information database and it's free, too!
As with so many other subjects, Wikipedia remains an excellent source of information on aircraft.  It is not a recommended source to cite for writing technical publications of your own, but is a excellent internet portal to additional information and resources e.g. books, periodical articles, etc.
Comment: I've always figured Jane's must employ a network of spies and informants to get the data they have. I would look at their diff and think there's no way the military wants this stuff to be public knowledge
Comment: +1 for Jane's - the aeronautical engineer's bible! Worth adding the best place to view a copy for free is a university library.
Comment: It is worth noting, however, that, while ubiquitous and amazingly thorough, Janes is not something to take at face value.  I worked for a short while at Sikorsky Aircraft doing competitive analysis and typically found that, while they are true, the performance characteristics are either recorded for a vague flight condition, different flight conditions, or something else of the sort.  You have to very careful in order to use Janes and still compare apples to apples.


magento 2 preferences - what to extend

Question: I have a question about m2 preferences (overwriting core modules). Whenever I overwrite a core module, do I have to inject all the classes the same way original class does? Also what should I extend? The class that I'm trying to overwrite or the class that the overwritten class is extending?
Answer: Your class should extend the one that you're overwriting. It should contain the same parameters at a minimum because your constructor needs to call the parent constructor with the original parameters in order, i.e. parent::__construct($context, $data);. You can of course inject additional classes to use in your child class.

magento 2 preferences - what to extend


What is the difference between #+TBLNAME and #+NAME in org-mode

Question: What is the difference between giving a table a name using #+TBLNAME and #+NAME in org-mode?
Answer: Org mode 8.2.10 is very old. If you can, you should upgrade. TBLNAME is deprecated (since version 8.3.4) : you should not use it any longer. It is still (in version 9.3) recognized for backward compatibility but it is likely to go away at some point. As for the link behavior mentioned in your answer, in recent versions of Org mode, [[a and b]] still results in the No match question, but [[c and d]] is a fully functioning link to the corresponding table.
Answer: Given two tables below only the one named using NAME can be
referenced in prose with a navigable link.
#+TBLNAME: a and b
| a | b |
| 1 | 2 |

#+NAME: c and d
| c | d |
| 1 | 2 |

The link [[c and d]] will not be navigable with C-c C-o while attempting
the same with the link [[a and b]] will result in the user being asked:

No match - create this as a new heading? (y or n)

But this is only part of the answer, there surely are more differences
than this.
This is with org-mode 8.2.10 released with Emacs 25.2.2.


jQuery open all slider elements then jump to anchor link

Question: Goal: I have some existing content (a lot of text and multiple pages) that I'm updating to hide/segment in a dynamic jQuery slider (creator's demo page & code here). However, the content is full of internal links in various locations, that I don't want to have to update individually.
Solution possibilities I came up with: (a) create jQuery to automatically detect which slider div the anchor is inside of, and automatically open that, or (b) if the URL contains a hash tag, trigger the openAll function to open all the sliders, and then after that, scroll to the anchor location.
Issues: I'm new to this. I went with option B and think my code has the right idea, but it breaks the page. Ideas?
var hash = location.hash.replace('#', '');
$('body').find('ul'+hash+':first');
function hashload {
if(window.location.hash) {
    $('.collapsible').openAll();
    $('html, body').animate({
    scrollTop: $('#'+hash).offset().top}, 'fast');}}

Relevant resources that might have the key to it all (aka what I was basing this on...):
Link to an anchor within JQuery tabbed content (and the accompanying solution here: http://jsfiddle.net/TGMDd/65/)
don't execute script if url contains # ...and:
Getting URL hash location, and using it in jQuery
JQuery scroll to anchor on click?
Many thanks for your time!
Answer: Assuming that $('.collapsible').openAll(); works, try removing this line:
$('body').find('ul'+hash+':first');

It does not appear to be doing anything valid.
The selectors are incorrect.

it should look something like:
$(document.body).find('ul.'+hash+':first');


Can I use diaphragm accumulators to maintain consistent water pressure?

Question: This is needed for a place where there's a high pressure water but not always available.
Answer: Normal domestic water diaphragm accumulators (usually bladder accumulators are used) would not be feasible as they are used with a pump that cuts off when max tank pressure is reached. When you say "use them as a water source" please give an idea of estimated capacity needed at what pressure.  Perhaps you should be using a simple raised atmospheric accumulator (water tower) that relies on gravity to supply pressure when your "high pressure water" is not available. 8 to 10 meters height should give enough usable pressure, higher = more pressure.
Comment: Thanks for your time. This is intended for indoor use, so raising a tank is not possible. The capacity of 2 average size bladder accumulators will do. This for emergency use when building water is not available. The building water's pressure is higher than average, so why not connect it to a bladder accumulator and fill it to the maximum point possible, then when building water is no longer available, I use it as a water source? I need an average or a bit below average pressure, something to keep me going for few hours till  building water (main source) is available again @jimmy-Fix-it
Comment: One more thing, the bladder accumulators will be placed next to the place where they will be used. No real distance, no height difference (I can raise them a couple of meters if necessary).
Answer: Yes, no reason this can't work, within the limits of the pressure tank (alternate name for "bladder accumulator" not that there is anything incorrect about that term - suspect it's regional differences in terms.) The one on my well pump system stores ~30 liters of water, but they come in many sizes and can be combined, so you should be able to store as much as you like within the limit of providing space for them.
Certainly far more practical than trying to create a piston to do the same job, per your other question. You will need to be sure that your accumulator is safe for use at the "higher than average pressure" of your building, or that you use a pressure regulator to reduce the pressure to the maximum that is practical for the accumulator; and you will need a check valve (one-way valve) on the input so that your accumulator does not send water back into the building when the water pressure falls.
You may also need to provide yourself with a pair of pressure gauges - one on the incoming line before the check valve, and one on your side of the check valve, or you won't know when the building pressure has fallen and you are using the limited supply of water you have stored.
There is no need to elevate the accumulator - internal air pressure on the bladder full of water or diaphragm separating water and air provides the pressure, not elevation of the tank.
Responding to comments The type of pressure tank I am most familiar (in the modern era - I do have experience with the old air over water tanks, and I hate them) has either a bag/bladder or diaphragm which separates a captive air charge from the water. The captive air charge is pre-pressurized to a few psi below the lowest expected working pressure (so on my well pump, the tank is pressurized to 38PSI, the pump starts at 40 PSI, and the pump stops at 60 PSI.) At 2.7 feet per PSI, moving the tank up 2 meters/6+ feet makes barely over 2 PSI difference - the last bit of water to come out of the tank (if the pump is shut off and does not start) comes out at 38PSI (due to the pre-charge on the tank) so there's no practical difference in moving it higher.
In setting a tank used the way you describe, the air charge pre-pressuerization will need to be set so that the maximum pressure does not exceed the flexibility of the diaphragm/bladder and burst it. Whatever that setting needs to be will define the lowest pressure you will get from the system just as the last bit of water runs out of it. The input pressure will determine the highest pressure you can expect (unless it's too high for the tank/accumulator at all, in which case you will need a pressure regulator to lower it, and THAT will set the lowest pressure you can expect.) There is a trade-off - the higher the pressure, the less water your tank will store - the lowest values typical in household water system here are "On at 20, off at 40" (Pounds per square inch - roughly 1.4bar to 2.7 bar) and for any given tank, that will store the most water. "On at 30, off at 50" and "on at 40, off at 60" are other common values for cycling well-pump type systems. Municipal systems are, I think, commonly regulated to below 100 or perhaps 80 PSI if the system pressure is higher than that at a given house.
Other than price, it makes no difference if you have 400 tiny pressure tanks or one big one, if the specifications are otherwise the same. I shopped on both physical size (what would fit into my space) and price per capacity of tank (where there was definitely a minimum at a certain size, so two of that size where cheaper to purchase than one twice as large - but the larger one would be more space efficient and require less plumbing.)
Comment: Thanks for your time. I have a question, how to maximize the output pressure? Giving the input pressure (of main water source), how many accumulators and what size and pressure should I go with? For example, would using many small accumulators with low pressure yield more pressure than few big ones with higher pressure? I also need to calculate the pressure I should be expecting before spending money to see if it's worth it.  I'm fine with using up to 4 accumulators. @ecnerwal
Comment: "There is no need to elevate the accumulator" what I meant is to preserve the output pressure of the accumulator instead of having it decreased  due to height difference.
Comment: Would it just be better to get one big pressure tank? Better in terms of output pressure, not cost. I'm looking for maybe 40-80 liters of capacity. Point of use will be right next to the tank. @ecnerwal


Where is documentation for $entity->data property? I.e. $commerce_order->data

Question: I've searched google and the Drupal API, but I can't seem to find documentation for the data array that serializes/unserializes automatically that is attached to entities and stored in the data column on some entities, particularly commerce_order. Searching for the world "data" is like searching for the word "the." Where/how is the data array serialized and unserialized?
Comment: I'm voting to close this question as off-topic because it's a "requests for tutorials and other online resources", forbidden in [Help Center](http://drupal.stackexchange.com/help/on-topic).
Comment: Maybe it should be rephrased, then, to how the entity attribute 'data' is serialized and unserialized? Just wondering
Comment: Updated to reflect a question about how serialization/unserialization happens rather than a request for resources.
Answer: The data attribute is part of the Commerce Entity definitions, and I think this might be part of the larger de facto Entity API setup for contrib entities (don't quote me on that ;).)
If you want to find the documentation on properties and how they are handled you need to review the EntityController class, which each Commerce module has in its includes folder.
commerce_order.controller.inc#n135
<code>/**
 * Unserializes the data property of loaded orders.
 */
public function attachLoad(&$queried_orders, $revision_id = FALSE) {
  foreach ($queried_orders as $order_id => &$order) {
    $order->data = unserialize($order->data);
}
</code>
The database layer automatically serializes, if I recall correctly. However controllers need to unserialize.
Hopefully this this question and other entity related items (also make sure to review hook_entity_info() implementation.)


Why do alpha particles get deflected by gold foil even though net electric field inside a metal is zero?

Question: The electric field in metal is zero in electrostatics. But in the Rutherford gold foil experiment, alpha particles get deflected from the gold foil showing the presence of an electric field there. I don't understand this contradiction.
Comment: Because if you get close to a gold nucleus (inside the electron cloud) you sense the charge on the nucleus - it is no longer screened by the electrons.
Comment: *net field* at macro distances is quite different from *local field* at atomic distances
Answer: The gold foil is overall neutral. That is correct. The nuclei of the gold atoms, like every other atomic nucleus, are positively charged. In Rutherford's gold foil atoms, the gold foils are bombarded with $\alpha$-particles ($He^{2+}$). Most of the $\alpha$ particles pass through the gold foil without any appreciable deflection because of a lot of intra-atomic "free space". A small fraction passes near the gold atoms and gets deflected by large angles. The $\alpha$-particles that collide head-on with the gold nuclei are reflected. Gold is chosen, because it is a heavy metal with a massive nucleus, which also has the convenient property of being very malleable. This helps with making the foil extremely thin (of the width of a thousand atoms).
Comment: None of your words is an answer to the question.
Comment: @Swami My answer describes what happens at the atomic scale in Rutherford's gold foil experiment. The overall neutrality of the gold foil is explained by the number of protons and electrons being equal. The interactions between the alpha particles and the nuclei arise because there is no screening effect by the electrons near the gold nuclei.